diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index cbbb002ab..d966558e3 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': '137849', + 'chromium_revision': '139609', } diff --git a/cef.gyp b/cef.gyp index 047868dc6..35f5432d3 100644 --- a/cef.gyp +++ b/cef.gyp @@ -638,13 +638,6 @@ '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak', '<(grit_out_dir)/cef_resources.pak', ], - 'conditions': [ - ['OS != "mac"', { - 'pak_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/ui/native_theme/native_theme_resources.pak', - ] - }], - ], }, 'inputs': [ '<(repack_path)', @@ -669,13 +662,6 @@ '<(SHARED_INTERMEDIATE_DIR)/webkit/grit/webkit_resources.h', '<(grit_out_dir)/grit/cef_resources.h', ], - 'conditions': [ - ['OS != "mac"', { - 'header_inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/ui/native_theme/grit/native_theme_resources.h', - ] - }], - ], }, 'inputs': [ '<(make_pack_header_path)', @@ -707,13 +693,6 @@ '<@(header_inputs)'], }, ], - 'conditions': [ - ['OS != "mac"', { - 'dependencies': [ - '<(DEPTH)/ui/ui.gyp:native_theme_resources', - ], - }], - ], }, { 'target_name': 'libcef_static', @@ -882,6 +861,8 @@ 'libcef/renderer/webkit_glue.h', 'libcef/utility/content_utility_client.cc', 'libcef/utility/content_utility_client.h', + '<(DEPTH)/chrome/browser/net/clear_on_exit_policy.cc', + '<(DEPTH)/chrome/browser/net/clear_on_exit_policy.h', '<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.cc', '<(DEPTH)/chrome/browser/net/sqlite_persistent_cookie_store.h', ], diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 0ceeda87c..87479efe7 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -21,13 +21,13 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "content/browser/renderer_host/render_view_host_impl.h" -#include "content/browser/renderer_host/resource_request_info_impl.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" +#include "content/public/browser/resource_request_info.h" namespace { @@ -183,13 +183,11 @@ CefRefPtr CefBrowserHostImpl::GetBrowserForRequest( int render_process_id = -1; int render_view_id = -1; - const content::ResourceRequestInfoImpl* info = - content::ResourceRequestInfoImpl::ForRequest(request); - if (info) - info->GetAssociatedRenderView(&render_process_id, &render_view_id); - - if (render_process_id == -1 || render_view_id == -1) + if (!content::ResourceRequestInfo::GetRenderViewForRequest(request, + &render_process_id, + &render_view_id)) { return NULL; + } return GetBrowserByRoutingID(render_process_id, render_view_id); } @@ -536,8 +534,8 @@ net::URLRequestContextGetter* CefBrowserHostImpl::GetRequestContext() { CefRefPtr CefBrowserHostImpl::GetFrameForRequest( net::URLRequest* request) { CEF_REQUIRE_IOT(); - const content::ResourceRequestInfoImpl* info = - content::ResourceRequestInfoImpl::ForRequest(request); + const content::ResourceRequestInfo* info = + content::ResourceRequestInfo::ForRequest(request); if (!info) return NULL; return GetOrCreateFrame(info->GetFrameID(), info->GetParentFrameID(), @@ -731,6 +729,13 @@ bool CefBrowserHostImpl::ViewText(const std::string& text) { return PlatformViewText(text); } +bool CefBrowserHostImpl::HasIDMatch(int render_process_id, int render_view_id) { + base::AutoLock lock_scope(state_lock_); + if (render_process_id != render_process_id_) + return false; + return (render_view_id == 0 || render_view_id == render_view_id_); +} + GURL CefBrowserHostImpl::GetLoadingURL() { base::AutoLock lock_scope(state_lock_); return loading_url_; @@ -883,6 +888,12 @@ void CefBrowserHostImpl::UpdatePreferredSize(content::WebContents* source, // content::WebContentsObserver methods. // ----------------------------------------------------------------------------- +void CefBrowserHostImpl::RenderViewCreated( + content::RenderViewHost* render_view_host) { + base::AutoLock lock_scope(state_lock_); + render_process_id_ = render_view_host->GetProcess()->GetID(); +} + void CefBrowserHostImpl::RenderViewReady() { // Send the queued messages. queue_messages_ = false; diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index fe69956b0..5259f61e2 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -170,11 +170,14 @@ class CefBrowserHostImpl : public CefBrowserHost, // Open the specified text in the default text editor. bool ViewText(const std::string& text); + // Returns true if this browser matches the specified ID values. If + // |render_view_id| is 0 any browser with the specified |render_process_id| + // will match. + bool HasIDMatch(int render_process_id, int render_view_id); + // Thread safe accessors. const CefBrowserSettings& settings() const { return settings_; } CefRefPtr client() const { return client_; } - int render_process_id() const { return render_process_id_; } - int render_view_id() const { return render_view_id_; } int unique_id() const { return unique_id_; } // Returns the URL that is currently loading (or loaded) in the main frame. @@ -213,6 +216,8 @@ class CefBrowserHostImpl : public CefBrowserHost, const gfx::Size& pref_size) OVERRIDE; // content::WebContentsObserver methods. + virtual void RenderViewCreated(content::RenderViewHost* render_view_host) + OVERRIDE; virtual void RenderViewReady() OVERRIDE; virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; virtual void DidCommitProvisionalLoadForFrame( @@ -313,7 +318,8 @@ class CefBrowserHostImpl : public CefBrowserHost, // Unique ids used for routing communication to/from the renderer. We keep a // copy of them as member variables so that we can locate matching browsers in - // a thread safe manner. + // a thread safe manner. |render_process_id_| may change and access must be + // protected by |state_lock_|. int render_process_id_; int render_view_id_; diff --git a/libcef/browser/browser_host_impl_win.cc b/libcef/browser/browser_host_impl_win.cc index bfd8f5a88..b968e0965 100644 --- a/libcef/browser/browser_host_impl_win.cc +++ b/libcef/browser/browser_host_impl_win.cc @@ -110,9 +110,7 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message, // Destroy the browser. browser->DestroyBrowser(); - // Release the reference added in PlatformCreateWindow(). There should be - // no other references to the browser. - DCHECK_EQ(browser->GetRefCt(), 1); + // Release the reference added in PlatformCreateWindow(). browser->Release(); } return 0; diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index 56d08beab..867d65d5d 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -25,13 +25,13 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "net/base/net_module.h" -#include "ui/base/clipboard/clipboard.h" #include "ui/base/resource/resource_bundle.h" namespace { base::StringPiece ResourceProvider(int resource_id) { - return content::GetContentClient()->GetDataResource(resource_id); + return content::GetContentClient()->GetDataResource(resource_id, + ui::SCALE_FACTOR_NONE); } } // namespace @@ -92,9 +92,3 @@ void CefBrowserMainParts::PostMainMessageLoopRun() { bool CefBrowserMainParts::MainMessageLoopRun(int* result_code) { return false; } - -ui::Clipboard* CefBrowserMainParts::GetClipboard() { - if (!clipboard_.get()) - clipboard_.reset(new ui::Clipboard()); - return clipboard_.get(); -} diff --git a/libcef/browser/browser_main.h b/libcef/browser/browser_main.h index dad4d7d15..1dbc120a4 100644 --- a/libcef/browser/browser_main.h +++ b/libcef/browser/browser_main.h @@ -15,10 +15,6 @@ namespace base { class Thread; } -namespace ui { -class Clipboard; -} - namespace content { struct MainFunctionParams; } @@ -43,7 +39,6 @@ class CefBrowserMainParts : public content::BrowserMainParts { virtual void PostMainMessageLoopRun() OVERRIDE; virtual void PostDestroyThreads() OVERRIDE {} - ui::Clipboard* GetClipboard(); CefBrowserContext* browser_context() const { return browser_context_.get(); } CefDevToolsDelegate* devtools_delegate() const { return devtools_delegate_; } @@ -54,7 +49,6 @@ class CefBrowserMainParts : public content::BrowserMainParts { scoped_ptr browser_context_; scoped_ptr message_loop_; - scoped_ptr clipboard_; CefDevToolsDelegate* devtools_delegate_; DISALLOW_COPY_AND_ASSIGN(CefBrowserMainParts); diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index 025e1403f..91f5720b7 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -85,76 +85,11 @@ content::BrowserMainParts* CefContentBrowserClient::CreateBrowserMainParts( return browser_main_parts_; } -content::WebContentsView* - CefContentBrowserClient::OverrideCreateWebContentsView( - content::WebContents* web_contents) { - return NULL; -} - -content::WebContentsViewDelegate* - CefContentBrowserClient::GetWebContentsViewDelegate( - content::WebContents* web_contents) { - return NULL; -} - -void CefContentBrowserClient::RenderViewHostCreated( - content::RenderViewHost* render_view_host) { -} - void CefContentBrowserClient::RenderProcessHostCreated( content::RenderProcessHost* host) { host->GetChannel()->AddFilter(new CefBrowserMessageFilter(host)); } -content::WebUIControllerFactory* -CefContentBrowserClient::GetWebUIControllerFactory() { - return NULL; -} - -GURL CefContentBrowserClient::GetEffectiveURL( - content::BrowserContext* browser_context, const GURL& url) { - return GURL(); -} - -bool CefContentBrowserClient::ShouldUseProcessPerSite( - content::BrowserContext* browser_context, const GURL& effective_url) { - return false; -} - -bool CefContentBrowserClient::IsHandledURL(const GURL& url) { - return false; -} - -bool CefContentBrowserClient::IsSuitableHost( - content::RenderProcessHost* process_host, - const GURL& site_url) { - return true; -} - -bool CefContentBrowserClient::ShouldTryToUseExistingProcessHost( - content::BrowserContext* browser_context, const GURL& url) { - return false; -} - -void CefContentBrowserClient::SiteInstanceGotProcess( - content::SiteInstance* site_instance) { -} - -void CefContentBrowserClient::SiteInstanceDeleting( - content::SiteInstance* site_instance) { -} - -bool CefContentBrowserClient::ShouldSwapProcessesForNavigation( - const GURL& current_url, - const GURL& new_url) { - return false; -} - -std::string CefContentBrowserClient::GetCanonicalEncodingNameByAliasName( - const std::string& alias_name) { - return std::string(); -} - void CefContentBrowserClient::AppendExtraCommandLineSwitches( CommandLine* command_line, int child_process_id) { std::string process_type = @@ -175,127 +110,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( } } -std::string CefContentBrowserClient::GetApplicationLocale() { - return std::string(); -} - -std::string CefContentBrowserClient::GetAcceptLangs( - content::BrowserContext* context) { - return std::string(); -} - -SkBitmap* CefContentBrowserClient::GetDefaultFavicon() { - static SkBitmap empty; - return ∅ -} - -bool CefContentBrowserClient::AllowAppCache( - const GURL& manifest_url, - const GURL& first_party, - content::ResourceContext* context) { - return true; -} - -bool CefContentBrowserClient::AllowGetCookie( - const GURL& url, - const GURL& first_party, - const net::CookieList& cookie_list, - content::ResourceContext* context, - int render_process_id, - int render_view_id) { - return true; -} - -bool CefContentBrowserClient::AllowSetCookie( - const GURL& url, - const GURL& first_party, - const std::string& cookie_line, - content::ResourceContext* context, - int render_process_id, - int render_view_id, - net::CookieOptions* options) { - return true; -} - -bool CefContentBrowserClient::AllowSaveLocalState( - content::ResourceContext* context) { - return true; -} - -bool CefContentBrowserClient::AllowWorkerDatabase( - const GURL& url, - const string16& name, - const string16& display_name, - unsigned long estimated_size, // NOLINT(runtime/int) - content::ResourceContext* context, - const std::vector >& render_views) { - return true; -} - -bool CefContentBrowserClient::AllowWorkerFileSystem( - const GURL& url, - content::ResourceContext* context, - const std::vector >& render_views) { - return true; -} - -bool CefContentBrowserClient::AllowWorkerIndexedDB( - const GURL& url, - const string16& name, - content::ResourceContext* context, - const std::vector >& render_views) { - return true; -} - -content::QuotaPermissionContext* - CefContentBrowserClient::CreateQuotaPermissionContext() { - return NULL; -} - -net::URLRequestContext* CefContentBrowserClient::OverrideRequestContextForURL( - const GURL& url, content::ResourceContext* context) { - return NULL; -} - -void CefContentBrowserClient::OpenItem(const FilePath& path) { -} - -void CefContentBrowserClient::ShowItemInFolder(const FilePath& path) { -} - -void CefContentBrowserClient::AllowCertificateError( - int render_process_id, - int render_view_id, - int cert_error, - const net::SSLInfo& ssl_info, - const GURL& request_url, - bool overridable, - bool strict_enforcement, - const base::Callback& callback, - bool* cancel_request) { -} - -void CefContentBrowserClient::SelectClientCertificate( - int render_process_id, - int render_view_id, - const net::HttpNetworkSession* network_session, - net::SSLCertRequestInfo* cert_request_info, - const base::Callback& callback) { -} - -void CefContentBrowserClient::AddNewCertificate( - net::URLRequest* request, - net::X509Certificate* cert, - int render_process_id, - int render_view_id) { -} - -bool CefContentBrowserClient::AllowSocketAPI( - content::BrowserContext* browser_context, - const GURL& url) { - return false; -} - void CefContentBrowserClient::RequestMediaAccessPermission( const content::MediaStreamRequest* request, const content::MediaResponseCallback& callback) { @@ -319,74 +133,10 @@ content::MediaObserver* CefContentBrowserClient::GetMediaObserver() { return media_observer_.get(); } -void CefContentBrowserClient::RequestDesktopNotificationPermission( - const GURL& source_origin, - int callback_context, - int render_process_id, - int render_view_id) { -} - -WebKit::WebNotificationPresenter::Permission - CefContentBrowserClient::CheckDesktopNotificationPermission( - const GURL& source_origin, - content::ResourceContext* context, - int render_process_id) { - return WebKit::WebNotificationPresenter::PermissionAllowed; -} - -void CefContentBrowserClient::ShowDesktopNotification( - const content::ShowDesktopNotificationHostMsgParams& params, - int render_process_id, - int render_view_id, - bool worker) { -} - -void CefContentBrowserClient::CancelDesktopNotification( - int render_process_id, - int render_view_id, - int notification_id) { -} - -bool CefContentBrowserClient::CanCreateWindow( - const GURL& opener_url, - const GURL& origin, - WindowContainerType container_type, - content::ResourceContext* context, - int render_process_id, - bool* no_javascript_access) { - *no_javascript_access = false; - return true; -} - -std::string CefContentBrowserClient::GetWorkerProcessTitle( - const GURL& url, content::ResourceContext* context) { - return std::string(); -} - -void CefContentBrowserClient::ResourceDispatcherHostCreated() { -} - -content::SpeechRecognitionManagerDelegate* - CefContentBrowserClient::GetSpeechRecognitionManagerDelegate() { - return NULL; -} - -ui::Clipboard* CefContentBrowserClient::GetClipboard() { - return browser_main_parts_->GetClipboard(); -} - -net::NetLog* CefContentBrowserClient::GetNetLog() { - return NULL; -} - content::AccessTokenStore* CefContentBrowserClient::CreateAccessTokenStore() { return new CefAccessTokenStore; } -bool CefContentBrowserClient::IsFastShutdownPossible() { - return true; -} - void CefContentBrowserClient::OverrideWebkitPrefs( content::RenderViewHost* rvh, const GURL& url, @@ -399,50 +149,6 @@ void CefContentBrowserClient::OverrideWebkitPrefs( BrowserToWebSettings(browser->settings(), *prefs); } -void CefContentBrowserClient::UpdateInspectorSetting( - content::RenderViewHost* rvh, - const std::string& key, - const std::string& value) { -} - -void CefContentBrowserClient::ClearInspectorSettings( - content::RenderViewHost* rvh) { -} - -void CefContentBrowserClient::BrowserURLHandlerCreated( - content::BrowserURLHandler* handler) { -} - -void CefContentBrowserClient::ClearCache(content::RenderViewHost* rvh) { -} - -void CefContentBrowserClient::ClearCookies(content::RenderViewHost* rvh) { -} - -FilePath CefContentBrowserClient::GetDefaultDownloadDirectory() { - return FilePath(); -} - std::string CefContentBrowserClient::GetDefaultDownloadName() { return "download"; } - -#if defined(OS_POSIX) && !defined(OS_MACOSX) -int CefContentBrowserClient::GetCrashSignalFD( - const CommandLine& command_line) { - return -1; -} -#endif - -#if defined(OS_WIN) -const wchar_t* CefContentBrowserClient::GetResourceDllName() { - return NULL; -} -#endif - -#if defined(USE_NSS) -crypto::CryptoModuleBlockingPasswordDelegate* - CefContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { - return NULL; -} -#endif diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 4774baff3..294f99b34 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -32,168 +32,19 @@ class CefContentBrowserClient : public content::ContentBrowserClient { virtual content::BrowserMainParts* CreateBrowserMainParts( const content::MainFunctionParams& parameters) OVERRIDE; - virtual content::WebContentsView* OverrideCreateWebContentsView( - content::WebContents* web_contents) OVERRIDE; - virtual content::WebContentsViewDelegate* GetWebContentsViewDelegate( - content::WebContents* web_contents) OVERRIDE; - virtual void RenderViewHostCreated( - content::RenderViewHost* render_view_host) OVERRIDE; virtual void RenderProcessHostCreated( content::RenderProcessHost* host) OVERRIDE; - virtual content::WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE; - virtual GURL GetEffectiveURL(content::BrowserContext* browser_context, - const GURL& url) OVERRIDE; - virtual bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, - const GURL& effective_url) OVERRIDE; - virtual bool IsHandledURL(const GURL& url) OVERRIDE; - virtual bool IsSuitableHost(content::RenderProcessHost* process_host, - const GURL& site_url) OVERRIDE; - virtual bool ShouldTryToUseExistingProcessHost( - content::BrowserContext* browser_context, const GURL& url) OVERRIDE; - virtual void SiteInstanceGotProcess( - content::SiteInstance* site_instance) OVERRIDE; - virtual void SiteInstanceDeleting( - content::SiteInstance* site_instance) OVERRIDE; - virtual bool ShouldSwapProcessesForNavigation(const GURL& current_url, - const GURL& new_url) OVERRIDE; - - virtual std::string GetCanonicalEncodingNameByAliasName( - const std::string& alias_name) OVERRIDE; virtual void AppendExtraCommandLineSwitches(CommandLine* command_line, int child_process_id) OVERRIDE; - virtual std::string GetApplicationLocale() OVERRIDE; - virtual std::string GetAcceptLangs( - content::BrowserContext* context) OVERRIDE; - virtual SkBitmap* GetDefaultFavicon() OVERRIDE; - virtual bool AllowAppCache(const GURL& manifest_url, - const GURL& first_party, - content::ResourceContext* context) OVERRIDE; - virtual bool AllowGetCookie(const GURL& url, - const GURL& first_party, - const net::CookieList& cookie_list, - content::ResourceContext* context, - int render_process_id, - int render_view_id) OVERRIDE; - virtual bool AllowSetCookie(const GURL& url, - const GURL& first_party, - const std::string& cookie_line, - content::ResourceContext* context, - int render_process_id, - int render_view_id, - net::CookieOptions* options) OVERRIDE; - virtual bool AllowSaveLocalState( - content::ResourceContext* context) OVERRIDE; - virtual bool AllowWorkerDatabase( - const GURL& url, - const string16& name, - const string16& display_name, - unsigned long estimated_size, // NOLINT(runtime/int) - content::ResourceContext* context, - const std::vector >& render_views) OVERRIDE; - virtual bool AllowWorkerFileSystem( - const GURL& url, - content::ResourceContext* context, - const std::vector >& render_views) OVERRIDE; - virtual bool AllowWorkerIndexedDB( - const GURL& url, - const string16& name, - content::ResourceContext* context, - const std::vector >& render_views) OVERRIDE; - virtual net::URLRequestContext* OverrideRequestContextForURL( - const GURL& url, content::ResourceContext* context) OVERRIDE; - virtual content::QuotaPermissionContext* CreateQuotaPermissionContext() - OVERRIDE; - virtual void OpenItem(const FilePath& path) OVERRIDE; - virtual void ShowItemInFolder(const FilePath& path) OVERRIDE; - virtual void AllowCertificateError( - int render_process_id, - int render_view_id, - int cert_error, - const net::SSLInfo& ssl_info, - const GURL& request_url, - bool overridable, - bool strict_enforcement, - const base::Callback& callback, - bool* cancel_request) OVERRIDE; - virtual void SelectClientCertificate( - int render_process_id, - int render_view_id, - const net::HttpNetworkSession* network_session, - net::SSLCertRequestInfo* cert_request_info, - const base::Callback& callback) OVERRIDE; - virtual void AddNewCertificate( - net::URLRequest* request, - net::X509Certificate* cert, - int render_process_id, - int render_view_id) OVERRIDE; virtual void RequestMediaAccessPermission( const content::MediaStreamRequest* request, const content::MediaResponseCallback& callback) OVERRIDE; virtual content::MediaObserver* GetMediaObserver() OVERRIDE; - virtual void RequestDesktopNotificationPermission( - const GURL& source_origin, - int callback_context, - int render_process_id, - int render_view_id) OVERRIDE; - virtual WebKit::WebNotificationPresenter::Permission - CheckDesktopNotificationPermission( - const GURL& origin, - content::ResourceContext* context, - int render_process_id) OVERRIDE; - virtual void ShowDesktopNotification( - const content::ShowDesktopNotificationHostMsgParams& params, - int render_process_id, - int render_view_id, - bool worker) OVERRIDE; - virtual void CancelDesktopNotification( - int render_process_id, - int render_view_id, - int notification_id) OVERRIDE; - virtual bool CanCreateWindow( - const GURL& opener_url, - const GURL& origin, - WindowContainerType container_type, - content::ResourceContext* context, - int render_process_id, - bool* no_javascript_access) OVERRIDE; - virtual std::string GetWorkerProcessTitle( - const GURL& url, content::ResourceContext* context) OVERRIDE; - virtual content::SpeechRecognitionManagerDelegate* - GetSpeechRecognitionManagerDelegate() OVERRIDE; - virtual void ResourceDispatcherHostCreated() OVERRIDE; - virtual ui::Clipboard* GetClipboard() OVERRIDE; - virtual net::NetLog* GetNetLog() OVERRIDE; virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE; - virtual bool IsFastShutdownPossible() OVERRIDE; virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, const GURL& url, webkit_glue::WebPreferences* prefs) OVERRIDE; - virtual void UpdateInspectorSetting(content::RenderViewHost* rvh, - const std::string& key, - const std::string& value) OVERRIDE; - virtual void ClearInspectorSettings(content::RenderViewHost* rvh) OVERRIDE; - virtual void BrowserURLHandlerCreated(content::BrowserURLHandler* handler) - OVERRIDE; - virtual void ClearCache(content::RenderViewHost* rvh) OVERRIDE; - virtual void ClearCookies(content::RenderViewHost* rvh) OVERRIDE; - virtual FilePath GetDefaultDownloadDirectory() OVERRIDE; virtual std::string GetDefaultDownloadName() OVERRIDE; - virtual bool AllowSocketAPI(content::BrowserContext* browser_context, - const GURL& url) OVERRIDE; - -#if defined(OS_POSIX) && !defined(OS_MACOSX) - virtual int GetCrashSignalFD(const CommandLine& command_line) OVERRIDE; -#endif - -#if defined(OS_WIN) - virtual const wchar_t* GetResourceDllName() OVERRIDE; -#endif - -#if defined(USE_NSS) - virtual - crypto::CryptoModuleBlockingPasswordDelegate* GetCryptoPasswordDelegate( - const GURL& url) OVERRIDE; -#endif private: CefBrowserMainParts* browser_main_parts_; diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index f4759bb59..dfba49c46 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -322,11 +322,8 @@ CefRefPtr CefContext::GetBrowserByRoutingID( BrowserList::const_iterator it = browserlist_.begin(); for (; it != browserlist_.end(); ++it) { - if (it->get()->render_process_id() == render_process_id && - (render_view_id == 0 || - it->get()->render_view_id() == render_view_id)) { + if (it->get()->HasIDMatch(render_process_id, render_view_id)) return it->get(); - } } return NULL; diff --git a/libcef/browser/cookie_manager_impl.cc b/libcef/browser/cookie_manager_impl.cc index 171fd29e2..037457ba4 100644 --- a/libcef/browser/cookie_manager_impl.cc +++ b/libcef/browser/cookie_manager_impl.cc @@ -233,7 +233,8 @@ bool CefCookieManagerImpl::SetStoragePath(const CefString& path) { base::ThreadRestrictions::ScopedAllowIO allow_io; if (file_util::CreateDirectory(new_path)) { const FilePath& cookie_path = new_path.AppendASCII("Cookies"); - persistent_store = new SQLitePersistentCookieStore(cookie_path, false); + persistent_store = + new SQLitePersistentCookieStore(cookie_path, false, NULL); } else { NOTREACHED() << "The cookie storage directory could not be created"; storage_path_.clear(); diff --git a/libcef/browser/devtools_delegate.cc b/libcef/browser/devtools_delegate.cc index 92373af54..86a7dd6f1 100644 --- a/libcef/browser/devtools_delegate.cc +++ b/libcef/browser/devtools_delegate.cc @@ -20,7 +20,9 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "grit/cef_resources.h" +#include "net/base/tcp_listen_socket.h" #include "net/url_request/url_request_context_getter.h" +#include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" namespace { @@ -95,8 +97,7 @@ CefDevToolsDelegate::CefDevToolsDelegate( int port, net::URLRequestContextGetter* context_getter) { devtools_http_handler_ = content::DevToolsHttpHandler::Start( - "127.0.0.1", - port, + new net::TCPListenSocketFactory("127.0.0.1", port), "", context_getter, this); @@ -115,7 +116,7 @@ void CefDevToolsDelegate::Stop() { std::string CefDevToolsDelegate::GetDiscoveryPageHTML() { return content::GetContentClient()->GetDataResource( - IDR_CEF_DEVTOOLS_DISCOVERY_PAGE).as_string(); + IDR_CEF_DEVTOOLS_DISCOVERY_PAGE, ui::SCALE_FACTOR_NONE).as_string(); } bool CefDevToolsDelegate::BundlesFrontendResources() { diff --git a/libcef/browser/devtools_scheme_handler.cc b/libcef/browser/devtools_scheme_handler.cc index ec6d25e3b..26ae1323b 100644 --- a/libcef/browser/devtools_scheme_handler.cc +++ b/libcef/browser/devtools_scheme_handler.cc @@ -120,7 +120,7 @@ class DevToolsSchemeHandlerFactory : public CefSchemeHandlerFactory { if (base::strcasecmp(kDevtoolsResources[i].name, path) == 0) { base::StringPiece piece = content::GetContentClient()->GetDataResource( - kDevtoolsResources[i].value); + kDevtoolsResources[i].value, ui::SCALE_FACTOR_NONE); if (!piece.empty()) { size = piece.size(); return CefStreamReader::CreateForData(const_cast(piece.data()), diff --git a/libcef/browser/javascript_dialog.h b/libcef/browser/javascript_dialog.h index 14a598689..5a3f5a885 100644 --- a/libcef/browser/javascript_dialog.h +++ b/libcef/browser/javascript_dialog.h @@ -23,7 +23,7 @@ class CefJavaScriptDialog { public: CefJavaScriptDialog( CefJavaScriptDialogCreator* creator, - ui::JavascriptMessageType javascript_message_type, + content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, @@ -43,7 +43,7 @@ class CefJavaScriptDialog { #if defined(OS_MACOSX) CefJavaScriptDialogHelper* helper_; // owned #elif defined(OS_WIN) - ui::JavascriptMessageType message_type_; + content::JavaScriptMessageType message_type_; HWND dialog_win_; HWND parent_win_; string16 message_text_; diff --git a/libcef/browser/javascript_dialog_creator.cc b/libcef/browser/javascript_dialog_creator.cc index 5fd0e7693..91ebb3b95 100644 --- a/libcef/browser/javascript_dialog_creator.cc +++ b/libcef/browser/javascript_dialog_creator.cc @@ -78,7 +78,7 @@ void CefJavaScriptDialogCreator::RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, const std::string& accept_lang, - ui::JavascriptMessageType javascript_message_type, + content::JavaScriptMessageType message_type, const string16& message_text, const string16& default_prompt_text, const DialogClosedCallback& callback, @@ -95,7 +95,7 @@ void CefJavaScriptDialogCreator::RunJavaScriptDialog( // Execute the user callback. bool handled = handler->OnJSDialog(browser_, origin_url.spec(), accept_lang, - static_cast(javascript_message_type), + static_cast(message_type), message_text, default_prompt_text, callbackPtr.get(), *did_suppress_message); if (handled) @@ -119,7 +119,7 @@ void CefJavaScriptDialogCreator::RunJavaScriptDialog( string16 display_url = net::FormatUrl(origin_url, accept_lang); dialog_.reset(new CefJavaScriptDialog(this, - javascript_message_type, + message_type, display_url, message_text, default_prompt_text, @@ -165,7 +165,7 @@ void CefJavaScriptDialogCreator::RunBeforeUnloadDialog( ASCIIToUTF16("\n\nIs it OK to leave/reload this page?"); dialog_.reset(new CefJavaScriptDialog(this, - ui::JAVASCRIPT_MESSAGE_TYPE_CONFIRM, + content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM, string16(), // display_url new_message_text, string16(), // default_prompt_text diff --git a/libcef/browser/javascript_dialog_creator.h b/libcef/browser/javascript_dialog_creator.h index 26ef2d427..37a05b5e0 100644 --- a/libcef/browser/javascript_dialog_creator.h +++ b/libcef/browser/javascript_dialog_creator.h @@ -26,7 +26,7 @@ class CefJavaScriptDialogCreator : public content::JavaScriptDialogCreator { content::WebContents* web_contents, const GURL& origin_url, const std::string& accept_lang, - ui::JavascriptMessageType javascript_message_type, + content::JavaScriptMessageType message_type, const string16& message_text, const string16& default_prompt_text, const DialogClosedCallback& callback, diff --git a/libcef/browser/javascript_dialog_mac.mm b/libcef/browser/javascript_dialog_mac.mm index bc31981a8..fc15339ec 100644 --- a/libcef/browser/javascript_dialog_mac.mm +++ b/libcef/browser/javascript_dialog_mac.mm @@ -88,7 +88,7 @@ CefJavaScriptDialog::CefJavaScriptDialog( CefJavaScriptDialogCreator* creator, - ui::JavascriptMessageType javascript_message_type, + content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, @@ -96,9 +96,9 @@ CefJavaScriptDialog::CefJavaScriptDialog( : creator_(creator), callback_(callback) { bool text_field = - javascript_message_type == ui::JAVASCRIPT_MESSAGE_TYPE_PROMPT; + message_type == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT; bool one_button = - javascript_message_type == ui::JAVASCRIPT_MESSAGE_TYPE_ALERT; + message_type == content::JAVASCRIPT_MESSAGE_TYPE_ALERT; helper_ = [[CefJavaScriptDialogHelper alloc] initHelperWithCreator:creator @@ -115,14 +115,14 @@ CefJavaScriptDialog::CefJavaScriptDialog( [alert setInformativeText:base::SysUTF16ToNSString(message_text)]; string16 label; - switch (javascript_message_type) { - case ui::JAVASCRIPT_MESSAGE_TYPE_ALERT: + switch (message_type) { + case content::JAVASCRIPT_MESSAGE_TYPE_ALERT: label = ASCIIToUTF16("JavaScript Alert"); break; - case ui::JAVASCRIPT_MESSAGE_TYPE_PROMPT: + case content::JAVASCRIPT_MESSAGE_TYPE_PROMPT: label = ASCIIToUTF16("JavaScript Prompt"); break; - case ui::JAVASCRIPT_MESSAGE_TYPE_CONFIRM: + case content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM: label = ASCIIToUTF16("JavaScript Confirm"); break; } diff --git a/libcef/browser/javascript_dialog_win.cc b/libcef/browser/javascript_dialog_win.cc index d24422203..14f5eabbe 100644 --- a/libcef/browser/javascript_dialog_win.cc +++ b/libcef/browser/javascript_dialog_win.cc @@ -18,7 +18,8 @@ class CefJavaScriptDialog; HHOOK CefJavaScriptDialog::msg_hook_ = NULL; int CefJavaScriptDialog::msg_hook_user_count_ = 0; -INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog, UINT message, +INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog, + UINT message, WPARAM wparam, LPARAM lparam) { switch (message) { @@ -28,7 +29,7 @@ INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog, UINT message, reinterpret_cast(lparam); owner->dialog_win_ = dialog; SetDlgItemText(dialog, IDC_DIALOGTEXT, owner->message_text_.c_str()); - if (owner->message_type_ == ui::JAVASCRIPT_MESSAGE_TYPE_PROMPT) + if (owner->message_type_ == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) SetDlgItemText(dialog, IDC_PROMPTEDIT, owner->default_prompt_text_.c_str()); break; @@ -57,7 +58,7 @@ INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog, UINT message, case IDOK: finish = true; result = true; - if (owner->message_type_ == ui::JAVASCRIPT_MESSAGE_TYPE_PROMPT) { + if (owner->message_type_ == content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) { size_t length = GetWindowTextLength(GetDlgItem(dialog, IDC_PROMPTEDIT)) + 1; GetDlgItemText(dialog, IDC_PROMPTEDIT, @@ -84,7 +85,7 @@ INT_PTR CALLBACK CefJavaScriptDialog::DialogProc(HWND dialog, UINT message, CefJavaScriptDialog::CefJavaScriptDialog( CefJavaScriptDialogCreator* creator, - ui::JavascriptMessageType javascript_message_type, + content::JavaScriptMessageType message_type, const string16& display_url, const string16& message_text, const string16& default_prompt_text, @@ -93,13 +94,13 @@ CefJavaScriptDialog::CefJavaScriptDialog( callback_(callback), message_text_(message_text), default_prompt_text_(default_prompt_text), - message_type_(javascript_message_type) { + message_type_(message_type) { InstallMessageHook(); int dialog_type; - if (javascript_message_type == ui::JAVASCRIPT_MESSAGE_TYPE_ALERT) + if (message_type == content::JAVASCRIPT_MESSAGE_TYPE_ALERT) dialog_type = IDD_ALERT; - else if (javascript_message_type == ui::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) + else if (message_type == content::JAVASCRIPT_MESSAGE_TYPE_CONFIRM) dialog_type = IDD_CONFIRM; else // JAVASCRIPT_MESSAGE_TYPE_PROMPT dialog_type = IDD_PROMPT; diff --git a/libcef/browser/menu_model_impl.cc b/libcef/browser/menu_model_impl.cc index 1488d09ec..10065197a 100644 --- a/libcef/browser/menu_model_impl.cc +++ b/libcef/browser/menu_model_impl.cc @@ -76,8 +76,16 @@ class CefSimpleMenuModel : public ui::MenuModel { bool alt_pressed = false; if (impl_->GetAcceleratorAt(index, key_code, shift_pressed, ctrl_pressed, alt_pressed)) { + int modifiers = 0; + if (shift_pressed) + modifiers |= ui::EF_SHIFT_DOWN; + if (ctrl_pressed) + modifiers |= ui::EF_CONTROL_DOWN; + if (alt_pressed) + modifiers |= ui::EF_ALT_DOWN; + *accelerator = ui::Accelerator(static_cast(key_code), - shift_pressed, ctrl_pressed, alt_pressed); + modifiers); return true; } return false; @@ -91,7 +99,7 @@ class CefSimpleMenuModel : public ui::MenuModel { return impl_->GetGroupIdAt(index); } - virtual bool GetIconAt(int index, SkBitmap* icon) OVERRIDE { + virtual bool GetIconAt(int index, gfx::ImageSkia* icon) OVERRIDE { return false; } diff --git a/libcef/browser/url_request_context_getter.cc b/libcef/browser/url_request_context_getter.cc index b57b3b96f..af9c20a75 100644 --- a/libcef/browser/url_request_context_getter.cc +++ b/libcef/browser/url_request_context_getter.cc @@ -302,7 +302,8 @@ void CefURLRequestContextGetter::SetCookieStoragePath(const FilePath& path) { base::ThreadRestrictions::ScopedAllowIO allow_io; if (file_util::CreateDirectory(path)) { const FilePath& cookie_path = path.AppendASCII("Cookies"); - persistent_store = new SQLitePersistentCookieStore(cookie_path, false); + persistent_store = + new SQLitePersistentCookieStore(cookie_path, false, NULL); } else { NOTREACHED() << "The cookie storage directory could not be created"; } @@ -321,5 +322,6 @@ void CefURLRequestContextGetter::CreateProxyConfigService() { return; proxy_config_service_.reset( - net::ProxyService::CreateSystemProxyConfigService(io_loop_, file_loop_)); + net::ProxyService::CreateSystemProxyConfigService( + io_loop_->message_loop_proxy(), file_loop_)); } diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index 5b528e984..f908d68ee 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -102,20 +102,18 @@ string16 CefContentClient::GetLocalizedString(int message_id) const { return value; } -base::StringPiece CefContentClient::GetDataResource(int resource_id) const { +base::StringPiece CefContentClient::GetDataResource( + int resource_id, + ui::ScaleFactor scale_factor) const { base::StringPiece value = - ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); + ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id, + scale_factor); if (value.empty()) LOG(ERROR) << "No data resource available for id " << resource_id; return value; } -base::StringPiece CefContentClient::GetImageResource(int resource_id, - float scale_factor) const { - return GetDataResource(resource_id); -} - #if defined(OS_WIN) bool CefContentClient::SandboxPlugin(CommandLine* command_line, sandbox::TargetPolicy* policy) { @@ -131,8 +129,9 @@ bool CefContentClient::GetSandboxProfileForSandboxType( } #endif -FilePath CefContentClient::GetPathForResourcePack(const FilePath& pack_path, - float scale_factor) { +FilePath CefContentClient::GetPathForResourcePack( + const 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; @@ -157,11 +156,13 @@ gfx::Image CefContentClient::GetNativeImageNamed( } base::RefCountedStaticMemory* CefContentClient::LoadDataResourceBytes( - int resource_id) { + int resource_id, + ui::ScaleFactor scale_factor) { return NULL; } bool CefContentClient::GetRawDataResource(int resource_id, + ui::ScaleFactor scale_factor, base::StringPiece* value) { if (application_.get()) { CefRefPtr handler = diff --git a/libcef/common/content_client.h b/libcef/common/content_client.h index 2dbc90895..ffebe84cf 100644 --- a/libcef/common/content_client.h +++ b/libcef/common/content_client.h @@ -38,9 +38,9 @@ class CefContentClient : public content::ContentClient, virtual bool CanHandleWhileSwappedOut(const IPC::Message& msg) OVERRIDE; virtual std::string GetUserAgent() const OVERRIDE; virtual string16 GetLocalizedString(int message_id) const OVERRIDE; - virtual base::StringPiece GetDataResource(int resource_id) const OVERRIDE; - virtual base::StringPiece GetImageResource(int resource_id, - float scale_factor) const OVERRIDE; + virtual base::StringPiece GetDataResource( + int resource_id, + ui::ScaleFactor scale_factor) const OVERRIDE; #if defined(OS_WIN) virtual bool SandboxPlugin(CommandLine* command_line, @@ -61,8 +61,9 @@ class CefContentClient : public content::ContentClient, private: // ui::ResourceBundle::Delegate methods. - virtual FilePath GetPathForResourcePack(const FilePath& pack_path, - float scale_factor) OVERRIDE; + virtual FilePath GetPathForResourcePack( + const FilePath& pack_path, + ui::ScaleFactor scale_factor) OVERRIDE; virtual FilePath GetPathForLocalePack(const FilePath& pack_path, const std::string& locale) OVERRIDE; virtual gfx::Image GetImageNamed(int resource_id) OVERRIDE; @@ -70,8 +71,10 @@ class CefContentClient : public content::ContentClient, int resource_id, ui::ResourceBundle::ImageRTL rtl) OVERRIDE; virtual base::RefCountedStaticMemory* LoadDataResourceBytes( - int resource_id) OVERRIDE; + int resource_id, + ui::ScaleFactor scale_factor) OVERRIDE; virtual bool GetRawDataResource(int resource_id, + ui::ScaleFactor scale_factor, base::StringPiece* value) OVERRIDE; virtual bool GetLocalizedString(int message_id, string16* value) OVERRIDE; virtual scoped_ptr GetFont( diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index ea4eb9b42..ab2aec0dc 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -23,7 +23,6 @@ #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "ui/base/resource/resource_bundle.h" -#include "ui/base/resource/resource_handle.h" #include "ui/base/ui_base_paths.h" #if defined(OS_WIN) @@ -243,9 +242,6 @@ void CefMainDelegate::PreSandboxStartup() { InitializeResourceBundle(); } -void CefMainDelegate::SandboxInitialized(const std::string& process_type) { -} - int CefMainDelegate::RunProcess( const std::string& process_type, const content::MainFunctionParams& main_function_params) { @@ -283,33 +279,14 @@ void CefMainDelegate::ProcessExiting(const std::string& process_type) { ResourceBundle::CleanupSharedInstance(); } -#if defined(OS_MACOSX) -bool CefMainDelegate::ProcessRegistersWithSystemProcess( - const std::string& process_type) { - return false; -} - -bool CefMainDelegate::ShouldSendMachPort(const std::string& process_type) { - return false; -} - -bool CefMainDelegate::DelaySandboxInitialization( - const std::string& process_type) { - return false; -} - -#elif defined(OS_POSIX) -content::ZygoteForkDelegate* CefMainDelegate::ZygoteStarting() { - return NULL; -} - +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) void CefMainDelegate::ZygoteForked() { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); InitializeContentClient(process_type); } -#endif // OS_MACOSX +#endif void CefMainDelegate::ShutdownBrowser() { if (browser_runner_.get()) { @@ -379,7 +356,7 @@ void CefMainDelegate::InitializeResourceBundle() { if (file_util::PathExists(pak_file)) { content_client_.set_allow_pack_file_load(true); ResourceBundle::GetSharedInstance().AddDataPack( - pak_file, ui::ResourceHandle::kScaleFactor100x); + pak_file, ui::SCALE_FACTOR_NONE); content_client_.set_allow_pack_file_load(false); } else { NOTREACHED() << "Could not load cef.pak"; diff --git a/libcef/common/main_delegate.h b/libcef/common/main_delegate.h index bf381817b..e859b5ad2 100644 --- a/libcef/common/main_delegate.h +++ b/libcef/common/main_delegate.h @@ -36,21 +36,13 @@ class CefMainDelegate : public content::ContentMainDelegate { virtual bool BasicStartupComplete(int* exit_code) OVERRIDE; virtual void PreSandboxStartup() OVERRIDE; - virtual void SandboxInitialized(const std::string& process_type) OVERRIDE; virtual int RunProcess( const std::string& process_type, const content::MainFunctionParams& main_function_params) OVERRIDE; virtual void ProcessExiting(const std::string& process_type) OVERRIDE; -#if defined(OS_MACOSX) - virtual bool ProcessRegistersWithSystemProcess( - const std::string& process_type) OVERRIDE; - virtual bool ShouldSendMachPort(const std::string& process_type) OVERRIDE; - virtual bool DelaySandboxInitialization( - const std::string& process_type) OVERRIDE; -#elif defined(OS_POSIX) - virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE; +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) virtual void ZygoteForked() OVERRIDE; -#endif // OS_MACOSX +#endif // Shut down the browser runner. void ShutdownBrowser(); diff --git a/libcef/plugin/content_plugin_client.cc b/libcef/plugin/content_plugin_client.cc index df3e95354..81ec0f001 100644 --- a/libcef/plugin/content_plugin_client.cc +++ b/libcef/plugin/content_plugin_client.cc @@ -6,7 +6,3 @@ CefContentPluginClient::~CefContentPluginClient() { } - -void CefContentPluginClient::PluginProcessStarted( - const string16& plugin_name) { -} diff --git a/libcef/plugin/content_plugin_client.h b/libcef/plugin/content_plugin_client.h index 632e056df..9e71fddb5 100644 --- a/libcef/plugin/content_plugin_client.h +++ b/libcef/plugin/content_plugin_client.h @@ -12,7 +12,6 @@ class CefContentPluginClient : public content::ContentPluginClient { public: virtual ~CefContentPluginClient(); - virtual void PluginProcessStarted(const string16& plugin_name) OVERRIDE; }; #endif // CEF_LIBCEF_PLUGIN_CONTENT_PLUGIN_CLIENT_H_ diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index f837a923d..142141175 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -167,82 +167,6 @@ void CefContentRendererClient::RenderViewCreated( new CefPrerendererClient(render_view); } -void CefContentRendererClient::SetNumberOfViews(int number_of_views) { -} - -SkBitmap* CefContentRendererClient::GetSadPluginBitmap() { - return NULL; -} - -std::string CefContentRendererClient::GetDefaultEncoding() { - return std::string(); -} - -bool CefContentRendererClient::OverrideCreatePlugin( - content::RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin) { - return false; -} - -WebKit::WebPlugin* CefContentRendererClient::CreatePluginReplacement( - content::RenderView* render_view, - const FilePath& plugin_path) { - return NULL; -} - -bool CefContentRendererClient::HasErrorPage(int http_status_code, - std::string* error_domain) { - return false; -} - -void CefContentRendererClient::GetNavigationErrorStrings( - const WebKit::WebURLRequest& failed_request, - const WebKit::WebURLError& error, - std::string* error_html, - string16* error_description) { -} - -webkit_media::WebMediaPlayerImpl* -CefContentRendererClient::OverrideCreateWebMediaPlayer( - content::RenderView* render_view, - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, - base::WeakPtr delegate, - media::FilterCollection* collection, - WebKit::WebAudioSourceProvider* audio_source_provider, - media::MessageLoopFactory* message_loop_factory, - webkit_media::MediaStreamClient* media_stream_client, - media::MediaLog* media_log) { - return NULL; -} - -bool CefContentRendererClient::RunIdleHandlerWhenWidgetsHidden() { - return true; -} - -bool CefContentRendererClient::AllowPopup(const GURL& creator) { - return false; -} - -bool CefContentRendererClient::ShouldFork(WebKit::WebFrame* frame, - const GURL& url, - bool is_initial_navigation, - bool* send_referrer) { - return false; -} - -bool CefContentRendererClient::WillSendRequest(WebKit::WebFrame* frame, - const GURL& url, - GURL* new_url) { - return false; -} - -bool CefContentRendererClient::ShouldPumpEventsDuringCookieMessage() { - return false; -} - void CefContentRendererClient::DidCreateScriptContext( WebKit::WebFrame* frame, v8::Handle context, int extension_group, int world_id) { @@ -299,42 +223,3 @@ void CefContentRendererClient::WillReleaseScriptContext( handler->OnContextReleased(browserPtr.get(), framePtr.get(), contextPtr); } - -unsigned long long CefContentRendererClient::VisitedLinkHash( - const char* canonical_url, size_t length) { - return 0LL; -} - -bool CefContentRendererClient::IsLinkVisited(unsigned long long link_hash) { - return false; -} - -void CefContentRendererClient::PrefetchHostName( - const char* hostname, size_t length) { -} - -bool CefContentRendererClient::ShouldOverridePageVisibilityState( - const content::RenderView* render_view, - WebKit::WebPageVisibilityState* override_state) const { - return false; -} - -bool CefContentRendererClient::HandleGetCookieRequest( - content::RenderView* sender, - const GURL& url, - const GURL& first_party_for_cookies, - std::string* cookies) { - return false; -} - -bool CefContentRendererClient::HandleSetCookieRequest( - content::RenderView* sender, - const GURL& url, - const GURL& first_party_for_cookies, - const std::string& value) { - return false; -} - -void CefContentRendererClient::RegisterPPAPIInterfaceFactories( - webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { -} diff --git a/libcef/renderer/content_renderer_client.h b/libcef/renderer/content_renderer_client.h index 294450bcc..a38adb46d 100644 --- a/libcef/renderer/content_renderer_client.h +++ b/libcef/renderer/content_renderer_client.h @@ -52,44 +52,6 @@ class CefContentRendererClient : public content::ContentRendererClient { // ContentRendererClient implementation. virtual void RenderThreadStarted() OVERRIDE; virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE; - virtual void SetNumberOfViews(int number_of_views) OVERRIDE; - virtual SkBitmap* GetSadPluginBitmap() OVERRIDE; - virtual std::string GetDefaultEncoding() OVERRIDE; - virtual bool OverrideCreatePlugin( - content::RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin) OVERRIDE; - virtual WebKit::WebPlugin* CreatePluginReplacement( - content::RenderView* render_view, - const FilePath& plugin_path) OVERRIDE; - virtual bool HasErrorPage(int http_status_code, - std::string* error_domain) OVERRIDE; - virtual void GetNavigationErrorStrings( - const WebKit::WebURLRequest& failed_request, - const WebKit::WebURLError& error, - std::string* error_html, - string16* error_description) OVERRIDE; - virtual webkit_media::WebMediaPlayerImpl* OverrideCreateWebMediaPlayer( - content::RenderView* render_view, - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, - base::WeakPtr delegate, - media::FilterCollection* collection, - WebKit::WebAudioSourceProvider* audio_source_provider, - media::MessageLoopFactory* message_loop_factory, - webkit_media::MediaStreamClient* media_stream_client, - media::MediaLog* media_log) OVERRIDE; - virtual bool RunIdleHandlerWhenWidgetsHidden() OVERRIDE; - virtual bool AllowPopup(const GURL& creator) OVERRIDE; - virtual bool ShouldFork(WebKit::WebFrame* frame, - const GURL& url, - bool is_initial_navigation, - bool* send_referrer) OVERRIDE; - virtual bool WillSendRequest(WebKit::WebFrame* frame, - const GURL& url, - GURL* new_url) OVERRIDE; - virtual bool ShouldPumpEventsDuringCookieMessage() OVERRIDE; virtual void DidCreateScriptContext(WebKit::WebFrame* frame, v8::Handle context, int extension_group, @@ -97,23 +59,6 @@ class CefContentRendererClient : public content::ContentRendererClient { virtual void WillReleaseScriptContext(WebKit::WebFrame* frame, v8::Handle context, int world_id) OVERRIDE; - virtual unsigned long long VisitedLinkHash(const char* canonical_url, - size_t length) OVERRIDE; - virtual bool IsLinkVisited(unsigned long long link_hash) OVERRIDE; - virtual void PrefetchHostName(const char* hostname, size_t length) OVERRIDE; - virtual bool ShouldOverridePageVisibilityState( - const content::RenderView* render_view, - WebKit::WebPageVisibilityState* override_state) const OVERRIDE; - virtual bool HandleGetCookieRequest(content::RenderView* sender, - const GURL& url, - const GURL& first_party_for_cookies, - std::string* cookies) OVERRIDE; - virtual bool HandleSetCookieRequest(content::RenderView* sender, - const GURL& url, - const GURL& first_party_for_cookies, - const std::string& value) OVERRIDE; - virtual void RegisterPPAPIInterfaceFactories( - webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) OVERRIDE; scoped_refptr render_loop_; scoped_ptr observer_; diff --git a/patch/patches/tools_gyp.patch b/patch/patches/tools_gyp.patch index b3f568b39..77beae74f 100644 --- a/patch/patches/tools_gyp.patch +++ b/patch/patches/tools_gyp.patch @@ -1,14 +1,14 @@ Index: pylib/gyp/input.py =================================================================== ---- pylib/gyp/input.py (revision 1344) +--- pylib/gyp/input.py (revision 1402) +++ pylib/gyp/input.py (working copy) -@@ -683,7 +683,8 @@ - # that don't load quickly, this can be faster than - #