diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 49fa2799c..e8a708410 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -17,5 +17,5 @@ { 'chromium_url': 'http://src.chromium.org/svn/trunk/src', - 'chromium_revision': '176706', + 'chromium_revision': '181864', } diff --git a/cef.gyp b/cef.gyp index c42b98144..aa75a450b 100644 --- a/cef.gyp +++ b/cef.gyp @@ -7,6 +7,7 @@ 'pkg-config': 'pkg-config', 'chromium_code': 1, 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/cef', + 'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html', 'revision': 'host_resolver(); + } + virtual net::URLRequestContext* GetRequestContext() OVERRIDE { + CHECK(getter_); + return getter_->GetURLRequestContext(); + } + + void set_url_request_context_getter(CefURLRequestContextGetter* getter) { + getter_ = getter; + } + + private: + CefURLRequestContextGetter* getter_; + + DISALLOW_COPY_AND_ASSIGN(CefResourceContext); +}; + CefBrowserContext::CefBrowserContext() - : use_osr_next_contents_view_(false) { - // Initialize the request context getter. - url_request_getter_ = new CefURLRequestContextGetter( - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), - BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE)); + : use_osr_next_contents_view_(false), + resource_context_(new CefResourceContext) { } CefBrowserContext::~CefBrowserContext() { @@ -192,7 +215,7 @@ CefBrowserContext::~CefBrowserContext() { } } -FilePath CefBrowserContext::GetPath() { +base::FilePath CefBrowserContext::GetPath() { return _Context->cache_path(); } @@ -210,7 +233,8 @@ content::DownloadManagerDelegate* } net::URLRequestContextGetter* CefBrowserContext::GetRequestContext() { - return url_request_getter_; + CEF_REQUIRE_UIT(); + return GetDefaultStoragePartition(this)->GetURLRequestContext(); } net::URLRequestContextGetter* @@ -236,23 +260,12 @@ net::URLRequestContextGetter* net::URLRequestContextGetter* CefBrowserContext::GetMediaRequestContextForStoragePartition( - const FilePath& partition_path, + const base::FilePath& partition_path, bool in_memory) { return GetRequestContext(); } -net::URLRequestContextGetter* - CefBrowserContext::GetRequestContextForStoragePartition( - const FilePath& partition_path, - bool in_memory) { - return NULL; -} - content::ResourceContext* CefBrowserContext::GetResourceContext() { - if (!resource_context_.get()) { - resource_context_.reset(new CefResourceContext( - static_cast(GetRequestContext()))); - } return resource_context_.get(); } @@ -276,6 +289,48 @@ quota::SpecialStoragePolicy* CefBrowserContext::GetSpecialStoragePolicy() { return NULL; } +net::URLRequestContextGetter* CefBrowserContext::CreateRequestContext( + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler) { + DCHECK(!url_request_getter_); + // CEF doesn't use URLDataManager for serving chrome internal protocols. + // |chrome_protocol_handler| and |chrome_devtools_protocol_handler| are + // ignored so as not to conflict with CEF's protocol implementation. + url_request_getter_ = new CefURLRequestContextGetter( + BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO), + BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE), + blob_protocol_handler.Pass(), + file_system_protocol_handler.Pass(), + developer_protocol_handler.Pass()); + resource_context_->set_url_request_context_getter(url_request_getter_.get()); + return url_request_getter_.get(); +} + +net::URLRequestContextGetter* + CefBrowserContext::CreateRequestContextForStoragePartition( + const base::FilePath& partition_path, + bool in_memory, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler) { + return NULL; +} + bool CefBrowserContext::use_osr_next_contents_view() const { return use_osr_next_contents_view_; } diff --git a/libcef/browser/browser_context.h b/libcef/browser/browser_context.h index 7b8316e46..6673d167e 100644 --- a/libcef/browser/browser_context.h +++ b/libcef/browser/browser_context.h @@ -11,6 +11,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/browser_context.h" +#include "net/url_request/url_request_job_factory.h" namespace content { class DownloadManagerDelegate; @@ -18,7 +19,7 @@ class SpeechRecognitionPreferences; } class CefDownloadManagerDelegate; -class CefResourceContext; +class CefURLRequestContextGetter; class CefBrowserContext : public content::BrowserContext { public: @@ -26,7 +27,7 @@ class CefBrowserContext : public content::BrowserContext { virtual ~CefBrowserContext(); // BrowserContext methods. - virtual FilePath GetPath() OVERRIDE; + virtual base::FilePath GetPath() OVERRIDE; virtual bool IsOffTheRecord() const OVERRIDE; virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; @@ -37,11 +38,8 @@ class CefBrowserContext : public content::BrowserContext { int renderer_child_id) OVERRIDE; virtual net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( - const FilePath& partition_path, + const base::FilePath& partition_path, bool in_memory) OVERRIDE; - virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( - const FilePath& partition_path, - bool in_memory) OVERRIDE; virtual content::ResourceContext* GetResourceContext() OVERRIDE; virtual content::GeolocationPermissionContext* GetGeolocationPermissionContext() OVERRIDE; @@ -49,6 +47,31 @@ class CefBrowserContext : public content::BrowserContext { GetSpeechRecognitionPreferences() OVERRIDE; virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; + net::URLRequestContextGetter* CreateRequestContext( + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler); + net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + const FilePath& partition_path, + bool in_memory, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler); + // To disable window rendering call this function with |override|=true // just before calling WebContents::Create. This will cause // CefContentBrowserClient::OverrideCreateWebContentsView to create @@ -57,10 +80,11 @@ class CefBrowserContext : public content::BrowserContext { bool use_osr_next_contents_view() const; private: + class CefResourceContext; scoped_ptr resource_context_; scoped_ptr download_manager_delegate_; - scoped_refptr url_request_getter_; + scoped_refptr url_request_getter_; scoped_refptr geolocation_permission_context_; scoped_refptr diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 50a56700d..1d6572080 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -39,7 +39,7 @@ #include "content/public/browser/notification_types.h" #include "content/public/browser/resource_request_info.h" #include "content/public/common/file_chooser_params.h" -#include "ui/base/dialogs/selected_file_info.h" +#include "ui/shell_dialogs/selected_file_info.h" #if defined(OS_WIN) #include "libcef/browser/render_widget_host_view_osr.h" @@ -133,11 +133,11 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback { virtual void Continue(const std::vector& file_paths) OVERRIDE { if (CEF_CURRENTLY_ON_UIT()) { if (!callback_.is_null()) { - std::vector vec; + std::vector vec; if (!file_paths.empty()) { std::vector::const_iterator it = file_paths.begin(); for (; it != file_paths.end(); ++it) - vec.push_back(FilePath(*it)); + vec.push_back(base::FilePath(*it)); } callback_.Run(vec); callback_.Reset(); @@ -172,7 +172,7 @@ class CefFileDialogCallbackImpl : public CefFileDialogCallback { static void CancelNow( const CefBrowserHostImpl::RunFileChooserCallback& callback) { CEF_REQUIRE_UIT(); - std::vector file_paths; + std::vector file_paths; callback.Run(file_paths); } @@ -190,7 +190,7 @@ class CefRunFileDialogCallbackWrapper callback_(callback) { } - void Callback(const std::vector& file_paths) { + void Callback(const std::vector& file_paths) { std::vector paths; if (file_paths.size() > 0) { for (size_t i = 0; i < file_paths.size(); ++i) @@ -544,7 +544,7 @@ void CefBrowserHostImpl::RunFileDialog( } params.title = title; if (!default_file_name.empty()) - params.default_file_name = FilePath(default_file_name); + params.default_file_name = base::FilePath(default_file_name); if (!accept_types.empty()) { std::vector::const_iterator it = accept_types.begin(); for (; it != accept_types.end(); ++it) @@ -1079,7 +1079,7 @@ net::URLRequestContextGetter* CefBrowserHostImpl::GetRequestContext() { request_context_proxy_ = new CefURLRequestContextGetterProxy(this, static_cast( - _Context->browser_context()->GetRequestContext())); + _Context->request_context().get())); } return request_context_proxy_.get(); } @@ -1569,11 +1569,11 @@ void CefBrowserHostImpl::DidNavigateMainFramePostCommit( has_document_ = false; } -content::JavaScriptDialogCreator* - CefBrowserHostImpl::GetJavaScriptDialogCreator() { - if (!dialog_creator_.get()) - dialog_creator_.reset(new CefJavaScriptDialogCreator(this)); - return dialog_creator_.get(); +content::JavaScriptDialogManager* + CefBrowserHostImpl::GetJavaScriptDialogManager() { + if (!dialog_manager_.get()) + dialog_manager_.reset(new CefJavaScriptDialogManager(this)); + return dialog_manager_.get(); } void CefBrowserHostImpl::RunFileChooser( @@ -1730,7 +1730,7 @@ void CefBrowserHostImpl::DidFailLoad( OnLoadEnd(frame, validated_url, error_code); } -void CefBrowserHostImpl::PluginCrashed(const FilePath& plugin_path, +void CefBrowserHostImpl::PluginCrashed(const base::FilePath& plugin_path, base::ProcessId plugin_pid) { if (client_.get()) { CefRefPtr handler = client_->GetLoadHandler(); @@ -2092,13 +2092,13 @@ void CefBrowserHostImpl::RunFileChooserOnUIThread( if (file_chooser_pending_) { // Dismiss the new dialog immediately. - callback.Run(std::vector()); + callback.Run(std::vector()); return; } if (params.mode == content::FileChooserParams::OpenFolder) { NOTIMPLEMENTED(); - callback.Run(std::vector()); + callback.Run(std::vector()); return; } @@ -2157,7 +2157,7 @@ void CefBrowserHostImpl::RunFileChooserOnUIThread( void CefBrowserHostImpl::OnRunFileChooserCallback( const RunFileChooserCallback& callback, - const std::vector& file_paths) { + const std::vector& file_paths) { CEF_REQUIRE_UIT(); file_chooser_pending_ = false; @@ -2168,7 +2168,7 @@ void CefBrowserHostImpl::OnRunFileChooserCallback( void CefBrowserHostImpl::OnRunFileChooserDelegateCallback( content::WebContents* tab, - const std::vector& file_paths) { + const std::vector& file_paths) { CEF_REQUIRE_UIT(); content::RenderViewHost* render_view_host = tab->GetRenderViewHost(); @@ -2183,8 +2183,10 @@ void CefBrowserHostImpl::OnRunFileChooserDelegateCallback( // Convert FilePath list to SelectedFileInfo list. std::vector selected_files; - for (size_t i = 0; i < file_paths.size(); ++i) - selected_files.push_back(ui::SelectedFileInfo(file_paths[i], FilePath())); + for (size_t i = 0; i < file_paths.size(); ++i) { + selected_files.push_back( + ui::SelectedFileInfo(file_paths[i], base::FilePath())); + } // Notify our RenderViewHost in all cases. render_view_host->FilesSelectedInChooser(selected_files, diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 1f3cb5039..879cdf822 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -16,7 +16,7 @@ #include "include/cef_client.h" #include "include/cef_frame.h" #include "libcef/browser/frame_host_impl.h" -#include "libcef/browser/javascript_dialog_creator.h" +#include "libcef/browser/javascript_dialog_manager.h" #include "libcef/browser/menu_creator.h" #include "libcef/common/response_manager.h" @@ -235,7 +235,7 @@ class CefBrowserHostImpl : public CefBrowserHost, void OnSetFocus(cef_focus_source_t source); // The argument vector will be empty if the dialog was cancelled. - typedef base::Callback&)> + typedef base::Callback&)> RunFileChooserCallback; // Run the file chooser dialog specified by |params|. Only a single dialog may @@ -292,7 +292,7 @@ class CefBrowserHostImpl : public CefBrowserHost, content::WebContents* new_contents) OVERRIDE; virtual void DidNavigateMainFramePostCommit( content::WebContents* tab) OVERRIDE; - virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator() + virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() OVERRIDE; virtual void RunFileChooser( content::WebContents* tab, @@ -331,7 +331,7 @@ class CefBrowserHostImpl : public CefBrowserHost, int error_code, const string16& error_description, content::RenderViewHost* render_view_host) OVERRIDE; - virtual void PluginCrashed(const FilePath& plugin_path, + virtual void PluginCrashed(const base::FilePath& plugin_path, base::ProcessId plugin_pid) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // Override to provide a thread safe implementation. @@ -438,12 +438,12 @@ class CefBrowserHostImpl : public CefBrowserHost, // Used with RunFileChooser to clear the |file_chooser_pending_| flag. void OnRunFileChooserCallback(const RunFileChooserCallback& callback, - const std::vector& file_paths); + const std::vector& file_paths); // Used with WebContentsDelegate::RunFileChooser to notify the WebContents. void OnRunFileChooserDelegateCallback( content::WebContents* tab, - const std::vector& file_paths); + const std::vector& file_paths); CefWindowInfo window_info_; CefBrowserSettings settings_; @@ -501,7 +501,7 @@ class CefBrowserHostImpl : public CefBrowserHost, scoped_ptr response_manager_; // Used for creating and managing JavaScript dialogs. - scoped_ptr dialog_creator_; + scoped_ptr dialog_manager_; // Used for creating and managing context menus. scoped_ptr menu_creator_; diff --git a/libcef/browser/browser_host_impl_gtk.cc b/libcef/browser/browser_host_impl_gtk.cc index 166d7d9a3..780e38b89 100644 --- a/libcef/browser/browser_host_impl_gtk.cc +++ b/libcef/browser/browser_host_impl_gtk.cc @@ -75,7 +75,7 @@ void AddFiltersForAcceptTypes(GtkFileChooser* chooser, std::string description = GetDescriptionFromMimeType(ascii_type); bool description_from_ext = description.empty(); - std::vector ext; + std::vector ext; net::GetExtensionsForMimeType(ascii_type, &ext); for (size_t x = 0; x < ext.size(); ++x) { if (!filter) @@ -113,7 +113,7 @@ void AddFiltersForAcceptTypes(GtkFileChooser* chooser, bool RunFileDialog(const content::FileChooserParams& params, CefWindowHandle widget, - std::vector* files) { + std::vector* files) { GtkFileChooserAction action; const gchar* accept_button; if (params.mode == content::FileChooserParams::Open || @@ -129,7 +129,7 @@ bool RunFileDialog(const content::FileChooserParams& params, } // Consider default file name if any. - FilePath default_file_name(params.default_file_name); + base::FilePath default_file_name(params.default_file_name); std::string base_name; if (!default_file_name.empty()) @@ -185,7 +185,7 @@ bool RunFileDialog(const content::FileChooserParams& params, if (params.mode == content::FileChooserParams::Open || params.mode == content::FileChooserParams::Save) { char* filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - files->push_back(FilePath(filename)); + files->push_back(base::FilePath(filename)); success = true; } else if (params.mode == content::FileChooserParams::OpenMultiple) { GSList* filenames = @@ -193,7 +193,7 @@ bool RunFileDialog(const content::FileChooserParams& params, if (filenames) { for (GSList* iter = filenames; iter != NULL; iter = g_slist_next(iter)) { - FilePath path(static_cast(iter->data)); + base::FilePath path(static_cast(iter->data)); g_free(iter->data); files->push_back(path); } @@ -318,7 +318,7 @@ void CefBrowserHostImpl::PlatformHandleKeyboardEvent( void CefBrowserHostImpl::PlatformRunFileChooser( const content::FileChooserParams& params, RunFileChooserCallback callback) { - std::vector files; + std::vector files; if (params.mode == content::FileChooserParams::Open || params.mode == content::FileChooserParams::OpenMultiple || diff --git a/libcef/browser/browser_host_impl_mac.mm b/libcef/browser/browser_host_impl_mac.mm index 7dbca7178..9ef99c31e 100644 --- a/libcef/browser/browser_host_impl_mac.mm +++ b/libcef/browser/browser_host_impl_mac.mm @@ -82,7 +82,7 @@ NSMutableArray* GetFileTypesFromAcceptTypes( [acceptArray addObject:base::SysUTF8ToNSString(ascii_type.substr(1))]; } else { // Otherwise convert mime type to one or more extensions. - std::vector ext; + std::vector ext; net::GetExtensionsForMimeType(ascii_type, &ext); for (size_t x = 0; x < ext.size(); ++x) [acceptArray addObject:base::SysUTF8ToNSString(ext[x])]; @@ -94,7 +94,7 @@ NSMutableArray* GetFileTypesFromAcceptTypes( void RunOpenFileDialog(const content::FileChooserParams& params, NSView* view, - std::vector* files) { + std::vector* files) { NSOpenPanel* openPanel = [NSOpenPanel openPanel]; string16 title; @@ -108,7 +108,7 @@ void RunOpenFileDialog(const content::FileChooserParams& params, [openPanel setTitle:base::SysUTF16ToNSString(title)]; // Consider default file name if any. - FilePath default_file_name(params.default_file_name); + base::FilePath default_file_name(params.default_file_name); if (!default_file_name.empty()) { if (!default_file_name.BaseName().empty()) { @@ -145,7 +145,7 @@ void RunOpenFileDialog(const content::FileChooserParams& params, for (i=0; ipush_back(FilePath(base::SysNSStringToUTF8([url path]))); + files->push_back(base::FilePath(base::SysNSStringToUTF8([url path]))); } } [NSApp endSheet:openPanel]; @@ -153,7 +153,7 @@ void RunOpenFileDialog(const content::FileChooserParams& params, bool RunSaveFileDialog(const content::FileChooserParams& params, NSView* view, - FilePath* file) { + base::FilePath* file) { NSSavePanel* savePanel = [NSSavePanel savePanel]; string16 title; @@ -164,7 +164,7 @@ bool RunSaveFileDialog(const content::FileChooserParams& params, [savePanel setTitle:base::SysUTF16ToNSString(title)]; // Consider default file name if any. - FilePath default_file_name(params.default_file_name); + base::FilePath default_file_name(params.default_file_name); if (!default_file_name.empty()) { if (!default_file_name.BaseName().empty()) { @@ -194,7 +194,7 @@ bool RunSaveFileDialog(const content::FileChooserParams& params, if ([savePanel runModal] == NSFileHandlingPanelOKButton) { NSURL * url = [savePanel URL]; NSString* path = [url path]; - *file = FilePath([path UTF8String]); + *file = base::FilePath([path UTF8String]); success = true; } [NSApp endSheet:savePanel]; @@ -300,13 +300,13 @@ void CefBrowserHostImpl::PlatformHandleKeyboardEvent( void CefBrowserHostImpl::PlatformRunFileChooser( const content::FileChooserParams& params, RunFileChooserCallback callback) { - std::vector files; + std::vector files; if (params.mode == content::FileChooserParams::Open || params.mode == content::FileChooserParams::OpenMultiple) { RunOpenFileDialog(params, PlatformGetWindowHandle(), &files); } else if (params.mode == content::FileChooserParams::Save) { - FilePath file; + base::FilePath file; if (RunSaveFileDialog(params, PlatformGetWindowHandle(), &file)) files.push_back(file); } else { diff --git a/libcef/browser/browser_host_impl_win.cc b/libcef/browser/browser_host_impl_win.cc index 458b34bea..cd72ea810 100644 --- a/libcef/browser/browser_host_impl_win.cc +++ b/libcef/browser/browser_host_impl_win.cc @@ -200,7 +200,7 @@ std::wstring GetFilterStringFromAcceptTypes( descriptions.push_back(std::wstring()); } else { // Otherwise convert mime type to one or more extensions. - std::vector ext; + std::vector ext; std::wstring ext_str; net::GetExtensionsForMimeType(ascii_type, &ext); if (ext.size() > 0) { @@ -223,7 +223,7 @@ std::wstring GetFilterStringFromAcceptTypes( bool RunOpenFileDialog(const content::FileChooserParams& params, HWND owner, - FilePath* path) { + base::FilePath* path) { OPENFILENAME ofn; // We must do this otherwise the ofn's FlagsEx may be initialized to random @@ -233,7 +233,7 @@ bool RunOpenFileDialog(const content::FileChooserParams& params, ofn.hwndOwner = owner; // Consider default file name if any. - FilePath default_file_name(params.default_file_name); + base::FilePath default_file_name(params.default_file_name); wchar_t filename[MAX_PATH] = {0}; @@ -268,13 +268,13 @@ bool RunOpenFileDialog(const content::FileChooserParams& params, bool success = !!GetOpenFileName(&ofn); if (success) - *path = FilePath(filename); + *path = base::FilePath(filename); return success; } bool RunOpenMultiFileDialog(const content::FileChooserParams& params, HWND owner, - std::vector* paths) { + std::vector* paths) { OPENFILENAME ofn; // We must do this otherwise the ofn's FlagsEx may be initialized to random @@ -309,10 +309,10 @@ bool RunOpenMultiFileDialog(const content::FileChooserParams& params, bool success = !!GetOpenFileName(&ofn); if (success) { - std::vector files; + std::vector files; const wchar_t* selection = ofn.lpstrFile; while (*selection) { // Empty string indicates end of list. - files.push_back(FilePath(selection)); + files.push_back(base::FilePath(selection)); // Skip over filename and null-terminator. selection += files.back().value().length() + 1; } @@ -324,8 +324,8 @@ bool RunOpenMultiFileDialog(const content::FileChooserParams& params, } else { // Otherwise, the first string is the path, and the remainder are // filenames. - std::vector::iterator path = files.begin(); - for (std::vector::iterator file = path + 1; + std::vector::iterator path = files.begin(); + for (std::vector::iterator file = path + 1; file != files.end(); ++file) { paths->push_back(path->Append(*file)); } @@ -336,7 +336,7 @@ bool RunOpenMultiFileDialog(const content::FileChooserParams& params, bool RunSaveFileDialog(const content::FileChooserParams& params, HWND owner, - FilePath* path) { + base::FilePath* path) { OPENFILENAME ofn; // We must do this otherwise the ofn's FlagsEx may be initialized to random @@ -346,7 +346,7 @@ bool RunSaveFileDialog(const content::FileChooserParams& params, ofn.hwndOwner = owner; // Consider default file name if any. - FilePath default_file_name(params.default_file_name); + base::FilePath default_file_name(params.default_file_name); wchar_t filename[MAX_PATH] = {0}; @@ -381,7 +381,7 @@ bool RunSaveFileDialog(const content::FileChooserParams& params, bool success = !!GetSaveFileName(&ofn); if (success) - *path = FilePath(filename); + *path = base::FilePath(filename); return success; } @@ -645,16 +645,16 @@ void CefBrowserHostImpl::PlatformHandleKeyboardEvent( void CefBrowserHostImpl::PlatformRunFileChooser( const content::FileChooserParams& params, RunFileChooserCallback callback) { - std::vector files; + std::vector files; if (params.mode == content::FileChooserParams::Open) { - FilePath file; + base::FilePath file; if (RunOpenFileDialog(params, PlatformGetWindowHandle(), &file)) files.push_back(file); } else if (params.mode == content::FileChooserParams::OpenMultiple) { RunOpenMultiFileDialog(params, PlatformGetWindowHandle(), &files); } else if (params.mode == content::FileChooserParams::Save) { - FilePath file; + base::FilePath file; if (RunSaveFileDialog(params, PlatformGetWindowHandle(), &file)) files.push_back(file); } else { diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index c2fca57dc..50dba0b26 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -8,6 +8,7 @@ #include "libcef/browser/browser_context.h" #include "libcef/browser/browser_message_loop.h" +#include "libcef/browser/context.h" #include "libcef/browser/devtools_delegate.h" #include "base/bind.h" @@ -70,9 +71,12 @@ int CefBrowserMainParts::PreCreateThreads() { void CefBrowserMainParts::PreMainMessageLoopRun() { browser_context_.reset(new CefBrowserContext()); + // Initialize the request context getter. + _Context->set_request_context(browser_context_->GetRequestContext()); + // Initialize proxy configuration service. ChromeProxyConfigService* chrome_proxy_config_service = - ProxyServiceFactory::CreateProxyConfigService(true); + ProxyServiceFactory::CreateProxyConfigService(); proxy_config_service_.reset(chrome_proxy_config_service); pref_proxy_config_tracker_->SetChromeProxyConfigService( chrome_proxy_config_service); @@ -94,6 +98,7 @@ void CefBrowserMainParts::PostMainMessageLoopRun() { if (devtools_delegate_) devtools_delegate_->Stop(); pref_proxy_config_tracker_->DetachFromPrefService(); + _Context->set_request_context(NULL); browser_context_.reset(); } diff --git a/libcef/browser/browser_message_loop.cc b/libcef/browser/browser_message_loop.cc index 724d9e2c6..70df829a5 100644 --- a/libcef/browser/browser_message_loop.cc +++ b/libcef/browser/browser_message_loop.cc @@ -3,9 +3,9 @@ // be found in the LICENSE file. #include "libcef/browser/browser_message_loop.h" +#include "base/run_loop.h" -CefBrowserMessageLoop::CefBrowserMessageLoop() - : is_iterating_(true) { +CefBrowserMessageLoop::CefBrowserMessageLoop() { } CefBrowserMessageLoop::~CefBrowserMessageLoop() { @@ -23,20 +23,11 @@ CefBrowserMessageLoop* CefBrowserMessageLoop::current() { return static_cast(loop); } -bool CefBrowserMessageLoop::DoIdleWork() { - bool valueToRet = inherited::DoIdleWork(); - if (is_iterating_) - pump_->Quit(); - return valueToRet; +void CefBrowserMessageLoop::DoMessageLoopIteration() { + base::RunLoop run_loop; + run_loop.RunUntilIdle(); } -// Do a single interation of the UI message loop. -void CefBrowserMessageLoop::DoMessageLoopIteration() { +void CefBrowserMessageLoop::RunMessageLoop() { Run(); } - -// Run the UI message loop. -void CefBrowserMessageLoop::RunMessageLoop() { - is_iterating_ = false; - DoMessageLoopIteration(); -} diff --git a/libcef/browser/browser_message_loop.h b/libcef/browser/browser_message_loop.h index 04bfeb9a5..a5200a896 100644 --- a/libcef/browser/browser_message_loop.h +++ b/libcef/browser/browser_message_loop.h @@ -20,20 +20,13 @@ class CefBrowserMessageLoop : public MessageLoopForUI { // Returns the MessageLoopForUI of the current thread. static CefBrowserMessageLoop* current(); - virtual bool DoIdleWork(); - // Do a single interation of the UI message loop. void DoMessageLoopIteration(); // Run the UI message loop. void RunMessageLoop(); - bool is_iterating() { return is_iterating_; } - private: - // True if the message loop is doing one iteration at a time. - bool is_iterating_; - DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageLoop); }; diff --git a/libcef/browser/browser_pref_store.cc b/libcef/browser/browser_pref_store.cc index 82e14f9cf..ccefabdb3 100644 --- a/libcef/browser/browser_pref_store.cc +++ b/libcef/browser/browser_pref_store.cc @@ -5,10 +5,10 @@ #include "libcef/browser/browser_pref_store.h" #include "base/command_line.h" +#include "base/prefs/pref_service_builder.h" +#include "base/prefs/pref_registry_simple.h" #include "base/values.h" #include "chrome/browser/prefs/command_line_pref_store.h" -#include "chrome/browser/prefs/pref_service_builder.h" -#include "chrome/browser/prefs/pref_service_simple.h" #include "chrome/browser/prefs/proxy_config_dictionary.h" #include "chrome/common/pref_names.h" @@ -21,13 +21,13 @@ PrefService* BrowserPrefStore::CreateService() { new CommandLinePrefStore(CommandLine::ForCurrentProcess())); builder.WithUserPrefs(this); - PrefServiceSimple* service = builder.CreateSimple(); + scoped_refptr registry(new PrefRegistrySimple()); // Default settings. - service->RegisterDictionaryPref(prefs::kProxy, - ProxyConfigDictionary::CreateDirect()); + registry->RegisterDictionaryPref(prefs::kProxy, + ProxyConfigDictionary::CreateDirect()); - return service; + return builder.Create(registry); } BrowserPrefStore::~BrowserPrefStore() { diff --git a/libcef/browser/browser_urlrequest_impl.cc b/libcef/browser/browser_urlrequest_impl.cc index ac1fbf596..01cb62836 100644 --- a/libcef/browser/browser_urlrequest_impl.cc +++ b/libcef/browser/browser_urlrequest_impl.cc @@ -113,8 +113,7 @@ class CefBrowserURLRequest::Context fetcher_.reset(net::URLFetcher::Create(url, request_type, fetcher_delegate_.get())); - fetcher_->SetRequestContext( - _Context->browser_context()->GetRequestContext()); + fetcher_->SetRequestContext(_Context->request_context()); CefRequest::HeaderMap headerMap; request_->GetHeaderMap(headerMap); diff --git a/libcef/browser/chrome_scheme_handler.cc b/libcef/browser/chrome_scheme_handler.cc index c5e15e1ff..78028c925 100644 --- a/libcef/browser/chrome_scheme_handler.cc +++ b/libcef/browser/chrome_scheme_handler.cc @@ -108,7 +108,7 @@ std::string GetCommandLine() { } std::string GetModulePath() { - FilePath path; + base::FilePath path; if (PathService::Get(base::FILE_MODULE, &path)) return CefString(path.value()); return std::string(); @@ -353,7 +353,8 @@ bool IsTraceFrameValid(CefRefPtr frame) { return true; } -void LoadTraceFile(CefRefPtr frame, const FilePath& path) { +void LoadTraceFile(CefRefPtr frame, + const base::FilePath& path) { CEF_REQUIRE_FILET(); if (!IsTraceFrameValid(frame)) @@ -416,7 +417,7 @@ void LoadTraceFile(CefRefPtr frame, const FilePath& path) { } void SaveTraceFile(CefRefPtr frame, - const FilePath& path, + const base::FilePath& path, scoped_ptr contents) { CEF_REQUIRE_FILET(); @@ -527,7 +528,7 @@ void OnChromeTracingProcessMessage(CefRefPtr browser, if (!file_paths.empty()) { CEF_POST_TASK(CEF_FILET, base::Bind(LoadTraceFile, frame_, - FilePath(file_paths.front()))); + base::FilePath(file_paths.front()))); } else { frame_->SendJavaScript( "tracingController.onLoadTraceFileCanceled();", @@ -565,7 +566,7 @@ void OnChromeTracingProcessMessage(CefRefPtr browser, if (!file_paths.empty()) { CEF_POST_TASK(CEF_FILET, base::Bind(SaveTraceFile, frame_, - FilePath(file_paths.front()), + base::FilePath(file_paths.front()), base::Passed(contents_.Pass()))); } else { frame_->SendJavaScript( diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 44c52a13f..42868253f 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -49,8 +49,7 @@ class CefAccessTokenStore : public content::AccessTokenStore { virtual void LoadAccessTokens( const LoadAccessTokensCallbackType& callback) OVERRIDE { - callback.Run(access_token_set_, - _Context->browser_context()->GetRequestContext()); + callback.Run(access_token_set_, _Context->request_context()); } virtual void SaveAccessToken( @@ -178,12 +177,12 @@ class CefPluginServiceFilter : public content::PluginServiceFilter { CefPluginServiceFilter() {} virtual ~CefPluginServiceFilter() {} - virtual bool ShouldUsePlugin(int render_process_id, - int render_view_id, - const void* context, - const GURL& url, - const GURL& policy_url, - webkit::WebPluginInfo* plugin) OVERRIDE { + virtual bool IsPluginAvailable(int render_process_id, + int render_view_id, + const void* context, + const GURL& url, + const GURL& policy_url, + webkit::WebPluginInfo* plugin) OVERRIDE { bool allowed = true; CefRefPtr browser = @@ -207,6 +206,11 @@ class CefPluginServiceFilter : public content::PluginServiceFilter { return allowed; } + + virtual bool CanLoadPlugin(int render_process_id, + const FilePath& path) OVERRIDE { + return true; + } }; } // namespace @@ -217,16 +221,6 @@ class CefMediaObserver : public content::MediaObserver { CefMediaObserver() {} virtual ~CefMediaObserver() {} - virtual void OnDeleteAudioStream(void* host, int stream_id) OVERRIDE {} - - virtual void OnSetAudioStreamPlaying(void* host, int stream_id, - bool playing) OVERRIDE {} - virtual void OnSetAudioStreamStatus(void* host, int stream_id, - const std::string& status) OVERRIDE {} - virtual void OnSetAudioStreamVolume(void* host, int stream_id, - double volume) OVERRIDE {} - virtual void OnMediaEvent(int render_process_id, - const media::MediaLogEvent& event) OVERRIDE {} virtual void OnCaptureDevicesOpened( int render_process_id, int render_view_id, @@ -394,6 +388,50 @@ void CefContentBrowserClient::RenderProcessHostCreated( host->GetChannel()->AddFilter(new CefBrowserMessageFilter(host)); } +net::URLRequestContextGetter* CefContentBrowserClient::CreateRequestContext( + content::BrowserContext* content_browser_context, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler) { + CefBrowserContext* cef_browser_context = + CefBrowserContextForBrowserContext(content_browser_context); + return cef_browser_context->CreateRequestContext( + blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(), + developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(), + chrome_devtools_protocol_handler.Pass()); +} + +net::URLRequestContextGetter* +CefContentBrowserClient::CreateRequestContextForStoragePartition( + content::BrowserContext* content_browser_context, + const base::FilePath& partition_path, + bool in_memory, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler) { + CefBrowserContext* cef_browser_context = + CefBrowserContextForBrowserContext(content_browser_context); + return cef_browser_context->CreateRequestContextForStoragePartition( + partition_path, in_memory, blob_protocol_handler.Pass(), + file_system_protocol_handler.Pass(), + developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(), + chrome_devtools_protocol_handler.Pass()); +} + void CefContentBrowserClient::AppendExtraCommandLineSwitches( CommandLine* command_line, int child_process_id) { const CommandLine& browser_cmd = *CommandLine::ForCurrentProcess(); @@ -593,7 +631,7 @@ const wchar_t* CefContentBrowserClient::GetResourceDllName() { if (file_path[0] == 0) { // Retrieve the module path (usually libcef.dll). - FilePath module; + base::FilePath module; PathService::Get(base::FILE_MODULE, &module); const std::wstring wstr = module.value(); size_t count = std::min(static_cast(MAX_PATH), wstr.size()); @@ -610,3 +648,10 @@ void CefContentBrowserClient::set_last_create_window_params( CEF_REQUIRE_IOT(); last_create_window_params_ = params; } + +CefBrowserContext* +CefContentBrowserClient::CefBrowserContextForBrowserContext( + content::BrowserContext* content_browser_context) { + DCHECK_EQ(content_browser_context, browser_main_parts_->browser_context()); + return browser_main_parts_->browser_context(); +} diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 04624e6fe..fd9673bf5 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -18,6 +18,7 @@ #include "content/public/browser/content_browser_client.h" #include "googleurl/src/gurl.h" +class CefBrowserContext; class CefBrowserInfo; class CefBrowserMainParts; class CefMediaObserver; @@ -61,11 +62,37 @@ class CefContentBrowserClient : public content::ContentBrowserClient { virtual content::BrowserMainParts* CreateBrowserMainParts( const content::MainFunctionParams& parameters) OVERRIDE; - virtual void RenderProcessHostCreated( - content::RenderProcessHost* host) OVERRIDE; virtual content::WebContentsView* OverrideCreateWebContentsView( content::WebContents* web_contents, content::RenderViewHostDelegateView** rvhdv) OVERRIDE; + virtual void RenderProcessHostCreated( + content::RenderProcessHost* host) OVERRIDE; + virtual net::URLRequestContextGetter* CreateRequestContext( + content::BrowserContext* browser_context, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler) OVERRIDE; + virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + content::BrowserContext* browser_context, + const base::FilePath& partition_path, + bool in_memory, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler, + scoped_ptr + chrome_protocol_handler, + scoped_ptr + chrome_devtools_protocol_handler) OVERRIDE; virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, int child_process_id) OVERRIDE; virtual content::QuotaPermissionContext* @@ -102,6 +129,9 @@ class CefContentBrowserClient : public content::ContentBrowserClient { void set_last_create_window_params(const LastCreateWindowParams& params); private: + CefBrowserContext* CefBrowserContextForBrowserContext( + content::BrowserContext* content_browser_context); + CefBrowserMainParts* browser_main_parts_; scoped_ptr media_observer_; diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index 12775dddf..747f60cb8 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -184,12 +184,12 @@ bool CefContext::Initialize(const CefMainArgs& args, init_thread_id_ = base::PlatformThread::CurrentId(); settings_ = settings; - cache_path_ = FilePath(CefString(&settings.cache_path)); + cache_path_ = base::FilePath(CefString(&settings.cache_path)); if (!cache_path_.empty() && !file_util::DirectoryExists(cache_path_) && !file_util::CreateDirectory(cache_path_)) { NOTREACHED() << "The cache_path directory could not be created"; - cache_path_ = FilePath(); + cache_path_ = base::FilePath(); } if (cache_path_.empty()) { // Create and use a temporary directory. diff --git a/libcef/browser/context.h b/libcef/browser/context.h index 5d2d1b365..1db2ad849 100644 --- a/libcef/browser/context.h +++ b/libcef/browser/context.h @@ -18,6 +18,7 @@ #include "base/memory/scoped_ptr.h" #include "base/threading/platform_thread.h" #include "net/proxy/proxy_config_service.h" +#include "net/url_request/url_request_context_getter.h" namespace base { class WaitableEvent; @@ -60,13 +61,20 @@ class CefContext : public CefBase { // Retrieve the path at which cache data will be stored on disk. If empty, // cache data will be stored in-memory. - const FilePath& cache_path() const { return cache_path_; } + const base::FilePath& cache_path() const { return cache_path_; } const CefSettings& settings() const { return settings_; } CefRefPtr application() const; CefBrowserContext* browser_context() const; CefDevToolsDelegate* devtools_delegate() const; + scoped_refptr request_context() const { + return request_context_; + } + void set_request_context(scoped_refptr context) { + request_context_ = context; + } + // Passes ownership. scoped_ptr proxy_config_service() const; @@ -90,13 +98,15 @@ class CefContext : public CefBase { base::PlatformThreadId init_thread_id_; CefSettings settings_; - FilePath cache_path_; + base::FilePath cache_path_; base::ScopedTempDir cache_temp_dir_; scoped_ptr main_delegate_; scoped_ptr main_runner_; scoped_ptr trace_subscriber_; + scoped_refptr request_context_; + IMPLEMENT_REFCOUNTING(CefContext); IMPLEMENT_LOCKING(CefContext); }; diff --git a/libcef/browser/cookie_manager_impl.cc b/libcef/browser/cookie_manager_impl.cc index 2cf1e0a95..e60480e4f 100644 --- a/libcef/browser/cookie_manager_impl.cc +++ b/libcef/browser/cookie_manager_impl.cc @@ -109,9 +109,9 @@ void CefCookieManagerImpl::SetSupportedSchemes( if (is_global_) { // Global changes are handled by the request context. - CefURLRequestContextGetter* getter = + scoped_refptr getter = static_cast( - _Context->browser_context()->GetRequestContext()); + _Context->request_context().get()); std::vector scheme_vec; std::vector::const_iterator it = schemes.begin(); @@ -256,15 +256,15 @@ bool CefCookieManagerImpl::SetStoragePath( const CefString& path, bool persist_session_cookies) { if (CEF_CURRENTLY_ON_IOT()) { - FilePath new_path; + base::FilePath new_path; if (!path.empty()) - new_path = FilePath(path); + new_path = base::FilePath(path); if (is_global_) { // Global path changes are handled by the request context. - CefURLRequestContextGetter* getter = + scoped_refptr getter = static_cast( - _Context->browser_context()->GetRequestContext()); + _Context->request_context().get()); getter->SetCookieStoragePath(new_path, persist_session_cookies); cookie_monster_ = getter->GetURLRequestContext()->cookie_store()-> GetCookieMonster(); @@ -284,7 +284,7 @@ bool CefCookieManagerImpl::SetStoragePath( base::ThreadRestrictions::ScopedAllowIO allow_io; if (file_util::DirectoryExists(new_path) || file_util::CreateDirectory(new_path)) { - const FilePath& cookie_path = new_path.AppendASCII("Cookies"); + const base::FilePath& cookie_path = new_path.AppendASCII("Cookies"); persistent_store = new SQLitePersistentCookieStore(cookie_path, persist_session_cookies, @@ -343,8 +343,8 @@ bool CefCookieManagerImpl::FlushStore(CefRefPtr handler) { void CefCookieManagerImpl::SetGlobal() { if (CEF_CURRENTLY_ON_IOT()) { if (_Context->browser_context()) { - cookie_monster_ = _Context->browser_context()->GetRequestContext()-> - GetURLRequestContext()->cookie_store()->GetCookieMonster(); + cookie_monster_ = _Context->request_context()->GetURLRequestContext()-> + cookie_store()->GetCookieMonster(); DCHECK(cookie_monster_); } } else { diff --git a/libcef/browser/cookie_manager_impl.h b/libcef/browser/cookie_manager_impl.h index b3f60f005..a9c8d5e81 100644 --- a/libcef/browser/cookie_manager_impl.h +++ b/libcef/browser/cookie_manager_impl.h @@ -44,7 +44,7 @@ class CefCookieManagerImpl : public CefCookieManager { scoped_refptr cookie_monster_; bool is_global_; - FilePath storage_path_; + base::FilePath storage_path_; std::vector supported_schemes_; IMPLEMENT_REFCOUNTING(CefCookieManagerImpl); diff --git a/libcef/browser/devtools_delegate.cc b/libcef/browser/devtools_delegate.cc index 85df447b6..a6510c22f 100644 --- a/libcef/browser/devtools_delegate.cc +++ b/libcef/browser/devtools_delegate.cc @@ -145,8 +145,8 @@ bool CefDevToolsDelegate::BundlesFrontendResources() { return true; } -FilePath CefDevToolsDelegate::GetDebugFrontendDir() { - return FilePath(); +base::FilePath CefDevToolsDelegate::GetDebugFrontendDir() { + return base::FilePath(); } std::string CefDevToolsDelegate::GetPageThumbnailData(const GURL& url) { @@ -157,6 +157,11 @@ content::RenderViewHost* CefDevToolsDelegate::CreateNewTarget() { return NULL; } +content::DevToolsHttpHandlerDelegate::TargetType + CefDevToolsDelegate::GetTargetType(content::RenderViewHost*) { + return kTargetTypeTab; +} + std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme) { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); diff --git a/libcef/browser/devtools_delegate.h b/libcef/browser/devtools_delegate.h index 79333c5fe..4a34fe3a6 100644 --- a/libcef/browser/devtools_delegate.h +++ b/libcef/browser/devtools_delegate.h @@ -58,9 +58,10 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate { // DevToolsHttpProtocolHandler::Delegate overrides. virtual std::string GetDiscoveryPageHTML() OVERRIDE; virtual bool BundlesFrontendResources() OVERRIDE; - virtual FilePath GetDebugFrontendDir() OVERRIDE; + virtual base::FilePath GetDebugFrontendDir() OVERRIDE; virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; virtual content::RenderViewHost* CreateNewTarget() OVERRIDE; + virtual TargetType GetTargetType(content::RenderViewHost*) OVERRIDE; // Returns the DevTools URL for the specified RenderViewHost. std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme); diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index 3aa6107a2..eb42923d0 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -54,7 +54,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { CefBeforeDownloadCallbackImpl( const base::WeakPtr& manager, int32 download_id, - const FilePath& suggested_name, + const base::FilePath& suggested_name, const content::DownloadTargetCallback& callback) : manager_(manager), download_id_(download_id), @@ -69,7 +69,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { return; if (manager_) { - FilePath path = FilePath(download_path); + base::FilePath path = base::FilePath(download_path); CEF_POST_TASK(CEF_FILET, base::Bind(&CefBeforeDownloadCallbackImpl::GenerateFilename, manager_, download_id_, suggested_name_, path, @@ -89,14 +89,14 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { static void GenerateFilename( base::WeakPtr manager, int32 download_id, - const FilePath& suggested_name, - const FilePath& download_path, + const base::FilePath& suggested_name, + const base::FilePath& download_path, bool show_dialog, const content::DownloadTargetCallback& callback) { - FilePath suggested_path = download_path; + base::FilePath suggested_path = download_path; if (!suggested_path.empty()) { // Create the directory if necessary. - FilePath dir_path = suggested_path.DirName(); + base::FilePath dir_path = suggested_path.DirName(); if (!file_util::DirectoryExists(dir_path) && !file_util::CreateDirectory(dir_path)) { NOTREACHED() << "failed to create the download directory"; @@ -123,7 +123,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { static void ChooseDownloadPath( base::WeakPtr manager, int32 download_id, - const FilePath& suggested_path, + const base::FilePath& suggested_path, bool show_dialog, const content::DownloadTargetCallback& callback) { if (!manager) @@ -169,10 +169,10 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { static void ChooseDownloadPathCallback( const content::DownloadTargetCallback& callback, - const std::vector& file_paths) { + const std::vector& file_paths) { DCHECK_LE(file_paths.size(), (size_t) 1); - FilePath path; + base::FilePath path; if (file_paths.size() > 0) path = file_paths.front(); @@ -185,7 +185,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { base::WeakPtr manager_; int32 download_id_; - FilePath suggested_name_; + base::FilePath suggested_name_; content::DownloadTargetCallback callback_; IMPLEMENT_REFCOUNTING(CefBeforeDownloadCallbackImpl); @@ -319,7 +319,7 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget( handler = GetDownloadHandler(browser); if (handler.get()) { - FilePath suggested_name = net::GenerateFileName( + base::FilePath suggested_name = net::GenerateFileName( item->GetURL(), item->GetContentDisposition(), EmptyString(), diff --git a/libcef/browser/javascript_dialog.h b/libcef/browser/javascript_dialog.h index 4c38b2edd..a2edc964f 100644 --- a/libcef/browser/javascript_dialog.h +++ b/libcef/browser/javascript_dialog.h @@ -7,7 +7,7 @@ #define CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_H_ #pragma once -#include "content/public/browser/javascript_dialogs.h" +#include "content/public/browser/javascript_dialog_manager.h" #if defined(TOOLKIT_GTK) #include "ui/base/gtk/gtk_signal.h" @@ -21,17 +21,17 @@ class CefJavaScriptDialogHelper; #endif // __OBJC__ #endif // defined(OS_MACOSX) -class CefJavaScriptDialogCreator; +class CefJavaScriptDialogManager; class CefJavaScriptDialog { public: CefJavaScriptDialog( - CefJavaScriptDialogCreator* creator, + CefJavaScriptDialogManager* creator, content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, - const content::JavaScriptDialogCreator::DialogClosedCallback& callback); + const content::JavaScriptDialogManager::DialogClosedCallback& callback); ~CefJavaScriptDialog(); // Called to cancel a dialog mid-flight. @@ -41,8 +41,8 @@ class CefJavaScriptDialog { void Activate(); private: - CefJavaScriptDialogCreator* creator_; - content::JavaScriptDialogCreator::DialogClosedCallback callback_; + CefJavaScriptDialogManager* creator_; + content::JavaScriptDialogManager::DialogClosedCallback callback_; #if defined(OS_MACOSX) CefJavaScriptDialogHelper* helper_; // owned diff --git a/libcef/browser/javascript_dialog_gtk.cc b/libcef/browser/javascript_dialog_gtk.cc index 892a143fa..f00a5d83b 100644 --- a/libcef/browser/javascript_dialog_gtk.cc +++ b/libcef/browser/javascript_dialog_gtk.cc @@ -5,7 +5,7 @@ #include "libcef/browser/javascript_dialog.h" #include "libcef/browser/browser_host_impl.h" -#include "libcef/browser/javascript_dialog_creator.h" +#include "libcef/browser/javascript_dialog_manager.h" #include @@ -30,12 +30,12 @@ string16 GetPromptText(GtkDialog* dialog) { } // namespace CefJavaScriptDialog::CefJavaScriptDialog( - CefJavaScriptDialogCreator* creator, + CefJavaScriptDialogManager* creator, content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, - const content::JavaScriptDialogCreator::DialogClosedCallback& callback) + const content::JavaScriptDialogManager::DialogClosedCallback& callback) : creator_(creator), callback_(callback) { GtkButtonsType buttons = GTK_BUTTONS_NONE; diff --git a/libcef/browser/javascript_dialog_mac.mm b/libcef/browser/javascript_dialog_mac.mm index 4b7b0c430..874fac5eb 100644 --- a/libcef/browser/javascript_dialog_mac.mm +++ b/libcef/browser/javascript_dialog_mac.mm @@ -4,7 +4,7 @@ // found in the LICENSE file. #include "libcef/browser/javascript_dialog.h" -#include "libcef/browser/javascript_dialog_creator.h" +#include "libcef/browser/javascript_dialog_manager.h" #import @@ -20,12 +20,12 @@ NSTextField* textField_; // WEAK; owned by alert_ // Copies of the fields in CefJavaScriptDialog because they're private. - CefJavaScriptDialogCreator* creator_; - content::JavaScriptDialogCreator::DialogClosedCallback callback_; + CefJavaScriptDialogManager* creator_; + content::JavaScriptDialogManager::DialogClosedCallback callback_; } -- (id)initHelperWithCreator:(CefJavaScriptDialogCreator*)creator - andCallback:(content::JavaScriptDialogCreator::DialogClosedCallback)callback; +- (id)initHelperWithCreator:(CefJavaScriptDialogManager*)creator + andCallback:(content::JavaScriptDialogManager::DialogClosedCallback)callback; - (NSAlert*)alert; - (NSTextField*)textField; - (void)alertDidEnd:(NSAlert*)alert @@ -37,8 +37,8 @@ @implementation CefJavaScriptDialogHelper -- (id)initHelperWithCreator:(CefJavaScriptDialogCreator*)creator - andCallback:(content::JavaScriptDialogCreator::DialogClosedCallback)callback { +- (id)initHelperWithCreator:(CefJavaScriptDialogManager*)creator + andCallback:(content::JavaScriptDialogManager::DialogClosedCallback)callback { if (self = [super init]) { creator_ = creator; callback_ = callback; @@ -86,12 +86,12 @@ @end CefJavaScriptDialog::CefJavaScriptDialog( - CefJavaScriptDialogCreator* creator, + CefJavaScriptDialogManager* creator, content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, - const content::JavaScriptDialogCreator::DialogClosedCallback& callback) + const content::JavaScriptDialogManager::DialogClosedCallback& callback) : creator_(creator), callback_(callback) { bool text_field = diff --git a/libcef/browser/javascript_dialog_creator.cc b/libcef/browser/javascript_dialog_manager.cc similarity index 90% rename from libcef/browser/javascript_dialog_creator.cc rename to libcef/browser/javascript_dialog_manager.cc index 98e942982..d6f9a3d6f 100644 --- a/libcef/browser/javascript_dialog_creator.cc +++ b/libcef/browser/javascript_dialog_manager.cc @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "libcef/browser/javascript_dialog_creator.h" +#include "libcef/browser/javascript_dialog_manager.h" #include "libcef/browser/browser_host_impl.h" #include "libcef/browser/javascript_dialog.h" #include "libcef/browser/thread_util.h" @@ -18,7 +18,7 @@ namespace { class CefJSDialogCallbackImpl : public CefJSDialogCallback { public: CefJSDialogCallbackImpl( - const content::JavaScriptDialogCreator::DialogClosedCallback& callback) + const content::JavaScriptDialogManager::DialogClosedCallback& callback) : callback_(callback) { } ~CefJSDialogCallbackImpl() { @@ -53,12 +53,12 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback { private: static void CancelNow( - const content::JavaScriptDialogCreator::DialogClosedCallback& callback) { + const content::JavaScriptDialogManager::DialogClosedCallback& callback) { CEF_REQUIRE_UIT(); callback.Run(false, string16()); } - content::JavaScriptDialogCreator::DialogClosedCallback callback_; + content::JavaScriptDialogManager::DialogClosedCallback callback_; IMPLEMENT_REFCOUNTING(CefJSDialogCallbackImpl); }; @@ -66,15 +66,15 @@ class CefJSDialogCallbackImpl : public CefJSDialogCallback { } // namespace -CefJavaScriptDialogCreator::CefJavaScriptDialogCreator( +CefJavaScriptDialogManager::CefJavaScriptDialogManager( CefBrowserHostImpl* browser) : browser_(browser) { } -CefJavaScriptDialogCreator::~CefJavaScriptDialogCreator() { +CefJavaScriptDialogManager::~CefJavaScriptDialogManager() { } -void CefJavaScriptDialogCreator::RunJavaScriptDialog( +void CefJavaScriptDialogManager::RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, const std::string& accept_lang, @@ -131,7 +131,7 @@ void CefJavaScriptDialogCreator::RunJavaScriptDialog( #endif } -void CefJavaScriptDialogCreator::RunBeforeUnloadDialog( +void CefJavaScriptDialogManager::RunBeforeUnloadDialog( content::WebContents* web_contents, const string16& message_text, bool is_reload, @@ -178,7 +178,7 @@ void CefJavaScriptDialogCreator::RunBeforeUnloadDialog( #endif } -void CefJavaScriptDialogCreator::ResetJavaScriptState( +void CefJavaScriptDialogManager::ResetJavaScriptState( content::WebContents* web_contents) { CefRefPtr client = browser_->GetClient(); if (client.get()) { @@ -197,7 +197,7 @@ void CefJavaScriptDialogCreator::ResetJavaScriptState( #endif } -void CefJavaScriptDialogCreator::DialogClosed(CefJavaScriptDialog* dialog) { +void CefJavaScriptDialogManager::DialogClosed(CefJavaScriptDialog* dialog) { #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) DCHECK_EQ(dialog, dialog_.get()); dialog_.reset(); diff --git a/libcef/browser/javascript_dialog_creator.h b/libcef/browser/javascript_dialog_manager.h similarity index 74% rename from libcef/browser/javascript_dialog_creator.h rename to libcef/browser/javascript_dialog_manager.h index 8fc15cfb9..4e6037d6c 100644 --- a/libcef/browser/javascript_dialog_creator.h +++ b/libcef/browser/javascript_dialog_manager.h @@ -3,25 +3,25 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_CREATOR_H_ -#define CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_CREATOR_H_ +#ifndef CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ +#define CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ #pragma once #include #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" -#include "content/public/browser/javascript_dialogs.h" +#include "content/public/browser/javascript_dialog_manager.h" class CefBrowserHostImpl; class CefJavaScriptDialog; -class CefJavaScriptDialogCreator : public content::JavaScriptDialogCreator { +class CefJavaScriptDialogManager : public content::JavaScriptDialogManager { public: - explicit CefJavaScriptDialogCreator(CefBrowserHostImpl* browser); - virtual ~CefJavaScriptDialogCreator(); + explicit CefJavaScriptDialogManager(CefBrowserHostImpl* browser); + virtual ~CefJavaScriptDialogManager(); - // JavaScriptDialogCreator methods. + // JavaScriptDialogManager methods. virtual void RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, @@ -47,7 +47,7 @@ class CefJavaScriptDialogCreator : public content::JavaScriptDialogCreator { CefBrowserHostImpl* browser() const { return browser_; } private: - // This pointer is guaranteed to outlive the CefJavaScriptDialogCreator. + // This pointer is guaranteed to outlive the CefJavaScriptDialogManager. CefBrowserHostImpl* browser_; #if defined(OS_MACOSX) || defined(OS_WIN) || defined(TOOLKIT_GTK) @@ -55,7 +55,7 @@ class CefJavaScriptDialogCreator : public content::JavaScriptDialogCreator { scoped_ptr dialog_; #endif - DISALLOW_COPY_AND_ASSIGN(CefJavaScriptDialogCreator); + DISALLOW_COPY_AND_ASSIGN(CefJavaScriptDialogManager); }; -#endif // CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_CREATOR_H_ +#endif // CEF_LIBCEF_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ diff --git a/libcef/browser/javascript_dialog_win.cc b/libcef/browser/javascript_dialog_win.cc index 66a4894b9..c5841ca73 100644 --- a/libcef/browser/javascript_dialog_win.cc +++ b/libcef/browser/javascript_dialog_win.cc @@ -4,7 +4,7 @@ // found in the LICENSE file. #include "libcef/browser/javascript_dialog.h" -#include "libcef/browser/javascript_dialog_creator.h" +#include "libcef/browser/javascript_dialog_manager.h" #include "libcef/browser/browser_host_impl.h" #include "libcef_dll/resource.h" @@ -86,12 +86,12 @@ INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog, } CefJavaScriptDialog::CefJavaScriptDialog( - CefJavaScriptDialogCreator* creator, + CefJavaScriptDialogManager* creator, content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, - const content::JavaScriptDialogCreator::DialogClosedCallback& callback) + const content::JavaScriptDialogManager::DialogClosedCallback& callback) : creator_(creator), callback_(callback), message_text_(message_text), @@ -107,7 +107,7 @@ CefJavaScriptDialog::CefJavaScriptDialog( else // JAVASCRIPT_MESSAGE_TYPE_PROMPT dialog_type = IDD_PROMPT; - FilePath file_path; + base::FilePath file_path; HMODULE hModule = NULL; // Try to load the dialog from the DLL. diff --git a/libcef/browser/menu_creator_runner_win.cc b/libcef/browser/menu_creator_runner_win.cc index 8c7903d59..c911ff1d9 100644 --- a/libcef/browser/menu_creator_runner_win.cc +++ b/libcef/browser/menu_creator_runner_win.cc @@ -16,7 +16,7 @@ CefMenuCreatorRunnerWin::CefMenuCreatorRunnerWin() { bool CefMenuCreatorRunnerWin::RunContextMenu(CefMenuCreator* manager) { // Create a menu based on the model. menu_.reset(new views::NativeMenuWin(manager->model(), NULL)); - menu_->Rebuild(); + menu_->Rebuild(NULL); // Make sure events can be pumped while the menu is up. MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current()); diff --git a/libcef/browser/navigate_params.h b/libcef/browser/navigate_params.h index 64b3a0d99..e78907413 100644 --- a/libcef/browser/navigate_params.h +++ b/libcef/browser/navigate_params.h @@ -14,7 +14,7 @@ #include "content/public/common/referrer.h" #include "googleurl/src/gurl.h" #include "net/base/upload_data.h" -#include "webkit/glue/window_open_disposition.h" +#include "ui/base/window_open_disposition.h" // Parameters that tell CefBrowserHostImpl::Navigate() what to do. struct CefNavigateParams { diff --git a/libcef/browser/path_util_impl.cc b/libcef/browser/path_util_impl.cc index f0832ee8d..10ead1a4c 100644 --- a/libcef/browser/path_util_impl.cc +++ b/libcef/browser/path_util_impl.cc @@ -34,7 +34,7 @@ bool CefGetPath(PathKey key, CefString& path) { return false; } - FilePath file_path; + base::FilePath file_path; if (PathService::Get(pref_key, &file_path)) { path = file_path.value(); return true; diff --git a/libcef/browser/proxy_stubs.cc b/libcef/browser/proxy_stubs.cc index 054b268c9..dbc21103a 100644 --- a/libcef/browser/proxy_stubs.cc +++ b/libcef/browser/proxy_stubs.cc @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/prefs/pref_service_syncable.h" +#include "base/logging.h" +#include "chrome/browser/prefs/pref_registry_syncable.h" // Required by PrefProxyConfigTrackerImpl::RegisterUserPrefs. -void PrefServiceSyncable::RegisterDictionaryPref(const char* path, - DictionaryValue* default_value, - PrefSyncStatus sync_status) { +void PrefRegistrySyncable::RegisterDictionaryPref( + const char* path, + base::DictionaryValue* default_value, + PrefSyncStatus sync_status) { NOTREACHED(); } diff --git a/libcef/browser/render_widget_host_view_osr.cc b/libcef/browser/render_widget_host_view_osr.cc index 5734460d0..769de38fb 100644 --- a/libcef/browser/render_widget_host_view_osr.cc +++ b/libcef/browser/render_widget_host_view_osr.cc @@ -12,6 +12,11 @@ #include "content/public/browser/content_browser_client.h" #include "content/public/browser/render_view_host.h" #include "content/public/common/content_client.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" + +#if defined(OS_WIN) +#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h" +#endif #include "webkit/glue/webcursor.h" @@ -205,6 +210,13 @@ void CefRenderWidgetHostViewOSR::WillWmDestroy() { } #endif +void CefRenderWidgetHostViewOSR::GetScreenInfo( + WebKit::WebScreenInfo* results) { +#if defined(OS_WIN) + *results = WebKit::WebScreenInfoFactory::screenInfo(GetNativeView()); +#endif +} + gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() { if (!browser_impl_.get()) return gfx::Rect(); @@ -249,8 +261,17 @@ content::BackingStore* CefRenderWidgetHostViewOSR::AllocBackingStore( void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface( const gfx::Rect& src_subrect, const gfx::Size& dst_size, - const base::Callback& callback, - skia::PlatformBitmap* output) { + const base::Callback& callback) { +} + +void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame( + const gfx::Rect& src_subrect, + const scoped_refptr& target, + const base::Callback& callback) { +} + +bool CefRenderWidgetHostViewOSR::CanCopyToVideoFrame() const { + return false; } void CefRenderWidgetHostViewOSR::OnAcceleratedCompositingStateChange() { diff --git a/libcef/browser/render_widget_host_view_osr.h b/libcef/browser/render_widget_host_view_osr.h index b14d90cc0..ddb6b7861 100644 --- a/libcef/browser/render_widget_host_view_osr.h +++ b/libcef/browser/render_widget_host_view_osr.h @@ -84,6 +84,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase { #if defined(OS_WIN) && !defined(USE_AURA) virtual void WillWmDestroy() OVERRIDE; #endif + virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual void Destroy() OVERRIDE; virtual void SetTooltipText(const string16& tooltip_text) OVERRIDE; @@ -92,8 +93,12 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase { virtual void CopyFromCompositingSurface( const gfx::Rect& src_subrect, const gfx::Size& dst_size, - const base::Callback& callback, - skia::PlatformBitmap* output) OVERRIDE; + const base::Callback& callback) OVERRIDE; + virtual void CopyFromCompositingSurfaceToVideoFrame( + const gfx::Rect& src_subrect, + const scoped_refptr& target, + const base::Callback& callback) OVERRIDE; + virtual bool CanCopyToVideoFrame() const OVERRIDE; virtual void OnAcceleratedCompositingStateChange() OVERRIDE; virtual void SetHasHorizontalScrollbar( bool has_horizontal_scrollbar) OVERRIDE; diff --git a/libcef/browser/resource_context.cc b/libcef/browser/resource_context.cc deleted file mode 100644 index 8f20cfc76..000000000 --- a/libcef/browser/resource_context.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "libcef/browser/resource_context.h" -#include "libcef/browser/thread_util.h" -#include "libcef/browser/url_request_context_getter.h" - -CefResourceContext::CefResourceContext( - CefURLRequestContextGetter* getter) - : getter_(getter) { -} - -CefResourceContext::~CefResourceContext() { - // Destroy the getter after content::ResourceContext has finished destructing. - // Otherwise, the URLRequestContext objects will be deleted before - // ResourceDispatcherHost has canceled any pending URLRequests. - getter_->AddRef(); - content::BrowserThread::ReleaseSoon( - content::BrowserThread::IO, FROM_HERE, getter_.get()); -} - -net::HostResolver* CefResourceContext::GetHostResolver() { - CEF_REQUIRE_IOT(); - return getter_->host_resolver(); -} - -net::URLRequestContext* CefResourceContext::GetRequestContext() { - CEF_REQUIRE_IOT(); - return getter_->GetURLRequestContext(); -} diff --git a/libcef/browser/resource_context.h b/libcef/browser/resource_context.h deleted file mode 100644 index 142944955..000000000 --- a/libcef/browser/resource_context.h +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -#ifndef CEF_LIBCEF_BROWSER_RESOURCE_CONTEXT_H_ -#define CEF_LIBCEF_BROWSER_RESOURCE_CONTEXT_H_ -#pragma once - -#include "base/compiler_specific.h" -#include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" -#include "content/public/browser/resource_context.h" - -class CefURLRequestContextGetter; - -class CefResourceContext : public content::ResourceContext { - public: - explicit CefResourceContext(CefURLRequestContextGetter* getter); - virtual ~CefResourceContext(); - - private: - // ResourceContext methods. - virtual net::HostResolver* GetHostResolver() OVERRIDE; - virtual net::URLRequestContext* GetRequestContext() OVERRIDE; - - scoped_refptr getter_; - - DISALLOW_COPY_AND_ASSIGN(CefResourceContext); -}; - -#endif // CEF_LIBCEF_BROWSER_RESOURCE_CONTEXT_H_ diff --git a/libcef/browser/scheme_impl.cc b/libcef/browser/scheme_impl.cc index 5962923fa..248eed6ac 100644 --- a/libcef/browser/scheme_impl.cc +++ b/libcef/browser/scheme_impl.cc @@ -127,7 +127,7 @@ class CefUrlRequestManager { net::URLRequestJobFactory* GetJobFactory() { return const_cast( static_cast( - _Context->browser_context()->GetRequestContext())-> + _Context->request_context().get())-> GetURLRequestContext()->job_factory()); } diff --git a/libcef/browser/url_network_delegate.cc b/libcef/browser/url_network_delegate.cc index 0801296f5..cb52bad80 100644 --- a/libcef/browser/url_network_delegate.cc +++ b/libcef/browser/url_network_delegate.cc @@ -208,7 +208,7 @@ bool CefNetworkDelegate::OnCanSetCookie(const net::URLRequest& request, } bool CefNetworkDelegate::OnCanAccessFile(const net::URLRequest& request, - const FilePath& path) const { + const base::FilePath& path) const { return true; } diff --git a/libcef/browser/url_network_delegate.h b/libcef/browser/url_network_delegate.h index 3afb70122..587a45d8b 100644 --- a/libcef/browser/url_network_delegate.h +++ b/libcef/browser/url_network_delegate.h @@ -51,7 +51,7 @@ class CefNetworkDelegate : public net::NetworkDelegate { const std::string& cookie_line, net::CookieOptions* options) OVERRIDE; virtual bool OnCanAccessFile(const net::URLRequest& request, - const FilePath& path) const OVERRIDE; + const base::FilePath& path) const OVERRIDE; virtual bool OnCanThrottleRequest( const net::URLRequest& request) const OVERRIDE; virtual int OnBeforeSocketStreamConnect( diff --git a/libcef/browser/url_request_context_getter.cc b/libcef/browser/url_request_context_getter.cc index 605c0739c..d77266279 100644 --- a/libcef/browser/url_request_context_getter.cc +++ b/libcef/browser/url_request_context_getter.cc @@ -29,6 +29,7 @@ #include "chrome/browser/net/sqlite_persistent_cookie_store.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_switches.h" +#include "content/public/common/url_constants.h" #include "net/base/cert_verifier.h" #include "net/base/default_server_bound_cert_store.h" #include "net/base/host_resolver.h" @@ -40,6 +41,7 @@ #include "net/http/http_cache.h" #include "net/http/http_server_properties_impl.h" #include "net/proxy/proxy_service.h" +#include "net/url_request/protocol_intercept_job_factory.h" #include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_context.h" @@ -55,9 +57,18 @@ using content::BrowserThread; CefURLRequestContextGetter::CefURLRequestContextGetter( MessageLoop* io_loop, - MessageLoop* file_loop) + MessageLoop* file_loop, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler) : io_loop_(io_loop), - file_loop_(file_loop) { + file_loop_(file_loop), + blob_protocol_handler_(blob_protocol_handler.Pass()), + file_system_protocol_handler_(file_system_protocol_handler.Pass()), + developer_protocol_handler_(developer_protocol_handler.Pass()) { // Must first be created on the UI thread. CEF_REQUIRE_UIT(); } @@ -71,7 +82,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() { CEF_REQUIRE_IOT(); if (!url_request_context_.get()) { - const FilePath& cache_path = _Context->cache_path(); + const base::FilePath& cache_path = _Context->cache_path(); const CommandLine& command_line = *CommandLine::ForCurrentProcess(); const CefSettings& settings = _Context->settings(); @@ -162,7 +173,17 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() { storage_->set_ftp_transaction_factory( new net::FtpNetworkLayer(url_request_context_->host_resolver())); - storage_->set_job_factory(new net::URLRequestJobFactoryImpl); + scoped_ptr job_factory( + new net::URLRequestJobFactoryImpl()); + bool set_protocol = job_factory->SetProtocolHandler( + chrome::kBlobScheme, blob_protocol_handler_.release()); + DCHECK(set_protocol); + set_protocol = job_factory->SetProtocolHandler( + chrome::kFileSystemScheme, file_system_protocol_handler_.release()); + DCHECK(set_protocol); + storage_->set_job_factory(new net::ProtocolInterceptJobFactory( + job_factory.PassAs(), + developer_protocol_handler_.Pass())); request_interceptor_.reset(new CefRequestInterceptor); } @@ -180,7 +201,7 @@ net::HostResolver* CefURLRequestContextGetter::host_resolver() { } void CefURLRequestContextGetter::SetCookieStoragePath( - const FilePath& path, + const base::FilePath& path, bool persist_session_cookies) { CEF_REQUIRE_IOT(); @@ -198,7 +219,7 @@ void CefURLRequestContextGetter::SetCookieStoragePath( base::ThreadRestrictions::ScopedAllowIO allow_io; if (file_util::DirectoryExists(path) || file_util::CreateDirectory(path)) { - const FilePath& cookie_path = path.AppendASCII("Cookies"); + const base::FilePath& cookie_path = path.AppendASCII("Cookies"); persistent_store = new SQLitePersistentCookieStore(cookie_path, persist_session_cookies, diff --git a/libcef/browser/url_request_context_getter.h b/libcef/browser/url_request_context_getter.h index f7d1a0661..495261401 100644 --- a/libcef/browser/url_request_context_getter.h +++ b/libcef/browser/url_request_context_getter.h @@ -15,6 +15,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "net/url_request/url_request_context_getter.h" +#include "net/url_request/url_request_job_factory.h" class CefRequestInterceptor; class CefURLRequestContextProxy; @@ -73,7 +74,13 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter { public: CefURLRequestContextGetter( MessageLoop* io_loop, - MessageLoop* file_loop); + MessageLoop* file_loop, + scoped_ptr + blob_protocol_handler, + scoped_ptr + file_system_protocol_handler, + scoped_ptr + developer_protocol_handler); virtual ~CefURLRequestContextGetter(); // net::URLRequestContextGetter implementation. @@ -83,7 +90,7 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter { net::HostResolver* host_resolver(); - void SetCookieStoragePath(const FilePath& path, + void SetCookieStoragePath(const base::FilePath& path, bool persist_session_cookies); void SetCookieSupportedSchemes(const std::vector& schemes); @@ -104,11 +111,17 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter { scoped_ptr storage_; scoped_ptr url_request_context_; scoped_ptr url_security_manager_; + scoped_ptr + blob_protocol_handler_; + scoped_ptr + file_system_protocol_handler_; + scoped_ptr + developer_protocol_handler_; typedef std::set RequestContextProxySet; RequestContextProxySet url_request_context_proxies_; - FilePath cookie_store_path_; + base::FilePath cookie_store_path_; std::vector cookie_supported_schemes_; DISALLOW_COPY_AND_ASSIGN(CefURLRequestContextGetter); diff --git a/libcef/browser/web_plugin_impl.cc b/libcef/browser/web_plugin_impl.cc index 0b48a02b6..1f3012b17 100644 --- a/libcef/browser/web_plugin_impl.cc +++ b/libcef/browser/web_plugin_impl.cc @@ -102,7 +102,8 @@ void CefAddWebPluginPath(const CefString& path) { } // No thread affinity. - content::PluginServiceImpl::GetInstance()->AddExtraPluginPath(FilePath(path)); + content::PluginServiceImpl::GetInstance()->AddExtraPluginPath( + base::FilePath(path)); } void CefAddWebPluginDirectory(const CefString& dir) { @@ -118,7 +119,8 @@ void CefAddWebPluginDirectory(const CefString& dir) { } // No thread affinity. - content::PluginServiceImpl::GetInstance()->AddExtraPluginDir(FilePath(dir)); + content::PluginServiceImpl::GetInstance()->AddExtraPluginDir( + base::FilePath(dir)); } void CefRemoveWebPluginPath(const CefString& path) { @@ -135,7 +137,7 @@ void CefRemoveWebPluginPath(const CefString& path) { // No thread affinity. content::PluginServiceImpl::GetInstance()->RemoveExtraPluginPath( - FilePath(path)); + base::FilePath(path)); } void CefUnregisterInternalWebPlugin(const CefString& path) { @@ -152,7 +154,7 @@ void CefUnregisterInternalWebPlugin(const CefString& path) { // No thread affinity. content::PluginServiceImpl::GetInstance()->UnregisterInternalPlugin( - FilePath(path)); + base::FilePath(path)); } void CefForceWebPluginShutdown(const CefString& path) { @@ -169,7 +171,7 @@ void CefForceWebPluginShutdown(const CefString& path) { if (CEF_CURRENTLY_ON_IOT()) { content::PluginServiceImpl::GetInstance()->ForcePluginShutdown( - FilePath(path)); + base::FilePath(path)); } else { // Execute on the IO thread. CEF_POST_TASK(CEF_IOT, base::Bind(CefForceWebPluginShutdown, path)); @@ -190,7 +192,7 @@ void CefRegisterWebPluginCrash(const CefString& path) { if (CEF_CURRENTLY_ON_IOT()) { content::PluginServiceImpl::GetInstance()->RegisterPluginCrash( - FilePath(path)); + base::FilePath(path)); } else { // Execute on the IO thread. CEF_POST_TASK(CEF_IOT, base::Bind(CefRegisterWebPluginCrash, path)); @@ -214,7 +216,7 @@ void CefIsWebPluginUnstable( if (CEF_CURRENTLY_ON_IOT()) { callback->IsUnstable(path, content::PluginServiceImpl::GetInstance()->IsPluginUnstable( - FilePath(path))); + base::FilePath(path))); } else { // Execute on the IO thread. CEF_POST_TASK(CEF_IOT, base::Bind(CefIsWebPluginUnstable, path, callback)); diff --git a/libcef/common/cef_messages.cc b/libcef/common/cef_messages.cc index 64d4b446c..9727d843e 100644 --- a/libcef/common/cef_messages.cc +++ b/libcef/common/cef_messages.cc @@ -46,7 +46,7 @@ struct ParamTraits { } default: { DCHECK(type == net::UploadElement::TYPE_FILE); - FilePath file_path; + base::FilePath file_path; uint64 offset, length; base::Time expected_modification_time; if (!ReadParam(m, iter, &file_path)) diff --git a/libcef/common/command_line_impl.cc b/libcef/common/command_line_impl.cc index 574a0a8ad..2dd9817a7 100644 --- a/libcef/common/command_line_impl.cc +++ b/libcef/common/command_line_impl.cc @@ -77,7 +77,7 @@ CefString CefCommandLineImpl::GetProgram() { void CefCommandLineImpl::SetProgram(const CefString& program) { CEF_VALUE_VERIFY_RETURN_VOID(true); - mutable_value()->SetProgram(FilePath(program)); + mutable_value()->SetProgram(base::FilePath(program)); } bool CefCommandLineImpl::HasSwitches() { diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index cce784192..0d2aa53d4 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -108,20 +108,21 @@ std::string CefContentClient::GetCarbonInterposePath() const { } #endif -FilePath CefContentClient::GetPathForResourcePack( - const FilePath& pack_path, +base::FilePath CefContentClient::GetPathForResourcePack( + const base::FilePath& pack_path, ui::ScaleFactor scale_factor) { // Only allow the cef pack file to load. if (!pack_loading_disabled_ && allow_pack_file_load_) return pack_path; - return FilePath(); + return base::FilePath(); } -FilePath CefContentClient::GetPathForLocalePack(const FilePath& pack_path, - const std::string& locale) { +base::FilePath CefContentClient::GetPathForLocalePack( + const base::FilePath& pack_path, + const std::string& locale) { if (!pack_loading_disabled_) return pack_path; - return FilePath(); + return base::FilePath(); } gfx::Image CefContentClient::GetImageNamed(int resource_id) { diff --git a/libcef/common/content_client.h b/libcef/common/content_client.h index 998b9afbd..41c50657b 100644 --- a/libcef/common/content_client.h +++ b/libcef/common/content_client.h @@ -47,11 +47,12 @@ class CefContentClient : public content::ContentClient, private: // ui::ResourceBundle::Delegate methods. - virtual FilePath GetPathForResourcePack( - const FilePath& pack_path, + virtual base::FilePath GetPathForResourcePack( + const base::FilePath& pack_path, ui::ScaleFactor scale_factor) OVERRIDE; - virtual FilePath GetPathForLocalePack(const FilePath& pack_path, - const std::string& locale) OVERRIDE; + virtual base::FilePath GetPathForLocalePack( + const base::FilePath& pack_path, + const std::string& locale) OVERRIDE; virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE; virtual gfx::Image GetNativeImageNamed( int resource_id, diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 60c0524ab..4eb81b7ac 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -40,13 +40,13 @@ namespace { #if defined(OS_MACOSX) -FilePath GetFrameworksPath() { +base::FilePath GetFrameworksPath() { // Start out with the path to the running executable. - FilePath execPath; + base::FilePath execPath; PathService::Get(base::FILE_EXE, &execPath); // Get the main bundle path. - FilePath bundlePath = base::mac::GetAppBundlePath(execPath); + base::FilePath bundlePath = base::mac::GetAppBundlePath(execPath); // Go into the Contents/Frameworks directory. return bundlePath.Append(FILE_PATH_LITERAL("Contents")) @@ -54,12 +54,12 @@ FilePath GetFrameworksPath() { } // The framework bundle path is used for loading resources, libraries, etc. -FilePath GetFrameworkBundlePath() { +base::FilePath GetFrameworkBundlePath() { return GetFrameworksPath().Append( FILE_PATH_LITERAL("Chromium Embedded Framework.framework")); } -FilePath GetResourcesFilePath() { +base::FilePath GetResourcesFilePath() { return GetFrameworkBundlePath().Append(FILE_PATH_LITERAL("Resources")); } @@ -69,12 +69,12 @@ void OverrideFrameworkBundlePath() { void OverrideChildProcessPath() { // Retrieve the name of the running executable. - FilePath path; + base::FilePath path; PathService::Get(base::FILE_EXE, &path); std::string name = path.BaseName().value(); - FilePath helper_path = GetFrameworksPath() + base::FilePath helper_path = GetFrameworksPath() .Append(FILE_PATH_LITERAL(name+" Helper.app")) .Append(FILE_PATH_LITERAL("Contents")) .Append(FILE_PATH_LITERAL("MacOS")) @@ -85,8 +85,8 @@ void OverrideChildProcessPath() { #else // !defined(OS_MACOSX) -FilePath GetResourcesFilePath() { - FilePath pak_dir; +base::FilePath GetResourcesFilePath() { + base::FilePath pak_dir; PathService::Get(base::DIR_MODULE, &pak_dir); return pak_dir; } @@ -167,8 +167,8 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { command_line->AppendSwitch(switches::kSingleProcess); if (settings.browser_subprocess_path.length > 0) { - FilePath file_path = - FilePath(CefString(&settings.browser_subprocess_path)); + base::FilePath file_path = + base::FilePath(CefString(&settings.browser_subprocess_path)); if (!file_path.empty()) { command_line->AppendSwitchPath(switches::kBrowserSubprocessPath, file_path); @@ -191,7 +191,7 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { } if (settings.log_file.length > 0) { - FilePath file_path = FilePath(CefString(&settings.log_file)); + base::FilePath file_path = FilePath(CefString(&settings.log_file)); if (!file_path.empty()) command_line->AppendSwitchPath(switches::kLogFile, file_path); } @@ -236,7 +236,8 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { command_line->AppendSwitch(switches::kDisablePackLoading); } else { if (settings.resources_dir_path.length > 0) { - FilePath file_path = FilePath(CefString(&settings.resources_dir_path)); + base::FilePath file_path = + base::FilePath(CefString(&settings.resources_dir_path)); if (!file_path.empty()) { command_line->AppendSwitchPath(switches::kResourcesDirPath, file_path); @@ -244,7 +245,8 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { } if (settings.locales_dir_path.length > 0) { - FilePath file_path = FilePath(CefString(&settings.locales_dir_path)); + base::FilePath file_path = + base::FilePath(CefString(&settings.locales_dir_path)); if (!file_path.empty()) command_line->AppendSwitchPath(switches::kLocalesDirPath, file_path); } @@ -281,7 +283,8 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { } // Initialize logging. - FilePath log_file = command_line->GetSwitchValuePath(switches::kLogFile); + base::FilePath log_file = + command_line->GetSwitchValuePath(switches::kLogFile); std::string log_severity_str = command_line->GetSwitchValueASCII(switches::kLogSeverity); @@ -403,10 +406,10 @@ void CefMainDelegate::ShutdownBrowser() { void CefMainDelegate::InitializeResourceBundle() { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - FilePath cef_pak_file, devtools_pak_file, locales_dir; + base::FilePath cef_pak_file, devtools_pak_file, locales_dir; if (!content_client_.pack_loading_disabled()) { - FilePath resources_dir; + base::FilePath resources_dir; if (command_line.HasSwitch(switches::kResourcesDirPath)) { resources_dir = command_line.GetSwitchValuePath(switches::kResourcesDirPath); diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index 5dcc5856f..d2ad13548 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -17,11 +17,11 @@ #include "net/base/upload_file_element_reader.h" #include "net/http/http_request_headers.h" #include "net/url_request/url_request.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPHeaderVisitor.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" namespace { @@ -703,7 +703,7 @@ void CefPostDataElementImpl::Get(net::UploadElement& element) { if (type_ == PDE_TYPE_BYTES) { element.SetToBytes(static_cast(data_.bytes.bytes), data_.bytes.size); } else if (type_ == PDE_TYPE_FILE) { - FilePath path = FilePath(CefString(&data_.filename)); + base::FilePath path = base::FilePath(CefString(&data_.filename)); element.SetToFilePath(path); } else { NOTREACHED(); @@ -720,7 +720,7 @@ net::UploadElementReader* CefPostDataElementImpl::Get() { return new BytesElementReader(make_scoped_ptr(element)); } else if (type_ == PDE_TYPE_FILE) { net::UploadElement* element = new net::UploadElement(); - FilePath path = FilePath(CefString(&data_.filename)); + base::FilePath path = base::FilePath(CefString(&data_.filename)); element->SetToFilePath(path); return new FileElementReader(make_scoped_ptr(element)); } else { diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index c9ad15295..ec9737cb2 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -7,7 +7,7 @@ #pragma once #include "include/cef_request.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPBody.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPBody.h" namespace net { class HttpRequestHeaders; diff --git a/libcef/common/response_impl.cc b/libcef/common/response_impl.cc index ce22b1dc3..1d57dc437 100644 --- a/libcef/common/response_impl.cc +++ b/libcef/common/response_impl.cc @@ -10,9 +10,9 @@ #include "base/stringprintf.h" #include "net/http/http_request_headers.h" #include "net/http/http_response_headers.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebHTTPHeaderVisitor.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebHTTPHeaderVisitor.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" #define CHECK_READONLY_RETURN_VOID() \ diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index 0e285e62a..caf77f816 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -24,9 +24,9 @@ #include "content/public/renderer/navigation_state.h" #include "content/public/renderer/render_view.h" #include "net/http/http_util.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index f4a82b458..24b64755b 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -38,12 +38,12 @@ MSVC_POP_WARNING(); #include "ipc/ipc_sync_channel.h" #include "media/base/media.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebPrerenderingSupport.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPrerendererClient.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerInfo.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerRunLoop.h" @@ -460,7 +460,7 @@ void CefContentRendererClient::RenderThreadStarted() { // Note that under Linux, the media library will normally already have // been initialized by the Zygote before this instance became a Renderer. - FilePath media_path; + base::FilePath media_path; PathService::Get(base::DIR_MODULE, &media_path); if (!media_path.empty()) media::InitializeMediaLibrary(media_path); diff --git a/libcef/renderer/dom_document_impl.cc b/libcef/renderer/dom_document_impl.cc index a178c5133..01c38bc06 100644 --- a/libcef/renderer/dom_document_impl.cc +++ b/libcef/renderer/dom_document_impl.cc @@ -7,13 +7,13 @@ #include "libcef/renderer/thread_util.h" #include "base/logging.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" using WebKit::WebDocument; using WebKit::WebElement; diff --git a/libcef/renderer/dom_event_impl.cc b/libcef/renderer/dom_event_impl.cc index 3b5349cb1..e6aef90a0 100644 --- a/libcef/renderer/dom_event_impl.cc +++ b/libcef/renderer/dom_event_impl.cc @@ -7,8 +7,8 @@ #include "libcef/renderer/thread_util.h" #include "base/logging.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" using WebKit::WebDOMEvent; using WebKit::WebString; diff --git a/libcef/renderer/dom_node_impl.cc b/libcef/renderer/dom_node_impl.cc index bc3b6b6d7..3fccd09b6 100644 --- a/libcef/renderer/dom_node_impl.cc +++ b/libcef/renderer/dom_node_impl.cc @@ -12,6 +12,7 @@ #include "base/logging.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDOMEventListener.h" @@ -21,7 +22,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" using WebKit::WebDocument; using WebKit::WebDOMEvent; diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index 95cbc5d98..153e79837 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -13,11 +13,11 @@ #include "libcef/renderer/v8_impl.h" #include "libcef/renderer/webkit_glue.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.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/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" #include "webkit/glue/webkit_glue.h" diff --git a/libcef/renderer/render_message_filter.cc b/libcef/renderer/render_message_filter.cc index 5717e4c55..52ddf1748 100644 --- a/libcef/renderer/render_message_filter.cc +++ b/libcef/renderer/render_message_filter.cc @@ -12,8 +12,8 @@ #include "content/common/devtools_messages.h" #include "googleurl/src/gurl.h" #include "googleurl/src/url_util.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" CefRenderMessageFilter::CefRenderMessageFilter() : channel_(NULL) { diff --git a/libcef/renderer/render_process_observer.cc b/libcef/renderer/render_process_observer.cc index 9720caadf..cee9221f7 100644 --- a/libcef/renderer/render_process_observer.cc +++ b/libcef/renderer/render_process_observer.cc @@ -7,9 +7,9 @@ #include "libcef/common/cef_messages.h" #include "libcef/renderer/content_renderer_client.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" CefRenderProcessObserver::CefRenderProcessObserver() { } diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index f20ecd547..8c66cf5ae 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -8,14 +8,14 @@ #include "base/logging.h" #include "base/message_loop.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoader.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRequest.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLResponse.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" using WebKit::WebString; diff --git a/libcef/resources/cef_resources.grd b/libcef/resources/cef_resources.grd index 3afbf6ad2..f93cfefc2 100644 --- a/libcef/resources/cef_resources.grd +++ b/libcef/resources/cef_resources.grd @@ -10,7 +10,7 @@ - + diff --git a/patch/patches/webkit_451.patch b/patch/patches/webkit_451.patch index b9d6867c7..340d3db89 100644 --- a/patch/patches/webkit_451.patch +++ b/patch/patches/webkit_451.patch @@ -61,7 +61,7 @@ Added: svn:eol-style Index: WebCore/bindings/v8/WorkerScriptController.cpp =================================================================== ---- WebCore/bindings/v8/WorkerScriptController.cpp (revision 136040) +--- WebCore/bindings/v8/WorkerScriptController.cpp (revision 142426) +++ WebCore/bindings/v8/WorkerScriptController.cpp (working copy) @@ -50,11 +50,23 @@ @@ -105,7 +105,7 @@ Index: WebCore/bindings/v8/WorkerScriptController.cpp return true; } -@@ -256,6 +272,39 @@ +@@ -257,6 +273,39 @@ return workerContext->script(); } @@ -147,7 +147,7 @@ Index: WebCore/bindings/v8/WorkerScriptController.cpp #endif // ENABLE(WORKERS) Index: WebCore/bindings/v8/WorkerScriptController.h =================================================================== ---- WebCore/bindings/v8/WorkerScriptController.h (revision 136040) +--- WebCore/bindings/v8/WorkerScriptController.h (revision 142426) +++ WebCore/bindings/v8/WorkerScriptController.h (working copy) @@ -40,6 +40,10 @@ #include @@ -180,7 +180,7 @@ Index: WebCore/bindings/v8/WorkerScriptController.h ScopedPersistent m_context; Index: WebKit/chromium/public/WebWorkerInfo.h =================================================================== ---- WebKit/chromium/public/WebWorkerInfo.h (revision 136040) +--- WebKit/chromium/public/WebWorkerInfo.h (revision 142426) +++ WebKit/chromium/public/WebWorkerInfo.h (working copy) @@ -35,9 +35,15 @@ @@ -236,7 +236,7 @@ Added: svn:eol-style Index: WebKit/chromium/src/WebWorkerInfo.cpp =================================================================== ---- WebKit/chromium/src/WebWorkerInfo.cpp (revision 136040) +--- WebKit/chromium/src/WebWorkerInfo.cpp (revision 142426) +++ WebKit/chromium/src/WebWorkerInfo.cpp (working copy) @@ -31,6 +31,7 @@ #include "config.h" diff --git a/tests/cefclient/mac/helper-Info.plist b/tests/cefclient/mac/helper-Info.plist index 9211f861a..ed5abfae9 100644 --- a/tests/cefclient/mac/helper-Info.plist +++ b/tests/cefclient/mac/helper-Info.plist @@ -24,8 +24,6 @@ 10.5.0 LSUIElement 1 - NSPrincipalClass - ClientApplication NSSupportsAutomaticGraphicsSwitching