Skip to content

Commit 18e6b59

Browse files
Update to Chromium revision 248478.
- Add new CefSettings.windowless_rendering_enabled value that must be enabled when using windowless (off-screen) rendering. - Improve naming and documentation for CefWindowInfo members. - CefBeginTracing now completes asynchronously. - Rename CefEndTracingAsync to CefEndTracing. - Rename CefCompletionHandler to CefCompletionCallback. git-svn-id: http://chromiumembedded.googlecode.com/svn/trunk/cef3@1592 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
1 parent 3a32bc3 commit 18e6b59

File tree

100 files changed

+1115
-1048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+1115
-1048
lines changed

CHROMIUM_BUILD_COMPATIBILITY.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717

1818
{
1919
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
20-
'chromium_revision': '242756',
20+
'chromium_revision': '248478',
2121
}

cef.gyp

+4-2
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,6 @@
868868
'<(DEPTH)/ui/gl/gl.gyp:gl',
869869
'<(DEPTH)/ui/ui.gyp:ui',
870870
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
871-
'<(DEPTH)/webkit/glue/webkit_glue.gyp:glue',
872871
'<(DEPTH)/webkit/storage_browser.gyp:webkit_storage_browser',
873872
'<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
874873
# Necessary to generate the grit include files.
@@ -1037,6 +1036,8 @@
10371036
'libcef/common/value_base.h',
10381037
'libcef/common/values_impl.cc',
10391038
'libcef/common/values_impl.h',
1039+
'libcef/common/upload_data.cc',
1040+
'libcef/common/upload_data.h',
10401041
'libcef/renderer/browser_impl.cc',
10411042
'libcef/renderer/browser_impl.h',
10421043
'libcef/renderer/content_renderer_client.cc',
@@ -1279,6 +1280,7 @@
12791280
'mac_bundle_resources': [
12801281
'<(PRODUCT_DIR)/cef.pak',
12811282
'<(PRODUCT_DIR)/devtools_resources.pak',
1283+
'<(PRODUCT_DIR)/icudtl.dat',
12821284
'libcef/resources/framework-Info.plist',
12831285
],
12841286
'mac_bundle_resources!': [
@@ -1635,7 +1637,7 @@
16351637
'<@(includes_win)',
16361638
# TODO(cef): Remove ui_unscaled_resources.rc once custom cursor
16371639
# resources can be loaded via ResourceBundle. See crbug.com/147663.
1638-
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
1640+
'<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
16391641
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
16401642
'libcef_dll/libcef_dll.rc',
16411643
],

cef_create_projects.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@echo off
2-
..\third_party\python_26\python.exe tools\gclient_hook.py
2+
python.bat tools\gclient_hook.py

cef_paths.gypi

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@
138138
'libcef_dll/ctocpp/client_ctocpp.h',
139139
'libcef_dll/cpptoc/command_line_cpptoc.cc',
140140
'libcef_dll/cpptoc/command_line_cpptoc.h',
141-
'libcef_dll/ctocpp/completion_handler_ctocpp.cc',
142-
'libcef_dll/ctocpp/completion_handler_ctocpp.h',
141+
'libcef_dll/ctocpp/completion_callback_ctocpp.cc',
142+
'libcef_dll/ctocpp/completion_callback_ctocpp.h',
143143
'libcef_dll/ctocpp/context_menu_handler_ctocpp.cc',
144144
'libcef_dll/ctocpp/context_menu_handler_ctocpp.h',
145145
'libcef_dll/cpptoc/context_menu_params_cpptoc.cc',
@@ -300,8 +300,8 @@
300300
'libcef_dll/cpptoc/client_cpptoc.h',
301301
'libcef_dll/ctocpp/command_line_ctocpp.cc',
302302
'libcef_dll/ctocpp/command_line_ctocpp.h',
303-
'libcef_dll/cpptoc/completion_handler_cpptoc.cc',
304-
'libcef_dll/cpptoc/completion_handler_cpptoc.h',
303+
'libcef_dll/cpptoc/completion_callback_cpptoc.cc',
304+
'libcef_dll/cpptoc/completion_callback_cpptoc.h',
305305
'libcef_dll/cpptoc/context_menu_handler_cpptoc.cc',
306306
'libcef_dll/cpptoc/context_menu_handler_cpptoc.h',
307307
'libcef_dll/ctocpp/context_menu_params_ctocpp.cc',

include/capi/cef_callback_capi.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ typedef struct _cef_callback_t {
6969
///
7070
// Generic callback structure used for asynchronous completion.
7171
///
72-
typedef struct _cef_completion_handler_t {
72+
typedef struct _cef_completion_callback_t {
7373
///
7474
// Base structure.
7575
///
@@ -78,8 +78,8 @@ typedef struct _cef_completion_handler_t {
7878
///
7979
// Method that will be called once the task is complete.
8080
///
81-
void (CEF_CALLBACK *on_complete)(struct _cef_completion_handler_t* self);
82-
} cef_completion_handler_t;
81+
void (CEF_CALLBACK *on_complete)(struct _cef_completion_callback_t* self);
82+
} cef_completion_callback_t;
8383

8484

8585
#ifdef __cplusplus

include/capi/cef_cookie_capi.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,11 @@ typedef struct _cef_cookie_manager_t {
120120

121121
///
122122
// Flush the backing store (if any) to disk and execute the specified
123-
// |handler| on the IO thread when done. Returns false (0) if cookies cannot
123+
// |callback| on the IO thread when done. Returns false (0) if cookies cannot
124124
// be accessed.
125125
///
126126
int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self,
127-
struct _cef_completion_handler_t* handler);
127+
struct _cef_completion_callback_t* callback);
128128
} cef_cookie_manager_t;
129129

130130

include/capi/cef_trace_capi.h

+7-5
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ extern "C" {
4343
#endif
4444

4545
#include "include/capi/cef_base_capi.h"
46+
#include "include/capi/cef_callback_capi.h"
4647

4748

4849
///
@@ -68,9 +69,9 @@ typedef struct _cef_end_tracing_callback_t {
6869

6970

7071
///
71-
// Start tracing events on all processes. Tracing begins immediately locally,
72-
// and asynchronously on child processes as soon as they receive the
73-
// BeginTracing request.
72+
// Start tracing events on all processes. Tracing is initialized asynchronously
73+
// and |callback| will be executed on the UI thread after initialization is
74+
// complete.
7475
//
7576
// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
7677
// pending, CefBeginTracing will fail and return false (0).
@@ -84,7 +85,8 @@ typedef struct _cef_end_tracing_callback_t {
8485
//
8586
// This function must be called on the browser process UI thread.
8687
///
87-
CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories);
88+
CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
89+
struct _cef_completion_callback_t* callback);
8890

8991
///
9092
// Stop tracing events on all processes.
@@ -99,7 +101,7 @@ CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories);
99101
//
100102
// This function must be called on the browser process UI thread.
101103
///
102-
CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file,
104+
CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
103105
cef_end_tracing_callback_t* callback);
104106

105107
///

include/cef_callback.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class CefCallback : public virtual CefBase {
6363
// Generic callback interface used for asynchronous completion.
6464
///
6565
/*--cef(source=client)--*/
66-
class CefCompletionHandler : public virtual CefBase {
66+
class CefCompletionCallback : public virtual CefBase {
6767
public:
6868
///
6969
// Method that will be called once the task is complete.

include/cef_cookie.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ class CefCookieManager : public virtual CefBase {
136136

137137
///
138138
// Flush the backing store (if any) to disk and execute the specified
139-
// |handler| on the IO thread when done. Returns false if cookies cannot be
139+
// |callback| on the IO thread when done. Returns false if cookies cannot be
140140
// accessed.
141141
///
142142
/*--cef(optional_param=handler)--*/
143-
virtual bool FlushStore(CefRefPtr<CefCompletionHandler> handler) =0;
143+
virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) =0;
144144
};
145145

146146

include/cef_trace.h

+8-6
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#pragma once
4343

4444
#include "include/cef_base.h"
45+
#include "include/cef_callback.h"
4546

4647
///
4748
// Implement this interface to receive notification when tracing has completed.
@@ -61,9 +62,9 @@ class CefEndTracingCallback : public virtual CefBase {
6162

6263

6364
///
64-
// Start tracing events on all processes. Tracing begins immediately locally,
65-
// and asynchronously on child processes as soon as they receive the
66-
// BeginTracing request.
65+
// Start tracing events on all processes. Tracing is initialized asynchronously
66+
// and |callback| will be executed on the UI thread after initialization is
67+
// complete.
6768
//
6869
// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
6970
// pending, CefBeginTracing will fail and return false.
@@ -79,7 +80,8 @@ class CefEndTracingCallback : public virtual CefBase {
7980
// This function must be called on the browser process UI thread.
8081
///
8182
/*--cef(optional_param=categories)--*/
82-
bool CefBeginTracing(const CefString& categories);
83+
bool CefBeginTracing(const CefString& categories,
84+
CefRefPtr<CefCompletionCallback> callback);
8385

8486
///
8587
// Stop tracing events on all processes.
@@ -95,8 +97,8 @@ bool CefBeginTracing(const CefString& categories);
9597
// This function must be called on the browser process UI thread.
9698
///
9799
/*--cef(optional_param=tracing_file,optional_param=callback)--*/
98-
bool CefEndTracingAsync(const CefString& tracing_file,
99-
CefRefPtr<CefEndTracingCallback> callback);
100+
bool CefEndTracing(const CefString& tracing_file,
101+
CefRefPtr<CefEndTracingCallback> callback);
100102

101103
///
102104
// Returns the current system trace time or, if none is defined, the current

include/internal/cef_linux.h

+23-11
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ struct CefWindowInfoTraits {
110110
static inline void set(const struct_type* src, struct_type* target,
111111
bool copy) {
112112
target->parent_widget = src->parent_widget;
113-
target->window_rendering_disabled = src->window_rendering_disabled;
114-
target->transparent_painting = src->transparent_painting;
113+
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
114+
target->transparent_painting_enabled = src->transparent_painting_enabled;
115115
target->widget = src->widget;
116116
}
117117
};
@@ -125,17 +125,29 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
125125
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
126126
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
127127

128-
void SetAsChild(CefWindowHandle ParentWidget) {
129-
parent_widget = ParentWidget;
128+
///
129+
// Create the browser as a child widget.
130+
///
131+
void SetAsChild(CefWindowHandle parent) {
132+
parent_widget = parent;
130133
}
131134

132-
void SetTransparentPainting(bool transparentPainting) {
133-
transparent_painting = transparentPainting;
134-
}
135-
136-
void SetAsOffScreen(CefWindowHandle ParentWidget) {
137-
window_rendering_disabled = true;
138-
parent_widget = ParentWidget;
135+
///
136+
// Create the browser using windowless (off-screen) rendering. No widget
137+
// will be created for the browser and all rendering will occur via the
138+
// CefRenderHandler interface. The |parent| value will be used to identify
139+
// monitor info and to act as the parent widget for dialogs, context menus,
140+
// etc. If |parent| is not provided then the main screen monitor will be used
141+
// and some functionality that requires a parent widget may not function
142+
// correctly. If |transparent| is true a transparent background color will be
143+
// used (RGBA=0x00000000). If |transparent| is false the background will be
144+
// white and opaque. In order to create windowless browsers the
145+
// CefSettings.windowless_rendering_enabled value must be set to true.
146+
///
147+
void SetAsWindowless(CefWindowHandle parent, bool transparent) {
148+
windowless_rendering_enabled = true;
149+
parent_widget = parent;
150+
transparent_painting_enabled = transparent;
139151
}
140152
};
141153

include/internal/cef_mac.h

+25-13
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,17 @@ struct CefWindowInfoTraits {
112112

113113
static inline void set(const struct_type* src, struct_type* target,
114114
bool copy) {
115-
target->view = src->view;
116-
target->parent_view = src->parent_view;
117115
cef_string_set(src->window_name.str, src->window_name.length,
118116
&target->window_name, copy);
119117
target->x = src->x;
120118
target->y = src->y;
121119
target->width = src->width;
122120
target->height = src->height;
123121
target->hidden = src->hidden;
124-
target->transparent_painting = src->transparent_painting;
125-
target->window_rendering_disabled = src->window_rendering_disabled;
122+
target->parent_view = src->parent_view;
123+
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
124+
target->transparent_painting_enabled = src->transparent_painting_enabled;
125+
target->view = src->view;
126126
}
127127
};
128128

@@ -135,23 +135,35 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
135135
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
136136
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
137137

138-
void SetAsChild(CefWindowHandle ParentView, int x, int y, int width,
138+
///
139+
// Create the browser as a child view.
140+
///
141+
void SetAsChild(CefWindowHandle parent, int x, int y, int width,
139142
int height) {
140-
parent_view = ParentView;
143+
parent_view = parent;
141144
this->x = x;
142145
this->y = y;
143146
this->width = width;
144147
this->height = height;
145148
hidden = false;
146149
}
147150

148-
void SetTransparentPainting(bool transparentPainting) {
149-
transparent_painting = transparentPainting;
150-
}
151-
152-
void SetAsOffScreen(NSView* view) {
153-
window_rendering_disabled = true;
154-
parent_view = view;
151+
///
152+
// Create the browser using windowless (off-screen) rendering. No view
153+
// will be created for the browser and all rendering will occur via the
154+
// CefRenderHandler interface. The |parent| value will be used to identify
155+
// monitor info and to act as the parent view for dialogs, context menus,
156+
// etc. If |parent| is not provided then the main screen monitor will be used
157+
// and some functionality that requires a parent view may not function
158+
// correctly. If |transparent| is true a transparent background color will be
159+
// used (RGBA=0x00000000). If |transparent| is false the background will be
160+
// white and opaque. In order to create windowless browsers the
161+
// CefSettings.windowless_rendering_enabled value must be set to true.
162+
///
163+
void SetAsWindowless(CefWindowHandle parent, bool transparent) {
164+
windowless_rendering_enabled = true;
165+
parent_view = parent;
166+
transparent_painting_enabled = transparent;
155167
}
156168
};
157169

include/internal/cef_types.h

+7-3
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,13 @@ typedef struct _cef_settings_t {
223223
///
224224
int multi_threaded_message_loop;
225225

226+
///
227+
// Set to true to enable windowless (off-screen) rendering support. Do not
228+
// enable this value if the application does not use windowless rendering as
229+
// it may reduce rendering performance on some systems.
230+
///
231+
bool windowless_rendering_enabled;
232+
226233
///
227234
// Set to true (1) to disable configuration of browser process features using
228235
// standard CEF and Chromium command-line arguments. Configuration can still
@@ -1650,14 +1657,11 @@ typedef enum {
16501657
DOM_NODE_TYPE_ATTRIBUTE,
16511658
DOM_NODE_TYPE_TEXT,
16521659
DOM_NODE_TYPE_CDATA_SECTION,
1653-
DOM_NODE_TYPE_ENTITY,
16541660
DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS,
16551661
DOM_NODE_TYPE_COMMENT,
16561662
DOM_NODE_TYPE_DOCUMENT,
16571663
DOM_NODE_TYPE_DOCUMENT_TYPE,
16581664
DOM_NODE_TYPE_DOCUMENT_FRAGMENT,
1659-
DOM_NODE_TYPE_NOTATION,
1660-
DOM_NODE_TYPE_XPATH_NAMESPACE,
16611665
} cef_dom_node_type_t;
16621666

16631667
///

include/internal/cef_types_linux.h

+24-8
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,34 @@ typedef struct _cef_main_args_t {
6060
// Class representing window information.
6161
///
6262
typedef struct _cef_window_info_t {
63-
// Pointer for the parent GtkBox widget.
63+
///
64+
// Pointer for the parent widget.
65+
///
6466
cef_window_handle_t parent_widget;
6567

66-
// If window rendering is disabled no browser window will be created. Set
67-
// |parent_widget| to the window that will act as the parent for popup menus,
68-
// dialog boxes, etc.
69-
int window_rendering_disabled;
68+
///
69+
// Set to true (1) to create the browser using windowless (off-screen)
70+
// rendering. No widget will be created for the browser and all rendering will
71+
// occur via the CefRenderHandler interface. The |parent_widget| value will be
72+
// used to identify monitor info and to act as the parent widget for dialogs,
73+
// context menus, etc. If |parent_widget| is not provided then the main screen
74+
// monitor will be used and some functionality that requires a parent widget
75+
// may not function correctly. In order to create windowless browsers the
76+
// CefSettings.windowless_rendering_enabled value must be set to true.
77+
///
78+
int windowless_rendering_enabled;
7079

71-
// Set to true to enable transparent painting.
72-
int transparent_painting;
80+
///
81+
// Set to true (1) to enable transparent painting in combination with
82+
// windowless rendering. When this value is true a transparent background
83+
// color will be used (RGBA=0x00000000). When this value is false the
84+
// background will be white and opaque.
85+
///
86+
int transparent_painting_enabled;
7387

74-
// Pointer for the new browser widget.
88+
///
89+
// Pointer for the new browser widget. Only used with windowed rendering.
90+
///
7591
cef_window_handle_t widget;
7692
} cef_window_info_t;
7793

0 commit comments

Comments
 (0)