diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 5d837e308..9a08a1ece 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -62,3 +62,4 @@ Date | CEF Revision | Chromium Revision 2010-12-16 | /trunk@152 | /trunk@69409 2010-01-07 | /trunk@159 | /trunk@70742 2010-01-11 | /trunk@162 | /trunk@71081 +2010-02-15 | /trunk@186 | /trunk@74933 diff --git a/cef.gyp b/cef.gyp index 3c9ed20e5..2740fc673 100644 --- a/cef.gyp +++ b/cef.gyp @@ -112,6 +112,8 @@ 'action_name': 'repack_locale', 'variables': { 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak', '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', @@ -234,7 +236,6 @@ '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../build/temp_gyp/googleurl.gyp:googleurl', - '../gfx/gfx.gyp:gfx', '../media/media.gyp:media', '../net/net.gyp:net', '../net/net.gyp:net_resources', @@ -251,12 +252,14 @@ '../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', - '../third_party/WebKit/WebKit/chromium/WebKit.gyp:concatenated_devtools_css', - '../third_party/WebKit/WebKit/chromium/WebKit.gyp:concatenated_devtools_js', - '../third_party/WebKit/WebKit/chromium/WebKit.gyp:devtools_html', - '../third_party/WebKit/WebKit/chromium/WebKit.gyp:inspector_resources', - '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:concatenated_devtools_css', + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:concatenated_devtools_js', + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:devtools_html', + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:inspector_resources', + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '../third_party/zlib/zlib.gyp:zlib', + '../ui/gfx/gfx.gyp:gfx', + '../ui/gfx/gfx.gyp:gfx_resources', '../ui/ui.gyp:ui_base', '../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:blob', @@ -287,6 +290,7 @@ 'include/cef_export.h', 'include/cef_nplugin.h', 'include/cef_nplugin_capi.h', + 'include/cef_nplugin_types.h', 'include/cef_ptr.h', 'include/cef_string.h', 'include/cef_string_list.h', @@ -445,14 +449,13 @@ 'include_dirs': [ '.', '..', - '../third_party/WebKit/WebKit/chromium/public' + '../third_party/WebKit/Source/WebKit/chromium/public' ], 'dependencies': [ '../app/app.gyp:app_base', '../base/base.gyp:base', '../base/base.gyp:base_i18n', '../build/temp_gyp/googleurl.gyp:googleurl', - '../gfx/gfx.gyp:gfx', '../media/media.gyp:media', '../net/net.gyp:net', '../net/net.gyp:net_resources', @@ -469,8 +472,10 @@ '../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore', - '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', + '../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '../third_party/zlib/zlib.gyp:zlib', + '../ui/gfx/gfx.gyp:gfx', + '../ui/gfx/gfx.gyp:gfx_resources', '../ui/ui.gyp:ui_base', '../webkit/support/webkit_support.gyp:appcache', '../webkit/support/webkit_support.gyp:blob', @@ -573,6 +578,7 @@ 'libcef/web_urlrequest_impl.cc', 'libcef/web_urlrequest_impl.h', 'libcef/webview_host.h', + 'libcef/webwidget_host.cc', 'libcef/webwidget_host.h', 'libcef/xml_reader_impl.cc', 'libcef/xml_reader_impl.h', diff --git a/include/cef_nplugin.h b/include/cef_nplugin.h index 7ee8082c3..b19152707 100644 --- a/include/cef_nplugin.h +++ b/include/cef_nplugin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -28,13 +28,10 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef _CEF_PLUGIN_H -#define _CEF_PLUGIN_H +#ifndef _CEF_NPLUGIN_H +#define _CEF_NPLUGIN_H -#include "cef_string.h" -#include -#include "third_party/npapi/bindings/npapi.h" -#include "third_party/npapi/bindings/nphostapi.h" +#include "cef_nplugin_types.h" // Netscape plugins are normally built at separate DLLs that are loaded by the // browser when needed. This interface supports the creation of plugins that @@ -43,45 +40,78 @@ // See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete // documentation on how to use the Netscape Plugin API. -// This structure describes a mime type entry for a plugin. -struct CefPluginMimeType { - // The actual mime type. - CefString mime_type; +// This class provides attribute information and entry point functions for a +// plugin. +class CefPluginInfo : public cef_plugin_info_t +{ +public: + CefPluginInfo() + { + Init(); + } + virtual ~CefPluginInfo() + { + Reset(); + } - // A list of all the file extensions for this mime type. - std::vector file_extensions; + CefPluginInfo(const CefPluginInfo& r) + { + Init(); + *this = r; + } + CefPluginInfo(const cef_plugin_info_t& r) + { + Init(); + *this = r; + } - // Description of the mime type. - CefString description; -}; + void Reset() + { + cef_string_clear(&unique_name); + cef_string_clear(&display_name); + cef_string_clear(&description); + cef_string_clear(&mime_type); + Init(); + } -// This structure provides attribute information and entry point functions for -// a plugin. -struct CefPluginInfo { - // The unique name that identifies the plugin. - CefString unique_name; + void Attach(const cef_plugin_info_t& r) + { + Reset(); + *static_cast(this) = r; + } - // The friendly display name of the plugin. - CefString display_name; + void Detach() + { + Init(); + } - // The version string of the plugin. - CefString version; + CefPluginInfo& operator=(const CefPluginInfo& r) + { + return operator=(static_cast(r)); + } - // A description of the plugin. - CefString description; - - // A list of all the mime types that this plugin supports. - std::vector mime_types; - - // Entry point function pointers. + CefPluginInfo& operator=(const cef_plugin_info_t& r) + { + cef_string_copy(r.unique_name.str, r.unique_name.length, &unique_name); + cef_string_copy(r.display_name.str, r.display_name.length, &display_name); + cef_string_copy(r.description.str, r.description.length, &description); + cef_string_copy(r.mime_type.str, r.mime_type.length, &mime_type); #if !defined(OS_POSIX) || defined(OS_MACOSX) - NP_GetEntryPointsFunc np_getentrypoints; + np_getentrypoints = r.np_getentrypoints; #endif - NP_InitializeFunc np_initialize; - NP_ShutdownFunc np_shutdown; + np_initialize = r.np_initialize; + np_shutdown = r.np_shutdown; + return *this; + } + +protected: + void Init() + { + memset(static_cast(this), 0, sizeof(cef_plugin_info_t)); + } }; // Register a plugin with the system. -bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info); +bool CefRegisterPlugin(const CefPluginInfo& plugin_info); -#endif // _CEF_PLUGIN_H +#endif // _CEF_NPLUGIN_H diff --git a/include/cef_nplugin_capi.h b/include/cef_nplugin_capi.h index 08f05318d..2f7e4f70a 100644 --- a/include/cef_nplugin_capi.h +++ b/include/cef_nplugin_capi.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -28,58 +28,15 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifndef _CEF_PLUGIN_CAPI_H -#define _CEF_PLUGIN_CAPI_H +#ifndef _CEF_NPLUGIN_CAPI_H +#define _CEF_NPLUGIN_CAPI_H + +#include "cef_nplugin_types.h" #ifdef __cplusplus extern "C" { #endif -#include "cef_export.h" -#include "third_party/npapi/bindings/npapi.h" -#include "third_party/npapi/bindings/nphostapi.h" - -// Netscape plugins are normally built at separate DLLs that are loaded by the -// browser when needed. This interface supports the creation of plugins that -// are an embedded component of the application. Embedded plugins built using -// this interface use the same Netscape Plugin API as DLL-based plugins. -// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete -// documentation on how to use the Netscape Plugin API. - -// This structure provides attribute information and entry point functions for -// a plugin. -typedef struct _cef_plugin_info_t { - // The unique name that identifies the plugin. - cef_string_t unique_name; - - // The friendly display name of the plugin. - cef_string_t display_name; - - // The version string of the plugin. - cef_string_t version; - - // A description of the plugin. - cef_string_t description; - - // A pipe (|) delimited list of mime type values that the plugin supports. - cef_string_t mime_types; - - // A pipe (|) delimited list of extension values. Each value is associated - // with the mime type value at the same position. Multiple file extensions - // for the same mime type may be delimited with commas (,). - cef_string_t file_extensions; - - // A pipe (|) delimited list of description values. Each value is associated - // with the mime type value at the same position. - cef_string_t type_descriptions; - - // Entry point function pointers. -#if !defined(OS_POSIX) || defined(OS_MACOSX) - NP_GetEntryPointsFunc np_getentrypoints; -#endif - NP_InitializeFunc np_initialize; - NP_ShutdownFunc np_shutdown; -} cef_plugin_info_t; // Register a plugin with the system. Returns true (1) on success. CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info); @@ -89,4 +46,4 @@ CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info); } #endif -#endif // _CEF_PLUGIN_CAPI_H +#endif // _CEF_NPLUGIN_CAPI_H diff --git a/include/cef_nplugin_types.h b/include/cef_nplugin_types.h new file mode 100644 index 000000000..fc61d0c1b --- /dev/null +++ b/include/cef_nplugin_types.h @@ -0,0 +1,77 @@ +// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +#ifndef _CEF_NPLUGIN_TYPES_H +#define _CEF_NPLUGIN_TYPES_H + +#include "cef_export.h" +#include "cef_string.h" +#include "third_party/npapi/bindings/npapi.h" +#include "third_party/npapi/bindings/nphostapi.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Netscape plugins are normally built at separate DLLs that are loaded by the +// browser when needed. This interface supports the creation of plugins that +// are an embedded component of the application. Embedded plugins built using +// this interface use the same Netscape Plugin API as DLL-based plugins. +// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete +// documentation on how to use the Netscape Plugin API. + +// This structure provides attribute information and entry point functions for +// a plugin. +typedef struct _cef_plugin_info_t { + // The unique name that identifies the plugin. + cef_string_t unique_name; + + // The friendly display name of the plugin. + cef_string_t display_name; + + // A description of the plugin. + cef_string_t description; + + // The mime type that the plugin supports. + cef_string_t mime_type; + + // Entry point function pointers. +#if !defined(OS_POSIX) || defined(OS_MACOSX) + NP_GetEntryPointsFunc np_getentrypoints; +#endif + NP_InitializeFunc np_initialize; + NP_ShutdownFunc np_shutdown; +} cef_plugin_info_t; + +#ifdef __cplusplus +} +#endif + +#endif // _CEF_NPLUGIN_TYPES_H diff --git a/libcef/browser_appcache_system.cc b/libcef/browser_appcache_system.cc index bad1309dc..1f0954192 100644 --- a/libcef/browser_appcache_system.cc +++ b/libcef/browser_appcache_system.cc @@ -6,7 +6,7 @@ #include "browser_resource_loader_bridge.h" #include "base/callback.h" -#include "base/lock.h" +#include "base/synchronization/lock.h" #include "base/task.h" #include "base/synchronization/waitable_event.h" #include "webkit/appcache/appcache_interceptor.h" diff --git a/libcef/browser_database_system.cc b/libcef/browser_database_system.cc index 9fdcff694..c875b6a85 100644 --- a/libcef/browser_database_system.cc +++ b/libcef/browser_database_system.cc @@ -10,8 +10,8 @@ #include "base/threading/platform_thread.h" #include "base/utf_string_conversions.h" #include "third_party/sqlite/sqlite3.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "webkit/database/database_util.h" #include "webkit/database/vfs_backend.h" @@ -28,7 +28,7 @@ BrowserDatabaseSystem* BrowserDatabaseSystem::GetInstance() { BrowserDatabaseSystem::BrowserDatabaseSystem() : waiting_for_dbs_to_close_(false) { - temp_dir_.CreateUniqueTempDir(); + CHECK(temp_dir_.CreateUniqueTempDir()); db_tracker_ = new DatabaseTracker(temp_dir_.path(), false); db_tracker_->AddObserver(this); DCHECK(!instance_); @@ -175,7 +175,7 @@ void BrowserDatabaseSystem::SetFullFilePathsForVfsFile( FilePath file_name = DatabaseUtil::GetFullFilePathForVfsFile(db_tracker_, vfs_file_name); - AutoLock file_names_auto_lock(file_names_lock_); + base::AutoLock file_names_auto_lock(file_names_lock_); file_names_[vfs_file_name] = file_name; file_names_[vfs_file_name + ASCIIToUTF16("-journal")] = FilePath::FromWStringHack(file_name.ToWStringHack() + @@ -187,7 +187,7 @@ FilePath BrowserDatabaseSystem::GetFullFilePathForVfsFile( if (vfs_file_name.empty()) // temp file, used for vacuuming return FilePath(); - AutoLock file_names_auto_lock(file_names_lock_); + base::AutoLock file_names_auto_lock(file_names_lock_); if(file_names_.find(vfs_file_name) != file_names_.end()) return file_names_[vfs_file_name]; diff --git a/libcef/browser_database_system.h b/libcef/browser_database_system.h index eb06cb6ea..04a185432 100644 --- a/libcef/browser_database_system.h +++ b/libcef/browser_database_system.h @@ -7,12 +7,12 @@ #include "base/file_path.h" #include "base/hash_tables.h" -#include "base/lock.h" #include "base/platform_file.h" #include "base/ref_counted.h" #include "base/scoped_temp_dir.h" #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDatabaseObserver.h" +#include "base/synchronization/lock.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabaseObserver.h" #include "webkit/database/database_connections.h" #include "webkit/database/database_tracker.h" @@ -75,7 +75,7 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer, scoped_refptr db_tracker_; - Lock file_names_lock_; + base::Lock file_names_lock_; base::hash_map file_names_; webkit_database::DatabaseConnections database_connections_; diff --git a/libcef/browser_devtools_agent.cc b/libcef/browser_devtools_agent.cc index 527ca5248..36a8f8ae2 100644 --- a/libcef/browser_devtools_agent.cc +++ b/libcef/browser_devtools_agent.cc @@ -6,8 +6,8 @@ #include "base/message_loop.h" #include "grit/webkit_chromium_resources.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "browser_devtools_callargs.h" #include "browser_devtools_client.h" #include "webkit/glue/webkit_glue.h" diff --git a/libcef/browser_devtools_agent.h b/libcef/browser_devtools_agent.h index 2a85bab90..48fae6b58 100644 --- a/libcef/browser_devtools_agent.h +++ b/libcef/browser_devtools_agent.h @@ -7,7 +7,7 @@ #include "base/task.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h" namespace WebKit { diff --git a/libcef/browser_devtools_callargs.h b/libcef/browser_devtools_callargs.h index 428483994..320aa4286 100644 --- a/libcef/browser_devtools_callargs.h +++ b/libcef/browser_devtools_callargs.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" class BrowserDevToolsCallArgs { public: diff --git a/libcef/browser_devtools_client.cc b/libcef/browser_devtools_client.cc index 30c66fa19..c880b4ba3 100644 --- a/libcef/browser_devtools_client.cc +++ b/libcef/browser_devtools_client.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontend.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #undef LOG #include "browser_devtools_agent.h" diff --git a/libcef/browser_devtools_client.h b/libcef/browser_devtools_client.h index fe2199cde..d02d1764d 100644 --- a/libcef/browser_devtools_client.h +++ b/libcef/browser_devtools_client.h @@ -8,7 +8,7 @@ #include "base/scoped_ptr.h" #include "base/task.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontendClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h" namespace WebKit { diff --git a/libcef/browser_drag_delegate.cc b/libcef/browser_drag_delegate.cc index 44a07590b..4caf4e3be 100644 --- a/libcef/browser_drag_delegate.cc +++ b/libcef/browser_drag_delegate.cc @@ -4,8 +4,8 @@ #include "browser_drag_delegate.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" using WebKit::WebPoint; using WebKit::WebView; diff --git a/libcef/browser_drag_delegate.h b/libcef/browser_drag_delegate.h index 1d5323848..0425429c3 100644 --- a/libcef/browser_drag_delegate.h +++ b/libcef/browser_drag_delegate.h @@ -5,23 +5,23 @@ #ifndef _BROWSER_DRAG_DELEGATE_H #define _BROWSER_DRAG_DELEGATE_H -#include "app/win/drag_source.h" +#include "ui/base/dragdrop/drag_source.h" namespace WebKit { class WebView; } -// A class that implements app::win::DragSource for the browser webview +// A class that implements ui::DragSource for the browser webview // delegate. -class BrowserDragDelegate : public app::win::DragSource { +class BrowserDragDelegate : public ui::DragSource { public: BrowserDragDelegate(HWND source_hwnd, WebKit::WebView* webview) - : app::win::DragSource(), + : ui::DragSource(), source_hwnd_(source_hwnd), webview_(webview) { } protected: - // app::win::DragSource + // ui::DragSource virtual void OnDragSourceCancel(); virtual void OnDragSourceDrop(); virtual void OnDragSourceMove(); diff --git a/libcef/browser_drop_delegate.cc b/libcef/browser_drop_delegate.cc index a7982389f..d13b67c25 100644 --- a/libcef/browser_drop_delegate.cc +++ b/libcef/browser_drop_delegate.cc @@ -4,9 +4,9 @@ #include "browser_drop_delegate.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webdropdata.h" using WebKit::WebDragOperation; @@ -15,7 +15,7 @@ using WebKit::WebPoint; using WebKit::WebView; BrowserDropDelegate::BrowserDropDelegate(HWND source_hwnd, WebKit::WebView* webview) - : app::win::DropTarget(source_hwnd), + : ui::DropTarget(source_hwnd), webview_(webview) { } diff --git a/libcef/browser_drop_delegate.h b/libcef/browser_drop_delegate.h index dc0afc06e..a21ecde7d 100644 --- a/libcef/browser_drop_delegate.h +++ b/libcef/browser_drop_delegate.h @@ -7,13 +7,13 @@ #ifndef _BROWSER_DROP_DELEGATE_H #define _BROWSER_DROP_DELEGATE_H -#include "app/win/drop_target.h" +#include "ui/base/dragdrop/drop_target.h" namespace WebKit { class WebView; } -class BrowserDropDelegate : public app::win::DropTarget { +class BrowserDropDelegate : public ui::DropTarget { public: BrowserDropDelegate(HWND source_hwnd, WebKit::WebView* webview); diff --git a/libcef/browser_file_system.cc b/libcef/browser_file_system.cc index 1b2a9994f..98532d459 100644 --- a/libcef/browser_file_system.cc +++ b/libcef/browser_file_system.cc @@ -12,17 +12,17 @@ #include "base/time.h" #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemEntry.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" #include "webkit/fileapi/file_system_callback_dispatcher.h" +#include "webkit/fileapi/file_system_context.h" +#include "webkit/fileapi/file_system_operation.h" #include "webkit/fileapi/file_system_path_manager.h" #include "webkit/fileapi/file_system_types.h" -#include "webkit/fileapi/sandboxed_file_system_context.h" -#include "webkit/fileapi/sandboxed_file_system_operation.h" #include "webkit/glue/webkit_glue.h" using base::WeakPtr; @@ -39,8 +39,8 @@ using WebKit::WebString; using WebKit::WebVector; using fileapi::FileSystemCallbackDispatcher; -using fileapi::SandboxedFileSystemContext; -using fileapi::SandboxedFileSystemOperation; +using fileapi::FileSystemContext; +using fileapi::FileSystemOperation; namespace { @@ -118,7 +118,7 @@ class BrowserFileSystemCallbackDispatcher BrowserFileSystem::BrowserFileSystem() { if (file_system_dir_.CreateUniqueTempDir()) { - sandboxed_context_ = new SandboxedFileSystemContext( + file_system_context_ = new FileSystemContext( base::MessageLoopProxy::CreateForCurrentThread(), base::MessageLoopProxy::CreateForCurrentThread(), file_system_dir_.path(), @@ -138,7 +138,7 @@ void BrowserFileSystem::OpenFileSystem( WebFrame* frame, WebFileSystem::Type web_filesystem_type, long long, bool create, WebFileSystemCallbacks* callbacks) { - if (!frame || !sandboxed_context_.get()) { + if (!frame || !file_system_context_.get()) { // The FileSystem temp directory was not initialized successfully. callbacks->didFail(WebKit::WebFileErrorSecurity); return; @@ -238,12 +238,12 @@ WebFileWriter* BrowserFileSystem::createFileWriter( return new BrowserFileWriter(path, client); } -SandboxedFileSystemOperation* BrowserFileSystem::GetNewOperation( +FileSystemOperation* BrowserFileSystem::GetNewOperation( WebFileSystemCallbacks* callbacks) { BrowserFileSystemCallbackDispatcher* dispatcher = new BrowserFileSystemCallbackDispatcher(AsWeakPtr(), callbacks); - SandboxedFileSystemOperation* operation = new SandboxedFileSystemOperation( + FileSystemOperation* operation = new FileSystemOperation( dispatcher, base::MessageLoopProxy::CreateForCurrentThread(), - sandboxed_context_.get()); + file_system_context_.get()); return operation; } diff --git a/libcef/browser_file_system.h b/libcef/browser_file_system.h index c57b56d9e..d56db2c09 100644 --- a/libcef/browser_file_system.h +++ b/libcef/browser_file_system.h @@ -10,7 +10,7 @@ #include "base/id_map.h" #include "base/scoped_temp_dir.h" #include "base/weak_ptr.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" #include "webkit/fileapi/file_system_types.h" namespace WebKit { @@ -19,8 +19,8 @@ class WebFrame; } namespace fileapi { -class SandboxedFileSystemContext; -class SandboxedFileSystemOperation; +class FileSystemContext; +class FileSystemOperation; } class BrowserFileSystem @@ -66,13 +66,13 @@ class BrowserFileSystem private: // Helpers. - fileapi::SandboxedFileSystemOperation* GetNewOperation( + fileapi::FileSystemOperation* GetNewOperation( WebKit::WebFileSystemCallbacks* callbacks); // A temporary directory for FileSystem API. ScopedTempDir file_system_dir_; - scoped_refptr sandboxed_context_; + scoped_refptr file_system_context_; DISALLOW_COPY_AND_ASSIGN(BrowserFileSystem); }; diff --git a/libcef/browser_file_writer.cc b/libcef/browser_file_writer.cc index e5e9cfbf0..6973506bd 100644 --- a/libcef/browser_file_writer.cc +++ b/libcef/browser_file_writer.cc @@ -19,7 +19,7 @@ using WebKit::WebFileWriterClient; using WebKit::WebString; using WebKit::WebURL; -URLRequestContext* BrowserFileWriter::request_context_ = NULL; +net::URLRequestContext* BrowserFileWriter::request_context_ = NULL; // Helper class to proxy the write and truncate calls to the IO thread, // and to proxy the results back to the main thead. There is a one-to-one @@ -116,7 +116,8 @@ class BrowserFileWriter::IOThreadProxy FileSystemOperation* GetNewOperation() { // The FileSystemOperation takes ownership of the CallbackDispatcher. - return new FileSystemOperation(new CallbackDispatcher(this), io_thread_); + return new FileSystemOperation(new CallbackDispatcher(this), + io_thread_, NULL); } void DidSucceed() { diff --git a/libcef/browser_impl.cc b/libcef/browser_impl.cc index 58200e4d5..d10076416 100644 --- a/libcef/browser_impl.cc +++ b/libcef/browser_impl.cc @@ -14,18 +14,18 @@ #include "base/path_service.h" #include "base/synchronization/waitable_event.h" #include "base/utf_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPluginDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRange.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/glue_serialize.h" #include "webkit/plugins/npapi/webplugin_delegate.h" #include "webkit/plugins/npapi/webplugin_impl.h" diff --git a/libcef/browser_impl.h b/libcef/browser_impl.h index be8fd62c3..af98173a3 100644 --- a/libcef/browser_impl.h +++ b/libcef/browser_impl.h @@ -19,7 +19,7 @@ #endif #include "base/scoped_temp_dir.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" namespace base { class WaitableEvent; diff --git a/libcef/browser_impl_gtk.cc b/libcef/browser_impl_gtk.cc index a9c4edaaa..7d0b016b7 100644 --- a/libcef/browser_impl_gtk.cc +++ b/libcef/browser_impl_gtk.cc @@ -9,10 +9,10 @@ #include -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webpreferences.h" using WebKit::WebRect; @@ -75,7 +75,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable) REQUIRE_UIT(); if (!host) return; - + if(enable) gtk_widget_grab_focus(host->view_handle()); } @@ -83,7 +83,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable) bool CefBrowserImpl::UIT_ViewDocumentString(WebKit::WebFrame *frame) { REQUIRE_UIT(); - + // TODO(port): Add implementation. NOTIMPLEMENTED(); return false; @@ -107,8 +107,8 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) { int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame) { - REQUIRE_UIT(); - + REQUIRE_UIT(); + // TODO(port): Add implementation. NOTIMPLEMENTED(); return 0; diff --git a/libcef/browser_impl_mac.mm b/libcef/browser_impl_mac.mm index 5a2597595..b7469d007 100644 --- a/libcef/browser_impl_mac.mm +++ b/libcef/browser_impl_mac.mm @@ -10,10 +10,10 @@ #import -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webpreferences.h" using WebKit::WebRect; @@ -110,7 +110,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable) REQUIRE_UIT(); if (!host) return; - + NSView* view = host->view_handle(); if (!view) return; @@ -122,7 +122,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable) bool CefBrowserImpl::UIT_ViewDocumentString(WebKit::WebFrame *frame) { REQUIRE_UIT(); - + // TODO(port): Add implementation. NOTIMPLEMENTED(); return false; @@ -146,8 +146,8 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) { int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame) { - REQUIRE_UIT(); - + REQUIRE_UIT(); + // TODO(port): Add implementation. NOTIMPLEMENTED(); return 0; diff --git a/libcef/browser_impl_win.cc b/libcef/browser_impl_win.cc index 6f39c8bcb..3e386985f 100644 --- a/libcef/browser_impl_win.cc +++ b/libcef/browser_impl_win.cc @@ -8,12 +8,12 @@ #include "browser_settings.h" #include "printing/units.h" -#include "app/win/hwnd_util.h" #include "skia/ext/vector_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/base/win/hwnd_util.h" #include "webkit/glue/webpreferences.h" #include @@ -34,7 +34,7 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { CefBrowserImpl* browser = - static_cast(app::win::GetWindowUserData(hwnd)); + static_cast(ui::GetWindowUserData(hwnd)); switch (message) { case WM_COMMAND: @@ -49,7 +49,7 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message, case WM_DESTROY: if (browser) { // Clear the user data pointer. - app::win::SetWindowUserData(hwnd, NULL); + ui::SetWindowUserData(hwnd, NULL); // Destroy the browser. browser->UIT_DestroyBrowser(); @@ -111,7 +111,7 @@ void CefBrowserImpl::UIT_CreateBrowser(const CefString& url) // Set window user data to this object for future reference from the window // procedure - app::win::SetWindowUserData(window_info_.m_hWnd, this); + ui::SetWindowUserData(window_info_.m_hWnd, this); if (!settings_.developer_tools_disabled) dev_tools_agent_.reset(new BrowserDevToolsAgent()); diff --git a/libcef/browser_navigation_controller.h b/libcef/browser_navigation_controller.h index 036e6614d..a2569b757 100644 --- a/libcef/browser_navigation_controller.h +++ b/libcef/browser_navigation_controller.h @@ -13,8 +13,8 @@ #include "base/linked_ptr.h" #include "base/ref_counted.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h" #include "include/cef.h" diff --git a/libcef/browser_request_context.cc b/libcef/browser_request_context.cc index e24a2b294..f3fae9675 100644 --- a/libcef/browser_request_context.cc +++ b/libcef/browser_request_context.cc @@ -149,7 +149,7 @@ BrowserRequestContext::~BrowserRequestContext() { void BrowserRequestContext::SetAcceptAllCookies(bool accept_all_cookies) { net::StaticCookiePolicy::Type policy_type = accept_all_cookies ? net::StaticCookiePolicy::ALLOW_ALL_COOKIES : - net::StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES; + net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES; static_cast(cookie_policy())->set_type(policy_type); } diff --git a/libcef/browser_request_context.h b/libcef/browser_request_context.h index 5807e48de..394cecdf6 100644 --- a/libcef/browser_request_context.h +++ b/libcef/browser_request_context.h @@ -16,7 +16,7 @@ class BlobStorageController; } // A basic URLRequestContext that only provides an in-memory cookie store. -class BrowserRequestContext : public URLRequestContext { +class BrowserRequestContext : public net::URLRequestContext { public: // Use an in-memory cache BrowserRequestContext(); diff --git a/libcef/browser_resource_loader_bridge.cc b/libcef/browser_resource_loader_bridge.cc index 43a48ac10..f8b352b7b 100644 --- a/libcef/browser_resource_loader_bridge.cc +++ b/libcef/browser_resource_loader_bridge.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Embedded Framework Authors. +// Copyright (c) 2011 The Chromium Embedded Framework Authors. // Portions copyright (c) 2006-2008 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. @@ -52,10 +52,11 @@ #include "base/nss_util.h" #endif #include "base/ref_counted.h" +#include "base/synchronization/waitable_event.h" #include "base/time.h" #include "base/timer.h" #include "base/threading/thread.h" -#include "base/synchronization/waitable_event.h" +#include "base/utf_string_conversions.h" #include "net/base/auth.h" #include "net/base/cookie_store.h" #include "net/base/file_stream.h" @@ -80,6 +81,7 @@ using net::HttpResponseHeaders; using net::StaticCookiePolicy; +using net::URLRequestStatus; using webkit_blob::DeletableFileReference; using webkit_glue::ResourceLoaderBridge; using webkit_glue::ResourceResponseInfo; @@ -201,7 +203,7 @@ class RequestProxy : public net::URLRequest::Delegate, if (allow_download && webkit_glue::ShouldDownload(content_disposition, info.mime_type)) { FilePath path(net::GetSuggestedFilename(url, content_disposition, - info.charset, FilePath(FILE_PATH_LITERAL("download")))); + info.charset, ASCIIToUTF16("download"))); CefRefPtr dl_handler; if (handler->HandleDownloadResponse(browser_, info.mime_type, path.value(), info.content_length, dl_handler) == @@ -255,7 +257,7 @@ class RequestProxy : public net::URLRequest::Delegate, peer_->OnDownloadedData(bytes_read); } - void NotifyCompletedRequest(const URLRequestStatus& status, + void NotifyCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& complete_time) { if (download_handler_.get()) { @@ -538,7 +540,7 @@ class RequestProxy : public net::URLRequest::Delegate, this, &RequestProxy::NotifyReceivedData, bytes_read)); } - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& complete_time) { if (download_to_file_) @@ -757,7 +759,7 @@ class SyncRequestProxy : public RequestProxy { AsyncReadData(); // read more (may recurse) } - virtual void OnCompletedRequest(const URLRequestStatus& status, + virtual void OnCompletedRequest(const net::URLRequestStatus& status, const std::string& security_info, const base::Time& complete_time) { if (download_to_file_) diff --git a/libcef/browser_socket_stream_bridge.cc b/libcef/browser_socket_stream_bridge.cc index 3e06f07ef..04bb35a04 100644 --- a/libcef/browser_socket_stream_bridge.cc +++ b/libcef/browser_socket_stream_bridge.cc @@ -12,9 +12,9 @@ #include "net/socket_stream/socket_stream_job.h" #include "net/websockets/websocket_job.h" #include "net/url_request/url_request_context.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandle.h" #include "webkit/glue/websocketstreamhandle_bridge.h" #include "webkit/glue/websocketstreamhandle_delegate.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSocketStreamHandle.h" using webkit_glue::WebSocketStreamHandleBridge; @@ -23,7 +23,7 @@ static const int kNoSocketId = 0; namespace { MessageLoop* g_io_thread; -scoped_refptr g_request_context; +scoped_refptr g_request_context; class WebSocketStreamHandleBridgeImpl : public WebSocketStreamHandleBridge, @@ -220,7 +220,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnClose() { /* static */ void BrowserSocketStreamBridge::InitializeOnIOThread( - URLRequestContext* request_context) { + net::URLRequestContext* request_context) { g_io_thread = MessageLoop::current(); g_request_context = request_context; } diff --git a/libcef/browser_web_worker.h b/libcef/browser_web_worker.h index 8c504df4c..2dfa0bb6c 100644 --- a/libcef/browser_web_worker.h +++ b/libcef/browser_web_worker.h @@ -7,9 +7,9 @@ #include "base/basictypes.h" #include "base/ref_counted.h" -#include "third_party/WebKit/WebKit/chromium/public/WebMessagePortChannel.h" -#include "third_party/WebKit/WebKit/chromium/public/WebWorker.h" -#include "third_party/WebKit/WebKit/chromium/public/WebWorkerClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h" namespace WebKit { class WebApplicationCacheHost; diff --git a/libcef/browser_webblobregistry_impl.cc b/libcef/browser_webblobregistry_impl.cc index f1430d31f..fe503b736 100644 --- a/libcef/browser_webblobregistry_impl.cc +++ b/libcef/browser_webblobregistry_impl.cc @@ -6,9 +6,9 @@ #include "base/message_loop.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebBlobData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "webkit/blob/blob_data.h" #include "webkit/blob/blob_storage_controller.h" diff --git a/libcef/browser_webblobregistry_impl.h b/libcef/browser_webblobregistry_impl.h index 3e0f8b833..848e9a0a4 100644 --- a/libcef/browser_webblobregistry_impl.h +++ b/libcef/browser_webblobregistry_impl.h @@ -6,7 +6,7 @@ #define BROWSER_WEBBLOBREGISTRY_IMPL_H_ #include "base/ref_counted.h" -#include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h" class GURL; diff --git a/libcef/browser_webcookiejar_impl.cc b/libcef/browser_webcookiejar_impl.cc index 6576dab26..a016a42ea 100644 --- a/libcef/browser_webcookiejar_impl.cc +++ b/libcef/browser_webcookiejar_impl.cc @@ -5,7 +5,7 @@ #include "browser_webcookiejar_impl.h" #include "browser_resource_loader_bridge.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" using WebKit::WebString; using WebKit::WebURL; diff --git a/libcef/browser_webcookiejar_impl.h b/libcef/browser_webcookiejar_impl.h index a8b036356..945f7e738 100644 --- a/libcef/browser_webcookiejar_impl.h +++ b/libcef/browser_webcookiejar_impl.h @@ -6,8 +6,8 @@ #define _BROWSER_SIMPLE_WEBCOOKIEJAR_IMPL_H // TODO(darin): WebCookieJar.h is missing a WebString.h include! -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCookieJar.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCookieJar.h" class BrowserWebCookieJarImpl : public WebKit::WebCookieJar { public: diff --git a/libcef/browser_webkit_glue.cc b/libcef/browser_webkit_glue.cc index 5058bc83b..abec6c018 100644 --- a/libcef/browser_webkit_glue.cc +++ b/libcef/browser_webkit_glue.cc @@ -7,10 +7,12 @@ #include "third_party/WebKit/Source/WebCore/config.h" MSVC_PUSH_WARNING_LEVEL(0); +#include "ApplicationCacheStorage.h" +#include "CrossOriginPreflightResultCache.h" #include "DocumentLoader.h" #include "MemoryCache.h" #include "TextEncoding.h" -#include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h" +#include "third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.h" MSVC_POP_WARNING(); #undef LOG #include "base/string_util.h" @@ -27,8 +29,8 @@ MSVC_POP_WARNING(); #include "base/scoped_ptr.h" #include "base/string16.h" #include "net/base/mime_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/plugins/plugin_list.h" @@ -140,9 +142,15 @@ void SetCacheMode(bool enabled) { void ClearCache() { - // Clear the cache by disabling it and then re-enabling it. - WebCore::cache()->setDisabled(true); - WebCore::cache()->setDisabled(false); + if (WebCore::memoryCache()->disabled()) + return; + + // Clear the memory cache by disabling and then re-enabling it. + WebCore::memoryCache()->setDisabled(true); + WebCore::memoryCache()->setDisabled(false); + + // Empty the Cross-Origin Preflight cache + WebCore::CrossOriginPreflightResultCache::shared().empty(); } std::string GetProductVersion() { diff --git a/libcef/browser_webkit_glue_mac.mm b/libcef/browser_webkit_glue_mac.mm index 69bb34701..7c563d2b2 100644 --- a/libcef/browser_webkit_glue_mac.mm +++ b/libcef/browser_webkit_glue_mac.mm @@ -10,23 +10,23 @@ #include "browser_webkit_glue.h" #undef LOG -#include "app/data_pack.h" #include "base/file_util.h" #include "base/logging.h" #include "base/mac/mac_util.h" #include "base/path_service.h" #include "grit/webkit_resources.h" +#include "ui/base/resource/data_pack.h" #include "webkit/glue/webkit_glue.h" namespace webkit_glue { // Data pack resource. This is a pointer to the mmapped resources file. -static app::DataPack* g_resource_data_pack = NULL; +static ui::DataPack* g_resource_data_pack = NULL; void InitializeDataPak() { // mmap the data pack which holds strings used by WebCore. // TODO(port): Allow the embedder to customize the pak name. - g_resource_data_pack = new app::DataPack; + g_resource_data_pack = new ui::DataPack; NSString *resource_path = [base::mac::MainAppBundle() pathForResource:@"cefclient" ofType:@"pak"]; FilePath resources_pak_path([resource_path fileSystemRepresentation]); diff --git a/libcef/browser_webkit_glue_win.cc b/libcef/browser_webkit_glue_win.cc index 3c48cb9f8..3b666dfeb 100644 --- a/libcef/browser_webkit_glue_win.cc +++ b/libcef/browser_webkit_glue_win.cc @@ -19,11 +19,11 @@ MSVC_POP_WARNING(); #undef LOG #include "base/logging.h" #include "base/resource_util.h" -#include "gfx/gdi_util.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/gfx/gdi_util.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebRect; diff --git a/libcef/browser_webkit_init.h b/libcef/browser_webkit_init.h index ba35c80e3..cc4fe2d01 100644 --- a/libcef/browser_webkit_init.h +++ b/libcef/browser_webkit_init.h @@ -23,20 +23,20 @@ #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/database/vfs_backend.h" #include "webkit/extensions/v8/gears_extension.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageEventDispatcher.h" -#include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h" -#include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h" -#include "third_party/WebKit/WebKit/chromium/public/WebIDBKeyPath.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webfileutilities_impl.h" @@ -229,7 +229,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl { } virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() { - return new webkit_gpu::WebGraphicsContext3DInProcessImpl(); + return new webkit::gpu::WebGraphicsContext3DInProcessImpl(); } WebKit::WebString queryLocalizedString( diff --git a/libcef/browser_webstoragearea_impl.cc b/libcef/browser_webstoragearea_impl.cc index 9e7e3d79e..d7417623a 100644 --- a/libcef/browser_webstoragearea_impl.cc +++ b/libcef/browser_webstoragearea_impl.cc @@ -7,9 +7,9 @@ #include "dom_storage_area.h" #include "dom_storage_namespace.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" using WebKit::WebFrame; using WebKit::WebString; diff --git a/libcef/browser_webstoragearea_impl.h b/libcef/browser_webstoragearea_impl.h index 8c0fb7c22..094c86417 100644 --- a/libcef/browser_webstoragearea_impl.h +++ b/libcef/browser_webstoragearea_impl.h @@ -6,8 +6,8 @@ #define _BROWSER_WEBSTORAGEAREA_IMPL_H #include "base/basictypes.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" class DOMStorageArea; diff --git a/libcef/browser_webstoragenamespace_impl.h b/libcef/browser_webstoragenamespace_impl.h index 3c9dbc690..85d5d8d23 100644 --- a/libcef/browser_webstoragenamespace_impl.h +++ b/libcef/browser_webstoragenamespace_impl.h @@ -8,7 +8,7 @@ #include "dom_storage_common.h" #include "base/basictypes.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" class BrowserWebStorageNamespaceImpl : public WebKit::WebStorageNamespace { public: diff --git a/libcef/browser_webview_delegate.cc b/libcef/browser_webview_delegate.cc index cc1c788f9..675f7506e 100644 --- a/libcef/browser_webview_delegate.cc +++ b/libcef/browser_webview_delegate.cc @@ -13,6 +13,7 @@ #include "browser_impl.h" #include "browser_navigation_controller.h" #include "browser_web_worker.h" +#include "browser_webkit_glue.h" #include "browser_zoom_map.h" #include "cef_context.h" #include "request_impl.h" @@ -23,37 +24,39 @@ #include "base/message_loop.h" #include "base/process_util.h" #include "base/string_util.h" -#include "gfx/point.h" #include "media/base/filter_collection.h" +#include "media/base/message_loop_factory_impl.h" #include "media/filters/audio_renderer_impl.h" #include "net/base/net_errors.h" -#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" -#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNode.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRange.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" -#include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" +#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/point.h" #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/glue/glue_serialize.h" #include "webkit/glue/media/video_renderer_impl.h" @@ -65,7 +68,6 @@ #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_impl.h" -#include "browser_webkit_glue.h" #if defined(OS_WIN) // TODO(port): make these files work everywhere. @@ -493,6 +495,11 @@ void BrowserWebViewDelegate::scheduleComposite() { host->ScheduleComposite(); } +void BrowserWebViewDelegate::scheduleAnimation() { + if (WebWidgetHost* host = GetWidgetHost()) + host->ScheduleAnimation(); +} + void BrowserWebViewDelegate::didFocus() { if (WebWidgetHost* host = GetWidgetHost()) { CefRefPtr handler = browser_->GetHandler(); @@ -530,7 +537,7 @@ WebPlugin* BrowserWebViewDelegate::createPlugin( std::string actual_mime_type; if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( params.url, params.mimeType.utf8(), allow_wildcard, &info, - &actual_mime_type)) { + &actual_mime_type) || !webkit::npapi::IsPluginEnabled(info)) { return NULL; } @@ -545,6 +552,9 @@ WebWorker* BrowserWebViewDelegate::createWorker( WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer( WebFrame* frame, WebMediaPlayerClient* client) { + scoped_ptr message_loop_factory( + new media::MessageLoopFactoryImpl()); + scoped_ptr collection( new media::FilterCollection()); @@ -556,7 +566,9 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer( collection->AddAudioRenderer(new media::AudioRendererImpl()); scoped_ptr result( - new webkit_glue::WebMediaPlayerImpl(client, collection.release())); + new webkit_glue::WebMediaPlayerImpl(client, + collection.release(), + message_loop_factory.release())); if (!result->Initialize(frame, false, video_renderer)) return NULL; return result.release(); diff --git a/libcef/browser_webview_delegate.h b/libcef/browser_webview_delegate.h index 700b59494..a73de9f91 100644 --- a/libcef/browser_webview_delegate.h +++ b/libcef/browser_webview_delegate.h @@ -17,18 +17,18 @@ #include "base/scoped_ptr.h" #include "base/weak_ptr.h" #include "build/build_config.h" -#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h" #include "webkit/glue/webcursor.h" #include "webkit/plugins/npapi/webplugin_page_delegate.h" #include "browser_navigation_controller.h" #if defined(OS_MACOSX) -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h" #endif #if defined(OS_WIN) @@ -116,6 +116,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient, virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clip_rect); virtual void scheduleComposite(); + virtual void scheduleAnimation(); virtual void didFocus(); virtual void didBlur(); virtual void didChangeCursor(const WebKit::WebCursorInfo& cursor); diff --git a/libcef/browser_webview_delegate_gtk.cc b/libcef/browser_webview_delegate_gtk.cc index 905ec6d09..bdc58ffbd 100644 --- a/libcef/browser_webview_delegate_gtk.cc +++ b/libcef/browser_webview_delegate_gtk.cc @@ -10,13 +10,13 @@ #include #include "base/message_loop.h" -#include "gfx/gtk_util.h" -#include "gfx/point.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/gfx/gtk_util.h" +#include "ui/gfx/point.h" #include "webkit/glue/webcursor.h" #include "webkit/glue/webdropdata.h" #include "webkit/glue/webpreferences.h" diff --git a/libcef/browser_webview_delegate_mac.mm b/libcef/browser_webview_delegate_mac.mm index 8ea9f9b87..605b7e1ec 100644 --- a/libcef/browser_webview_delegate_mac.mm +++ b/libcef/browser_webview_delegate_mac.mm @@ -8,9 +8,9 @@ #import #include "base/sys_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webcursor.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" diff --git a/libcef/browser_webview_delegate_win.cc b/libcef/browser_webview_delegate_win.cc index f7ad3a509..9df337177 100644 --- a/libcef/browser_webview_delegate_win.cc +++ b/libcef/browser_webview_delegate_win.cc @@ -20,15 +20,15 @@ #include "base/message_loop.h" #include "base/string_util.h" -#include "gfx/gdi_util.h" -#include "gfx/native_widget_types.h" -#include "gfx/point.h" #include "net/base/net_errors.h" -#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/gfx/gdi_util.h" +#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/point.h" #include "webkit/glue/webdropdata.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/webkit_glue.h" diff --git a/libcef/browser_webview_mac.mm b/libcef/browser_webview_mac.mm index d5026f7eb..6c3853ebc 100644 --- a/libcef/browser_webview_mac.mm +++ b/libcef/browser_webview_mac.mm @@ -11,9 +11,9 @@ #include "webwidget_host.h" #include "base/scoped_ptr.h" -#include "gfx/rect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/gfx/rect.h" @implementation BrowserWebView diff --git a/libcef/cef_context.cc b/libcef/cef_context.cc index 532534402..ceeb0e5d0 100644 --- a/libcef/cef_context.cc +++ b/libcef/cef_context.cc @@ -76,48 +76,31 @@ void CefDoMessageLoopWork() _Context->process()->DoMessageLoopIteration(); } -static void UIT_RegisterPlugin(struct CefPluginInfo* plugin_info) +static void UIT_RegisterPlugin(CefPluginInfo* plugin_info) { REQUIRE_UIT(); - webkit::npapi::PluginVersionInfo info; + webkit::npapi::WebPluginInfo info; - info.path = FilePath(plugin_info->unique_name); - info.product_name = plugin_info->display_name; - info.file_description = plugin_info->description; - info.file_version =plugin_info->version; - - for(size_t i = 0; i < plugin_info->mime_types.size(); ++i) { - if(i > 0) { - info.mime_types += L"|"; - info.file_extensions += L"|"; - info.type_descriptions += L"|"; - } - - info.mime_types += plugin_info->mime_types[i].mime_type; - info.type_descriptions += plugin_info->mime_types[i].description; - - for(size_t j = 0; - j < plugin_info->mime_types[i].file_extensions.size(); ++j) { - if(j > 0) { - info.file_extensions += L","; - } - info.file_extensions += plugin_info->mime_types[i].file_extensions[j]; - } - } + FilePath filename = FilePath(CefString(&plugin_info->unique_name)); + std::string name = CefString(&plugin_info->display_name); + std::string description = CefString(&plugin_info->description); + std::string mime_type = CefString(&plugin_info->mime_type); + webkit::npapi::PluginEntryPoints entry_points; #if !defined(OS_POSIX) || defined(OS_MACOSX) - info.entry_points.np_getentrypoints = plugin_info->np_getentrypoints; + entry_points.np_getentrypoints = plugin_info->np_getentrypoints; #endif - info.entry_points.np_initialize = plugin_info->np_initialize; - info.entry_points.np_shutdown = plugin_info->np_shutdown; + entry_points.np_initialize = plugin_info->np_initialize; + entry_points.np_shutdown = plugin_info->np_shutdown; - webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info); + webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(filename, + name, description, mime_type, entry_points); delete plugin_info; } -bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info) +bool CefRegisterPlugin(const CefPluginInfo& plugin_info) { // Verify that the context is in a valid state. if (!CONTEXT_STATE_VALID()) { @@ -125,11 +108,8 @@ bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info) return false; } - CefPluginInfo* pPluginInfo = new CefPluginInfo; - *pPluginInfo = plugin_info; - CefThread::PostTask(CefThread::UI, FROM_HERE, - NewRunnableFunction(UIT_RegisterPlugin, pPluginInfo)); + NewRunnableFunction(UIT_RegisterPlugin, new CefPluginInfo(plugin_info))); return true; } diff --git a/libcef/cef_process_ui_thread.cc b/libcef/cef_process_ui_thread.cc index 2de55966e..0727d920d 100644 --- a/libcef/cef_process_ui_thread.cc +++ b/libcef/cef_process_ui_thread.cc @@ -8,13 +8,13 @@ #include "browser_webkit_init.h" #include "cef_context.h" +#include "app/gfx/gl/gl_implementation.h" #include "base/command_line.h" #include "base/i18n/icu_util.h" #include "base/metrics/stats_table.h" #include "base/rand_util.h" #include "base/string_number_conversions.h" #include "build/build_config.h" -#include "app/gfx/gl/gl_implementation.h" #include "net/base/net_module.h" #if defined(OS_WIN) #include "net/socket/ssl_client_socket_nss_factory.h" diff --git a/libcef/cef_process_ui_thread_mac.mm b/libcef/cef_process_ui_thread_mac.mm index d5f460e10..9e9ead7de 100644 --- a/libcef/cef_process_ui_thread_mac.mm +++ b/libcef/cef_process_ui_thread_mac.mm @@ -7,7 +7,7 @@ #include "cef_process_ui_thread.h" #include "browser_webkit_glue.h" #include "base/message_pump_mac.h" -#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" +#include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.h" // CrAppProtocol implementation. @interface CrApplication : NSApplication { diff --git a/libcef/cef_thread.cc b/libcef/cef_thread.cc index 975d8ecc2..7a5e347c6 100644 --- a/libcef/cef_thread.cc +++ b/libcef/cef_thread.cc @@ -58,7 +58,7 @@ class CefThreadMessageLoopProxy : public MessageLoopProxy { }; -Lock CefThread::lock_; +base::Lock CefThread::lock_; CefThread* CefThread::cef_threads_[ID_COUNT]; @@ -77,7 +77,7 @@ CefThread::CefThread(ID identifier, MessageLoop* message_loop) } void CefThread::Initialize() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); DCHECK(identifier_ >= 0 && identifier_ < ID_COUNT); DCHECK(cef_threads_[identifier_] == NULL); cef_threads_[identifier_] = this; @@ -89,7 +89,7 @@ CefThread::~CefThread() { // correct CefThread succeeds. Stop(); - AutoLock lock(lock_); + base::AutoLock lock(lock_); cef_threads_[identifier_] = NULL; #ifndef NDEBUG // Double check that the threads are ordererd correctly in the enumeration. @@ -102,14 +102,14 @@ CefThread::~CefThread() { // static bool CefThread::IsWellKnownThread(ID identifier) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); return (identifier >= 0 && identifier < ID_COUNT && cef_threads_[identifier]); } // static bool CefThread::CurrentlyOn(ID identifier) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); DCHECK(identifier >= 0 && identifier < ID_COUNT); return cef_threads_[identifier] && cef_threads_[identifier]->message_loop() == MessageLoop::current(); diff --git a/libcef/cef_thread.h b/libcef/cef_thread.h index def769218..4609ab41d 100644 --- a/libcef/cef_thread.h +++ b/libcef/cef_thread.h @@ -6,7 +6,7 @@ #ifndef _CEF_THREAD_H #define _CEF_THREAD_H -#include "base/lock.h" +#include "base/synchronization/lock.h" #include "base/task.h" #include "base/threading/thread.h" @@ -170,7 +170,7 @@ class CefThread : public base::Thread { // This lock protects |cef_threads_|. Do not read or modify that array // without holding this lock. Do not block while holding this lock. - static Lock lock_; + static base::Lock lock_; // An array of the CefThread objects. This array is protected by |lock_|. // The threads are not owned by this array. Typically, the threads are owned diff --git a/libcef/dom_storage_area.cc b/libcef/dom_storage_area.cc index 34a1dc302..a6f9a0fc5 100644 --- a/libcef/dom_storage_area.cc +++ b/libcef/dom_storage_area.cc @@ -7,10 +7,10 @@ #include "dom_storage_namespace.h" #include "base/task.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebSecurityOrigin; diff --git a/libcef/dom_storage_area.h b/libcef/dom_storage_area.h index 0868b67f4..3c0953c5c 100644 --- a/libcef/dom_storage_area.h +++ b/libcef/dom_storage_area.h @@ -11,7 +11,7 @@ #include "base/scoped_ptr.h" #include "base/string16.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" class DOMStorageNamespace; diff --git a/libcef/dom_storage_context.cc b/libcef/dom_storage_context.cc index 51a5f2f96..947bb41b7 100644 --- a/libcef/dom_storage_context.cc +++ b/libcef/dom_storage_context.cc @@ -13,8 +13,8 @@ #include "base/file_util.h" #include "base/string_util.h" #include "dom_storage_area.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "webkit/glue/webkit_glue.h" const FilePath::CharType DOMStorageContext::kLocalStorageDirectory[] = diff --git a/libcef/dom_storage_namespace.cc b/libcef/dom_storage_namespace.cc index 397dd8f33..6e965cade 100644 --- a/libcef/dom_storage_namespace.cc +++ b/libcef/dom_storage_namespace.cc @@ -8,8 +8,8 @@ #include "base/file_path.h" #include "base/logging.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" -#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebStorageArea; diff --git a/libcef/dom_storage_namespace.h b/libcef/dom_storage_namespace.h index f6f8fdf15..48b810e50 100644 --- a/libcef/dom_storage_namespace.h +++ b/libcef/dom_storage_namespace.h @@ -10,7 +10,7 @@ #include "base/hash_tables.h" #include "base/scoped_ptr.h" #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" class DOMStorageArea; class DOMStorageContext; diff --git a/libcef/http_header_utils.h b/libcef/http_header_utils.h index 1f022c87d..93422496d 100644 --- a/libcef/http_header_utils.h +++ b/libcef/http_header_utils.h @@ -5,8 +5,8 @@ #ifndef _HTTP_HEADER_UTILS_H #define _HTTP_HEADER_UTILS_H -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPHeaderVisitor.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" namespace HttpHeaderUtils { diff --git a/libcef/printing/print_settings.h b/libcef/printing/print_settings.h index 30d96bdac..8c073b5e9 100644 --- a/libcef/printing/print_settings.h +++ b/libcef/printing/print_settings.h @@ -7,9 +7,9 @@ #include "include/cef_types.h" -#include "gfx/rect.h" #include "printing/page_range.h" #include "printing/page_setup.h" +#include "ui/gfx/rect.h" typedef struct HDC__* HDC; typedef struct _devicemodeW DEVMODE; diff --git a/libcef/request_impl.h b/libcef/request_impl.h index c79b809fe..66c62113b 100644 --- a/libcef/request_impl.h +++ b/libcef/request_impl.h @@ -8,8 +8,8 @@ #include "include/cef.h" #include "net/base/upload_data.h" #include "net/http/http_request_headers.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" namespace net { class URLRequest; diff --git a/libcef/response_impl.cc b/libcef/response_impl.cc index e1d474d35..5b5bed343 100644 --- a/libcef/response_impl.cc +++ b/libcef/response_impl.cc @@ -7,8 +7,8 @@ #include "base/logging.h" #include "http_header_utils.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" CefResponseImpl::CefResponseImpl(const WebKit::WebURLResponse &response) { diff --git a/libcef/scheme_impl.cc b/libcef/scheme_impl.cc index d683e4524..2b8e74763 100644 --- a/libcef/scheme_impl.cc +++ b/libcef/scheme_impl.cc @@ -174,7 +174,7 @@ private: } void Resolve(const GURL& url) { - AutoLock locked(lock_); + base::AutoLock locked(lock_); if (!owner_ || !owner_loop_) return; @@ -205,7 +205,7 @@ private: void Cancel() { owner_->handler_->Cancel(); - AutoLock locked(lock_); + base::AutoLock locked(lock_); owner_ = NULL; owner_loop_ = NULL; } @@ -218,7 +218,7 @@ private: CefUrlRequestJob* owner_; - Lock lock_; + base::Lock lock_; MessageLoop* owner_loop_; }; diff --git a/libcef/v8_impl.cc b/libcef/v8_impl.cc index 9a687acf8..986891fba 100644 --- a/libcef/v8_impl.cc +++ b/libcef/v8_impl.cc @@ -6,8 +6,8 @@ #include "cef_context.h" #include "tracker.h" #include "base/lazy_instance.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h" // Memory manager. diff --git a/libcef/web_urlrequest_impl.cc b/libcef/web_urlrequest_impl.cc index 8497db4c8..46acd56f6 100644 --- a/libcef/web_urlrequest_impl.cc +++ b/libcef/web_urlrequest_impl.cc @@ -11,10 +11,10 @@ #include "base/logging.h" #include "base/scoped_ptr.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "webkit/glue/weburlloader_impl.h" using WebKit::WebURLError; diff --git a/libcef/webview_host.h b/libcef/webview_host.h index e15c7ab67..c3a085db0 100644 --- a/libcef/webview_host.h +++ b/libcef/webview_host.h @@ -6,7 +6,7 @@ #define _WEBVIEW_HOST_H #include "base/basictypes.h" -#include "gfx/native_widget_types.h" +#include "ui/gfx/native_widget_types.h" #include "webwidget_host.h" #if defined(TOOLKIT_USES_GTK) diff --git a/libcef/webview_host_gtk.cc b/libcef/webview_host_gtk.cc index e50fd1316..639dfc593 100644 --- a/libcef/webview_host_gtk.cc +++ b/libcef/webview_host_gtk.cc @@ -8,10 +8,10 @@ #include "browser_webview_delegate.h" #include "base/logging.h" -#include "gfx/rect.h" -#include "gfx/size.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "webkit/glue/webpreferences.h" #include "webkit/plugins/npapi/gtk_plugin_container.h" diff --git a/libcef/webview_host_mac.mm b/libcef/webview_host_mac.mm index fe4c2b4e0..fc68d081f 100644 --- a/libcef/webview_host_mac.mm +++ b/libcef/webview_host_mac.mm @@ -8,11 +8,11 @@ #include "browser_webview_delegate.h" #include "browser_webview_mac.h" -#include "gfx/rect.h" -#include "gfx/size.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "webkit/glue/webpreferences.h" using WebKit::WebDevToolsAgentClient; diff --git a/libcef/webview_host_win.cc b/libcef/webview_host_win.cc index cf3b5f6f4..b307bcb4f 100644 --- a/libcef/webview_host_win.cc +++ b/libcef/webview_host_win.cc @@ -5,10 +5,10 @@ #include "webview_host.h" #include "browser_webview_delegate.h" -#include "app/win/hwnd_util.h" -#include "gfx/rect.h" -#include "gfx/size.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" +#include "ui/base/win/hwnd_util.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "webkit/glue/webpreferences.h" using namespace WebKit; @@ -40,7 +40,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view, WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0, 0, 0, parent_view, NULL, GetModuleHandle(NULL), NULL); - app::win::SetWindowUserData(host->view_, host); + ui::SetWindowUserData(host->view_, host); #if defined(WEBKIT_HAS_WEB_AUTO_FILL_CLIENT) host->webwidget_ = WebView::create(delegate, dev_tools_client, NULL); diff --git a/libcef/webwidget_host.cc b/libcef/webwidget_host.cc new file mode 100644 index 000000000..b05660b46 --- /dev/null +++ b/libcef/webwidget_host.cc @@ -0,0 +1,12 @@ +// Copyright (c) 2011 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 "webwidget_host.h" + +#include "base/message_loop.h" + +void WebWidgetHost::ScheduleAnimation() { + MessageLoop::current()->PostDelayedTask(FROM_HERE, + factory_.NewRunnableMethod(&WebWidgetHost::ScheduleComposite), 10); +} diff --git a/libcef/webwidget_host.h b/libcef/webwidget_host.h index b1c8c2970..f7aeace48 100644 --- a/libcef/webwidget_host.h +++ b/libcef/webwidget_host.h @@ -8,10 +8,11 @@ #include "include/cef_string.h" #include "base/basictypes.h" #include "base/scoped_ptr.h" -#include "gfx/native_widget_types.h" -#include "gfx/rect.h" +#include "base/task.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" +#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/rect.h" namespace gfx { class Rect; @@ -52,6 +53,7 @@ class WebWidgetHost { void DidInvalidateRect(const gfx::Rect& rect); void DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect); void ScheduleComposite(); + void ScheduleAnimation(); #if defined(OS_WIN) void SetCursor(HCURSOR cursor); #endif @@ -166,6 +168,9 @@ class WebWidgetHost { #ifndef NDEBUG bool painting_; #endif + + private: + ScopedRunnableMethodFactory factory_; }; #endif // _WEBWIDGET_HOST_H diff --git a/libcef/webwidget_host_gtk.cc b/libcef/webwidget_host_gtk.cc index 612ec1bef..27a288900 100644 --- a/libcef/webwidget_host_gtk.cc +++ b/libcef/webwidget_host_gtk.cc @@ -13,12 +13,12 @@ #include "skia/ext/bitmap_platform_device.h" #include "skia/ext/platform_canvas.h" #include "skia/ext/platform_device.h" -#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h" -#include "third_party/WebKit/WebKit/chromium/public/x11/WebScreenInfoFactory.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" using WebKit::WebInputEventFactory; using WebKit::WebKeyboardEvent; @@ -334,7 +334,8 @@ WebWidgetHost::WebWidgetHost() webwidget_(NULL), popup_(false), scroll_dx_(0), - scroll_dy_(0) { + scroll_dy_(0), + ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) { set_painting(false); } @@ -371,6 +372,8 @@ void WebWidgetHost::Paint() { } } + webwidget_->animate(); + // This may result in more invalidation webwidget_->layout(); diff --git a/libcef/webwidget_host_mac.mm b/libcef/webwidget_host_mac.mm index 5050e55a4..646e18bb2 100644 --- a/libcef/webwidget_host_mac.mm +++ b/libcef/webwidget_host_mac.mm @@ -7,15 +7,15 @@ #include "webwidget_host.h" #include "base/logging.h" -#include "gfx/rect.h" -#include "gfx/size.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/mac/WebInputEventFactory.h" -#include "third_party/WebKit/WebKit/chromium/public/mac/WebScreenInfoFactory.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebInputEvent; @@ -142,7 +142,8 @@ WebWidgetHost::WebWidgetHost() webwidget_(NULL), popup_(false), scroll_dx_(0), - scroll_dy_(0) { + scroll_dy_(0), + ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) { set_painting(false); } @@ -173,6 +174,8 @@ void WebWidgetHost::Paint() { [NSGraphicsContext graphicsContextWithGraphicsPort:bitmap_context flipped:YES]]; + webwidget_->animate(); + // This may result in more invalidation webwidget_->layout(); diff --git a/libcef/webwidget_host_win.cc b/libcef/webwidget_host_win.cc index 4987fbec4..1308b2b22 100644 --- a/libcef/webwidget_host_win.cc +++ b/libcef/webwidget_host_win.cc @@ -5,15 +5,15 @@ #include "webwidget_host.h" -#include "app/win/hwnd_util.h" -#include "gfx/rect.h" +#include "ui/gfx/rect.h" #include "base/logging.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h" -#include "third_party/WebKit/WebKit/chromium/public/win/WebScreenInfoFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h" +#include "ui/base/win/hwnd_util.h" #include @@ -54,7 +54,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view, 0, 0, 0, 0, parent_view, NULL, GetModuleHandle(NULL), NULL); - app::win::SetWindowUserData(host->view_, host); + ui::SetWindowUserData(host->view_, host); host->webwidget_ = WebPopupMenu::create(client); @@ -63,7 +63,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view, /*static*/ static WebWidgetHost* FromWindow(HWND view) { - return reinterpret_cast(app::win::GetWindowUserData(view)); + return reinterpret_cast(ui::GetWindowUserData(view)); } /*static*/ @@ -218,12 +218,13 @@ WebWidgetHost::WebWidgetHost() scroll_dx_(0), scroll_dy_(0), tooltip_view_(NULL), - tooltip_showing_(false) { + tooltip_showing_(false), + ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) { set_painting(false); } WebWidgetHost::~WebWidgetHost() { - app::win::SetWindowUserData(view_, 0); + ui::SetWindowUserData(view_, 0); TrackMouseLeave(false); ResetTooltip(); @@ -259,6 +260,8 @@ void WebWidgetHost::Paint() { paint_rect_.width(), paint_rect_.height(), true)); } + webwidget_->animate(); + // This may result in more invalidation webwidget_->layout(); diff --git a/libcef_dll/libcef_dll.cc b/libcef_dll/libcef_dll.cc index 1c4e705a9..bb7807612 100644 --- a/libcef_dll/libcef_dll.cc +++ b/libcef_dll/libcef_dll.cc @@ -14,6 +14,7 @@ #include "cpptoc/stream_reader_cpptoc.h" #include "cpptoc/stream_writer_cpptoc.h" #include "cpptoc/v8value_cpptoc.h" +#include "cpptoc/web_urlrequest_cpptoc.h" #include "cpptoc/xml_reader_cpptoc.h" #include "cpptoc/zip_reader_cpptoc.h" #include "ctocpp/download_handler_ctocpp.h" @@ -23,6 +24,7 @@ #include "ctocpp/scheme_handler_factory_ctocpp.h" #include "ctocpp/task_ctocpp.h" #include "ctocpp/v8handler_ctocpp.h" +#include "ctocpp/web_urlrequest_client_ctocpp.h" #include "ctocpp/write_handler_ctocpp.h" #include "base/string_split.h" @@ -61,6 +63,7 @@ CEF_EXPORT void cef_shutdown() DCHECK(CefStreamReaderCppToC::DebugObjCt == 0); DCHECK(CefStreamWriterCppToC::DebugObjCt == 0); DCHECK(CefV8ValueCppToC::DebugObjCt == 0); + DCHECK(CefWebURLRequestCppToC::DebugObjCt == 0); DCHECK(CefXmlReaderCppToC::DebugObjCt == 0); DCHECK(CefZipReaderCppToC::DebugObjCt == 0); DCHECK(CefDownloadHandlerCToCpp::DebugObjCt == 0); @@ -68,6 +71,7 @@ CEF_EXPORT void cef_shutdown() DCHECK(CefSchemeHandlerCToCpp::DebugObjCt == 0); DCHECK(CefSchemeHandlerFactoryCToCpp::DebugObjCt == 0); DCHECK(CefV8HandlerCToCpp::DebugObjCt == 0); + DCHECK(CefWebURLRequestClientCToCpp::DebugObjCt == 0); DCHECK(CefWriteHandlerCToCpp::DebugObjCt == 0); // TODO: This breakpoint may be hit if content is still loading when CEF @@ -101,52 +105,8 @@ CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name, CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info) { - CefPluginInfo pluginInfo; - - pluginInfo.unique_name.FromString(plugin_info->unique_name.str, - plugin_info->unique_name.length, true); - pluginInfo.display_name.FromString(plugin_info->display_name.str, - plugin_info->display_name.length, true); - pluginInfo.version.FromString(plugin_info->version.str, - plugin_info->version.length, true); - pluginInfo.description.FromString(plugin_info->description.str, - plugin_info->description.length, true); - - typedef std::vector VectorType; - VectorType mime_types, file_extensions, descriptions, file_extensions_parts; - base::SplitString(CefString(&plugin_info->mime_types), '|', - &mime_types); - base::SplitString(CefString(&plugin_info->file_extensions), '|', - &file_extensions); - base::SplitString(CefString(&plugin_info->type_descriptions), '|', - &descriptions); - - for (size_t i = 0; i < mime_types.size(); ++i) { - CefPluginMimeType mimeType; - - mimeType.mime_type = mime_types[i]; - - if (file_extensions.size() > i) { - base::SplitString(file_extensions[i], ',', &file_extensions_parts); - VectorType::const_iterator it = file_extensions_parts.begin(); - for(; it != file_extensions_parts.end(); ++it) - mimeType.file_extensions.push_back(*(it)); - file_extensions_parts.clear(); - } - - if (descriptions.size() > i) - mimeType.description = descriptions[i]; - - pluginInfo.mime_types.push_back(mimeType); - } - -#if !defined(OS_POSIX) || defined(OS_MACOSX) - pluginInfo.np_getentrypoints = plugin_info->np_getentrypoints; -#endif - pluginInfo.np_initialize = plugin_info->np_initialize; - pluginInfo.np_shutdown = plugin_info->np_shutdown; - - return CefRegisterPlugin(pluginInfo); + DCHECK(plugin_info); + return CefRegisterPlugin(*plugin_info); } CEF_EXPORT int cef_register_scheme(const cef_string_t* scheme_name, diff --git a/libcef_dll/wrapper/libcef_dll_wrapper.cc b/libcef_dll/wrapper/libcef_dll_wrapper.cc index 97a3d1f9b..8f51f77ed 100644 --- a/libcef_dll/wrapper/libcef_dll_wrapper.cc +++ b/libcef_dll/wrapper/libcef_dll_wrapper.cc @@ -13,6 +13,7 @@ #include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h" #include "libcef_dll/cpptoc/task_cpptoc.h" #include "libcef_dll/cpptoc/v8handler_cpptoc.h" +#include "libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h" #include "libcef_dll/cpptoc/write_handler_cpptoc.h" #include "libcef_dll/ctocpp/browser_ctocpp.h" #include "libcef_dll/ctocpp/post_data_ctocpp.h" @@ -21,6 +22,7 @@ #include "libcef_dll/ctocpp/stream_reader_ctocpp.h" #include "libcef_dll/ctocpp/stream_writer_ctocpp.h" #include "libcef_dll/ctocpp/v8value_ctocpp.h" +#include "libcef_dll/ctocpp/web_urlrequest_ctocpp.h" #include "libcef_dll/ctocpp/xml_reader_ctocpp.h" #include "libcef_dll/ctocpp/zip_reader_ctocpp.h" @@ -42,6 +44,7 @@ void CefShutdown() DCHECK(CefSchemeHandlerCppToC::DebugObjCt == 0); DCHECK(CefSchemeHandlerFactoryCppToC::DebugObjCt == 0); DCHECK(CefV8HandlerCppToC::DebugObjCt == 0); + DCHECK(CefWebURLRequestClientCppToC::DebugObjCt == 0); DCHECK(CefWriteHandlerCppToC::DebugObjCt == 0); DCHECK(CefBrowserCToCpp::DebugObjCt == 0); DCHECK(CefRequestCToCpp::DebugObjCt == 0); @@ -50,6 +53,7 @@ void CefShutdown() DCHECK(CefStreamReaderCToCpp::DebugObjCt == 0); DCHECK(CefStreamWriterCToCpp::DebugObjCt == 0); DCHECK(CefV8ValueCToCpp::DebugObjCt == 0); + DCHECK(CefWebURLRequestCToCpp::DebugObjCt == 0); DCHECK(CefXmlReaderCToCpp::DebugObjCt == 0); DCHECK(CefZipReaderCToCpp::DebugObjCt == 0); @@ -74,65 +78,9 @@ bool CefRegisterExtension(const CefString& extension_name, true:false; } -bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info) +bool CefRegisterPlugin(const CefPluginInfo& plugin_info) { - cef_plugin_info_t pluginInfo; - memset(&pluginInfo, 0, sizeof(pluginInfo)); - - cef_string_set(plugin_info.unique_name.c_str(), - plugin_info.unique_name.length(), - &pluginInfo.unique_name, false); - cef_string_set(plugin_info.display_name.c_str(), - plugin_info.display_name.length(), - &pluginInfo.display_name, false); - cef_string_set(plugin_info.version.c_str(), - plugin_info.version.length(), - &pluginInfo.version, false); - cef_string_set(plugin_info.description.c_str(), - plugin_info.description.length(), - &pluginInfo.description, false); - - std::string mimeTypes, fileExtensions, typeDescriptions; - - for(size_t i = 0; i < plugin_info.mime_types.size(); ++i) { - if(i > 0) { - mimeTypes += "|"; - fileExtensions += "|"; - typeDescriptions += "|"; - } - - mimeTypes += plugin_info.mime_types[i].mime_type; - typeDescriptions += plugin_info.mime_types[i].description; - - for(size_t j = 0; - j < plugin_info.mime_types[i].file_extensions.size(); ++j) { - if(j > 0) { - fileExtensions += ","; - } - fileExtensions += plugin_info.mime_types[i].file_extensions[j]; - } - } - - cef_string_from_utf8(mimeTypes.c_str(), mimeTypes.length(), - &pluginInfo.mime_types); - cef_string_from_utf8(fileExtensions.c_str(), fileExtensions.length(), - &pluginInfo.file_extensions); - cef_string_from_utf8(typeDescriptions.c_str(), typeDescriptions.length(), - &pluginInfo.type_descriptions); - -#if !defined(OS_POSIX) || defined(OS_MACOSX) - pluginInfo.np_getentrypoints = plugin_info.np_getentrypoints; -#endif - pluginInfo.np_initialize = plugin_info.np_initialize; - pluginInfo.np_shutdown = plugin_info.np_shutdown; - - bool ret = cef_register_plugin(&pluginInfo) ? true : false; - - cef_string_clear(&pluginInfo.mime_types); - cef_string_clear(&pluginInfo.file_extensions); - cef_string_clear(&pluginInfo.type_descriptions); - - return ret; + return cef_register_plugin(&plugin_info)?true:false; } bool CefRegisterScheme(const CefString& scheme_name, diff --git a/tests/cefclient/plugin_test.cpp b/tests/cefclient/plugin_test.cpp index 5bbefc274..70af53514 100644 --- a/tests/cefclient/plugin_test.cpp +++ b/tests/cefclient/plugin_test.cpp @@ -9,15 +9,10 @@ void InitPluginTest() { // Structure providing information about the client plugin. CefPluginInfo plugin_info; - plugin_info.display_name = "Client Plugin"; - plugin_info.unique_name = "client_plugin"; - plugin_info.version = "1, 0, 0, 1"; - plugin_info.description = "My Example Client Plugin"; - - CefPluginMimeType mime_type; - mime_type.mime_type = "application/x-client-plugin"; - mime_type.file_extensions.push_back("*"); - plugin_info.mime_types.push_back(mime_type); + CefString(&plugin_info.display_name).FromASCII("Client Plugin"); + CefString(&plugin_info.unique_name).FromASCII("client_plugin"); + CefString(&plugin_info.description).FromASCII("My Example Client Plugin"); + CefString(&plugin_info.mime_type).FromASCII("application/x-client-plugin"); plugin_info.np_getentrypoints = NP_GetEntryPoints; plugin_info.np_initialize = NP_Initialize; diff --git a/tests/cefclient/uiplugin_test.cpp b/tests/cefclient/uiplugin_test.cpp index 53f2a00d8..65aa30122 100644 --- a/tests/cefclient/uiplugin_test.cpp +++ b/tests/cefclient/uiplugin_test.cpp @@ -58,15 +58,10 @@ void InitUIPluginTest() { // Structure providing information about the client plugin. CefPluginInfo plugin_info; - plugin_info.display_name = "Client UI Plugin"; - plugin_info.unique_name = "client_ui_plugin"; - plugin_info.version = "1, 0, 0, 1"; - plugin_info.description = "My Example Client UI Plugin"; - - CefPluginMimeType mime_type; - mime_type.mime_type = "application/x-client-ui-plugin"; - mime_type.file_extensions.push_back("*"); - plugin_info.mime_types.push_back(mime_type); + CefString(&plugin_info.display_name).FromASCII("Client UI Plugin"); + CefString(&plugin_info.unique_name).FromASCII("client_ui_plugin"); + CefString(&plugin_info.description).FromASCII("My Example Client UI Plugin"); + CefString(&plugin_info.mime_type).FromASCII("application/x-client-ui-plugin"); plugin_info.np_getentrypoints = NP_UIGetEntryPoints; plugin_info.np_initialize = NP_UIInitialize;