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: https://chromiumembedded.googlecode.com/svn/trunk@1592 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-02-05 20:35:45 +00:00
parent 76f6ca0763
commit 8078afe7bf
100 changed files with 1115 additions and 1048 deletions

View File

@ -17,5 +17,5 @@
{ {
'chromium_url': 'http://src.chromium.org/svn/trunk/src', 'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '242756', 'chromium_revision': '248478',
} }

View File

@ -868,7 +868,6 @@
'<(DEPTH)/ui/gl/gl.gyp:gl', '<(DEPTH)/ui/gl/gl.gyp:gl',
'<(DEPTH)/ui/ui.gyp:ui', '<(DEPTH)/ui/ui.gyp:ui',
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
'<(DEPTH)/webkit/glue/webkit_glue.gyp:glue',
'<(DEPTH)/webkit/storage_browser.gyp:webkit_storage_browser', '<(DEPTH)/webkit/storage_browser.gyp:webkit_storage_browser',
'<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common', '<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
# Necessary to generate the grit include files. # Necessary to generate the grit include files.
@ -1037,6 +1036,8 @@
'libcef/common/value_base.h', 'libcef/common/value_base.h',
'libcef/common/values_impl.cc', 'libcef/common/values_impl.cc',
'libcef/common/values_impl.h', 'libcef/common/values_impl.h',
'libcef/common/upload_data.cc',
'libcef/common/upload_data.h',
'libcef/renderer/browser_impl.cc', 'libcef/renderer/browser_impl.cc',
'libcef/renderer/browser_impl.h', 'libcef/renderer/browser_impl.h',
'libcef/renderer/content_renderer_client.cc', 'libcef/renderer/content_renderer_client.cc',
@ -1279,6 +1280,7 @@
'mac_bundle_resources': [ 'mac_bundle_resources': [
'<(PRODUCT_DIR)/cef.pak', '<(PRODUCT_DIR)/cef.pak',
'<(PRODUCT_DIR)/devtools_resources.pak', '<(PRODUCT_DIR)/devtools_resources.pak',
'<(PRODUCT_DIR)/icudtl.dat',
'libcef/resources/framework-Info.plist', 'libcef/resources/framework-Info.plist',
], ],
'mac_bundle_resources!': [ 'mac_bundle_resources!': [
@ -1635,7 +1637,7 @@
'<@(includes_win)', '<@(includes_win)',
# TODO(cef): Remove ui_unscaled_resources.rc once custom cursor # TODO(cef): Remove ui_unscaled_resources.rc once custom cursor
# resources can be loaded via ResourceBundle. See crbug.com/147663. # resources can be loaded via ResourceBundle. See crbug.com/147663.
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.rc',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc', '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_unscaled_resources.rc',
'libcef_dll/libcef_dll.rc', 'libcef_dll/libcef_dll.rc',
], ],

View File

@ -1,2 +1,2 @@
@echo off @echo off
..\third_party\python_26\python.exe tools\gclient_hook.py python.bat tools\gclient_hook.py

View File

@ -138,8 +138,8 @@
'libcef_dll/ctocpp/client_ctocpp.h', 'libcef_dll/ctocpp/client_ctocpp.h',
'libcef_dll/cpptoc/command_line_cpptoc.cc', 'libcef_dll/cpptoc/command_line_cpptoc.cc',
'libcef_dll/cpptoc/command_line_cpptoc.h', 'libcef_dll/cpptoc/command_line_cpptoc.h',
'libcef_dll/ctocpp/completion_handler_ctocpp.cc', 'libcef_dll/ctocpp/completion_callback_ctocpp.cc',
'libcef_dll/ctocpp/completion_handler_ctocpp.h', 'libcef_dll/ctocpp/completion_callback_ctocpp.h',
'libcef_dll/ctocpp/context_menu_handler_ctocpp.cc', 'libcef_dll/ctocpp/context_menu_handler_ctocpp.cc',
'libcef_dll/ctocpp/context_menu_handler_ctocpp.h', 'libcef_dll/ctocpp/context_menu_handler_ctocpp.h',
'libcef_dll/cpptoc/context_menu_params_cpptoc.cc', 'libcef_dll/cpptoc/context_menu_params_cpptoc.cc',
@ -300,8 +300,8 @@
'libcef_dll/cpptoc/client_cpptoc.h', 'libcef_dll/cpptoc/client_cpptoc.h',
'libcef_dll/ctocpp/command_line_ctocpp.cc', 'libcef_dll/ctocpp/command_line_ctocpp.cc',
'libcef_dll/ctocpp/command_line_ctocpp.h', 'libcef_dll/ctocpp/command_line_ctocpp.h',
'libcef_dll/cpptoc/completion_handler_cpptoc.cc', 'libcef_dll/cpptoc/completion_callback_cpptoc.cc',
'libcef_dll/cpptoc/completion_handler_cpptoc.h', 'libcef_dll/cpptoc/completion_callback_cpptoc.h',
'libcef_dll/cpptoc/context_menu_handler_cpptoc.cc', 'libcef_dll/cpptoc/context_menu_handler_cpptoc.cc',
'libcef_dll/cpptoc/context_menu_handler_cpptoc.h', 'libcef_dll/cpptoc/context_menu_handler_cpptoc.h',
'libcef_dll/ctocpp/context_menu_params_ctocpp.cc', 'libcef_dll/ctocpp/context_menu_params_ctocpp.cc',

View File

@ -69,7 +69,7 @@ typedef struct _cef_callback_t {
/// ///
// Generic callback structure used for asynchronous completion. // Generic callback structure used for asynchronous completion.
/// ///
typedef struct _cef_completion_handler_t { typedef struct _cef_completion_callback_t {
/// ///
// Base structure. // Base structure.
/// ///
@ -78,8 +78,8 @@ typedef struct _cef_completion_handler_t {
/// ///
// Method that will be called once the task is complete. // Method that will be called once the task is complete.
/// ///
void (CEF_CALLBACK *on_complete)(struct _cef_completion_handler_t* self); void (CEF_CALLBACK *on_complete)(struct _cef_completion_callback_t* self);
} cef_completion_handler_t; } cef_completion_callback_t;
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -120,11 +120,11 @@ typedef struct _cef_cookie_manager_t {
/// ///
// Flush the backing store (if any) to disk and execute the specified // Flush the backing store (if any) to disk and execute the specified
// |handler| on the IO thread when done. Returns false (0) if cookies cannot // |callback| on the IO thread when done. Returns false (0) if cookies cannot
// be accessed. // be accessed.
/// ///
int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self, int (CEF_CALLBACK *flush_store)(struct _cef_cookie_manager_t* self,
struct _cef_completion_handler_t* handler); struct _cef_completion_callback_t* callback);
} cef_cookie_manager_t; } cef_cookie_manager_t;

View File

@ -43,6 +43,7 @@ extern "C" {
#endif #endif
#include "include/capi/cef_base_capi.h" #include "include/capi/cef_base_capi.h"
#include "include/capi/cef_callback_capi.h"
/// ///
@ -68,9 +69,9 @@ typedef struct _cef_end_tracing_callback_t {
/// ///
// Start tracing events on all processes. Tracing begins immediately locally, // Start tracing events on all processes. Tracing is initialized asynchronously
// and asynchronously on child processes as soon as they receive the // and |callback| will be executed on the UI thread after initialization is
// BeginTracing request. // complete.
// //
// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is // If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
// pending, CefBeginTracing will fail and return false (0). // pending, CefBeginTracing will fail and return false (0).
@ -84,7 +85,8 @@ typedef struct _cef_end_tracing_callback_t {
// //
// This function must be called on the browser process UI thread. // This function must be called on the browser process UI thread.
/// ///
CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories); CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
struct _cef_completion_callback_t* callback);
/// ///
// Stop tracing events on all processes. // Stop tracing events on all processes.
@ -99,7 +101,7 @@ CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories);
// //
// This function must be called on the browser process UI thread. // This function must be called on the browser process UI thread.
/// ///
CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file, CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
cef_end_tracing_callback_t* callback); cef_end_tracing_callback_t* callback);
/// ///

View File

@ -63,7 +63,7 @@ class CefCallback : public virtual CefBase {
// Generic callback interface used for asynchronous completion. // Generic callback interface used for asynchronous completion.
/// ///
/*--cef(source=client)--*/ /*--cef(source=client)--*/
class CefCompletionHandler : public virtual CefBase { class CefCompletionCallback : public virtual CefBase {
public: public:
/// ///
// Method that will be called once the task is complete. // Method that will be called once the task is complete.

View File

@ -136,11 +136,11 @@ class CefCookieManager : public virtual CefBase {
/// ///
// Flush the backing store (if any) to disk and execute the specified // Flush the backing store (if any) to disk and execute the specified
// |handler| on the IO thread when done. Returns false if cookies cannot be // |callback| on the IO thread when done. Returns false if cookies cannot be
// accessed. // accessed.
/// ///
/*--cef(optional_param=handler)--*/ /*--cef(optional_param=handler)--*/
virtual bool FlushStore(CefRefPtr<CefCompletionHandler> handler) =0; virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) =0;
}; };

View File

@ -42,6 +42,7 @@
#pragma once #pragma once
#include "include/cef_base.h" #include "include/cef_base.h"
#include "include/cef_callback.h"
/// ///
// Implement this interface to receive notification when tracing has completed. // Implement this interface to receive notification when tracing has completed.
@ -61,9 +62,9 @@ class CefEndTracingCallback : public virtual CefBase {
/// ///
// Start tracing events on all processes. Tracing begins immediately locally, // Start tracing events on all processes. Tracing is initialized asynchronously
// and asynchronously on child processes as soon as they receive the // and |callback| will be executed on the UI thread after initialization is
// BeginTracing request. // complete.
// //
// If CefBeginTracing was called previously, or if a CefEndTracingAsync call is // If CefBeginTracing was called previously, or if a CefEndTracingAsync call is
// pending, CefBeginTracing will fail and return false. // pending, CefBeginTracing will fail and return false.
@ -79,7 +80,8 @@ class CefEndTracingCallback : public virtual CefBase {
// This function must be called on the browser process UI thread. // This function must be called on the browser process UI thread.
/// ///
/*--cef(optional_param=categories)--*/ /*--cef(optional_param=categories)--*/
bool CefBeginTracing(const CefString& categories); bool CefBeginTracing(const CefString& categories,
CefRefPtr<CefCompletionCallback> callback);
/// ///
// Stop tracing events on all processes. // Stop tracing events on all processes.
@ -95,8 +97,8 @@ bool CefBeginTracing(const CefString& categories);
// This function must be called on the browser process UI thread. // This function must be called on the browser process UI thread.
/// ///
/*--cef(optional_param=tracing_file,optional_param=callback)--*/ /*--cef(optional_param=tracing_file,optional_param=callback)--*/
bool CefEndTracingAsync(const CefString& tracing_file, bool CefEndTracing(const CefString& tracing_file,
CefRefPtr<CefEndTracingCallback> callback); CefRefPtr<CefEndTracingCallback> callback);
/// ///
// Returns the current system trace time or, if none is defined, the current // Returns the current system trace time or, if none is defined, the current

View File

@ -110,8 +110,8 @@ struct CefWindowInfoTraits {
static inline void set(const struct_type* src, struct_type* target, static inline void set(const struct_type* src, struct_type* target,
bool copy) { bool copy) {
target->parent_widget = src->parent_widget; target->parent_widget = src->parent_widget;
target->window_rendering_disabled = src->window_rendering_disabled; target->windowless_rendering_enabled = src->windowless_rendering_enabled;
target->transparent_painting = src->transparent_painting; target->transparent_painting_enabled = src->transparent_painting_enabled;
target->widget = src->widget; target->widget = src->widget;
} }
}; };
@ -125,17 +125,29 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
void SetAsChild(CefWindowHandle ParentWidget) { ///
parent_widget = ParentWidget; // Create the browser as a child widget.
///
void SetAsChild(CefWindowHandle parent) {
parent_widget = parent;
} }
void SetTransparentPainting(bool transparentPainting) { ///
transparent_painting = transparentPainting; // Create the browser using windowless (off-screen) rendering. No widget
} // will be created for the browser and all rendering will occur via the
// CefRenderHandler interface. The |parent| value will be used to identify
void SetAsOffScreen(CefWindowHandle ParentWidget) { // monitor info and to act as the parent widget for dialogs, context menus,
window_rendering_disabled = true; // etc. If |parent| is not provided then the main screen monitor will be used
parent_widget = ParentWidget; // and some functionality that requires a parent widget may not function
// correctly. If |transparent| is true a transparent background color will be
// used (RGBA=0x00000000). If |transparent| is false the background will be
// white and opaque. In order to create windowless browsers the
// CefSettings.windowless_rendering_enabled value must be set to true.
///
void SetAsWindowless(CefWindowHandle parent, bool transparent) {
windowless_rendering_enabled = true;
parent_widget = parent;
transparent_painting_enabled = transparent;
} }
}; };

View File

@ -112,8 +112,6 @@ struct CefWindowInfoTraits {
static inline void set(const struct_type* src, struct_type* target, static inline void set(const struct_type* src, struct_type* target,
bool copy) { bool copy) {
target->view = src->view;
target->parent_view = src->parent_view;
cef_string_set(src->window_name.str, src->window_name.length, cef_string_set(src->window_name.str, src->window_name.length,
&target->window_name, copy); &target->window_name, copy);
target->x = src->x; target->x = src->x;
@ -121,8 +119,10 @@ struct CefWindowInfoTraits {
target->width = src->width; target->width = src->width;
target->height = src->height; target->height = src->height;
target->hidden = src->hidden; target->hidden = src->hidden;
target->transparent_painting = src->transparent_painting; target->parent_view = src->parent_view;
target->window_rendering_disabled = src->window_rendering_disabled; target->windowless_rendering_enabled = src->windowless_rendering_enabled;
target->transparent_painting_enabled = src->transparent_painting_enabled;
target->view = src->view;
} }
}; };
@ -135,9 +135,12 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
void SetAsChild(CefWindowHandle ParentView, int x, int y, int width, ///
// Create the browser as a child view.
///
void SetAsChild(CefWindowHandle parent, int x, int y, int width,
int height) { int height) {
parent_view = ParentView; parent_view = parent;
this->x = x; this->x = x;
this->y = y; this->y = y;
this->width = width; this->width = width;
@ -145,13 +148,22 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
hidden = false; hidden = false;
} }
void SetTransparentPainting(bool transparentPainting) { ///
transparent_painting = transparentPainting; // Create the browser using windowless (off-screen) rendering. No view
} // will be created for the browser and all rendering will occur via the
// CefRenderHandler interface. The |parent| value will be used to identify
void SetAsOffScreen(NSView* view) { // monitor info and to act as the parent view for dialogs, context menus,
window_rendering_disabled = true; // etc. If |parent| is not provided then the main screen monitor will be used
parent_view = view; // and some functionality that requires a parent view may not function
// correctly. If |transparent| is true a transparent background color will be
// used (RGBA=0x00000000). If |transparent| is false the background will be
// white and opaque. In order to create windowless browsers the
// CefSettings.windowless_rendering_enabled value must be set to true.
///
void SetAsWindowless(CefWindowHandle parent, bool transparent) {
windowless_rendering_enabled = true;
parent_view = parent;
transparent_painting_enabled = transparent;
} }
}; };

View File

@ -223,6 +223,13 @@ typedef struct _cef_settings_t {
/// ///
int multi_threaded_message_loop; int multi_threaded_message_loop;
///
// Set to true to enable windowless (off-screen) rendering support. Do not
// enable this value if the application does not use windowless rendering as
// it may reduce rendering performance on some systems.
///
bool windowless_rendering_enabled;
/// ///
// Set to true (1) to disable configuration of browser process features using // Set to true (1) to disable configuration of browser process features using
// standard CEF and Chromium command-line arguments. Configuration can still // standard CEF and Chromium command-line arguments. Configuration can still
@ -1650,14 +1657,11 @@ typedef enum {
DOM_NODE_TYPE_ATTRIBUTE, DOM_NODE_TYPE_ATTRIBUTE,
DOM_NODE_TYPE_TEXT, DOM_NODE_TYPE_TEXT,
DOM_NODE_TYPE_CDATA_SECTION, DOM_NODE_TYPE_CDATA_SECTION,
DOM_NODE_TYPE_ENTITY,
DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS, DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS,
DOM_NODE_TYPE_COMMENT, DOM_NODE_TYPE_COMMENT,
DOM_NODE_TYPE_DOCUMENT, DOM_NODE_TYPE_DOCUMENT,
DOM_NODE_TYPE_DOCUMENT_TYPE, DOM_NODE_TYPE_DOCUMENT_TYPE,
DOM_NODE_TYPE_DOCUMENT_FRAGMENT, DOM_NODE_TYPE_DOCUMENT_FRAGMENT,
DOM_NODE_TYPE_NOTATION,
DOM_NODE_TYPE_XPATH_NAMESPACE,
} cef_dom_node_type_t; } cef_dom_node_type_t;
/// ///

View File

@ -60,18 +60,34 @@ typedef struct _cef_main_args_t {
// Class representing window information. // Class representing window information.
/// ///
typedef struct _cef_window_info_t { typedef struct _cef_window_info_t {
// Pointer for the parent GtkBox widget. ///
// Pointer for the parent widget.
///
cef_window_handle_t parent_widget; cef_window_handle_t parent_widget;
// If window rendering is disabled no browser window will be created. Set ///
// |parent_widget| to the window that will act as the parent for popup menus, // Set to true (1) to create the browser using windowless (off-screen)
// dialog boxes, etc. // rendering. No widget will be created for the browser and all rendering will
int window_rendering_disabled; // occur via the CefRenderHandler interface. The |parent_widget| value will be
// used to identify monitor info and to act as the parent widget for dialogs,
// context menus, etc. If |parent_widget| is not provided then the main screen
// monitor will be used and some functionality that requires a parent widget
// may not function correctly. In order to create windowless browsers the
// CefSettings.windowless_rendering_enabled value must be set to true.
///
int windowless_rendering_enabled;
// Set to true to enable transparent painting. ///
int transparent_painting; // Set to true (1) to enable transparent painting in combination with
// windowless rendering. When this value is true a transparent background
// color will be used (RGBA=0x00000000). When this value is false the
// background will be white and opaque.
///
int transparent_painting_enabled;
// Pointer for the new browser widget. ///
// Pointer for the new browser widget. Only used with windowed rendering.
///
cef_window_handle_t widget; cef_window_handle_t widget;
} cef_window_info_t; } cef_window_info_t;

View File

@ -82,20 +82,40 @@ typedef struct _cef_window_info_t {
int y; int y;
int width; int width;
int height; int height;
///
// Set to true (1) to create the view initially hidden.
///
int hidden; int hidden;
///
// NSView pointer for the parent view. // NSView pointer for the parent view.
///
cef_window_handle_t parent_view; cef_window_handle_t parent_view;
// If window rendering is disabled no browser window will be created. Set ///
// |parent_view| to the window that will act as the parent for popup menus, // Set to true (1) to create the browser using windowless (off-screen)
// dialog boxes, etc. // rendering. No view will be created for the browser and all rendering will
int window_rendering_disabled; // occur via the CefRenderHandler interface. The |parent_view| value will be
// used to identify monitor info and to act as the parent view for dialogs,
// context menus, etc. If |parent_view| is not provided then the main screen
// monitor will be used and some functionality that requires a parent view
// may not function correctly. In order to create windowless browsers the
// CefSettings.windowless_rendering_enabled value must be set to true.
///
int windowless_rendering_enabled;
// Set to true to enable transparent painting. ///
int transparent_painting; // Set to true (1) to enable transparent painting in combination with
// windowless rendering. When this value is true a transparent background
// color will be used (RGBA=0x00000000). When this value is false the
// background will be white and opaque.
///
int transparent_painting_enabled;
// NSView pointer for the new browser view. ///
// NSView pointer for the new browser view. Only used with windowed rendering.
///
cef_window_handle_t view; cef_window_handle_t view;
} cef_window_info_t; } cef_window_info_t;

View File

@ -70,19 +70,29 @@ typedef struct _cef_window_info_t {
cef_window_handle_t parent_window; cef_window_handle_t parent_window;
HMENU menu; HMENU menu;
// If window rendering is disabled no browser window will be created. Set ///
// |parent_window| to be used for identifying monitor info // Set to true (1) to create the browser using windowless (off-screen)
// (MonitorFromWindow). If |parent_window| is not provided the main screen // rendering. No window will be created for the browser and all rendering will
// monitor will be used. // occur via the CefRenderHandler interface. The |parent_window| value will be
BOOL window_rendering_disabled; // used to identify monitor info and to act as the parent window for dialogs,
// context menus, etc. If |parent_window| is not provided then the main screen
// monitor will be used and some functionality that requires a parent window
// may not function correctly. In order to create windowless browsers the
// CefSettings.windowless_rendering_enabled value must be set to true.
///
int windowless_rendering_enabled;
// Set to true to enable transparent painting. ///
// If window rendering is disabled and |transparent_painting| is set to true // Set to true (1) to enable transparent painting in combination with
// WebKit rendering will draw on a transparent background (RGBA=0x00000000). // windowless rendering. When this value is true a transparent background
// When this value is false the background will be white and opaque. // color will be used (RGBA=0x00000000). When this value is false the
BOOL transparent_painting; // background will be white and opaque.
///
int transparent_painting_enabled;
// Handle for the new browser window. ///
// Handle for the new browser window. Only used with windowed rendering.
///
cef_window_handle_t window; cef_window_handle_t window;
} cef_window_info_t; } cef_window_info_t;

View File

@ -349,6 +349,7 @@ struct CefSettingsTraits {
src->browser_subprocess_path.length, src->browser_subprocess_path.length,
&target->browser_subprocess_path, copy); &target->browser_subprocess_path, copy);
target->multi_threaded_message_loop = src->multi_threaded_message_loop; target->multi_threaded_message_loop = src->multi_threaded_message_loop;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
target->command_line_args_disabled = src->command_line_args_disabled; target->command_line_args_disabled = src->command_line_args_disabled;
cef_string_set(src->cache_path.str, src->cache_path.length, cef_string_set(src->cache_path.str, src->cache_path.length,

View File

@ -119,9 +119,9 @@ struct CefWindowInfoTraits {
target->height = src->height; target->height = src->height;
target->parent_window = src->parent_window; target->parent_window = src->parent_window;
target->menu = src->menu; target->menu = src->menu;
target->transparent_painting_enabled = src->transparent_painting_enabled;
target->windowless_rendering_enabled = src->windowless_rendering_enabled;
target->window = src->window; target->window = src->window;
target->transparent_painting = src->transparent_painting;
target->window_rendering_disabled = src->window_rendering_disabled;
} }
}; };
@ -136,20 +136,26 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {} explicit CefWindowInfo(const cef_window_info_t& r) : parent(r) {}
explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {} explicit CefWindowInfo(const CefWindowInfo& r) : parent(r) {}
void SetAsChild(HWND hWndParent, RECT windowRect) { ///
// Create the browser as a child window.
///
void SetAsChild(CefWindowHandle parent, RECT windowRect) {
style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP | style = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP |
WS_VISIBLE; WS_VISIBLE;
parent_window = hWndParent; parent_window = parent;
x = windowRect.left; x = windowRect.left;
y = windowRect.top; y = windowRect.top;
width = windowRect.right - windowRect.left; width = windowRect.right - windowRect.left;
height = windowRect.bottom - windowRect.top; height = windowRect.bottom - windowRect.top;
} }
void SetAsPopup(HWND hWndParent, const CefString& windowName) { ///
// Create the browser as a popup window.
///
void SetAsPopup(CefWindowHandle parent, const CefString& windowName) {
style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | style = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
WS_VISIBLE; WS_VISIBLE;
parent_window = hWndParent; parent_window = parent;
x = CW_USEDEFAULT; x = CW_USEDEFAULT;
y = CW_USEDEFAULT; y = CW_USEDEFAULT;
width = CW_USEDEFAULT; width = CW_USEDEFAULT;
@ -158,13 +164,22 @@ class CefWindowInfo : public CefStructBase<CefWindowInfoTraits> {
cef_string_copy(windowName.c_str(), windowName.length(), &window_name); cef_string_copy(windowName.c_str(), windowName.length(), &window_name);
} }
void SetTransparentPainting(BOOL transparentPainting) { ///
transparent_painting = transparentPainting; // Create the browser using windowless (off-screen) rendering. No window
} // will be created for the browser and all rendering will occur via the
// CefRenderHandler interface. The |parent| value will be used to identify
void SetAsOffScreen(HWND hWndParent) { // monitor info and to act as the parent window for dialogs, context menus,
window_rendering_disabled = TRUE; // etc. If |parent| is not provided then the main screen monitor will be used
parent_window = hWndParent; // and some functionality that requires a parent window may not function
// correctly. If |transparent| is true a transparent background color will be
// used (RGBA=0x00000000). If |transparent| is false the background will be
// white and opaque. In order to create windowless browsers the
// CefSettings.windowless_rendering_enabled value must be set to true.
///
void SetAsWindowless(CefWindowHandle parent, bool transparent) {
windowless_rendering_enabled = TRUE;
parent_window = parent;
transparent_painting_enabled = transparent;
} }
}; };

View File

@ -267,6 +267,19 @@ void CefBrowserContextImpl::CancelMIDISysExPermissionRequest(
const GURL& requesting_frame) { const GURL& requesting_frame) {
} }
void CefBrowserContextImpl::RequestProtectedMediaIdentifierPermission(
int render_process_id,
int render_view_id,
int bridge_id,
int group_id,
const GURL& requesting_frame,
const ProtectedMediaIdentifierPermissionCallback& callback) {
}
void CefBrowserContextImpl::CancelProtectedMediaIdentifierPermissionRequests(
int group_id) {
}
content::ResourceContext* CefBrowserContextImpl::GetResourceContext() { content::ResourceContext* CefBrowserContextImpl::GetResourceContext() {
return resource_context_.get(); return resource_context_.get();
} }

View File

@ -50,6 +50,15 @@ class CefBrowserContextImpl : public CefBrowserContext {
int render_view_id, int render_view_id,
int bridge_id, int bridge_id,
const GURL& requesting_frame) OVERRIDE; const GURL& requesting_frame) OVERRIDE;
virtual void RequestProtectedMediaIdentifierPermission(
int render_process_id,
int render_view_id,
int bridge_id,
int group_id,
const GURL& requesting_frame,
const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE;
virtual void CancelProtectedMediaIdentifierPermissionRequests(
int group_id) OVERRIDE;
virtual content::ResourceContext* GetResourceContext() OVERRIDE; virtual content::ResourceContext* GetResourceContext() OVERRIDE;
virtual content::GeolocationPermissionContext* virtual content::GeolocationPermissionContext*
GetGeolocationPermissionContext() OVERRIDE; GetGeolocationPermissionContext() OVERRIDE;

View File

@ -129,6 +129,19 @@ void CefBrowserContextProxy::CancelMIDISysExPermissionRequest(
const GURL& requesting_frame) { const GURL& requesting_frame) {
} }
void CefBrowserContextProxy::RequestProtectedMediaIdentifierPermission(
int render_process_id,
int render_view_id,
int bridge_id,
int group_id,
const GURL& requesting_frame,
const ProtectedMediaIdentifierPermissionCallback& callback) {
}
void CefBrowserContextProxy::CancelProtectedMediaIdentifierPermissionRequests(
int group_id) {
}
content::ResourceContext* CefBrowserContextProxy::GetResourceContext() { content::ResourceContext* CefBrowserContextProxy::GetResourceContext() {
return resource_context_.get(); return resource_context_.get();
} }

View File

@ -58,6 +58,15 @@ class CefBrowserContextProxy : public CefBrowserContext {
int render_view_id, int render_view_id,
int bridge_id, int bridge_id,
const GURL& requesting_frame) OVERRIDE; const GURL& requesting_frame) OVERRIDE;
virtual void RequestProtectedMediaIdentifierPermission(
int render_process_id,
int render_view_id,
int bridge_id,
int group_id,
const GURL& requesting_frame,
const ProtectedMediaIdentifierPermissionCallback& callback) OVERRIDE;
virtual void CancelProtectedMediaIdentifierPermissionRequests(
int group_id) OVERRIDE;
virtual content::ResourceContext* GetResourceContext() OVERRIDE; virtual content::ResourceContext* GetResourceContext() OVERRIDE;
virtual content::GeolocationPermissionContext* virtual content::GeolocationPermissionContext*
GetGeolocationPermissionContext() OVERRIDE; GetGeolocationPermissionContext() OVERRIDE;

View File

@ -290,6 +290,10 @@ bool CefBrowserHost::CreateBrowser(
// Verify that render handler is in place for a windowless browser. // Verify that render handler is in place for a windowless browser.
if (CefBrowserHostImpl::IsWindowRenderingDisabled(windowInfo)) { if (CefBrowserHostImpl::IsWindowRenderingDisabled(windowInfo)) {
if (!CefContext::Get()->settings().windowless_rendering_enabled) {
NOTREACHED() << "Windowless rendering must be enabled";
return false;
}
if (!client->GetRenderHandler().get()) { if (!client->GetRenderHandler().get()) {
NOTREACHED() << "CefRenderHandler implementation is required"; NOTREACHED() << "CefRenderHandler implementation is required";
return false; return false;
@ -358,6 +362,10 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::Create(
// Verify that render handler is in place for a windowless browser. // Verify that render handler is in place for a windowless browser.
if (CefBrowserHostImpl::IsWindowRenderingDisabled(windowInfo)) { if (CefBrowserHostImpl::IsWindowRenderingDisabled(windowInfo)) {
if (!CefContext::Get()->settings().windowless_rendering_enabled) {
NOTREACHED() << "Windowless rendering must be enabled";
return NULL;
}
if (!client->GetRenderHandler().get()) { if (!client->GetRenderHandler().get()) {
NOTREACHED() << "CefRenderHandler implementation is required"; NOTREACHED() << "CefRenderHandler implementation is required";
return NULL; return NULL;
@ -715,8 +723,8 @@ double CefBrowserHostImpl::GetZoomLevel() {
void CefBrowserHostImpl::SetZoomLevel(double zoomLevel) { void CefBrowserHostImpl::SetZoomLevel(double zoomLevel) {
if (CEF_CURRENTLY_ON_UIT()) { if (CEF_CURRENTLY_ON_UIT()) {
if (web_contents_.get() && web_contents_->GetRenderViewHost()) if (web_contents_.get())
web_contents_->GetRenderViewHost()->SetZoomLevel(zoomLevel); web_contents_->SetZoomLevel(zoomLevel);
} else { } else {
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::SetZoomLevel, this, zoomLevel)); base::Bind(&CefBrowserHostImpl::SetZoomLevel, this, zoomLevel));
@ -812,7 +820,7 @@ void CefBrowserHostImpl::Find(int identifier, const CefString& searchText,
options.forward = forward; options.forward = forward;
options.matchCase = matchCase; options.matchCase = matchCase;
options.findNext = findNext; options.findNext = findNext;
web_contents()->GetRenderViewHost()->Find(identifier, searchText, options); web_contents()->Find(identifier, searchText, options);
} else { } else {
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::Find, this, identifier, searchText, base::Bind(&CefBrowserHostImpl::Find, this, identifier, searchText,
@ -828,7 +836,7 @@ void CefBrowserHostImpl::StopFinding(bool clearSelection) {
content::StopFindAction action = clearSelection ? content::StopFindAction action = clearSelection ?
content::STOP_FIND_ACTION_CLEAR_SELECTION : content::STOP_FIND_ACTION_CLEAR_SELECTION :
content::STOP_FIND_ACTION_KEEP_SELECTION; content::STOP_FIND_ACTION_KEEP_SELECTION;
web_contents()->GetRenderViewHost()->StopFinding(action); web_contents()->StopFinding(action);
} else { } else {
CEF_POST_TASK(CEF_UIT, CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::StopFinding, this, clearSelection)); base::Bind(&CefBrowserHostImpl::StopFinding, this, clearSelection));
@ -1846,9 +1854,10 @@ void CefBrowserHostImpl::WebContentsFocused(content::WebContents* contents) {
} }
bool CefBrowserHostImpl::HandleContextMenu( bool CefBrowserHostImpl::HandleContextMenu(
content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) { const content::ContextMenuParams& params) {
if (!menu_creator_.get()) if (!menu_creator_.get())
menu_creator_.reset(new CefMenuCreator(this)); menu_creator_.reset(new CefMenuCreator(this, render_frame_host));
return menu_creator_->CreateContextMenu(params); return menu_creator_->CreateContextMenu(params);
} }

View File

@ -330,8 +330,9 @@ class CefBrowserHostImpl : public CefBrowserHost,
virtual bool TakeFocus(content::WebContents* source, virtual bool TakeFocus(content::WebContents* source,
bool reverse) OVERRIDE; bool reverse) OVERRIDE;
virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE;
virtual bool HandleContextMenu(const content::ContextMenuParams& params) virtual bool HandleContextMenu(
OVERRIDE; content::RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) OVERRIDE;
virtual bool PreHandleKeyboardEvent( virtual bool PreHandleKeyboardEvent(
content::WebContents* source, content::WebContents* source,
const content::NativeWebKeyboardEvent& event, const content::NativeWebKeyboardEvent& event,

View File

@ -385,11 +385,11 @@ void CefBrowserHostImpl::PlatformHandleExternalProtocol(const GURL& url) {
// static // static
bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) { bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) {
return info.window_rendering_disabled ? true : false; return info.windowless_rendering_enabled ? true : false;
} }
bool CefBrowserHostImpl::IsTransparent() { bool CefBrowserHostImpl::IsTransparent() {
return window_info_.transparent_painting != 0; return window_info_.transparent_painting_enabled ? true : false;
} }
void CefBrowserHostImpl::PlatformTranslateKeyEvent( void CefBrowserHostImpl::PlatformTranslateKeyEvent(

View File

@ -436,7 +436,11 @@ void CefBrowserHostImpl::PlatformHandleExternalProtocol(const GURL& url) {
// static // static
bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) { bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) {
return info.window_rendering_disabled ? true : false; return info.windowless_rendering_enabled ? true : false;
}
bool CefBrowserHostImpl::IsTransparent() {
return window_info_.transparent_painting_enabled ? true : false;
} }
static NSTimeInterval currentEventTimestamp() { static NSTimeInterval currentEventTimestamp() {
@ -453,10 +457,6 @@ static NSTimeInterval currentEventTimestamp() {
} }
} }
bool CefBrowserHostImpl::IsTransparent() {
return window_info_.transparent_painting != 0;
}
static NSUInteger NativeModifiers(int cef_modifiers) { static NSUInteger NativeModifiers(int cef_modifiers) {
NSUInteger native_modifiers = 0; NSUInteger native_modifiers = 0;
if (cef_modifiers & EVENTFLAG_SHIFT_DOWN) if (cef_modifiers & EVENTFLAG_SHIFT_DOWN)

View File

@ -701,7 +701,7 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
case WM_DWMCOMPOSITIONCHANGED: case WM_DWMCOMPOSITIONCHANGED:
// Message sent to top-level windows when composition has been enabled or // Message sent to top-level windows when composition has been enabled or
// disabled. // disabled.
if (browser && browser->window_info_.transparent_painting) if (browser && browser->IsTransparent())
SetAeroGlass(hwnd); SetAeroGlass(hwnd);
break; break;
} }
@ -739,7 +739,7 @@ bool CefBrowserHostImpl::PlatformCreateWindow() {
if (!window_info_.window) if (!window_info_.window)
return false; return false;
if (window_info_.transparent_painting && if (window_info_.transparent_painting_enabled &&
!(window_info_.style & WS_CHILD)) { !(window_info_.style & WS_CHILD)) {
// Transparent top-level windows will be given "sheet of glass" effect. // Transparent top-level windows will be given "sheet of glass" effect.
SetAeroGlass(window_info_.window); SetAeroGlass(window_info_.window);
@ -885,11 +885,11 @@ void CefBrowserHostImpl::PlatformHandleExternalProtocol(const GURL& url) {
// static // static
bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) { bool CefBrowserHostImpl::IsWindowRenderingDisabled(const CefWindowInfo& info) {
return info.window_rendering_disabled ? true : false; return info.windowless_rendering_enabled ? true : false;
} }
bool CefBrowserHostImpl::IsTransparent() { bool CefBrowserHostImpl::IsTransparent() {
return window_info_.transparent_painting != 0; return window_info_.transparent_painting_enabled ? true : false;
} }
void CefBrowserHostImpl::PlatformTranslateKeyEvent( void CefBrowserHostImpl::PlatformTranslateKeyEvent(

View File

@ -70,7 +70,7 @@ void CefBrowserMainParts::PostMainMessageLoopStart() {
content::ContentWebUIControllerFactory::GetInstance()); content::ContentWebUIControllerFactory::GetInstance());
#if defined(OS_LINUX) #if defined(OS_LINUX)
printing::PrintingContextGtk::SetCreatePrintDialogFunction( printing::PrintingContextLinux::SetCreatePrintDialogFunction(
&PrintDialogGtk::CreatePrintDialog); &PrintDialogGtk::CreatePrintDialog);
#endif #endif
} }

View File

@ -225,7 +225,8 @@ prerender::PrerenderTracker* ChromeBrowserProcessStub::prerender_tracker() {
return NULL; return NULL;
} }
ComponentUpdateService* ChromeBrowserProcessStub::component_updater() { component_updater::ComponentUpdateService*
ChromeBrowserProcessStub::component_updater() {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
return NULL; return NULL;
} }
@ -235,8 +236,8 @@ CRLSetFetcher* ChromeBrowserProcessStub::crl_set_fetcher() {
return NULL; return NULL;
} }
PnaclComponentInstaller* component_updater::PnaclComponentInstaller*
ChromeBrowserProcessStub::pnacl_component_installer() { ChromeBrowserProcessStub::pnacl_component_installer() {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
return NULL; return NULL;
} }

View File

@ -82,9 +82,11 @@ class ChromeBrowserProcessStub : public BrowserProcess {
virtual ChromeNetLog* net_log() OVERRIDE; virtual ChromeNetLog* net_log() OVERRIDE;
virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE;
virtual ComponentUpdateService* component_updater() OVERRIDE; virtual component_updater::ComponentUpdateService*
component_updater() OVERRIDE;
virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE;
virtual PnaclComponentInstaller* pnacl_component_installer() OVERRIDE; virtual component_updater::PnaclComponentInstaller*
pnacl_component_installer() OVERRIDE;
virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE; virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE;
virtual MediaFileSystemRegistry* virtual MediaFileSystemRegistry*
media_file_system_registry() OVERRIDE; media_file_system_registry() OVERRIDE;

View File

@ -81,9 +81,9 @@ bool GetCookieDomain(const GURL& url,
result); result);
} }
void RunCompletionOnIOThread(CefRefPtr<CefCompletionHandler> handler) { void RunCompletionOnIOThread(CefRefPtr<CefCompletionCallback> callback) {
CEF_POST_TASK(CEF_IOT, CEF_POST_TASK(CEF_IOT,
base::Bind(&CefCompletionHandler::OnComplete, handler.get())); base::Bind(&CefCompletionCallback::OnComplete, callback.get()));
} }
} // namespace } // namespace
@ -300,7 +300,7 @@ bool CefCookieManagerImpl::SetStoragePath(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
persist_session_cookies, persist_session_cookies,
NULL, NULL,
scoped_ptr<content::CookieCryptoDelegate>()); NULL);
} else { } else {
NOTREACHED() << "The cookie storage directory could not be created"; NOTREACHED() << "The cookie storage directory could not be created";
storage_path_.clear(); storage_path_.clear();
@ -327,26 +327,27 @@ bool CefCookieManagerImpl::SetStoragePath(
return true; return true;
} }
bool CefCookieManagerImpl::FlushStore(CefRefPtr<CefCompletionHandler> handler) { bool CefCookieManagerImpl::FlushStore(
CefRefPtr<CefCompletionCallback> callback) {
if (CEF_CURRENTLY_ON_IOT()) { if (CEF_CURRENTLY_ON_IOT()) {
if (!cookie_monster_) { if (!cookie_monster_) {
if (handler.get()) if (callback.get())
RunCompletionOnIOThread(handler); RunCompletionOnIOThread(callback);
return true; return true;
} }
base::Closure callback; base::Closure flush_callback;
if (handler.get()) if (callback.get())
callback = base::Bind(RunCompletionOnIOThread, handler); flush_callback = base::Bind(RunCompletionOnIOThread, callback);
else else
callback = base::Bind(&base::DoNothing); flush_callback = base::Bind(&base::DoNothing);
cookie_monster_->FlushStore(callback); cookie_monster_->FlushStore(flush_callback);
} else { } else {
// Execute on the IO thread. // Execute on the IO thread.
CEF_POST_TASK(CEF_IOT, CEF_POST_TASK(CEF_IOT,
base::Bind(base::IgnoreResult(&CefCookieManagerImpl::FlushStore), base::Bind(base::IgnoreResult(&CefCookieManagerImpl::FlushStore),
this, handler)); this, callback));
} }
return true; return true;

View File

@ -31,7 +31,7 @@ class CefCookieManagerImpl : public CefCookieManager {
const CefString& cookie_name) OVERRIDE; const CefString& cookie_name) OVERRIDE;
virtual bool SetStoragePath(const CefString& path, virtual bool SetStoragePath(const CefString& path,
bool persist_session_cookies) OVERRIDE; bool persist_session_cookies) OVERRIDE;
virtual bool FlushStore(CefRefPtr<CefCompletionHandler> handler) OVERRIDE; virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
net::CookieMonster* cookie_monster() { return cookie_monster_; } net::CookieMonster* cookie_monster() { return cookie_monster_; }

View File

@ -1,215 +1,216 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "libcef/browser/media_capture_devices_dispatcher.h" #include "libcef/browser/media_capture_devices_dispatcher.h"
#include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h" #include "base/prefs/pref_service.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_devices_monitor.h" #include "content/public/browser/media_devices_monitor.h"
#include "content/public/common/media_stream_request.h" #include "content/public/common/media_stream_request.h"
using content::BrowserThread; using content::BrowserThread;
using content::MediaStreamDevices; using content::MediaStreamDevices;
namespace { namespace {
const content::MediaStreamDevice* FindDefaultDeviceWithId( const content::MediaStreamDevice* FindDefaultDeviceWithId(
const content::MediaStreamDevices& devices, const content::MediaStreamDevices& devices,
const std::string& device_id) { const std::string& device_id) {
if (devices.empty()) if (devices.empty())
return NULL; return NULL;
content::MediaStreamDevices::const_iterator iter = devices.begin(); content::MediaStreamDevices::const_iterator iter = devices.begin();
for (; iter != devices.end(); ++iter) { for (; iter != devices.end(); ++iter) {
if (iter->id == device_id) { if (iter->id == device_id) {
return &(*iter); return &(*iter);
} }
} }
return &(*devices.begin()); return &(*devices.begin());
}; };
} // namespace } // namespace
CefMediaCaptureDevicesDispatcher* CefMediaCaptureDevicesDispatcher*
CefMediaCaptureDevicesDispatcher::GetInstance() { CefMediaCaptureDevicesDispatcher::GetInstance() {
return Singleton<CefMediaCaptureDevicesDispatcher>::get(); return Singleton<CefMediaCaptureDevicesDispatcher>::get();
} }
CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher() CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher()
: devices_enumerated_(false) {} : devices_enumerated_(false) {}
CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {} CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {}
void CefMediaCaptureDevicesDispatcher::RegisterPrefs( void CefMediaCaptureDevicesDispatcher::RegisterPrefs(
PrefRegistrySimple* registry) { PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kDefaultAudioCaptureDevice, registry->RegisterStringPref(prefs::kDefaultAudioCaptureDevice,
std::string()); std::string());
registry->RegisterStringPref(prefs::kDefaultVideoCaptureDevice, registry->RegisterStringPref(prefs::kDefaultVideoCaptureDevice,
std::string()); std::string());
} }
void CefMediaCaptureDevicesDispatcher::AddObserver(Observer* observer) { void CefMediaCaptureDevicesDispatcher::AddObserver(Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!observers_.HasObserver(observer)) if (!observers_.HasObserver(observer))
observers_.AddObserver(observer); observers_.AddObserver(observer);
} }
void CefMediaCaptureDevicesDispatcher::RemoveObserver(Observer* observer) { void CefMediaCaptureDevicesDispatcher::RemoveObserver(Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observers_.RemoveObserver(observer); observers_.RemoveObserver(observer);
} }
const MediaStreamDevices& const MediaStreamDevices&
CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() { CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!devices_enumerated_) { if (!devices_enumerated_) {
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::Bind(&content::EnsureMonitorCaptureDevices)); base::Bind(&content::EnsureMonitorCaptureDevices));
devices_enumerated_ = true; devices_enumerated_ = true;
} }
return audio_devices_; return audio_devices_;
} }
const MediaStreamDevices& const MediaStreamDevices&
CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() { CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!devices_enumerated_) { if (!devices_enumerated_) {
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::Bind(&content::EnsureMonitorCaptureDevices)); base::Bind(&content::EnsureMonitorCaptureDevices));
devices_enumerated_ = true; devices_enumerated_ = true;
} }
return video_devices_; return video_devices_;
} }
void CefMediaCaptureDevicesDispatcher::GetDefaultDevices( void CefMediaCaptureDevicesDispatcher::GetDefaultDevices(
PrefService* prefs, PrefService* prefs,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices) { content::MediaStreamDevices* devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(audio || video); DCHECK(audio || video);
std::string default_device; std::string default_device;
if (audio) { if (audio) {
default_device = prefs->GetString(prefs::kDefaultAudioCaptureDevice); default_device = prefs->GetString(prefs::kDefaultAudioCaptureDevice);
GetRequestedDevice(default_device, true, false, devices); GetRequestedDevice(default_device, true, false, devices);
} }
if (video) { if (video) {
default_device = prefs->GetString(prefs::kDefaultVideoCaptureDevice); default_device = prefs->GetString(prefs::kDefaultVideoCaptureDevice);
GetRequestedDevice(default_device, false, true, devices); GetRequestedDevice(default_device, false, true, devices);
} }
} }
void CefMediaCaptureDevicesDispatcher::GetRequestedDevice( void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
const std::string& requested_device_id, const std::string& requested_device_id,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices) { content::MediaStreamDevices* devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(audio || video); DCHECK(audio || video);
if (audio) { if (audio) {
const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
const content::MediaStreamDevice* const device = const content::MediaStreamDevice* const device =
FindDefaultDeviceWithId(audio_devices, requested_device_id); FindDefaultDeviceWithId(audio_devices, requested_device_id);
if (device) if (device)
devices->push_back(*device); devices->push_back(*device);
} }
if (video) { if (video) {
const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
const content::MediaStreamDevice* const device = const content::MediaStreamDevice* const device =
FindDefaultDeviceWithId(video_devices, requested_device_id); FindDefaultDeviceWithId(video_devices, requested_device_id);
if (device) if (device)
devices->push_back(*device); devices->push_back(*device);
} }
} }
void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged( void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) { const content::MediaStreamDevices& devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, BrowserThread::UI, FROM_HERE,
base::Bind( base::Bind(
&CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread, &CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread,
base::Unretained(this), devices)); base::Unretained(this), devices));
} }
void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged( void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged(
const content::MediaStreamDevices& devices) { const content::MediaStreamDevices& devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, BrowserThread::UI, FROM_HERE,
base::Bind( base::Bind(
&CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread, &CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread,
base::Unretained(this), devices)); base::Unretained(this), devices));
} }
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged( void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int page_request_id, int page_request_id,
const GURL& security_origin,
const content::MediaStreamDevice& device, const content::MediaStreamDevice& device,
content::MediaRequestState state) { content::MediaRequestState state) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, BrowserThread::UI, FROM_HERE,
base::Bind( base::Bind(
&CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread, &CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread,
base::Unretained(this), render_process_id, render_view_id, base::Unretained(this), render_process_id, render_view_id,
page_request_id, device, state)); page_request_id, device, state));
} }
void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlayingChanged( void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlayingChanged(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int stream_id, int stream_id,
bool is_playing, bool is_playing,
float power_dbfs, float power_dbfs,
bool clipped) { bool clipped) {
} }
void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream( void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
int render_process_id, int render_process_id,
int render_view_id) { int render_view_id) {
} }
void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread( void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread(
const content::MediaStreamDevices& devices) { const content::MediaStreamDevices& devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
devices_enumerated_ = true; devices_enumerated_ = true;
audio_devices_ = devices; audio_devices_ = devices;
FOR_EACH_OBSERVER(Observer, observers_, FOR_EACH_OBSERVER(Observer, observers_,
OnUpdateAudioDevices(audio_devices_)); OnUpdateAudioDevices(audio_devices_));
} }
void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread( void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread(
const content::MediaStreamDevices& devices){ const content::MediaStreamDevices& devices){
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
devices_enumerated_ = true; devices_enumerated_ = true;
video_devices_ = devices; video_devices_ = devices;
FOR_EACH_OBSERVER(Observer, observers_, FOR_EACH_OBSERVER(Observer, observers_,
OnUpdateVideoDevices(video_devices_)); OnUpdateVideoDevices(video_devices_));
} }
void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread( void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int page_request_id, int page_request_id,
const content::MediaStreamDevice& device, const content::MediaStreamDevice& device,
content::MediaRequestState state) { content::MediaRequestState state) {
FOR_EACH_OBSERVER(Observer, observers_, FOR_EACH_OBSERVER(Observer, observers_,
OnRequestUpdate(render_process_id, OnRequestUpdate(render_process_id,
render_view_id, render_view_id,
page_request_id, page_request_id,
device, device,
state)); state));
} }

View File

@ -1,127 +1,128 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #ifndef CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#define CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #define CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#include "base/callback.h" #include "base/callback.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "content/public/browser/media_observer.h" #include "content/public/browser/media_observer.h"
#include "content/public/common/media_stream_request.h" #include "content/public/common/media_stream_request.h"
class PrefRegistrySimple; class PrefRegistrySimple;
class PrefService; class PrefService;
// This singleton is used to receive updates about media events from the content // This singleton is used to receive updates about media events from the content
// layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc]. // layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc].
class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
public: public:
class Observer { class Observer {
public: public:
// Handle an information update consisting of a up-to-date audio capture // Handle an information update consisting of a up-to-date audio capture
// device lists. This happens when a microphone is plugged in or unplugged. // device lists. This happens when a microphone is plugged in or unplugged.
virtual void OnUpdateAudioDevices( virtual void OnUpdateAudioDevices(
const content::MediaStreamDevices& devices) {} const content::MediaStreamDevices& devices) {}
// Handle an information update consisting of a up-to-date video capture // Handle an information update consisting of a up-to-date video capture
// device lists. This happens when a camera is plugged in or unplugged. // device lists. This happens when a camera is plugged in or unplugged.
virtual void OnUpdateVideoDevices( virtual void OnUpdateVideoDevices(
const content::MediaStreamDevices& devices) {} const content::MediaStreamDevices& devices) {}
// Handle an information update related to a media stream request. // Handle an information update related to a media stream request.
virtual void OnRequestUpdate( virtual void OnRequestUpdate(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int page_request_id, int page_request_id,
const content::MediaStreamDevice& device, const content::MediaStreamDevice& device,
const content::MediaRequestState state) {} const content::MediaRequestState state) {}
virtual ~Observer() {} virtual ~Observer() {}
}; };
static CefMediaCaptureDevicesDispatcher* GetInstance(); static CefMediaCaptureDevicesDispatcher* GetInstance();
// Registers the preferences related to Media Stream default devices. // Registers the preferences related to Media Stream default devices.
static void RegisterPrefs(PrefRegistrySimple* registry); static void RegisterPrefs(PrefRegistrySimple* registry);
// Methods for observers. Called on UI thread. // Methods for observers. Called on UI thread.
// Observers should add themselves on construction and remove themselves // Observers should add themselves on construction and remove themselves
// on destruction. // on destruction.
void AddObserver(Observer* observer); void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer); void RemoveObserver(Observer* observer);
const content::MediaStreamDevices& GetAudioCaptureDevices(); const content::MediaStreamDevices& GetAudioCaptureDevices();
const content::MediaStreamDevices& GetVideoCaptureDevices(); const content::MediaStreamDevices& GetVideoCaptureDevices();
// Helper to get the default devices which can be used by the media request, // Helper to get the default devices which can be used by the media request,
// if the return list is empty, it means there is no available device on the // if the return list is empty, it means there is no available device on the
// OS. // OS.
// Called on the UI thread. // Called on the UI thread.
void GetDefaultDevices(PrefService* prefs, void GetDefaultDevices(PrefService* prefs,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices); content::MediaStreamDevices* devices);
// Helper for picking the device that was requested for an OpenDevice request. // Helper for picking the device that was requested for an OpenDevice request.
// If the device requested is not available it will revert to using the first // If the device requested is not available it will revert to using the first
// available one instead or will return an empty list if no devices of the // available one instead or will return an empty list if no devices of the
// requested kind are present. // requested kind are present.
void GetRequestedDevice(const std::string& requested_device_id, void GetRequestedDevice(const std::string& requested_device_id,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices); content::MediaStreamDevices* devices);
// Overridden from content::MediaObserver: // Overridden from content::MediaObserver:
virtual void OnAudioCaptureDevicesChanged( virtual void OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE; const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnVideoCaptureDevicesChanged( virtual void OnVideoCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE; const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnMediaRequestStateChanged( virtual void OnMediaRequestStateChanged(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int page_request_id, int page_request_id,
const GURL& security_origin,
const content::MediaStreamDevice& device, const content::MediaStreamDevice& device,
content::MediaRequestState state) OVERRIDE; content::MediaRequestState state) OVERRIDE;
virtual void OnAudioStreamPlayingChanged( virtual void OnAudioStreamPlayingChanged(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int stream_id, int stream_id,
bool is_playing, bool is_playing,
float power_dbfs, float power_dbfs,
bool clipped) OVERRIDE; bool clipped) OVERRIDE;
virtual void OnCreatingAudioStream(int render_process_id, virtual void OnCreatingAudioStream(int render_process_id,
int render_view_id) OVERRIDE; int render_view_id) OVERRIDE;
private: private:
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>; friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
CefMediaCaptureDevicesDispatcher(); CefMediaCaptureDevicesDispatcher();
virtual ~CefMediaCaptureDevicesDispatcher(); virtual ~CefMediaCaptureDevicesDispatcher();
// Called by the MediaObserver() functions, executed on UI thread. // Called by the MediaObserver() functions, executed on UI thread.
void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices); void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices);
void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices); void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices);
void UpdateMediaRequestStateOnUIThread( void UpdateMediaRequestStateOnUIThread(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
int page_request_id, int page_request_id,
const content::MediaStreamDevice& device, const content::MediaStreamDevice& device,
content::MediaRequestState state); content::MediaRequestState state);
// A list of cached audio capture devices. // A list of cached audio capture devices.
content::MediaStreamDevices audio_devices_; content::MediaStreamDevices audio_devices_;
// A list of cached video capture devices. // A list of cached video capture devices.
content::MediaStreamDevices video_devices_; content::MediaStreamDevices video_devices_;
// A list of observers for the device update notifications. // A list of observers for the device update notifications.
ObserverList<Observer> observers_; ObserverList<Observer> observers_;
// Flag to indicate if device enumeration has been done/doing. // Flag to indicate if device enumeration has been done/doing.
// Only accessed on UI thread. // Only accessed on UI thread.
bool devices_enumerated_; bool devices_enumerated_;
}; };
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_

View File

@ -9,7 +9,8 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/logging.h" #include "base/logging.h"
#include "content/public/browser/render_view_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "grit/cef_strings.h" #include "grit/cef_strings.h"
@ -32,8 +33,12 @@ CefString GetLabel(int message_id) {
} // namespace } // namespace
CefMenuCreator::CefMenuCreator(CefBrowserHostImpl* browser) CefMenuCreator::CefMenuCreator(CefBrowserHostImpl* browser,
content::RenderFrameHost* render_frame_host)
: browser_(browser) { : browser_(browser) {
DCHECK(render_frame_host);
render_process_id_ = render_frame_host->GetProcess()->GetID();
render_frame_id_ = render_frame_host->GetRoutingID();
model_ = new CefMenuModelImpl(this); model_ = new CefMenuModelImpl(this);
} }
@ -199,10 +204,10 @@ void CefMenuCreator::MenuClosed(CefRefPtr<CefMenuModelImpl> source) {
browser_->GetWebContents()->GetRenderWidgetHostView(); browser_->GetWebContents()->GetRenderWidgetHostView();
if (view) if (view)
view->SetShowingContextMenu(false); view->SetShowingContextMenu(false);
content::RenderViewHost* rvh = content::RenderFrameHost* render_frame_host =
browser_->GetWebContents()->GetRenderViewHost(); content::RenderFrameHost::FromID(render_process_id_, render_frame_id_);
if (rvh) if (render_frame_host)
rvh->NotifyContextMenuClosed(params_.custom_context); render_frame_host->NotifyContextMenuClosed(params_.custom_context);
} }
} }

View File

@ -11,6 +11,10 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "content/public/common/context_menu_params.h" #include "content/public/common/context_menu_params.h"
namespace content {
class RenderFrameHost;
};
class CefBrowserHostImpl; class CefBrowserHostImpl;
class CefMenuCreator : public CefMenuModelImpl::Delegate { class CefMenuCreator : public CefMenuModelImpl::Delegate {
@ -22,7 +26,8 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate {
virtual bool RunContextMenu(CefMenuCreator* manager) =0; virtual bool RunContextMenu(CefMenuCreator* manager) =0;
}; };
explicit CefMenuCreator(CefBrowserHostImpl* browser); CefMenuCreator(CefBrowserHostImpl* browser,
content::RenderFrameHost* render_frame_host);
virtual ~CefMenuCreator(); virtual ~CefMenuCreator();
// Returns true if the context menu is currently showing. // Returns true if the context menu is currently showing.
@ -53,6 +58,11 @@ class CefMenuCreator : public CefMenuModelImpl::Delegate {
// CefBrowserHostImpl pointer is guaranteed to outlive this object. // CefBrowserHostImpl pointer is guaranteed to outlive this object.
CefBrowserHostImpl* browser_; CefBrowserHostImpl* browser_;
// The RenderFrameHost's IDs.
int render_process_id_;
int render_frame_id_;
CefRefPtr<CefMenuModelImpl> model_; CefRefPtr<CefMenuModelImpl> model_;
content::ContextMenuParams params_; content::ContextMenuParams params_;
scoped_ptr<Runner> runner_; scoped_ptr<Runner> runner_;

View File

@ -9,10 +9,11 @@
#include <string> #include <string>
#include "libcef/common/upload_data.h"
#include "content/public/browser/global_request_id.h" #include "content/public/browser/global_request_id.h"
#include "content/public/common/page_transition_types.h" #include "content/public/common/page_transition_types.h"
#include "content/public/common/referrer.h" #include "content/public/common/referrer.h"
#include "net/base/upload_data.h"
#include "ui/base/window_open_disposition.h" #include "ui/base/window_open_disposition.h"
#include "url/gurl.h" #include "url/gurl.h"

View File

@ -369,7 +369,8 @@ content::BackingStore* CefRenderWidgetHostViewOSR::AllocBackingStore(
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface( void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface(
const gfx::Rect& src_subrect, const gfx::Rect& src_subrect,
const gfx::Size& dst_size, const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback) { const base::Callback<void(bool, const SkBitmap&)>& callback,
const SkBitmap::Config config) {
} }
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame( void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame(

View File

@ -156,7 +156,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
virtual void CopyFromCompositingSurface( virtual void CopyFromCompositingSurface(
const gfx::Rect& src_subrect, const gfx::Rect& src_subrect,
const gfx::Size& dst_size, const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; const base::Callback<void(bool, const SkBitmap&)>& callback,
const SkBitmap::Config config) OVERRIDE;
virtual void CopyFromCompositingSurfaceToVideoFrame( virtual void CopyFromCompositingSurfaceToVideoFrame(
const gfx::Rect& src_subrect, const gfx::Rect& src_subrect,
const scoped_refptr<media::VideoFrame>& target, const scoped_refptr<media::VideoFrame>& target,

View File

@ -25,7 +25,7 @@ void InstallInternalProtectedHandlers(
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
net::FtpTransactionFactory* ftp_transaction_factory) { net::FtpTransactionFactory* ftp_transaction_factory) {
protocol_handlers->insert( protocol_handlers->insert(
std::make_pair(chrome::kDataScheme, std::make_pair(content::kDataScheme,
linked_ptr<net::URLRequestJobFactory::ProtocolHandler>( linked_ptr<net::URLRequestJobFactory::ProtocolHandler>(
new net::DataProtocolHandler))); new net::DataProtocolHandler)));
protocol_handlers->insert( protocol_handlers->insert(

View File

@ -18,6 +18,7 @@
#include "libcef/common/request_impl.h" #include "libcef/common/request_impl.h"
#include "libcef/common/response_impl.h" #include "libcef/common/response_impl.h"
#include "libcef/common/scheme_registration.h" #include "libcef/common/scheme_registration.h"
#include "libcef/common/upload_data.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
@ -27,7 +28,6 @@
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "net/base/completion_callback.h" #include "net/base/completion_callback.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h" #include "net/http/http_response_headers.h"
#include "net/http/http_util.h" #include "net/http/http_util.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"

View File

@ -11,7 +11,8 @@
#include "base/debug/trace_event.h" #include "base/debug/trace_event.h"
#include "base/time/time.h" #include "base/time/time.h"
bool CefBeginTracing(const CefString& categories) { bool CefBeginTracing(const CefString& categories,
CefRefPtr<CefCompletionCallback> callback) {
if (!CONTEXT_STATE_VALID()) { if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid"; NOTREACHED() << "context not valid";
return false; return false;
@ -26,11 +27,11 @@ bool CefBeginTracing(const CefString& categories) {
if (!subscriber) if (!subscriber)
return false; return false;
return subscriber->BeginTracing(categories); return subscriber->BeginTracing(categories, callback);
} }
bool CefEndTracingAsync(const CefString& tracing_file, bool CefEndTracing(const CefString& tracing_file,
CefRefPtr<CefEndTracingCallback> callback) { CefRefPtr<CefEndTracingCallback> callback) {
if (!CONTEXT_STATE_VALID()) { if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid"; NOTREACHED() << "context not valid";
return false; return false;
@ -45,7 +46,7 @@ bool CefEndTracingAsync(const CefString& tracing_file,
if (!subscriber) if (!subscriber)
return false; return false;
return subscriber->EndTracingAsync(base::FilePath(tracing_file), callback); return subscriber->EndTracing(base::FilePath(tracing_file), callback);
} }
int64 CefNowFromSystemTraceTime() { int64 CefNowFromSystemTraceTime() {

View File

@ -26,7 +26,9 @@ CefTraceSubscriber::~CefTraceSubscriber() {
} }
} }
bool CefTraceSubscriber::BeginTracing(const std::string& categories) { bool CefTraceSubscriber::BeginTracing(
const std::string& categories,
CefRefPtr<CefCompletionCallback> callback) {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();
if (collecting_trace_data_) if (collecting_trace_data_)
@ -34,13 +36,16 @@ bool CefTraceSubscriber::BeginTracing(const std::string& categories) {
collecting_trace_data_ = true; collecting_trace_data_ = true;
TracingController::EnableRecordingDoneCallback done_callback;
if (callback.get())
done_callback = base::Bind(&CefCompletionCallback::OnComplete, callback);
TracingController::GetInstance()->EnableRecording( TracingController::GetInstance()->EnableRecording(
categories, TracingController::DEFAULT_OPTIONS, categories, TracingController::DEFAULT_OPTIONS, done_callback);
TracingController::EnableRecordingDoneCallback());
return true; return true;
} }
bool CefTraceSubscriber::EndTracingAsync( bool CefTraceSubscriber::EndTracing(
const base::FilePath& tracing_file, const base::FilePath& tracing_file,
CefRefPtr<CefEndTracingCallback> callback) { CefRefPtr<CefEndTracingCallback> callback) {
CEF_REQUIRE_UIT(); CEF_REQUIRE_UIT();

View File

@ -19,9 +19,10 @@ class CefTraceSubscriber {
CefTraceSubscriber(); CefTraceSubscriber();
virtual ~CefTraceSubscriber(); virtual ~CefTraceSubscriber();
bool BeginTracing(const std::string& categories); bool BeginTracing(const std::string& categories,
bool EndTracingAsync(const base::FilePath& tracing_file, CefRefPtr<CefCompletionCallback> callback);
CefRefPtr<CefEndTracingCallback> callback); bool EndTracing(const base::FilePath& tracing_file,
CefRefPtr<CefEndTracingCallback> callback);
private: private:
void OnTracingFileResult(CefRefPtr<CefEndTracingCallback> callback, void OnTracingFileResult(CefRefPtr<CefEndTracingCallback> callback,

View File

@ -274,7 +274,7 @@ void CefURLRequestContextGetter::SetCookieStoragePath(
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
persist_session_cookies, persist_session_cookies,
NULL, NULL,
scoped_ptr<content::CookieCryptoDelegate>()); NULL);
} else { } else {
NOTREACHED() << "The cookie storage directory could not be created"; NOTREACHED() << "The cookie storage directory could not be created";
} }

View File

@ -6,12 +6,13 @@
// IPC messages for CEF. // IPC messages for CEF.
// Multiply-included message file, hence no include guard. // Multiply-included message file, hence no include guard.
#include "libcef/common/upload_data.h"
#include "base/memory/shared_memory.h" #include "base/memory/shared_memory.h"
#include "base/values.h" #include "base/values.h"
#include "content/public/common/common_param_traits.h" #include "content/public/common/common_param_traits.h"
#include "content/public/common/referrer.h" #include "content/public/common/referrer.h"
#include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_macros.h"
#include "net/base/upload_data.h"
// TODO(cef): Re-using the message start for extensions may be problematic in // TODO(cef): Re-using the message start for extensions may be problematic in
// the future. It would be better if ipc_message_utils.h contained a value // the future. It would be better if ipc_message_utils.h contained a value

View File

@ -291,6 +291,13 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
command_line->AppendSwitchASCII(switches::kContextSafetyImplementation, command_line->AppendSwitchASCII(switches::kContextSafetyImplementation,
base::IntToString(settings.context_safety_implementation)); base::IntToString(settings.context_safety_implementation));
} }
if (settings.windowless_rendering_enabled) {
// Must disable delegated renderer and threaded compositing for select
// popups to display correctly in a windowless browser.
command_line->AppendSwitch(switches::kDisableDelegatedRenderer);
command_line->AppendSwitch(switches::kDisableThreadedCompositing);
}
} }
if (content_client_.application().get()) { if (content_client_.application().get()) {

View File

@ -8,10 +8,10 @@
#include "libcef/common/http_header_utils.h" #include "libcef/common/http_header_utils.h"
#include "libcef/common/request_impl.h" #include "libcef/common/request_impl.h"
#include "libcef/common/task_runner_impl.h" #include "libcef/common/task_runner_impl.h"
#include "libcef/common/upload_data.h"
#include "base/logging.h" #include "base/logging.h"
#include "content/public/browser/resource_request_info.h" #include "content/public/browser/resource_request_info.h"
#include "net/base/upload_data.h"
#include "net/base/upload_data_stream.h" #include "net/base/upload_data_stream.h"
#include "net/base/upload_element_reader.h" #include "net/base/upload_element_reader.h"
#include "net/base/upload_bytes_element_reader.h" #include "net/base/upload_bytes_element_reader.h"

View File

@ -28,7 +28,7 @@ bool IsInternalHandledScheme(const std::string& scheme) {
chrome::kBlobScheme, chrome::kBlobScheme,
chrome::kChromeDevToolsScheme, chrome::kChromeDevToolsScheme,
chrome::kChromeUIScheme, chrome::kChromeUIScheme,
chrome::kDataScheme, content::kDataScheme,
content::kFileScheme, content::kFileScheme,
content::kFileSystemScheme, content::kFileSystemScheme,
}; };
@ -48,7 +48,7 @@ bool IsInternalProtectedScheme(const std::string& scheme) {
static const char* schemes[] = { static const char* schemes[] = {
chrome::kBlobScheme, chrome::kBlobScheme,
chrome::kChromeUIScheme, chrome::kChromeUIScheme,
chrome::kDataScheme, content::kDataScheme,
content::kFileScheme, content::kFileScheme,
content::kFileSystemScheme, content::kFileSystemScheme,
#if !defined(DISABLE_FTP_SUPPORT) #if !defined(DISABLE_FTP_SUPPORT)

View File

@ -0,0 +1,37 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cef/libcef/common/upload_data.h"
#include "base/logging.h"
namespace net {
UploadData::UploadData()
: identifier_(0),
is_chunked_(false),
last_chunk_appended_(false) {
}
void UploadData::AppendBytes(const char* bytes, int bytes_len) {
DCHECK(!is_chunked_);
if (bytes_len > 0) {
elements_.push_back(new UploadElement());
elements_.back()->SetToBytes(bytes, bytes_len);
}
}
void UploadData::AppendFileRange(const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
DCHECK(!is_chunked_);
elements_.push_back(new UploadElement());
elements_.back()->SetToFilePathRange(file_path, offset, length,
expected_modification_time);
}
UploadData::~UploadData() {
}
} // namespace net

View File

@ -0,0 +1,83 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_COMMON_UPLOAD_DATA_H_
#define CEF_LIBCEF_COMMON_UPLOAD_DATA_H_
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/supports_user_data.h"
#include "net/base/net_export.h"
#include "net/base/upload_element.h"
namespace base {
class FilePath;
class Time;
} // namespace base
namespace net {
//-----------------------------------------------------------------------------
// A very concrete class representing the data to be uploaded as part of a
// URLRequest.
//
// Until there is a more abstract class for this, this one derives from
// SupportsUserData to allow users to stash random data by
// key and ensure its destruction when UploadData is finally deleted.
class NET_EXPORT UploadData
: public base::RefCounted<UploadData>,
public base::SupportsUserData {
public:
UploadData();
void AppendBytes(const char* bytes, int bytes_len);
void AppendFileRange(const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time);
// Initializes the object to send chunks of upload data over time rather
// than all at once. Chunked data may only contain bytes, not files.
void set_is_chunked(bool set) { is_chunked_ = set; }
bool is_chunked() const { return is_chunked_; }
// set_last_chunk_appended() is only used for serialization.
void set_last_chunk_appended(bool set) { last_chunk_appended_ = set; }
bool last_chunk_appended() const { return last_chunk_appended_; }
const ScopedVector<UploadElement>& elements() const {
return elements_;
}
ScopedVector<UploadElement>* elements_mutable() {
return &elements_;
}
void swap_elements(ScopedVector<UploadElement>* elements) {
elements_.swap(*elements);
}
// Identifies a particular upload instance, which is used by the cache to
// formulate a cache key. This value should be unique across browser
// sessions. A value of 0 is used to indicate an unspecified identifier.
void set_identifier(int64 id) { identifier_ = id; }
int64 identifier() const { return identifier_; }
private:
friend class base::RefCounted<UploadData>;
virtual ~UploadData();
ScopedVector<UploadElement> elements_;
int64 identifier_;
bool is_chunked_;
bool last_chunk_appended_;
DISALLOW_COPY_AND_ASSIGN(UploadData);
};
} // namespace net
#endif // CEF_LIBCEF_COMMON_UPLOAD_DATA_H_

View File

@ -37,7 +37,6 @@
#include "third_party/WebKit/public/web/WebScriptSource.h" #include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#include "third_party/WebKit/public/web/WebView.h" #include "third_party/WebKit/public/web/WebView.h"
#include "webkit/glue/webkit_glue.h"
using blink::WebFrame; using blink::WebFrame;
using blink::WebScriptSource; using blink::WebScriptSource;

View File

@ -517,7 +517,7 @@ bool CefContentRendererClient::OverrideCreatePlugin(
} }
bool CefContentRendererClient::HandleNavigation( bool CefContentRendererClient::HandleNavigation(
content::RenderView* view, content::RenderFrame* render_frame,
content::DocumentState* document_state, content::DocumentState* document_state,
int opener_id, int opener_id,
blink::WebFrame* frame, blink::WebFrame* frame,

View File

@ -82,7 +82,7 @@ class CefContentRendererClient : public content::ContentRendererClient,
blink::WebFrame* frame, blink::WebFrame* frame,
const blink::WebPluginParams& params, const blink::WebPluginParams& params,
blink::WebPlugin** plugin) OVERRIDE; blink::WebPlugin** plugin) OVERRIDE;
virtual bool HandleNavigation(content::RenderView* view, virtual bool HandleNavigation(content::RenderFrame* render_frame,
content::DocumentState* document_state, content::DocumentState* document_state,
int opener_id, int opener_id,
blink::WebFrame* frame, blink::WebFrame* frame,

View File

@ -112,8 +112,6 @@ CefDOMNodeImpl::Type CefDOMNodeImpl::GetType() {
return DOM_NODE_TYPE_TEXT; return DOM_NODE_TYPE_TEXT;
case WebNode::CDataSectionNode: case WebNode::CDataSectionNode:
return DOM_NODE_TYPE_CDATA_SECTION; return DOM_NODE_TYPE_CDATA_SECTION;
case WebNode::EntityNode:
return DOM_NODE_TYPE_ENTITY;
case WebNode::ProcessingInstructionsNode: case WebNode::ProcessingInstructionsNode:
return DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS; return DOM_NODE_TYPE_PROCESSING_INSTRUCTIONS;
case WebNode::CommentNode: case WebNode::CommentNode:
@ -124,10 +122,6 @@ CefDOMNodeImpl::Type CefDOMNodeImpl::GetType() {
return DOM_NODE_TYPE_DOCUMENT_TYPE; return DOM_NODE_TYPE_DOCUMENT_TYPE;
case WebNode::DocumentFragmentNode: case WebNode::DocumentFragmentNode:
return DOM_NODE_TYPE_DOCUMENT_FRAGMENT; return DOM_NODE_TYPE_DOCUMENT_FRAGMENT;
case WebNode::NotationNode:
return DOM_NODE_TYPE_NOTATION;
case WebNode::XPathNamespaceNode:
return DOM_NODE_TYPE_XPATH_NAMESPACE;
default: default:
return DOM_NODE_TYPE_UNSUPPORTED; return DOM_NODE_TYPE_UNSUPPORTED;
} }

View File

@ -620,7 +620,7 @@ v8::Local<v8::Value> CallV8Function(v8::Handle<v8::Context> context,
} }
} else { } else {
WebCore::WorkerScriptController* controller = WebCore::WorkerScriptController* controller =
WebCore::WorkerScriptController::controllerForContext(); WebCore::WorkerScriptController::controllerForContext(isolate);
DCHECK(controller); DCHECK(controller);
if (controller) { if (controller) {
func_rv = WebCore::ScriptController::callFunction( func_rv = WebCore::ScriptController::callFunction(
@ -1154,7 +1154,7 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
} }
// Create the new V8 object. // Create the new V8 object.
v8::Local<v8::Object> obj = v8::Object::New(); v8::Local<v8::Object> obj = v8::Object::New(isolate);
// Create a tracker object that will cause the user data and/or accessor // Create a tracker object that will cause the user data and/or accessor
// reference to be released when the V8 object is destroyed. // reference to be released when the V8 object is destroyed.

View File

@ -124,7 +124,7 @@ class CefV8HandleBase :
template <typename v8class> template <typename v8class>
class CefV8Handle : public CefV8HandleBase { class CefV8Handle : public CefV8HandleBase {
public: public:
typedef v8::Handle<v8class> handleType; typedef v8::Local<v8class> handleType;
typedef v8::Persistent<v8class> persistentType; typedef v8::Persistent<v8class> persistentType;
CefV8Handle(v8::Isolate* isolate, CefV8Handle(v8::Isolate* isolate,
@ -275,7 +275,7 @@ class CefV8ValueImpl : public CefV8Value {
class Handle : public CefV8HandleBase { class Handle : public CefV8HandleBase {
public: public:
typedef v8::Handle<v8::Value> handleType; typedef v8::Local<v8::Value> handleType;
typedef v8::Persistent<v8::Value> persistentType; typedef v8::Persistent<v8::Value> persistentType;
Handle(v8::Isolate* isolate, Handle(v8::Isolate* isolate,

View File

@ -274,7 +274,7 @@ need to be translated for each locale.-->
<message name="IDS_PRINT_SPOOL_FAILED_ERROR_TEXT" desc="Text in a messagebox when printing fails because of printer issues."> <message name="IDS_PRINT_SPOOL_FAILED_ERROR_TEXT" desc="Text in a messagebox when printing fails because of printer issues.">
Something went wrong when trying to print. Please check your printer and try again. Something went wrong when trying to print. Please check your printer and try again.
</message> </message>
<message name="IDS_PRINT_PREVIEW_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid."> <message name="IDS_PRINT_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid.">
The selected printer is not available or not installed correctly. Check your printer or try selecting another printer. The selected printer is not available or not installed correctly. Check your printer or try selecting another printer.
</message> </message>
</messages> </messages>

View File

@ -10,13 +10,13 @@
// for more information. // for more information.
// //
#include "libcef_dll/cpptoc/completion_handler_cpptoc.h" #include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand. // MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK completion_handler_on_complete( void CEF_CALLBACK completion_callback_on_complete(
struct _cef_completion_handler_t* self) { struct _cef_completion_callback_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self); DCHECK(self);
@ -24,21 +24,21 @@ void CEF_CALLBACK completion_handler_on_complete(
return; return;
// Execute // Execute
CefCompletionHandlerCppToC::Get(self)->OnComplete(); CefCompletionCallbackCppToC::Get(self)->OnComplete();
} }
// CONSTRUCTOR - Do not edit by hand. // CONSTRUCTOR - Do not edit by hand.
CefCompletionHandlerCppToC::CefCompletionHandlerCppToC( CefCompletionCallbackCppToC::CefCompletionCallbackCppToC(
CefCompletionHandler* cls) CefCompletionCallback* cls)
: CefCppToC<CefCompletionHandlerCppToC, CefCompletionHandler, : CefCppToC<CefCompletionCallbackCppToC, CefCompletionCallback,
cef_completion_handler_t>(cls) { cef_completion_callback_t>(cls) {
struct_.struct_.on_complete = completion_handler_on_complete; struct_.struct_.on_complete = completion_callback_on_complete;
} }
#ifndef NDEBUG #ifndef NDEBUG
template<> long CefCppToC<CefCompletionHandlerCppToC, CefCompletionHandler, template<> long CefCppToC<CefCompletionCallbackCppToC, CefCompletionCallback,
cef_completion_handler_t>::DebugObjCt = 0; cef_completion_callback_t>::DebugObjCt = 0;
#endif #endif

View File

@ -10,8 +10,8 @@
// for more information. // for more information.
// //
#ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_HANDLER_CPPTOC_H_ #ifndef CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_COMPLETION_HANDLER_CPPTOC_H_ #define CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_
#pragma once #pragma once
#ifndef USING_CEF_SHARED #ifndef USING_CEF_SHARED
@ -24,14 +24,14 @@
// Wrap a C++ class with a C structure. // Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only. // This class may be instantiated and accessed wrapper-side only.
class CefCompletionHandlerCppToC class CefCompletionCallbackCppToC
: public CefCppToC<CefCompletionHandlerCppToC, CefCompletionHandler, : public CefCppToC<CefCompletionCallbackCppToC, CefCompletionCallback,
cef_completion_handler_t> { cef_completion_callback_t> {
public: public:
explicit CefCompletionHandlerCppToC(CefCompletionHandler* cls); explicit CefCompletionCallbackCppToC(CefCompletionCallback* cls);
virtual ~CefCompletionHandlerCppToC() {} virtual ~CefCompletionCallbackCppToC() {}
}; };
#endif // USING_CEF_SHARED #endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_COMPLETION_HANDLER_CPPTOC_H_ #endif // CEF_LIBCEF_DLL_CPPTOC_COMPLETION_CALLBACK_CPPTOC_H_

View File

@ -11,7 +11,7 @@
// //
#include "libcef_dll/cpptoc/cookie_manager_cpptoc.h" #include "libcef_dll/cpptoc/cookie_manager_cpptoc.h"
#include "libcef_dll/ctocpp/completion_handler_ctocpp.h" #include "libcef_dll/ctocpp/completion_callback_ctocpp.h"
#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" #include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h"
#include "libcef_dll/transfer_util.h" #include "libcef_dll/transfer_util.h"
@ -184,17 +184,20 @@ int CEF_CALLBACK cookie_manager_set_storage_path(
} }
int CEF_CALLBACK cookie_manager_flush_store(struct _cef_cookie_manager_t* self, int CEF_CALLBACK cookie_manager_flush_store(struct _cef_cookie_manager_t* self,
cef_completion_handler_t* handler) { cef_completion_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self); DCHECK(self);
if (!self) if (!self)
return 0; return 0;
// Unverified params: handler // Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return 0;
// Execute // Execute
bool _retval = CefCookieManagerCppToC::Get(self)->FlushStore( bool _retval = CefCookieManagerCppToC::Get(self)->FlushStore(
CefCompletionHandlerCToCpp::Wrap(handler)); CefCompletionCallbackCToCpp::Wrap(callback));
// Return type: bool // Return type: bool
return _retval; return _retval;

View File

@ -10,12 +10,12 @@
// for more information. // for more information.
// //
#include "libcef_dll/ctocpp/completion_handler_ctocpp.h" #include "libcef_dll/ctocpp/completion_callback_ctocpp.h"
// VIRTUAL METHODS - Body may be edited by hand. // VIRTUAL METHODS - Body may be edited by hand.
void CefCompletionHandlerCToCpp::OnComplete() { void CefCompletionCallbackCToCpp::OnComplete() {
if (CEF_MEMBER_MISSING(struct_, on_complete)) if (CEF_MEMBER_MISSING(struct_, on_complete))
return; return;
@ -27,7 +27,7 @@ void CefCompletionHandlerCToCpp::OnComplete() {
#ifndef NDEBUG #ifndef NDEBUG
template<> long CefCToCpp<CefCompletionHandlerCToCpp, CefCompletionHandler, template<> long CefCToCpp<CefCompletionCallbackCToCpp, CefCompletionCallback,
cef_completion_handler_t>::DebugObjCt = 0; cef_completion_callback_t>::DebugObjCt = 0;
#endif #endif

View File

@ -10,8 +10,8 @@
// for more information. // for more information.
// //
#ifndef CEF_LIBCEF_DLL_CTOCPP_COMPLETION_HANDLER_CTOCPP_H_ #ifndef CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_COMPLETION_HANDLER_CTOCPP_H_ #define CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_CTOCPP_H_
#pragma once #pragma once
#ifndef BUILDING_CEF_SHARED #ifndef BUILDING_CEF_SHARED
@ -24,19 +24,19 @@
// Wrap a C structure with a C++ class. // Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only. // This class may be instantiated and accessed DLL-side only.
class CefCompletionHandlerCToCpp class CefCompletionCallbackCToCpp
: public CefCToCpp<CefCompletionHandlerCToCpp, CefCompletionHandler, : public CefCToCpp<CefCompletionCallbackCToCpp, CefCompletionCallback,
cef_completion_handler_t> { cef_completion_callback_t> {
public: public:
explicit CefCompletionHandlerCToCpp(cef_completion_handler_t* str) explicit CefCompletionCallbackCToCpp(cef_completion_callback_t* str)
: CefCToCpp<CefCompletionHandlerCToCpp, CefCompletionHandler, : CefCToCpp<CefCompletionCallbackCToCpp, CefCompletionCallback,
cef_completion_handler_t>(str) {} cef_completion_callback_t>(str) {}
virtual ~CefCompletionHandlerCToCpp() {} virtual ~CefCompletionCallbackCToCpp() {}
// CefCompletionHandler methods // CefCompletionCallback methods
virtual void OnComplete() OVERRIDE; virtual void OnComplete() OVERRIDE;
}; };
#endif // BUILDING_CEF_SHARED #endif // BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CTOCPP_COMPLETION_HANDLER_CTOCPP_H_ #endif // CEF_LIBCEF_DLL_CTOCPP_COMPLETION_CALLBACK_CTOCPP_H_

View File

@ -10,7 +10,7 @@
// for more information. // for more information.
// //
#include "libcef_dll/cpptoc/completion_handler_cpptoc.h" #include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" #include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
#include "libcef_dll/ctocpp/cookie_manager_ctocpp.h" #include "libcef_dll/ctocpp/cookie_manager_ctocpp.h"
#include "libcef_dll/transfer_util.h" #include "libcef_dll/transfer_util.h"
@ -172,17 +172,20 @@ bool CefCookieManagerCToCpp::SetStoragePath(const CefString& path,
} }
bool CefCookieManagerCToCpp::FlushStore( bool CefCookieManagerCToCpp::FlushStore(
CefRefPtr<CefCompletionHandler> handler) { CefRefPtr<CefCompletionCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, flush_store)) if (CEF_MEMBER_MISSING(struct_, flush_store))
return false; return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: handler // Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Execute // Execute
int _retval = struct_->flush_store(struct_, int _retval = struct_->flush_store(struct_,
CefCompletionHandlerCppToC::Wrap(handler)); CefCompletionCallbackCppToC::Wrap(callback));
// Return type: bool // Return type: bool
return _retval?true:false; return _retval?true:false;

View File

@ -46,7 +46,7 @@ class CefCookieManagerCToCpp
const CefString& cookie_name) OVERRIDE; const CefString& cookie_name) OVERRIDE;
virtual bool SetStoragePath(const CefString& path, virtual bool SetStoragePath(const CefString& path,
bool persist_session_cookies) OVERRIDE; bool persist_session_cookies) OVERRIDE;
virtual bool FlushStore(CefRefPtr<CefCompletionHandler> handler) OVERRIDE; virtual bool FlushStore(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
}; };
#endif // USING_CEF_SHARED #endif // USING_CEF_SHARED

View File

@ -71,7 +71,7 @@
#include "libcef_dll/cpptoc/zip_reader_cpptoc.h" #include "libcef_dll/cpptoc/zip_reader_cpptoc.h"
#include "libcef_dll/ctocpp/app_ctocpp.h" #include "libcef_dll/ctocpp/app_ctocpp.h"
#include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h" #include "libcef_dll/ctocpp/browser_process_handler_ctocpp.h"
#include "libcef_dll/ctocpp/completion_handler_ctocpp.h" #include "libcef_dll/ctocpp/completion_callback_ctocpp.h"
#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h" #include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h"
#include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h" #include "libcef_dll/ctocpp/cookie_visitor_ctocpp.h"
#include "libcef_dll/ctocpp/domevent_listener_ctocpp.h" #include "libcef_dll/ctocpp/domevent_listener_ctocpp.h"
@ -184,7 +184,7 @@ CEF_EXPORT void cef_shutdown() {
DCHECK_EQ(CefBrowserHostCppToC::DebugObjCt, 0); DCHECK_EQ(CefBrowserHostCppToC::DebugObjCt, 0);
DCHECK_EQ(CefBrowserProcessHandlerCToCpp::DebugObjCt, 0); DCHECK_EQ(CefBrowserProcessHandlerCToCpp::DebugObjCt, 0);
DCHECK_EQ(CefCallbackCppToC::DebugObjCt, 0); DCHECK_EQ(CefCallbackCppToC::DebugObjCt, 0);
DCHECK_EQ(CefCompletionHandlerCToCpp::DebugObjCt, 0); DCHECK_EQ(CefCompletionCallbackCToCpp::DebugObjCt, 0);
DCHECK_EQ(CefContextMenuHandlerCToCpp::DebugObjCt, 0); DCHECK_EQ(CefContextMenuHandlerCToCpp::DebugObjCt, 0);
DCHECK_EQ(CefContextMenuParamsCppToC::DebugObjCt, 0); DCHECK_EQ(CefContextMenuParamsCppToC::DebugObjCt, 0);
DCHECK_EQ(CefCookieVisitorCToCpp::DebugObjCt, 0); DCHECK_EQ(CefCookieVisitorCToCpp::DebugObjCt, 0);
@ -472,27 +472,33 @@ CEF_EXPORT int cef_post_delayed_task(cef_thread_id_t threadId,
return _retval; return _retval;
} }
CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories) { CEF_EXPORT int cef_begin_tracing(const cef_string_t* categories,
struct _cef_completion_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: callback; type: refptr_diff
DCHECK(callback);
if (!callback)
return 0;
// Unverified params: categories // Unverified params: categories
// Execute // Execute
bool _retval = CefBeginTracing( bool _retval = CefBeginTracing(
CefString(categories)); CefString(categories),
CefCompletionCallbackCToCpp::Wrap(callback));
// Return type: bool // Return type: bool
return _retval; return _retval;
} }
CEF_EXPORT int cef_end_tracing_async(const cef_string_t* tracing_file, CEF_EXPORT int cef_end_tracing(const cef_string_t* tracing_file,
struct _cef_end_tracing_callback_t* callback) { struct _cef_end_tracing_callback_t* callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: tracing_file, callback // Unverified params: tracing_file, callback
// Execute // Execute
bool _retval = CefEndTracingAsync( bool _retval = CefEndTracing(
CefString(tracing_file), CefString(tracing_file),
CefEndTracingCallbackCToCpp::Wrap(callback)); CefEndTracingCallbackCToCpp::Wrap(callback));

View File

@ -35,7 +35,7 @@
#include "include/cef_version.h" #include "include/cef_version.h"
#include "libcef_dll/cpptoc/app_cpptoc.h" #include "libcef_dll/cpptoc/app_cpptoc.h"
#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h" #include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h"
#include "libcef_dll/cpptoc/completion_handler_cpptoc.h" #include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h" #include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h"
#include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h" #include "libcef_dll/cpptoc/cookie_visitor_cpptoc.h"
#include "libcef_dll/cpptoc/domevent_listener_cpptoc.h" #include "libcef_dll/cpptoc/domevent_listener_cpptoc.h"
@ -176,7 +176,7 @@ CEF_GLOBAL void CefShutdown() {
DCHECK_EQ(CefBrowserHostCToCpp::DebugObjCt, 0); DCHECK_EQ(CefBrowserHostCToCpp::DebugObjCt, 0);
DCHECK_EQ(CefBrowserProcessHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefBrowserProcessHandlerCppToC::DebugObjCt, 0);
DCHECK_EQ(CefCallbackCToCpp::DebugObjCt, 0); DCHECK_EQ(CefCallbackCToCpp::DebugObjCt, 0);
DCHECK_EQ(CefCompletionHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefCompletionCallbackCppToC::DebugObjCt, 0);
DCHECK_EQ(CefContextMenuHandlerCppToC::DebugObjCt, 0); DCHECK_EQ(CefContextMenuHandlerCppToC::DebugObjCt, 0);
DCHECK_EQ(CefContextMenuParamsCToCpp::DebugObjCt, 0); DCHECK_EQ(CefContextMenuParamsCToCpp::DebugObjCt, 0);
DCHECK_EQ(CefCookieVisitorCppToC::DebugObjCt, 0); DCHECK_EQ(CefCookieVisitorCppToC::DebugObjCt, 0);
@ -455,27 +455,33 @@ CEF_GLOBAL bool CefPostDelayedTask(CefThreadId threadId,
return _retval?true:false; return _retval?true:false;
} }
CEF_GLOBAL bool CefBeginTracing(const CefString& categories) { CEF_GLOBAL bool CefBeginTracing(const CefString& categories,
CefRefPtr<CefCompletionCallback> callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: callback; type: refptr_diff
DCHECK(callback.get());
if (!callback.get())
return false;
// Unverified params: categories // Unverified params: categories
// Execute // Execute
int _retval = cef_begin_tracing( int _retval = cef_begin_tracing(
categories.GetStruct()); categories.GetStruct(),
CefCompletionCallbackCppToC::Wrap(callback));
// Return type: bool // Return type: bool
return _retval?true:false; return _retval?true:false;
} }
CEF_GLOBAL bool CefEndTracingAsync(const CefString& tracing_file, CEF_GLOBAL bool CefEndTracing(const CefString& tracing_file,
CefRefPtr<CefEndTracingCallback> callback) { CefRefPtr<CefEndTracingCallback> callback) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Unverified params: tracing_file, callback // Unverified params: tracing_file, callback
// Execute // Execute
int _retval = cef_end_tracing_async( int _retval = cef_end_tracing(
tracing_file.GetStruct(), tracing_file.GetStruct(),
CefEndTracingCallbackCppToC::Wrap(callback)); CefEndTracingCallbackCppToC::Wrap(callback));

View File

@ -15,10 +15,7 @@ patches = [
# Fix Xcode 4 build on OS X Lion. # Fix Xcode 4 build on OS X Lion.
# http://codereview.chromium.org/8086022/ # http://codereview.chromium.org/8086022/
# #
# Set use_default_render_theme=0 to use native-styled scrollbars with aura. # Don't use aura on Linux.
# Needs to be set here because setting the value in cef.gypi isn't picked up
# by third_party/WebKit/Source/build/features.gypi.
# https://code.google.com/p/chromiumembedded/issues/detail?id=180
'name': 'build', 'name': 'build',
'path': '../build/', 'path': '../build/',
}, },
@ -63,32 +60,24 @@ patches = [
'name': 'views_widget_180', 'name': 'views_widget_180',
'path': '../ui/views/widget/', 'path': '../ui/views/widget/',
}, },
{
# Use native-styled scrollbars with aura on Windows.
# https://code.google.com/p/chromiumembedded/issues/detail?id=180
'name': 'native_theme_180',
'path': '../ui/native_theme/',
},
{ {
# Allow continued use of ContentRendererClient::HandleNavigation. # Allow continued use of ContentRendererClient::HandleNavigation.
# https://code.google.com/p/chromiumembedded/issues/detail?id=1129 # https://code.google.com/p/chromiumembedded/issues/detail?id=1129
'name': 'content_nav_1129', 'name': 'content_nav_1129',
'path': '../content/', 'path': '../content/',
}, },
{
# Fix TracingController to properly track response callbacks when a
# TraceMessageFilter is removed before a response is received from
# the associated subprocess.
# https://code.google.com/p/chromiumembedded/issues/detail?id=1157
'name': 'tracing_1157',
'path': '../content/browser/tracing/',
},
{ {
# Allow customization of the background color on OS X. # Allow customization of the background color on OS X.
# http://code.google.com/p/chromiumembedded/issues/detail?id=1161 # http://code.google.com/p/chromiumembedded/issues/detail?id=1161
'name': 'renderer_host_1161', 'name': 'renderer_host_1161',
'path': '../content/browser/renderer_host/', 'path': '../content/browser/renderer_host/',
}, },
{
# Pass RenderFrameHost to WebContentsDelegate::HandleContextMenu.
# https://codereview.chromium.org/148843003/
'name': 'web_contents_304341',
'path': '../content/',
},
{ {
# Disable scollbar bounce and overlay on OS X. # Disable scollbar bounce and overlay on OS X.
# http://code.google.com/p/chromiumembedded/issues/detail?id=364 # http://code.google.com/p/chromiumembedded/issues/detail?id=364

View File

@ -1,6 +1,6 @@
Index: common.gypi Index: common.gypi
=================================================================== ===================================================================
--- common.gypi (revision 240657) --- common.gypi (revision 248478)
+++ common.gypi (working copy) +++ common.gypi (working copy)
@@ -9,6 +9,9 @@ @@ -9,6 +9,9 @@
# Variables expected to be overriden on the GYP command line (-D) or by # Variables expected to be overriden on the GYP command line (-D) or by
@ -12,18 +12,22 @@ Index: common.gypi
# Putting a variables dict inside another variables dict looks kind of # Putting a variables dict inside another variables dict looks kind of
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary # variables within the outer variables dict here. This is necessary
@@ -201,7 +204,7 @@ @@ -88,9 +91,9 @@
'enable_app_list%': 0, #
}], # TODO(erg): Merge this into the previous block once compiling with
# aura safely implies including ash capabilities.
- ['OS=="linux"', {
- 'use_aura%': 1,
- }],
+ #['OS=="linux"', {
+ # 'use_aura%': 1,
+ #}],
- ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', { # Whether we're a traditional desktop unix.
+ ['OS!="win" and OS!="mac" and OS!="ios" and OS!="android"', { ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
'use_default_render_theme%': 1,
}, {
'use_default_render_theme%': 0,
Index: mac/strip_save_dsym Index: mac/strip_save_dsym
=================================================================== ===================================================================
--- mac/strip_save_dsym (revision 240657) --- mac/strip_save_dsym (revision 248478)
+++ mac/strip_save_dsym (working copy) +++ mac/strip_save_dsym (working copy)
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
"bundle"] "bundle"]

View File

@ -1,16 +1,16 @@
Index: public/renderer/content_renderer_client.cc Index: public/renderer/content_renderer_client.cc
=================================================================== ===================================================================
--- public/renderer/content_renderer_client.cc (revision 242756) --- public/renderer/content_renderer_client.cc (revision 248478)
+++ public/renderer/content_renderer_client.cc (working copy) +++ public/renderer/content_renderer_client.cc (working copy)
@@ -91,7 +91,6 @@ @@ -92,7 +92,6 @@
return false; return false;
} }
-#ifdef OS_ANDROID -#ifdef OS_ANDROID
bool ContentRendererClient::HandleNavigation( bool ContentRendererClient::HandleNavigation(
RenderView* view, RenderFrame* render_frame,
DocumentState* document_state, DocumentState* document_state,
@@ -103,7 +102,6 @@ @@ -104,7 +103,6 @@
bool is_redirect) { bool is_redirect) {
return false; return false;
} }
@ -20,9 +20,9 @@ Index: public/renderer/content_renderer_client.cc
const GURL& url, const GURL& url,
Index: public/renderer/content_renderer_client.h Index: public/renderer/content_renderer_client.h
=================================================================== ===================================================================
--- public/renderer/content_renderer_client.h (revision 242756) --- public/renderer/content_renderer_client.h (revision 248478)
+++ public/renderer/content_renderer_client.h (working copy) +++ public/renderer/content_renderer_client.h (working copy)
@@ -172,7 +172,6 @@ @@ -175,7 +175,6 @@
// Returns true if a popup window should be allowed. // Returns true if a popup window should be allowed.
virtual bool AllowPopup(); virtual bool AllowPopup();
@ -30,7 +30,7 @@ Index: public/renderer/content_renderer_client.h
// TODO(sgurun) This callback is deprecated and will be removed as soon // TODO(sgurun) This callback is deprecated and will be removed as soon
// as android webview completes implementation of a resource throttle based // as android webview completes implementation of a resource throttle based
// shouldoverrideurl implementation. See crbug.com/325351 // shouldoverrideurl implementation. See crbug.com/325351
@@ -187,7 +186,6 @@ @@ -190,7 +189,6 @@
blink::WebNavigationType type, blink::WebNavigationType type,
blink::WebNavigationPolicy default_policy, blink::WebNavigationPolicy default_policy,
bool is_redirect); bool is_redirect);
@ -40,17 +40,17 @@ Index: public/renderer/content_renderer_client.h
// If |send_referrer| is set to false (which is the default), no referrer // If |send_referrer| is set to false (which is the default), no referrer
Index: renderer/render_view_impl.cc Index: renderer/render_view_impl.cc
=================================================================== ===================================================================
--- renderer/render_view_impl.cc (revision 242756) --- renderer/render_view_impl.cc (revision 248478)
+++ renderer/render_view_impl.cc (working copy) +++ renderer/render_view_impl.cc (working copy)
@@ -3124,7 +3124,6 @@ @@ -3071,7 +3071,6 @@
WebFrame* frame, WebDataSource::ExtraData* extraData, WebDataSource::ExtraData* extraData, const WebURLRequest& request,
const WebURLRequest& request, WebNavigationType type, WebNavigationType type, WebNavigationPolicy default_policy,
WebNavigationPolicy default_policy, bool is_redirect) { bool is_redirect) {
-#ifdef OS_ANDROID -#ifdef OS_ANDROID
// The handlenavigation API is deprecated and will be removed once // The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved. // crbug.com/325351 is resolved.
if (request.url() != GURL(kSwappedOutURL) && if (request.url() != GURL(kSwappedOutURL) &&
@@ -3139,7 +3138,6 @@ @@ -3086,7 +3085,6 @@
is_redirect)) { is_redirect)) {
return blink::WebNavigationPolicyIgnore; return blink::WebNavigationPolicyIgnore;
} }

View File

@ -1,8 +1,8 @@
Index: message_loop.cc Index: message_loop.cc
=================================================================== ===================================================================
--- message_loop.cc (revision 237081) --- message_loop.cc (revision 248478)
+++ message_loop.cc (working copy) +++ message_loop.cc (working copy)
@@ -166,7 +166,7 @@ @@ -142,7 +142,7 @@
MessageLoop::~MessageLoop() { MessageLoop::~MessageLoop() {
DCHECK_EQ(this, current()); DCHECK_EQ(this, current());

View File

@ -1,34 +0,0 @@
Index: native_theme_aura.cc
===================================================================
--- native_theme_aura.cc (revision 237081)
+++ native_theme_aura.cc (working copy)
@@ -17,10 +17,12 @@
namespace ui {
+#if !defined(OS_WIN)
// static
NativeTheme* NativeTheme::instance() {
return NativeThemeAura::instance();
}
+#endif
// static
NativeThemeAura* NativeThemeAura::instance() {
Index: native_theme_win.cc
===================================================================
--- native_theme_win.cc (revision 237081)
+++ native_theme_win.cc (working copy)
@@ -211,12 +211,10 @@
// TODO(sky): seems like we should default to NativeThemeWin, but that currently
// breaks a couple of tests (FocusTraversalTest.NormalTraversal in
// views_unittests).
-#if !defined(USE_AURA)
// static
NativeTheme* NativeTheme::instance() {
return NativeThemeWin::instance();
}
-#endif
// static
NativeThemeWin* NativeThemeWin::instance() {

View File

@ -1,8 +1,21 @@
Index: compositing_iosurface_layer_mac.mm
===================================================================
--- compositing_iosurface_layer_mac.mm (revision 248478)
+++ compositing_iosurface_layer_mac.mm (working copy)
@@ -119,7 +119,7 @@
if (!context_.get() || !renderWidgetHostView_ ||
!renderWidgetHostView_->compositing_iosurface_) {
- glClearColor(1, 1, 1, 1);
+ glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
return;
}
Index: compositing_iosurface_mac.mm Index: compositing_iosurface_mac.mm
=================================================================== ===================================================================
--- compositing_iosurface_mac.mm (revision 242756) --- compositing_iosurface_mac.mm (revision 248478)
+++ compositing_iosurface_mac.mm (working copy) +++ compositing_iosurface_mac.mm (working copy)
@@ -433,7 +433,7 @@ @@ -424,7 +424,7 @@
glUseProgram(0); CHECK_AND_SAVE_GL_ERROR(); glUseProgram(0); CHECK_AND_SAVE_GL_ERROR();
} else { } else {
// Should match the clear color of RenderWidgetHostViewMac. // Should match the clear color of RenderWidgetHostViewMac.
@ -11,10 +24,9 @@ Index: compositing_iosurface_mac.mm
glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT);
} }
Index: compositing_iosurface_shader_programs_mac.cc Index: compositing_iosurface_shader_programs_mac.cc
=================================================================== ===================================================================
--- compositing_iosurface_shader_programs_mac.cc (revision 242756) --- compositing_iosurface_shader_programs_mac.cc (revision 248478)
+++ compositing_iosurface_shader_programs_mac.cc (working copy) +++ compositing_iosurface_shader_programs_mac.cc (working copy)
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "base/debug/trace_event.h" #include "base/debug/trace_event.h"
@ -49,7 +61,7 @@ Index: compositing_iosurface_shader_programs_mac.cc
// Select and compile the shader program source code. // Select and compile the shader program source code.
if (shader_type == GL_VERTEX_SHADER) { if (shader_type == GL_VERTEX_SHADER) {
const GLchar* source_snippets[] = { const GLchar* source_snippets[] = {
@@ -414,6 +426,14 @@ @@ -412,6 +424,14 @@
Reset(); Reset();
} }
@ -66,7 +78,7 @@ Index: compositing_iosurface_shader_programs_mac.cc
shader_programs_[which] = shader_programs_[which] =
Index: compositing_iosurface_shader_programs_mac.h Index: compositing_iosurface_shader_programs_mac.h
=================================================================== ===================================================================
--- compositing_iosurface_shader_programs_mac.h (revision 242756) --- compositing_iosurface_shader_programs_mac.h (revision 248478)
+++ compositing_iosurface_shader_programs_mac.h (working copy) +++ compositing_iosurface_shader_programs_mac.h (working copy)
@@ -48,6 +48,8 @@ @@ -48,6 +48,8 @@
return rgb_to_yv12_output_format_; return rgb_to_yv12_output_format_;
@ -77,26 +89,11 @@ Index: compositing_iosurface_shader_programs_mac.h
protected: protected:
FRIEND_TEST_ALL_PREFIXES(CompositingIOSurfaceTransformerTest, FRIEND_TEST_ALL_PREFIXES(CompositingIOSurfaceTransformerTest,
TransformsRGBToYV12); TransformsRGBToYV12);
Index: compositing_iosurface_layer_mac.mm
===================================================================
--- compositing_iosurface_layer_mac.mm (revision 242756)
+++ compositing_iosurface_layer_mac.mm (working copy)
@@ -89,7 +89,7 @@
if (!context_.get() || !renderWidgetHostView_ ||
!renderWidgetHostView_->compositing_iosurface_) {
- glClearColor(1, 1, 1, 1);
+ glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
return;
}
Index: render_widget_host_view_mac.mm Index: render_widget_host_view_mac.mm
=================================================================== ===================================================================
--- render_widget_host_view_mac.mm (revision 242756) --- render_widget_host_view_mac.mm (revision 248478)
+++ render_widget_host_view_mac.mm (working copy) +++ render_widget_host_view_mac.mm (working copy)
@@ -490,7 +490,7 @@ @@ -494,7 +494,7 @@
software_layer_.reset([[CALayer alloc] init]); software_layer_.reset([[CALayer alloc] init]);
if (!software_layer_) if (!software_layer_)
LOG(ERROR) << "Failed to create CALayer for software rendering"; LOG(ERROR) << "Failed to create CALayer for software rendering";
@ -105,7 +102,7 @@ Index: render_widget_host_view_mac.mm
[software_layer_ setDelegate:cocoa_view_]; [software_layer_ setDelegate:cocoa_view_];
[software_layer_ setContentsGravity:kCAGravityTopLeft]; [software_layer_ setContentsGravity:kCAGravityTopLeft];
[software_layer_ setFrame:NSRectToCGRect([cocoa_view_ bounds])]; [software_layer_ setFrame:NSRectToCGRect([cocoa_view_ bounds])];
@@ -2737,7 +2737,7 @@ @@ -2846,7 +2846,7 @@
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)]; NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
CGContextSetFillColorWithColor(context, CGContextSetFillColorWithColor(context,
@ -114,7 +111,7 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, NSRectToCGRect(r)); CGContextFillRect(context, NSRectToCGRect(r));
} }
if (damagedRect.bottom() > rect.bottom()) { if (damagedRect.bottom() > rect.bottom()) {
@@ -2759,7 +2759,7 @@ @@ -2868,7 +2868,7 @@
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)]; NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
CGContextSetFillColorWithColor(context, CGContextSetFillColorWithColor(context,
@ -123,7 +120,7 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, NSRectToCGRect(r)); CGContextFillRect(context, NSRectToCGRect(r));
} }
} }
@@ -2918,7 +2918,7 @@ @@ -3029,7 +3029,7 @@
} }
} else { } else {
CGContextSetFillColorWithColor(context, CGContextSetFillColorWithColor(context,
@ -132,7 +129,7 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, dirtyRect); CGContextFillRect(context, dirtyRect);
if (renderWidgetHostView_->whiteout_start_time_.is_null()) if (renderWidgetHostView_->whiteout_start_time_.is_null())
renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks::Now(); renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks::Now();
@@ -3925,7 +3925,7 @@ @@ -4037,7 +4037,7 @@
if (!renderWidgetHostView_->render_widget_host_ || if (!renderWidgetHostView_->render_widget_host_ ||
renderWidgetHostView_->render_widget_host_->is_hidden()) { renderWidgetHostView_->render_widget_host_->is_hidden()) {
CGContextSetFillColorWithColor(context, CGContextSetFillColorWithColor(context,
@ -141,4 +138,3 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, clipRect); CGContextFillRect(context, clipRect);
return; return;
} }

View File

@ -1,8 +1,8 @@
Index: core/frame/FrameView.cpp Index: core/frame/FrameView.cpp
=================================================================== ===================================================================
--- core/frame/FrameView.cpp (revision 163979) --- core/frame/FrameView.cpp (revision 166298)
+++ core/frame/FrameView.cpp (working copy) +++ core/frame/FrameView.cpp (working copy)
@@ -200,8 +200,10 @@ @@ -168,8 +168,10 @@
if (!isMainFrame()) if (!isMainFrame())
return; return;
@ -13,13 +13,13 @@ Index: core/frame/FrameView.cpp
} }
PassRefPtr<FrameView> FrameView::create(Frame* frame) PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm Index: platform/scroll/ScrollbarThemeMacCommon.mm
=================================================================== ===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 163979) --- platform/scroll/ScrollbarThemeMacCommon.mm (revision 166298)
+++ platform/mac/NSScrollerImpDetails.mm (working copy) +++ platform/scroll/ScrollbarThemeMacCommon.mm (working copy)
@@ -73,10 +73,14 @@ @@ -369,10 +369,14 @@
// static
bool isScrollbarOverlayAPIAvailable() bool ScrollbarThemeMacCommon::isOverlayAPIAvailable()
{ {
+#if 0 +#if 0
static bool apiAvailable = static bool apiAvailable =
@ -31,4 +31,4 @@ Index: platform/mac/NSScrollerImpDetails.mm
+#endif +#endif
} }
NSScrollerStyle recommendedScrollerStyle() } // namespace WebCore

View File

@ -1,332 +0,0 @@
Index: trace_message_filter.cc
===================================================================
--- trace_message_filter.cc (revision 241258)
+++ trace_message_filter.cc (working copy)
@@ -121,7 +121,7 @@
if (is_awaiting_end_ack_) {
is_awaiting_end_ack_ = false;
TracingControllerImpl::GetInstance()->OnDisableRecordingAcked(
- known_categories);
+ this, known_categories);
} else {
NOTREACHED();
}
@@ -132,7 +132,8 @@
// but check in case the child process is compromised.
if (is_awaiting_capture_monitoring_snapshot_ack_) {
is_awaiting_capture_monitoring_snapshot_ack_ = false;
- TracingControllerImpl::GetInstance()->OnCaptureMonitoringSnapshotAcked();
+ TracingControllerImpl::GetInstance()->OnCaptureMonitoringSnapshotAcked(
+ this);
} else {
NOTREACHED();
}
@@ -160,7 +161,7 @@
if (is_awaiting_buffer_percent_full_ack_) {
is_awaiting_buffer_percent_full_ack_ = false;
TracingControllerImpl::GetInstance()->OnTraceBufferPercentFullReply(
- percent_full);
+ this, percent_full);
} else {
NOTREACHED();
}
Index: tracing_controller_impl.cc
===================================================================
--- tracing_controller_impl.cc (revision 241258)
+++ tracing_controller_impl.cc (working copy)
@@ -177,7 +177,7 @@
is_recording_ = true;
// Notify all child processes.
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendBeginTracing(category_filter, trace_options);
}
@@ -212,6 +212,7 @@
// Count myself (local trace) in pending_disable_recording_ack_count_,
// acked below.
pending_disable_recording_ack_count_ = trace_message_filters_.size() + 1;
+ pending_disable_recording_filters_ = trace_message_filters_;
// Handle special case of zero child processes by immediately flushing the
// trace log. Once the flush has completed the caller will be notified that
@@ -224,7 +225,7 @@
}
// Notify all child processes.
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendEndTracing();
}
@@ -254,7 +255,7 @@
static_cast<TraceLog::Options>(monitoring_tracing_options));
// Notify all child processes.
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendEnableMonitoring(category_filter,
static_cast<TraceLog::Options>(monitoring_tracing_options));
@@ -276,7 +277,7 @@
TraceLog::GetInstance()->SetDisabled();
// Notify all child processes.
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendDisableMonitoring();
}
@@ -311,6 +312,7 @@
// acked below.
pending_capture_monitoring_snapshot_ack_count_ =
trace_message_filters_.size() + 1;
+ pending_capture_monitoring_filters_ = trace_message_filters_;
// Handle special case of zero child processes by immediately flushing the
// trace log. Once the flush has completed the caller will be notified that
@@ -323,7 +325,7 @@
}
// Notify all child processes.
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendCaptureMonitoringSnapshot();
}
@@ -347,6 +349,7 @@
// Count myself in pending_trace_buffer_percent_full_ack_count_, acked below.
pending_trace_buffer_percent_full_ack_count_ =
trace_message_filters_.size() + 1;
+ pending_trace_buffer_percent_full_filters_ = trace_message_filters_;
maximum_trace_buffer_percent_full_ = 0;
// Handle special case of zero child processes.
@@ -354,11 +357,12 @@
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
base::Unretained(this),
+ scoped_refptr<TraceMessageFilter>(),
TraceLog::GetInstance()->GetBufferPercentFull()));
}
// Notify all child processes.
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendGetTraceBufferPercentFull();
}
@@ -383,7 +387,7 @@
base::Bind(&TracingControllerImpl::OnWatchEventMatched,
base::Unretained(this)));
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendSetWatchEvent(category_name, event_name);
}
@@ -396,7 +400,7 @@
if (!can_cancel_watch_event())
return false;
- for (TraceMessageFilterMap::iterator it = trace_message_filters_.begin();
+ for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
it != trace_message_filters_.end(); ++it) {
it->get()->SendCancelWatchEvent();
}
@@ -437,15 +441,54 @@
return;
}
+ // If a filter is removed while a response from that filter is pending then
+ // simulate the response. Otherwise the response count will be wrong and the
+ // completion callback will never be executed.
+ if (pending_disable_recording_ack_count_ > 0) {
+ TraceMessageFilterSet::const_iterator it =
+ pending_disable_recording_filters_.find(trace_message_filter);
+ if (it != pending_disable_recording_filters_.end()) {
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&TracingControllerImpl::OnDisableRecordingAcked,
+ base::Unretained(this),
+ make_scoped_refptr(trace_message_filter),
+ std::vector<std::string>()));
+ }
+ }
+ if (pending_capture_monitoring_snapshot_ack_count_ > 0) {
+ TraceMessageFilterSet::const_iterator it =
+ pending_capture_monitoring_filters_.find(trace_message_filter);
+ if (it != pending_capture_monitoring_filters_.end()) {
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&TracingControllerImpl::OnCaptureMonitoringSnapshotAcked,
+ base::Unretained(this),
+ make_scoped_refptr(trace_message_filter)));
+ }
+ }
+ if (pending_trace_buffer_percent_full_ack_count_ > 0) {
+ TraceMessageFilterSet::const_iterator it =
+ pending_trace_buffer_percent_full_filters_.find(trace_message_filter);
+ if (it != pending_trace_buffer_percent_full_filters_.end()) {
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
+ base::Unretained(this),
+ make_scoped_refptr(trace_message_filter),
+ 0));
+ }
+ }
+
trace_message_filters_.erase(trace_message_filter);
}
void TracingControllerImpl::OnDisableRecordingAcked(
+ TraceMessageFilter* trace_message_filter,
const std::vector<std::string>& known_category_groups) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TracingControllerImpl::OnDisableRecordingAcked,
- base::Unretained(this), known_category_groups));
+ base::Unretained(this),
+ make_scoped_refptr(trace_message_filter),
+ known_category_groups));
return;
}
@@ -456,6 +499,12 @@
if (pending_disable_recording_ack_count_ == 0)
return;
+ if (trace_message_filter &&
+ !pending_disable_recording_filters_.erase(trace_message_filter)) {
+ // The response from the specified message filter has already been received.
+ return;
+ }
+
if (--pending_disable_recording_ack_count_ == 1) {
// All acks from subprocesses have been received. Now flush the local trace.
// During or after this call, our OnLocalTraceDataCollected will be
@@ -497,17 +546,25 @@
result_file_.reset();
}
-void TracingControllerImpl::OnCaptureMonitoringSnapshotAcked() {
+void TracingControllerImpl::OnCaptureMonitoringSnapshotAcked(
+ TraceMessageFilter* trace_message_filter) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TracingControllerImpl::OnCaptureMonitoringSnapshotAcked,
- base::Unretained(this)));
+ base::Unretained(this),
+ make_scoped_refptr(trace_message_filter)));
return;
}
if (pending_capture_monitoring_snapshot_ack_count_ == 0)
return;
+ if (trace_message_filter &&
+ !pending_capture_monitoring_filters_.erase(trace_message_filter)) {
+ // The response from the specified message filter has already been received.
+ return;
+ }
+
if (--pending_capture_monitoring_snapshot_ack_count_ == 1) {
// All acks from subprocesses have been received. Now flush the local trace.
// During or after this call, our OnLocalMonitoringTraceDataCollected
@@ -582,7 +639,7 @@
// Simulate an DisableRecordingAcked for the local trace.
std::vector<std::string> category_groups;
TraceLog::GetInstance()->GetKnownCategoryGroups(&category_groups);
- OnDisableRecordingAcked(category_groups);
+ OnDisableRecordingAcked(NULL, category_groups);
}
void TracingControllerImpl::OnLocalMonitoringTraceDataCollected(
@@ -595,20 +652,30 @@
return;
// Simulate an CaptureMonitoringSnapshotAcked for the local trace.
- OnCaptureMonitoringSnapshotAcked();
+ OnCaptureMonitoringSnapshotAcked(NULL);
}
-void TracingControllerImpl::OnTraceBufferPercentFullReply(float percent_full) {
+void TracingControllerImpl::OnTraceBufferPercentFullReply(
+ TraceMessageFilter* trace_message_filter,
+ float percent_full) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
- base::Unretained(this), percent_full));
+ base::Unretained(this),
+ make_scoped_refptr(trace_message_filter),
+ percent_full));
return;
}
if (pending_trace_buffer_percent_full_ack_count_ == 0)
return;
+ if (trace_message_filter &&
+ !pending_trace_buffer_percent_full_filters_.erase(trace_message_filter)) {
+ // The response from the specified message filter has already been received.
+ return;
+ }
+
maximum_trace_buffer_percent_full_ =
std::max(maximum_trace_buffer_percent_full_, percent_full);
@@ -625,6 +692,7 @@
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&TracingControllerImpl::OnTraceBufferPercentFullReply,
base::Unretained(this),
+ make_scoped_refptr(trace_message_filter),
TraceLog::GetInstance()->GetBufferPercentFull()));
}
}
Index: tracing_controller_impl.h
===================================================================
--- tracing_controller_impl.h (revision 241258)
+++ tracing_controller_impl.h (working copy)
@@ -55,7 +55,7 @@
virtual bool CancelWatchEvent() OVERRIDE;
private:
- typedef std::set<scoped_refptr<TraceMessageFilter> > TraceMessageFilterMap;
+ typedef std::set<scoped_refptr<TraceMessageFilter> > TraceMessageFilterSet;
class ResultFile;
friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>;
@@ -107,23 +107,30 @@
bool has_more_events);
void OnDisableRecordingAcked(
+ TraceMessageFilter* trace_message_filter,
const std::vector<std::string>& known_category_groups);
void OnResultFileClosed();
- void OnCaptureMonitoringSnapshotAcked();
+ void OnCaptureMonitoringSnapshotAcked(
+ TraceMessageFilter* trace_message_filter);
void OnMonitoringSnapshotFileClosed();
- void OnTraceBufferPercentFullReply(float percent_full);
+ void OnTraceBufferPercentFullReply(
+ TraceMessageFilter* trace_message_filter,
+ float percent_full);
void OnWatchEventMatched();
- TraceMessageFilterMap trace_message_filters_;
+ TraceMessageFilterSet trace_message_filters_;
// Pending acks for DisableRecording.
int pending_disable_recording_ack_count_;
+ TraceMessageFilterSet pending_disable_recording_filters_;
// Pending acks for CaptureMonitoringSnapshot.
int pending_capture_monitoring_snapshot_ack_count_;
+ TraceMessageFilterSet pending_capture_monitoring_filters_;
// Pending acks for GetTraceBufferPercentFull.
int pending_trace_buffer_percent_full_ack_count_;
+ TraceMessageFilterSet pending_trace_buffer_percent_full_filters_;
float maximum_trace_buffer_percent_full_;
bool is_recording_;

View File

@ -1,12 +1,12 @@
Index: underlay_opengl_hosting_window.h Index: underlay_opengl_hosting_window.h
=================================================================== ===================================================================
--- underlay_opengl_hosting_window.h (revision 214871) --- underlay_opengl_hosting_window.h (revision 248478)
+++ underlay_opengl_hosting_window.h (working copy) +++ underlay_opengl_hosting_window.h (working copy)
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
// Common base class for windows that host a OpenGL surface that renders under // Common base class for windows that host a OpenGL surface that renders under
// the window. Contains methods relating to hole punching so that the OpenGL // the window. Contains methods relating to hole punching so that the OpenGL
// surface is visible through the window. // surface is visible through the window.
-UI_EXPORT -UI_BASE_EXPORT
+__attribute__((visibility("default"))) +__attribute__((visibility("default")))
@interface UnderlayOpenGLHostingWindow : NSWindow @interface UnderlayOpenGLHostingWindow : NSWindow
@end @end

View File

@ -1,8 +1,8 @@
Index: desktop_aura/desktop_root_window_host_win.cc Index: desktop_aura/desktop_root_window_host_win.cc
=================================================================== ===================================================================
--- desktop_aura/desktop_root_window_host_win.cc (revision 242756) --- desktop_aura/desktop_root_window_host_win.cc (revision 248478)
+++ desktop_aura/desktop_root_window_host_win.cc (working copy) +++ desktop_aura/desktop_root_window_host_win.cc (working copy)
@@ -131,7 +131,9 @@ @@ -132,7 +132,9 @@
native_widget_delegate_); native_widget_delegate_);
HWND parent_hwnd = NULL; HWND parent_hwnd = NULL;
@ -13,9 +13,9 @@ Index: desktop_aura/desktop_root_window_host_win.cc
parent_hwnd = parent_hwnd =
params.parent->GetDispatcher()->host()->GetAcceleratedWidget(); params.parent->GetDispatcher()->host()->GetAcceleratedWidget();
} }
@@ -752,7 +754,7 @@ @@ -771,7 +773,7 @@
void DesktopRootWindowHostWin::HandleCreate() { void DesktopWindowTreeHostWin::HandleCreate() {
// TODO(beng): moar // TODO(beng): moar
- NOTIMPLEMENTED(); - NOTIMPLEMENTED();
+ // NOTIMPLEMENTED(); + // NOTIMPLEMENTED();
@ -24,7 +24,7 @@ Index: desktop_aura/desktop_root_window_host_win.cc
Index: desktop_aura/desktop_screen_win.cc Index: desktop_aura/desktop_screen_win.cc
=================================================================== ===================================================================
--- desktop_aura/desktop_screen_win.cc (revision 242756) --- desktop_aura/desktop_screen_win.cc (revision 248478)
+++ desktop_aura/desktop_screen_win.cc (working copy) +++ desktop_aura/desktop_screen_win.cc (working copy)
@@ -54,6 +54,8 @@ @@ -54,6 +54,8 @@
} }
@ -37,7 +37,7 @@ Index: desktop_aura/desktop_screen_win.cc
} }
Index: widget.h Index: widget.h
=================================================================== ===================================================================
--- widget.h (revision 242756) --- widget.h (revision 248478)
+++ widget.h (working copy) +++ widget.h (working copy)
@@ -197,6 +197,7 @@ @@ -197,6 +197,7 @@
// Should the widget be double buffered? Default is false. // Should the widget be double buffered? Default is false.

View File

@ -0,0 +1,92 @@
Index: browser/browser_plugin/browser_plugin_guest.cc
===================================================================
--- browser/browser_plugin/browser_plugin_guest.cc (revision 248478)
+++ browser/browser_plugin/browser_plugin_guest.cc (working copy)
@@ -785,7 +785,8 @@
return this;
}
-bool BrowserPluginGuest::HandleContextMenu(const ContextMenuParams& params) {
+bool BrowserPluginGuest::HandleContextMenu(RenderFrameHost* render_frame_host,
+ const ContextMenuParams& params) {
// TODO(fsamuel): We show the regular page context menu handler for now until
// we implement the Apps Context Menu API for Browser Plugin (see
// http://crbug.com/140315).
Index: browser/browser_plugin/browser_plugin_guest.h
===================================================================
--- browser/browser_plugin/browser_plugin_guest.h (revision 248478)
+++ browser/browser_plugin/browser_plugin_guest.h (working copy)
@@ -200,7 +200,8 @@
double progress) OVERRIDE;
virtual void CloseContents(WebContents* source) OVERRIDE;
virtual JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE;
- virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE;
+ virtual bool HandleContextMenu(RenderFrameHost* render_frame_host,
+ const ContextMenuParams& params) OVERRIDE;
virtual void HandleKeyboardEvent(
WebContents* source,
const NativeWebKeyboardEvent& event) OVERRIDE;
Index: browser/web_contents/web_contents_impl.cc
===================================================================
--- browser/web_contents/web_contents_impl.cc (revision 248478)
+++ browser/web_contents/web_contents_impl.cc (working copy)
@@ -2687,7 +2687,7 @@
void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
// Allow WebContentsDelegates to handle the context menu operation first.
- if (delegate_ && delegate_->HandleContextMenu(params))
+ if (delegate_ && delegate_->HandleContextMenu(render_frame_host, params))
return;
render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params);
Index: browser/web_contents/web_contents_view_mac.mm
===================================================================
--- browser/web_contents/web_contents_view_mac.mm (revision 248478)
+++ browser/web_contents/web_contents_view_mac.mm (working copy)
@@ -233,12 +233,6 @@
void WebContentsViewMac::ShowContextMenu(
content::RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
- // Allow delegates to handle the context menu operation first.
- if (web_contents_->GetDelegate() &&
- web_contents_->GetDelegate()->HandleContextMenu(params)) {
- return;
- }
-
if (delegate())
delegate()->ShowContextMenu(render_frame_host, params);
else
Index: public/browser/web_contents_delegate.cc
===================================================================
--- public/browser/web_contents_delegate.cc (revision 248478)
+++ public/browser/web_contents_delegate.cc (working copy)
@@ -76,6 +76,7 @@
}
bool WebContentsDelegate::HandleContextMenu(
+ RenderFrameHost* render_frame_host,
const content::ContextMenuParams& params) {
return false;
}
Index: public/browser/web_contents_delegate.h
===================================================================
--- public/browser/web_contents_delegate.h (revision 248478)
+++ public/browser/web_contents_delegate.h (working copy)
@@ -35,6 +35,7 @@
class DownloadItem;
class JavaScriptDialogManager;
class PageState;
+class RenderFrameHost;
class RenderViewHost;
class SessionStorageNamespace;
class WebContents;
@@ -228,7 +229,8 @@
virtual int GetExtraRenderViewHeight() const;
// Returns true if the context menu operation was handled by the delegate.
- virtual bool HandleContextMenu(const content::ContextMenuParams& params);
+ virtual bool HandleContextMenu(RenderFrameHost* render_frame_host,
+ const content::ContextMenuParams& params);
// Opens source view for given WebContents that is navigated to the given
// page url.

View File

@ -1,8 +1,8 @@
Index: WebNode.cpp Index: WebNode.cpp
=================================================================== ===================================================================
--- WebNode.cpp (revision 160715) --- WebNode.cpp (revision 166298)
+++ WebNode.cpp (working copy) +++ WebNode.cpp (working copy)
@@ -169,7 +169,7 @@ @@ -171,7 +171,7 @@
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture) void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{ {
// Please do not add more eventTypes to this list without an API review. // Please do not add more eventTypes to this list without an API review.

View File

@ -1,6 +1,6 @@
Index: public/web/WebView.h Index: public/web/WebView.h
=================================================================== ===================================================================
--- public/web/WebView.h (revision 164381) --- public/web/WebView.h (revision 166298)
+++ public/web/WebView.h (working copy) +++ public/web/WebView.h (working copy)
@@ -417,6 +417,7 @@ @@ -417,6 +417,7 @@
@ -12,9 +12,9 @@ Index: public/web/WebView.h
virtual void hidePopups() = 0; virtual void hidePopups() = 0;
Index: Source/web/ChromeClientImpl.cpp Index: Source/web/ChromeClientImpl.cpp
=================================================================== ===================================================================
--- Source/web/ChromeClientImpl.cpp (revision 164381) --- Source/web/ChromeClientImpl.cpp (revision 166298)
+++ Source/web/ChromeClientImpl.cpp (working copy) +++ Source/web/ChromeClientImpl.cpp (working copy)
@@ -851,7 +851,7 @@ @@ -828,7 +828,7 @@
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const
{ {
@ -25,9 +25,9 @@ Index: Source/web/ChromeClientImpl.cpp
return adoptRef(new PopupMenuChromium(frame, client)); return adoptRef(new PopupMenuChromium(frame, client));
Index: Source/web/WebViewImpl.cpp Index: Source/web/WebViewImpl.cpp
=================================================================== ===================================================================
--- Source/web/WebViewImpl.cpp (revision 164381) --- Source/web/WebViewImpl.cpp (revision 166298)
+++ Source/web/WebViewImpl.cpp (working copy) +++ Source/web/WebViewImpl.cpp (working copy)
@@ -348,6 +348,7 @@ @@ -340,6 +340,7 @@
, m_fakePageScaleAnimationPageScaleFactor(0) , m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false) , m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false) , m_contextMenuAllowed(false)
@ -35,7 +35,7 @@ Index: Source/web/WebViewImpl.cpp
, m_doingDragAndDrop(false) , m_doingDragAndDrop(false)
, m_ignoreInputEvents(false) , m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0) , m_compositorDeviceScaleFactorOverride(0)
@@ -3552,9 +3553,14 @@ @@ -3517,9 +3518,14 @@
updateLayerTreeViewport(); updateLayerTreeViewport();
} }
@ -53,9 +53,9 @@ Index: Source/web/WebViewImpl.cpp
void WebViewImpl::startDragging(Frame* frame, void WebViewImpl::startDragging(Frame* frame,
Index: Source/web/WebViewImpl.h Index: Source/web/WebViewImpl.h
=================================================================== ===================================================================
--- Source/web/WebViewImpl.h (revision 164381) --- Source/web/WebViewImpl.h (revision 166298)
+++ Source/web/WebViewImpl.h (working copy) +++ Source/web/WebViewImpl.h (working copy)
@@ -398,7 +398,8 @@ @@ -397,7 +397,8 @@
// Returns true if popup menus should be rendered by the browser, false if // Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default). // they should be rendered by WebKit (which is the default).
@ -65,7 +65,7 @@ Index: Source/web/WebViewImpl.h
bool contextMenuAllowed() const bool contextMenuAllowed() const
{ {
@@ -680,6 +681,8 @@ @@ -683,6 +684,8 @@
bool m_contextMenuAllowed; bool m_contextMenuAllowed;

View File

@ -62,6 +62,9 @@ void AppGetSettings(CefSettings& settings) {
CefString(&settings.cache_path) = CefString(&settings.cache_path) =
g_command_line->GetSwitchValue(cefclient::kCachePath); g_command_line->GetSwitchValue(cefclient::kCachePath);
if (g_command_line->HasSwitch(cefclient::kOffScreenRenderingEnabled))
settings.windowless_rendering_enabled = true;
} }
bool AppIsOffScreenRenderingEnabled() { bool AppIsOffScreenRenderingEnabled() {

View File

@ -360,8 +360,7 @@ int main(int argc, char* argv[]) {
CefRefPtr<OSRWindow> osr_window = CefRefPtr<OSRWindow> osr_window =
OSRWindow::Create(&g_main_browser_provider, transparent, vbox); OSRWindow::Create(&g_main_browser_provider, transparent, vbox);
window_info.SetAsOffScreen(osr_window->GetWindowHandle()); window_info.SetAsWindowless(osr_window->GetWindowHandle(), transparent);
window_info.SetTransparentPainting(transparent);
g_handler->SetOSRHandler(osr_window.get()); g_handler->SetOSRHandler(osr_window.get());
} else { } else {
window_info.SetAsChild(vbox); window_info.SetAsChild(vbox);

View File

@ -355,8 +355,7 @@ NSButton* MakeButton(NSRect* rect, NSString* title, NSView* parent) {
CefRefPtr<OSRWindow> osr_window = CefRefPtr<OSRWindow> osr_window =
OSRWindow::Create(&g_main_browser_provider, transparent, contentView, OSRWindow::Create(&g_main_browser_provider, transparent, contentView,
CefRect(0, 0, kWindowWidth, kWindowHeight)); CefRect(0, 0, kWindowWidth, kWindowHeight));
window_info.SetAsOffScreen(osr_window->GetWindowHandle()); window_info.SetAsWindowless(osr_window->GetWindowHandle(), transparent);
window_info.SetTransparentPainting(transparent);
g_handler->SetOSRHandler(osr_window->GetRenderHandler().get()); g_handler->SetOSRHandler(osr_window->GetRenderHandler().get());
} else { } else {
// Initialize window info to the defaults for a child window. // Initialize window info to the defaults for a child window.

View File

@ -394,8 +394,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
CefRefPtr<OSRWindow> osr_window = CefRefPtr<OSRWindow> osr_window =
OSRWindow::Create(&g_main_browser_provider, transparent); OSRWindow::Create(&g_main_browser_provider, transparent);
osr_window->CreateWidget(hWnd, rect, hInst, szOSRWindowClass); osr_window->CreateWidget(hWnd, rect, hInst, szOSRWindowClass);
info.SetAsOffScreen(osr_window->hwnd()); info.SetAsWindowless(osr_window->hwnd(), transparent);
info.SetTransparentPainting(transparent ? TRUE : FALSE);
g_handler->SetOSRHandler(osr_window.get()); g_handler->SetOSRHandler(osr_window.get());
} else { } else {
// Initialize window info to the defaults for a child window. // Initialize window info to the defaults for a child window.

View File

@ -644,7 +644,7 @@ void ClientHandler::CloseDevTools(CefRefPtr<CefBrowser> browser) {
void ClientHandler::BeginTracing() { void ClientHandler::BeginTracing() {
if (CefCurrentlyOn(TID_UI)) { if (CefCurrentlyOn(TID_UI)) {
CefBeginTracing(CefString()); CefBeginTracing(CefString(), NULL);
} else { } else {
CefPostTask(TID_UI, CefPostTask(TID_UI,
NewCefRunnableMethod(this, &ClientHandler::BeginTracing)); NewCefRunnableMethod(this, &ClientHandler::BeginTracing));
@ -678,10 +678,10 @@ void ClientHandler::EndTracing() {
const std::vector<CefString>& file_paths) OVERRIDE { const std::vector<CefString>& file_paths) OVERRIDE {
if (!file_paths.empty()) { if (!file_paths.empty()) {
// File selected. Results in a call to OnEndTracingComplete. // File selected. Results in a call to OnEndTracingComplete.
CefEndTracingAsync(file_paths.front(), this); CefEndTracing(file_paths.front(), this);
} else { } else {
// No file selected. Discard the trace data. // No file selected. Discard the trace data.
CefEndTracingAsync(CefString(), NULL); CefEndTracing(CefString(), NULL);
} }
} }

View File

@ -574,9 +574,9 @@ TEST(CookieTest, ChangeDirectoryCreated) {
namespace { namespace {
class TestCompletionHandler : public CefCompletionHandler { class TestCompletionCallback : public CefCompletionCallback {
public: public:
explicit TestCompletionHandler(base::WaitableEvent* event) explicit TestCompletionCallback(base::WaitableEvent* event)
: event_(event) {} : event_(event) {}
virtual void OnComplete() OVERRIDE { virtual void OnComplete() OVERRIDE {
@ -586,7 +586,7 @@ class TestCompletionHandler : public CefCompletionHandler {
private: private:
base::WaitableEvent* event_; base::WaitableEvent* event_;
IMPLEMENT_REFCOUNTING(TestCompletionHandler); IMPLEMENT_REFCOUNTING(TestCompletionCallback);
}; };
} // namespace } // namespace
@ -610,7 +610,7 @@ TEST(CookieTest, SessionCookieNoPersist) {
GetCookie(manager, cookie, true, event, false); GetCookie(manager, cookie, true, event, false);
// Flush the cookie store to disk. // Flush the cookie store to disk.
manager->FlushStore(new TestCompletionHandler(&event)); manager->FlushStore(new TestCompletionCallback(&event));
event.Wait(); event.Wait();
// Create a new manager to read the same cookie store. // Create a new manager to read the same cookie store.
@ -640,7 +640,7 @@ TEST(CookieTest, SessionCookieWillPersist) {
GetCookie(manager, cookie, true, event, false); GetCookie(manager, cookie, true, event, false);
// Flush the cookie store to disk. // Flush the cookie store to disk.
manager->FlushStore(new TestCompletionHandler(&event)); manager->FlushStore(new TestCompletionCallback(&event));
event.Wait(); event.Wait();
// Create a new manager to read the same cookie store. // Create a new manager to read the same cookie store.

View File

@ -826,22 +826,23 @@ class OSRTestHandler : public RoutingTestHandler,
void CreateOSRBrowser(const CefString& url) { void CreateOSRBrowser(const CefString& url) {
CefWindowInfo windowInfo; CefWindowInfo windowInfo;
CefBrowserSettings settings; CefBrowserSettings settings;
const bool transparent = (test_type_ == OSR_TEST_TRANSPARENCY);
#if defined(OS_WIN) #if defined(OS_WIN)
windowInfo.SetAsOffScreen(GetDesktopWindow()); windowInfo.SetAsWindowless(GetDesktopWindow(), transparent);
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
// An actual vies is needed only for the ContextMenu test. The menu runner // An actual vies is needed only for the ContextMenu test. The menu runner
// checks if the view is not nil before showing the context menu. // checks if the view is not nil before showing the context menu.
if (test_type_ == OSR_TEST_CONTEXT_MENU) if (test_type_ == OSR_TEST_CONTEXT_MENU)
windowInfo.SetAsOffScreen(osr_unittests::GetFakeView()); windowInfo.SetAsWindowless(osr_unittests::GetFakeView(), transparent);
else else
windowInfo.SetAsOffScreen(NULL); windowInfo.SetAsWindowless(NULL, transparent);
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
windowInfo.SetAsOffScreen(NULL); windowInfo.SetAsWindowless(NULL, transparent);
#else #else
#error "Unsupported platform" #error "Unsupported platform"
#endif #endif
if (test_type_ == OSR_TEST_TRANSPARENCY)
windowInfo.SetTransparentPainting(TRUE);
CefBrowserHost::CreateBrowser(windowInfo, this, url, settings, NULL); CefBrowserHost::CreateBrowser(windowInfo, this, url, settings, NULL);
} }

View File

@ -245,6 +245,7 @@ bool TestFailed();
#define EXPECT_UI_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_UI)); #define EXPECT_UI_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_UI));
#define EXPECT_IO_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_IO)); #define EXPECT_IO_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_IO));
#define EXPECT_FILE_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_FILE));
#define EXPECT_RENDERER_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_RENDERER)); #define EXPECT_RENDERER_THREAD() EXPECT_TRUE(CefCurrentlyOn(TID_RENDERER));
#endif // CEF_TESTS_UNITTESTS_TEST_HANDLER_H_ #endif // CEF_TESTS_UNITTESTS_TEST_HANDLER_H_

View File

@ -61,6 +61,9 @@ void CefTestSuite::GetSettings(CefSettings& settings) {
// Necessary for V8Test.OnUncaughtException tests. // Necessary for V8Test.OnUncaughtException tests.
settings.uncaught_exception_stack_size = 10; settings.uncaught_exception_stack_size = 10;
// Necessary for the OSRTest tests.
settings.windowless_rendering_enabled = true;
} }
// static // static

View File

@ -65,7 +65,8 @@ enum TracingTestType {
const char kTraceTestCategory[] = "test_category"; const char kTraceTestCategory[] = "test_category";
class TracingTestHandler : public CefEndTracingCallback { class TracingTestHandler : public CefEndTracingCallback,
public CefCompletionCallback {
public: public:
TracingTestHandler(TracingTestType type, const char* trace_type) TracingTestHandler(TracingTestType type, const char* trace_type)
: completion_event_(true, false), : completion_event_(true, false),
@ -74,7 +75,7 @@ class TracingTestHandler : public CefEndTracingCallback {
} }
void ReadTracingFile(const base::FilePath& file_path) { void ReadTracingFile(const base::FilePath& file_path) {
EXPECT_TRUE(CefCurrentlyOn(TID_FILE)); EXPECT_FILE_THREAD();
base::ReadFileToString(file_path, &trace_data_); base::ReadFileToString(file_path, &trace_data_);
base::DeleteFile(file_path, false); base::DeleteFile(file_path, false);
@ -84,7 +85,7 @@ class TracingTestHandler : public CefEndTracingCallback {
// CefEndTracingCallback method: // CefEndTracingCallback method:
virtual void OnEndTracingComplete(const CefString& tracing_file) OVERRIDE { virtual void OnEndTracingComplete(const CefString& tracing_file) OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_UI)); EXPECT_UI_THREAD();
base::FilePath file_path(tracing_file); base::FilePath file_path(tracing_file);
CefPostTask(TID_FILE, CefPostTask(TID_FILE,
@ -93,9 +94,14 @@ class TracingTestHandler : public CefEndTracingCallback {
} }
void RunTracing() { void RunTracing() {
EXPECT_TRUE(CefCurrentlyOn(TID_UI)); EXPECT_UI_THREAD();
CefBeginTracing(kTraceTestCategory); // Results in a call to OnComplete.
CefBeginTracing(kTraceTestCategory, this);
}
virtual void OnComplete() OVERRIDE {
EXPECT_UI_THREAD();
switch (type_) { switch (type_) {
case CEF_TRACE_EVENT0: { case CEF_TRACE_EVENT0: {
@ -313,7 +319,7 @@ class TracingTestHandler : public CefEndTracingCallback {
} }
// Results in a call to OnEndTracingComplete. // Results in a call to OnEndTracingComplete.
CefEndTracingAsync(CefString(), this); CefEndTracing(CefString(), this);
} }
void ExecuteTest() { void ExecuteTest() {

View File

@ -1,2 +1,2 @@
@echo off @echo off
..\..\third_party\python_26\python.exe check_style.py %* python.bat check_style.py %*

View File

@ -221,6 +221,7 @@
'files': [ 'files': [
'Resources/cef.pak', 'Resources/cef.pak',
'Resources/devtools_resources.pak', 'Resources/devtools_resources.pak',
'Resources/icudtl.dat',
'Resources/locales/', 'Resources/locales/',
'$(BUILDTYPE)/chrome-sandbox', '$(BUILDTYPE)/chrome-sandbox',
'$(BUILDTYPE)/libcef.so', '$(BUILDTYPE)/libcef.so',
@ -433,6 +434,7 @@
'files': [ 'files': [
'Resources/cef.pak', 'Resources/cef.pak',
'Resources/devtools_resources.pak', 'Resources/devtools_resources.pak',
'Resources/icudtl.dat',
'Resources/locales/', 'Resources/locales/',
'$(BUILDTYPE)/chrome-sandbox', '$(BUILDTYPE)/chrome-sandbox',
'$(BUILDTYPE)/libcef.so', '$(BUILDTYPE)/libcef.so',

View File

@ -11,6 +11,9 @@ Required components:
* CEF core library * CEF core library
libcef.so libcef.so
* Unicode support
icudtl.dat
Optional components: Optional components:
* Localized resources * Localized resources

View File

@ -19,6 +19,7 @@ cefclient.app/
Resources/ Resources/
cef.pak, devtools_resources.pak <= non-localized resources and strings cef.pak, devtools_resources.pak <= non-localized resources and strings
crash_inspector, crash_report_sender <= breakpad support crash_inspector, crash_report_sender <= breakpad support
icudtl.dat <= unicode support
en.lproj/, ... <= locale-specific resources and strings en.lproj/, ... <= locale-specific resources and strings
Info.plist Info.plist
libplugin_carbon_interpose.dylib <= plugin support library libplugin_carbon_interpose.dylib <= plugin support library
@ -68,6 +69,9 @@ Required components:
* CEF framework library * CEF framework library
Chromium Embedded Framework.framework/Chromium Embedded Framework Chromium Embedded Framework.framework/Chromium Embedded Framework
* Unicode support
Chromium Embedded Framework.framework/Resources/icudtl.dat
* Plugin support library * Plugin support library
libplugin_carbon_interpose.dylib libplugin_carbon_interpose.dylib

View File

@ -12,7 +12,7 @@ Required components:
libcef.dll libcef.dll
* Unicode support * Unicode support
icudt.dll icudtl.dat
Optional components: Optional components:

View File

@ -1,2 +1,2 @@
@echo off @echo off
..\..\third_party\python_26\python.exe make_distrib.py --output-dir ..\binary_distrib\ %* python.bat make_distrib.py --output-dir ..\binary_distrib\ %*

View File

@ -490,6 +490,14 @@ if mode == 'standard':
output_dir, options.quiet) output_dir, options.quiet)
if platform == 'windows': if platform == 'windows':
binaries = [
'd3dcompiler_46.dll',
'ffmpegsumo.dll',
'libcef.dll',
'libEGL.dll',
'libGLESv2.dll',
]
if options.ninjabuild: if options.ninjabuild:
out_dir = os.path.join(src_dir, 'out') out_dir = os.path.join(src_dir, 'out')
libcef_dll_file = 'libcef.dll.lib' libcef_dll_file = 'libcef.dll.lib'
@ -525,7 +533,8 @@ if platform == 'windows':
dst_dir = os.path.join(output_dir, 'Debug') dst_dir = os.path.join(output_dir, 'Debug')
make_dir(dst_dir, options.quiet) make_dir(dst_dir, options.quiet)
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet) copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
copy_files(os.path.join(build_dir, '*.dll'), dst_dir, options.quiet) for binary in binaries:
copy_file(os.path.join(build_dir, binary), os.path.join(dst_dir, binary), options.quiet)
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \ copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
options.quiet) options.quiet)
combine_libs(build_dir, sandbox_libs, os.path.join(dst_dir, 'cef_sandbox.lib')); combine_libs(build_dir, sandbox_libs, os.path.join(dst_dir, 'cef_sandbox.lib'));
@ -545,7 +554,8 @@ if platform == 'windows':
dst_dir = os.path.join(output_dir, 'Release') dst_dir = os.path.join(output_dir, 'Release')
make_dir(dst_dir, options.quiet) make_dir(dst_dir, options.quiet)
copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet) copy_files(os.path.join(script_dir, 'distrib/win/*.dll'), dst_dir, options.quiet)
copy_files(os.path.join(build_dir, '*.dll'), dst_dir, options.quiet) for binary in binaries:
copy_file(os.path.join(build_dir, binary), os.path.join(dst_dir, binary), options.quiet)
if mode != 'client': if mode != 'client':
copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \ copy_file(os.path.join(build_dir, libcef_dll_file), os.path.join(dst_dir, 'libcef.lib'), \
@ -572,6 +582,7 @@ if platform == 'windows':
make_dir(dst_dir, options.quiet) make_dir(dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'cef.pak'), dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'cef.pak'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'icudtl.dat'), dst_dir, options.quiet)
copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), options.quiet) copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), options.quiet)
if mode == 'standard': if mode == 'standard':
@ -735,6 +746,7 @@ elif platform == 'linux':
make_dir(dst_dir, options.quiet) make_dir(dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'cef.pak'), dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'cef.pak'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet) copy_file(os.path.join(build_dir, 'devtools_resources.pak'), dst_dir, options.quiet)
copy_file(os.path.join(build_dir, 'icudtl.dat'), dst_dir, options.quiet)
copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), options.quiet) copy_dir(os.path.join(build_dir, 'locales'), os.path.join(dst_dir, 'locales'), options.quiet)
if mode == 'standard': if mode == 'standard':

View File

@ -1,2 +1,2 @@
@echo off @echo off
..\third_party\python_26\python.exe tools\make_version_header.py --header include\cef_version.h --cef_version VERSION --chrome_version ../chrome/VERSION --cpp_header_dir include python.bat tools\make_version_header.py --header include\cef_version.h --cef_version VERSION --chrome_version ../chrome/VERSION --cpp_header_dir include

View File

@ -1,2 +1,2 @@
@echo off @echo off
..\third_party\python_26\python.exe tools\patcher.py --patch-config patch/patch.cfg python.bat tools\patcher.py --patch-config patch/patch.cfg

View File

@ -1,3 +1,3 @@
@echo off @echo off
..\..\third_party\python_26\python.exe translator.py --cpp-header-dir ..\include --capi-header-dir ..\include\capi --cpptoc-global-impl ..\libcef_dll\libcef_dll.cc --ctocpp-global-impl ..\libcef_dll\wrapper\libcef_dll_wrapper.cc --cpptoc-dir ..\libcef_dll\cpptoc --ctocpp-dir ..\libcef_dll\ctocpp --gypi-file ..\cef_paths.gypi call python.bat translator.py --cpp-header-dir ..\include --capi-header-dir ..\include\capi --cpptoc-global-impl ..\libcef_dll\libcef_dll.cc --ctocpp-global-impl ..\libcef_dll\wrapper\libcef_dll_wrapper.cc --cpptoc-dir ..\libcef_dll\cpptoc --ctocpp-dir ..\libcef_dll\ctocpp --gypi-file ..\cef_paths.gypi
pause pause