mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision ad468e8b (#292352).
- Building Chromium using SVN is no longer supported. - Remove CefDOMEvent and CefDOMEventListener (issue #933). - Remove CefRenderHandler::OnScrollOffsetChanged (http://crbug.com/404656). - Remove UR_FLAG_REPORT_LOAD_TIMING (https://codereview.chromium.org/451623002/). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1816 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -123,7 +123,8 @@ content::BrowserPluginGuestManager* CefBrowserContextImpl::GetGuestManager() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
quota::SpecialStoragePolicy* CefBrowserContextImpl::GetSpecialStoragePolicy() {
|
||||
storage::SpecialStoragePolicy*
|
||||
CefBrowserContextImpl::GetSpecialStoragePolicy() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -132,6 +133,11 @@ content::PushMessagingService*
|
||||
return NULL;
|
||||
}
|
||||
|
||||
content::SSLHostStateDelegate*
|
||||
CefBrowserContextImpl::GetSSLHostStateDelegate() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors) {
|
||||
|
@@ -41,8 +41,9 @@ class CefBrowserContextImpl : public CefBrowserContext {
|
||||
bool in_memory) OVERRIDE;
|
||||
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
|
||||
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
|
||||
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||
virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE;
|
||||
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE;
|
||||
|
||||
// CefBrowserContext methods.
|
||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||
|
@@ -120,7 +120,7 @@ content::BrowserPluginGuestManager* CefBrowserContextProxy::GetGuestManager() {
|
||||
return parent_->GetGuestManager();
|
||||
}
|
||||
|
||||
quota::SpecialStoragePolicy*
|
||||
storage::SpecialStoragePolicy*
|
||||
CefBrowserContextProxy::GetSpecialStoragePolicy() {
|
||||
return parent_->GetSpecialStoragePolicy();
|
||||
}
|
||||
@@ -130,6 +130,11 @@ content::PushMessagingService*
|
||||
return parent_->GetPushMessagingService();
|
||||
}
|
||||
|
||||
content::SSLHostStateDelegate*
|
||||
CefBrowserContextProxy::GetSSLHostStateDelegate() {
|
||||
return parent_->GetSSLHostStateDelegate();
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter* CefBrowserContextProxy::CreateRequestContext(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors) {
|
||||
|
@@ -49,8 +49,9 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
||||
bool in_memory) OVERRIDE;
|
||||
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
|
||||
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
|
||||
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||
virtual storage::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
|
||||
virtual content::PushMessagingService* GetPushMessagingService() OVERRIDE;
|
||||
virtual content::SSLHostStateDelegate* GetSSLHostStateDelegate() OVERRIDE;
|
||||
|
||||
// CefBrowserContext methods.
|
||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "components/pdf/common/pdf_messages.h"
|
||||
#include "content/browser/gpu/compositor_util.h"
|
||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||
#include "content/common/view_messages.h"
|
||||
@@ -57,7 +58,7 @@
|
||||
#include "ui/shell_dialogs/selected_file_info.h"
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
#include "ui/gfx/font_render_params_linux.h"
|
||||
#include "ui/gfx/font_render_params.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_AURA)
|
||||
@@ -428,57 +429,14 @@ CefRefPtr<CefBrowserHostImpl> CefBrowserHostImpl::CreateInternal(
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
content::RendererPreferences* prefs = web_contents->GetMutableRendererPrefs();
|
||||
const gfx::FontRenderParams& params = gfx::GetDefaultWebKitFontRenderParams();
|
||||
CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params,
|
||||
(gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(true), NULL)));
|
||||
prefs->should_antialias_text = params.antialiasing;
|
||||
prefs->use_subpixel_positioning = params.subpixel_positioning;
|
||||
switch (params.hinting) {
|
||||
case gfx::FontRenderParams::HINTING_NONE:
|
||||
prefs->hinting = content::RENDERER_PREFERENCES_HINTING_NONE;
|
||||
break;
|
||||
case gfx::FontRenderParams::HINTING_SLIGHT:
|
||||
prefs->hinting = content::RENDERER_PREFERENCES_HINTING_SLIGHT;
|
||||
break;
|
||||
case gfx::FontRenderParams::HINTING_MEDIUM:
|
||||
prefs->hinting = content::RENDERER_PREFERENCES_HINTING_MEDIUM;
|
||||
break;
|
||||
case gfx::FontRenderParams::HINTING_FULL:
|
||||
prefs->hinting = content::RENDERER_PREFERENCES_HINTING_FULL;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED() << "Unhandled hinting style " << params.hinting;
|
||||
prefs->hinting = content::RENDERER_PREFERENCES_HINTING_SYSTEM_DEFAULT;
|
||||
break;
|
||||
}
|
||||
prefs->hinting = params.hinting;
|
||||
prefs->use_autohinter = params.autohinter;
|
||||
prefs->use_bitmaps = params.use_bitmaps;
|
||||
switch (params.subpixel_rendering) {
|
||||
case gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE:
|
||||
prefs->subpixel_rendering =
|
||||
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_NONE;
|
||||
break;
|
||||
case gfx::FontRenderParams::SUBPIXEL_RENDERING_RGB:
|
||||
prefs->subpixel_rendering =
|
||||
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_RGB;
|
||||
break;
|
||||
case gfx::FontRenderParams::SUBPIXEL_RENDERING_BGR:
|
||||
prefs->subpixel_rendering =
|
||||
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_BGR;
|
||||
break;
|
||||
case gfx::FontRenderParams::SUBPIXEL_RENDERING_VRGB:
|
||||
prefs->subpixel_rendering =
|
||||
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VRGB;
|
||||
break;
|
||||
case gfx::FontRenderParams::SUBPIXEL_RENDERING_VBGR:
|
||||
prefs->subpixel_rendering =
|
||||
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_VBGR;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED() << "Unhandled subpixel rendering style "
|
||||
<< params.subpixel_rendering;
|
||||
prefs->subpixel_rendering =
|
||||
content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_SYSTEM_DEFAULT;
|
||||
break;
|
||||
}
|
||||
prefs->subpixel_rendering = params.subpixel_rendering;
|
||||
web_contents->GetRenderViewHost()->SyncRendererPrefs();
|
||||
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
|
||||
|
||||
@@ -1552,8 +1510,8 @@ void CefBrowserHostImpl::LoadString(int64 frame_id, const std::string& string,
|
||||
params.request_id = -1;
|
||||
params.expect_response = false;
|
||||
|
||||
params.arguments.Append(base::Value::CreateStringValue(string));
|
||||
params.arguments.Append(base::Value::CreateStringValue(url));
|
||||
params.arguments.AppendString(string);
|
||||
params.arguments.AppendString(url);
|
||||
|
||||
Send(new CefMsg_Request(routing_id(), params));
|
||||
}
|
||||
@@ -1584,7 +1542,7 @@ void CefBrowserHostImpl::SendCommand(
|
||||
params.expect_response = false;
|
||||
}
|
||||
|
||||
params.arguments.Append(base::Value::CreateStringValue(command));
|
||||
params.arguments.AppendString(command);
|
||||
|
||||
Send(new CefMsg_Request(routing_id(), params));
|
||||
} else {
|
||||
@@ -1624,10 +1582,10 @@ void CefBrowserHostImpl::SendCode(
|
||||
params.expect_response = false;
|
||||
}
|
||||
|
||||
params.arguments.Append(base::Value::CreateBooleanValue(is_javascript));
|
||||
params.arguments.Append(base::Value::CreateStringValue(code));
|
||||
params.arguments.Append(base::Value::CreateStringValue(script_url));
|
||||
params.arguments.Append(base::Value::CreateIntegerValue(script_start_line));
|
||||
params.arguments.AppendBoolean(is_javascript);
|
||||
params.arguments.AppendString(code);
|
||||
params.arguments.AppendString(script_url);
|
||||
params.arguments.AppendInteger(script_start_line);
|
||||
|
||||
Send(new CefMsg_Request(routing_id(), params));
|
||||
} else {
|
||||
@@ -2359,9 +2317,9 @@ void CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) {
|
||||
|
||||
void CefBrowserHostImpl::DidCommitProvisionalLoadForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
bool is_main_frame,
|
||||
const GURL& url,
|
||||
content::PageTransition transition_type) {
|
||||
const bool is_main_frame = !render_frame_host->GetParent();
|
||||
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
||||
render_frame_host->GetRoutingID(),
|
||||
CefFrameHostImpl::kUnspecifiedFrameId,
|
||||
@@ -2375,10 +2333,10 @@ void CefBrowserHostImpl::DidCommitProvisionalLoadForFrame(
|
||||
|
||||
void CefBrowserHostImpl::DidFailProvisionalLoad(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
bool is_main_frame,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description) {
|
||||
const bool is_main_frame = !render_frame_host->GetParent();
|
||||
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
||||
render_frame_host->GetRoutingID(),
|
||||
CefFrameHostImpl::kUnspecifiedFrameId,
|
||||
@@ -2394,14 +2352,16 @@ void CefBrowserHostImpl::DocumentAvailableInMainFrame() {
|
||||
}
|
||||
|
||||
void CefBrowserHostImpl::DidFailLoad(
|
||||
int64 frame_id,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
bool is_main_frame,
|
||||
int error_code,
|
||||
const base::string16& error_description,
|
||||
content::RenderViewHost* render_view_host) {
|
||||
CefRefPtr<CefFrame> frame = GetOrCreateFrame(frame_id,
|
||||
CefFrameHostImpl::kUnspecifiedFrameId, is_main_frame, base::string16(),
|
||||
const base::string16& error_description) {
|
||||
const bool is_main_frame = !render_frame_host->GetParent();
|
||||
CefRefPtr<CefFrame> frame = GetOrCreateFrame(
|
||||
render_frame_host->GetRoutingID(),
|
||||
CefFrameHostImpl::kUnspecifiedFrameId,
|
||||
is_main_frame,
|
||||
base::string16(),
|
||||
validated_url);
|
||||
OnLoadError(frame, validated_url, error_code, error_description);
|
||||
OnLoadEnd(frame, validated_url, error_code);
|
||||
@@ -2432,14 +2392,13 @@ bool CefBrowserHostImpl::OnMessageReceived(const IPC::Message& message) {
|
||||
IPC_MESSAGE_HANDLER(CefHostMsg_Request, OnRequest)
|
||||
IPC_MESSAGE_HANDLER(CefHostMsg_Response, OnResponse)
|
||||
IPC_MESSAGE_HANDLER(CefHostMsg_ResponseAck, OnResponseAck)
|
||||
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PDFHasUnsupportedFeature,
|
||||
IPC_MESSAGE_HANDLER(PDFHostMsg_PDFHasUnsupportedFeature,
|
||||
OnPDFHasUnsupportedFeature)
|
||||
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PDFSaveURLAs, OnPDFSaveURLAs)
|
||||
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_PDFUpdateContentRestrictions,
|
||||
IPC_MESSAGE_HANDLER(PDFHostMsg_PDFSaveURLAs, OnPDFSaveURLAs)
|
||||
IPC_MESSAGE_HANDLER(PDFHostMsg_PDFUpdateContentRestrictions,
|
||||
OnPDFUpdateContentRestrictions)
|
||||
IPC_MESSAGE_HANDLER_DELAY_REPLY(
|
||||
ChromeViewHostMsg_PDFModalPromptForPassword,
|
||||
OnPDFModalPromptForPassword)
|
||||
IPC_MESSAGE_HANDLER_DELAY_REPLY(PDFHostMsg_PDFModalPromptForPassword,
|
||||
OnPDFModalPromptForPassword)
|
||||
IPC_MESSAGE_UNHANDLED(handled = false)
|
||||
IPC_END_MESSAGE_MAP()
|
||||
return handled;
|
||||
@@ -2561,7 +2520,7 @@ void CefBrowserHostImpl::OnPDFModalPromptForPasswordClosed(
|
||||
IPC::Message* reply_message,
|
||||
bool success,
|
||||
const base::string16& actual_value) {
|
||||
ChromeViewHostMsg_PDFModalPromptForPassword::WriteReplyParams(
|
||||
PDFHostMsg_PDFModalPromptForPassword::WriteReplyParams(
|
||||
reply_message, base::UTF16ToUTF8(actual_value));
|
||||
Send(reply_message);
|
||||
}
|
||||
|
@@ -409,22 +409,18 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
|
||||
virtual void DidCommitProvisionalLoadForFrame(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
bool is_main_frame,
|
||||
const GURL& url,
|
||||
content::PageTransition transition_type) OVERRIDE;
|
||||
virtual void DidFailProvisionalLoad(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
bool is_main_frame,
|
||||
const GURL& validated_url,
|
||||
int error_code,
|
||||
const base::string16& error_description) OVERRIDE;
|
||||
virtual void DocumentAvailableInMainFrame() OVERRIDE;
|
||||
virtual void DidFailLoad(int64 frame_id,
|
||||
virtual void DidFailLoad(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& validated_url,
|
||||
bool is_main_frame,
|
||||
int error_code,
|
||||
const base::string16& error_description,
|
||||
content::RenderViewHost* render_view_host) OVERRIDE;
|
||||
const base::string16& error_description) OVERRIDE;
|
||||
virtual void PluginCrashed(const base::FilePath& plugin_path,
|
||||
base::ProcessId plugin_pid) OVERRIDE;
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
||||
|
@@ -386,7 +386,7 @@ bool CefBrowserHostImpl::PlatformCreateWindow() {
|
||||
// Make the content view for the window have a layer. This will make all
|
||||
// sub-views have layers. This is necessary to ensure correct layer
|
||||
// ordering of all child views and their layers.
|
||||
[[[parentView window] contentView] cr_setWantsLayer:YES];
|
||||
[[[parentView window] contentView] setWantsLayer:YES];
|
||||
|
||||
// Add a reference that will be released in the dealloc handler.
|
||||
AddRef();
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include "net/base/net_module.h"
|
||||
#include "net/proxy/proxy_resolver_v8.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
#if defined(USE_AURA)
|
||||
#include "ui/aura/env.h"
|
||||
@@ -47,8 +46,7 @@
|
||||
|
||||
CefBrowserMainParts::CefBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters)
|
||||
: BrowserMainParts(),
|
||||
proxy_v8_isolate_(NULL) {
|
||||
: BrowserMainParts() {
|
||||
}
|
||||
|
||||
CefBrowserMainParts::~CefBrowserMainParts() {
|
||||
@@ -114,12 +112,6 @@ int CefBrowserMainParts::PreCreateThreads() {
|
||||
pref_store_->SetInitializationCompleted();
|
||||
pref_service_ = pref_store_->CreateService().Pass();
|
||||
|
||||
// Create a v8::Isolate for the current thread if it doesn't already exist.
|
||||
if (!v8::Isolate::GetCurrent()) {
|
||||
proxy_v8_isolate_ = v8::Isolate::New();
|
||||
proxy_v8_isolate_->Enter();
|
||||
}
|
||||
|
||||
// Initialize the V8 proxy integration.
|
||||
net::ProxyResolverV8::EnsureIsolateCreated();
|
||||
|
||||
@@ -175,11 +167,6 @@ void CefBrowserMainParts::PostMainMessageLoopRun() {
|
||||
void CefBrowserMainParts::PostDestroyThreads() {
|
||||
pref_proxy_config_tracker_.reset(NULL);
|
||||
|
||||
if (proxy_v8_isolate_) {
|
||||
proxy_v8_isolate_->Exit();
|
||||
proxy_v8_isolate_->Dispose();
|
||||
}
|
||||
|
||||
#if defined(USE_AURA)
|
||||
aura::Env::DeleteInstance();
|
||||
delete views::ViewsDelegate::views_delegate;
|
||||
|
@@ -27,10 +27,6 @@ namespace content {
|
||||
struct MainFunctionParams;
|
||||
}
|
||||
|
||||
namespace v8 {
|
||||
class Isolate;
|
||||
}
|
||||
|
||||
class CefBrowserContext;
|
||||
class CefDevToolsDelegate;
|
||||
|
||||
@@ -78,7 +74,6 @@ class CefBrowserMainParts : public content::BrowserMainParts {
|
||||
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
|
||||
scoped_refptr<CefBrowserPrefStore> pref_store_;
|
||||
scoped_ptr<PrefService> pref_service_;
|
||||
v8::Isolate* proxy_v8_isolate_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefBrowserMainParts);
|
||||
};
|
||||
|
@@ -3,21 +3,8 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "libcef/browser/browser_main.h"
|
||||
#include "libcef/browser/context.h"
|
||||
|
||||
#include "content/browser/renderer_host/compositing_iosurface_shader_programs_mac.h"
|
||||
|
||||
void CefBrowserMainParts::PlatformInitialize() {
|
||||
const CefSettings& settings = CefContext::Get()->settings();
|
||||
if (CefColorGetA(settings.background_color) > 0) {
|
||||
const float r =
|
||||
static_cast<float>(CefColorGetR(settings.background_color)) / 255.0f;
|
||||
const float g =
|
||||
static_cast<float>(CefColorGetG(settings.background_color)) / 255.0f;
|
||||
const float b =
|
||||
static_cast<float>(CefColorGetB(settings.background_color)) / 255.0f;
|
||||
content::CompositingIOSurfaceShaderPrograms::SetBackgroundColor(r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserMainParts::PlatformCleanup() {
|
||||
|
@@ -6,15 +6,15 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
#include "libcef/common/cef_switches.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
#include "webkit/common/webpreferences.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
|
||||
// Set default preferences based on CEF command-line flags. Chromium command-
|
||||
// line flags should not exist for these preferences.
|
||||
void SetDefaults(WebPreferences& web) {
|
||||
void SetDefaults(content::WebPreferences& web) {
|
||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||
|
||||
if (command_line.HasSwitch(switches::kDefaultEncoding)) {
|
||||
@@ -55,31 +55,32 @@ void SetDefaults(WebPreferences& web) {
|
||||
// Use the preferences from WebContentsImpl::GetWebkitPrefs and the
|
||||
// WebPreferences constructor by default. Only override features that are
|
||||
// explicitly enabled or disabled.
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef,
|
||||
content::WebPreferences& web) {
|
||||
SetDefaults(web);
|
||||
|
||||
if (cef.standard_font_family.length > 0) {
|
||||
web.standard_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.standard_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.standard_font_family);
|
||||
}
|
||||
if (cef.fixed_font_family.length > 0) {
|
||||
web.fixed_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.fixed_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.fixed_font_family);
|
||||
}
|
||||
if (cef.serif_font_family.length > 0) {
|
||||
web.serif_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.serif_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.serif_font_family);
|
||||
}
|
||||
if (cef.sans_serif_font_family.length > 0) {
|
||||
web.sans_serif_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.sans_serif_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.sans_serif_font_family);
|
||||
}
|
||||
if (cef.cursive_font_family.length > 0) {
|
||||
web.cursive_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.cursive_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.cursive_font_family);
|
||||
}
|
||||
if (cef.fantasy_font_family.length > 0) {
|
||||
web.fantasy_font_family_map[webkit_glue::kCommonScript] =
|
||||
web.fantasy_font_family_map[content::kCommonScript] =
|
||||
CefString(&cef.fantasy_font_family);
|
||||
}
|
||||
|
||||
|
@@ -8,8 +8,11 @@
|
||||
|
||||
#include "include/internal/cef_types_wrappers.h"
|
||||
|
||||
namespace content {
|
||||
struct WebPreferences;
|
||||
}
|
||||
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web);
|
||||
void BrowserToWebSettings(const CefBrowserSettings& cef,
|
||||
content::WebPreferences& web);
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_BROWSER_SETTINGS_H_
|
||||
|
@@ -162,7 +162,7 @@ class CefBrowserURLRequest::Context
|
||||
return false;
|
||||
|
||||
std::string method = request_->GetMethod();
|
||||
StringToLowerASCII(&method);
|
||||
base::StringToLowerASCII(&method);
|
||||
net::URLFetcher::RequestType request_type = net::URLFetcher::GET;
|
||||
if (LowerCaseEqualsASCII(method, "get")) {
|
||||
} else if (LowerCaseEqualsASCII(method, "post")) {
|
||||
@@ -277,9 +277,6 @@ class CefBrowserURLRequest::Context
|
||||
upload_data_size_ = upload_data_size;
|
||||
}
|
||||
|
||||
if (cef_flags & UR_FLAG_REPORT_LOAD_TIMING)
|
||||
load_flags |= net::LOAD_ENABLE_LOAD_TIMING;
|
||||
|
||||
if (cef_flags & UR_FLAG_REPORT_RAW_HEADERS)
|
||||
load_flags |= net::LOAD_REPORT_RAW_HEADERS;
|
||||
|
||||
|
@@ -30,7 +30,7 @@ MetricsServicesManager* ChromeBrowserProcessStub::GetMetricsServicesManager() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MetricsService* ChromeBrowserProcessStub::metrics_service() {
|
||||
metrics::MetricsService* ChromeBrowserProcessStub::metrics_service() {
|
||||
NOTIMPLEMENTED();
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
virtual void ResourceDispatcherHostCreated() OVERRIDE;
|
||||
virtual void EndSession() OVERRIDE;
|
||||
virtual MetricsServicesManager* GetMetricsServicesManager() OVERRIDE;
|
||||
virtual MetricsService* metrics_service() OVERRIDE;
|
||||
virtual metrics::MetricsService* metrics_service() OVERRIDE;
|
||||
virtual rappor::RapporService* rappor_service() OVERRIDE;
|
||||
virtual IOThread* io_thread() OVERRIDE;
|
||||
virtual WatchDogThread* watchdog_thread() OVERRIDE;
|
||||
|
@@ -41,15 +41,15 @@
|
||||
#include "content/public/browser/resource_dispatcher_host.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/storage_quota_params.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "url/gurl.h"
|
||||
#include "webkit/common/webpreferences.h"
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
#include "base/debug/leak_annotations.h"
|
||||
#include "components/breakpad/app/breakpad_linux.h"
|
||||
#include "components/breakpad/browser/crash_handler_host_linux.h"
|
||||
#include "components/crash/app/breakpad_linux.h"
|
||||
#include "components/crash/browser/crash_handler_host_linux.h"
|
||||
#include "content/public/common/content_descriptors.h"
|
||||
#endif
|
||||
|
||||
@@ -236,7 +236,7 @@ class CefQuotaPermissionContext : public content::QuotaPermissionContext {
|
||||
const content::StorageQuotaParams& params,
|
||||
int render_process_id,
|
||||
const PermissionCallback& callback) OVERRIDE {
|
||||
if (params.storage_type != quota::kStorageTypePersistent) {
|
||||
if (params.storage_type != storage::kStorageTypePersistent) {
|
||||
// To match Chrome behavior we only support requesting quota with this
|
||||
// interface for Persistent storage type.
|
||||
callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW);
|
||||
@@ -606,7 +606,7 @@ content::BrowserMainParts* CefContentBrowserClient::CreateBrowserMainParts(
|
||||
void CefContentBrowserClient::RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host) {
|
||||
host->GetChannel()->AddFilter(new CefBrowserMessageFilter(host));
|
||||
host->AddFilter(new PrintingMessageFilter(host->GetID()));
|
||||
host->AddFilter(new printing::PrintingMessageFilter(host->GetID()));
|
||||
|
||||
AddBrowserContextReference(
|
||||
static_cast<CefBrowserContext*>(host->GetBrowserContext()));
|
||||
@@ -643,7 +643,7 @@ bool CefContentBrowserClient::IsHandledURL(const GURL& url) {
|
||||
if (!url.is_valid())
|
||||
return false;
|
||||
const std::string& scheme = url.scheme();
|
||||
DCHECK_EQ(scheme, StringToLowerASCII(scheme));
|
||||
DCHECK_EQ(scheme, base::StringToLowerASCII(scheme));
|
||||
|
||||
if (scheme::IsInternalHandledScheme(scheme))
|
||||
return true;
|
||||
@@ -738,14 +738,15 @@ void CefContentBrowserClient::AllowCertificateError(
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
ResourceType::Type resource_type,
|
||||
content::ResourceType resource_type,
|
||||
bool overridable,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
content::CertificateRequestResultType* result) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (resource_type != ResourceType::MAIN_FRAME) {
|
||||
if (resource_type != content::ResourceType::RESOURCE_TYPE_MAIN_FRAME) {
|
||||
// A sub-resource has a certificate error. The user doesn't really
|
||||
// have a context for making the right decision, so block the request
|
||||
// hard.
|
||||
@@ -930,7 +931,7 @@ void CefContentBrowserClient::ResourceDispatcherHostCreated() {
|
||||
void CefContentBrowserClient::OverrideWebkitPrefs(
|
||||
content::RenderViewHost* rvh,
|
||||
const GURL& url,
|
||||
WebPreferences* prefs) {
|
||||
content::WebPreferences* prefs) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForHost(rvh);
|
||||
DCHECK(browser.get());
|
||||
|
@@ -109,9 +109,10 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
ResourceType::Type resource_type,
|
||||
content::ResourceType resource_type,
|
||||
bool overridable,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
content::CertificateRequestResultType* result) OVERRIDE;
|
||||
virtual content::AccessTokenStore* CreateAccessTokenStore() OVERRIDE;
|
||||
@@ -139,7 +140,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
virtual void ResourceDispatcherHostCreated() OVERRIDE;
|
||||
virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh,
|
||||
const GURL& url,
|
||||
WebPreferences* prefs) OVERRIDE;
|
||||
content::WebPreferences* prefs) OVERRIDE;
|
||||
virtual SkColor GetBaseBackgroundColor(content::RenderViewHost* rvh) OVERRIDE;
|
||||
virtual void BrowserURLHandlerCreated(
|
||||
content::BrowserURLHandler* handler) OVERRIDE;
|
||||
|
@@ -28,24 +28,61 @@
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "grit/cef_resources.h"
|
||||
#include "net/socket/tcp_listen_socket.h"
|
||||
#include "net/socket/tcp_server_socket.h"
|
||||
#include "ui/base/layout.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const char kTargetTypePage[] = "page";
|
||||
const char kTargetTypeServiceWorker[] = "service_worker";
|
||||
const char kTargetTypeOther[] = "other";
|
||||
|
||||
class TCPServerSocketFactory
|
||||
: public content::DevToolsHttpHandler::ServerSocketFactory {
|
||||
public:
|
||||
TCPServerSocketFactory(const std::string& address, int port, int backlog)
|
||||
: content::DevToolsHttpHandler::ServerSocketFactory(
|
||||
address, port, backlog) {}
|
||||
|
||||
private:
|
||||
// content::DevToolsHttpHandler::ServerSocketFactory.
|
||||
virtual scoped_ptr<net::ServerSocket> Create() const OVERRIDE {
|
||||
return scoped_ptr<net::ServerSocket>(
|
||||
new net::TCPServerSocket(NULL, net::NetLog::Source()));
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
|
||||
};
|
||||
|
||||
scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory>
|
||||
CreateSocketFactory(int port) {
|
||||
return scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory>(
|
||||
new TCPServerSocketFactory("127.0.0.1", port, 1));
|
||||
}
|
||||
|
||||
class Target : public content::DevToolsTarget {
|
||||
public:
|
||||
explicit Target(content::WebContents* web_contents);
|
||||
explicit Target(scoped_refptr<content::DevToolsAgentHost> agent_host);
|
||||
|
||||
virtual std::string GetId() const OVERRIDE { return id_; }
|
||||
virtual std::string GetId() const OVERRIDE { return agent_host_->GetId(); }
|
||||
virtual std::string GetParentId() const OVERRIDE { return std::string(); }
|
||||
virtual std::string GetType() const OVERRIDE { return kTargetTypePage; }
|
||||
virtual std::string GetTitle() const OVERRIDE { return title_; }
|
||||
virtual std::string GetType() const OVERRIDE {
|
||||
switch (agent_host_->GetType()) {
|
||||
case content::DevToolsAgentHost::TYPE_WEB_CONTENTS:
|
||||
return kTargetTypePage;
|
||||
case content::DevToolsAgentHost::TYPE_SERVICE_WORKER:
|
||||
return kTargetTypeServiceWorker;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return kTargetTypeOther;
|
||||
}
|
||||
virtual std::string GetTitle() const OVERRIDE {
|
||||
return agent_host_->GetTitle();
|
||||
}
|
||||
virtual std::string GetDescription() const OVERRIDE { return std::string(); }
|
||||
virtual GURL GetURL() const OVERRIDE { return url_; }
|
||||
virtual GURL GetURL() const OVERRIDE { return agent_host_->GetURL(); }
|
||||
virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; }
|
||||
virtual base::TimeTicks GetLastActivityTime() const OVERRIDE {
|
||||
return last_activity_time_;
|
||||
@@ -62,45 +99,27 @@ class Target : public content::DevToolsTarget {
|
||||
|
||||
private:
|
||||
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
||||
std::string id_;
|
||||
std::string title_;
|
||||
GURL url_;
|
||||
GURL favicon_url_;
|
||||
base::TimeTicks last_activity_time_;
|
||||
};
|
||||
|
||||
Target::Target(content::WebContents* web_contents) {
|
||||
agent_host_ =
|
||||
content::DevToolsAgentHost::GetOrCreateFor(
|
||||
web_contents->GetRenderViewHost());
|
||||
id_ = agent_host_->GetId();
|
||||
title_ = base::UTF16ToUTF8(web_contents->GetTitle());
|
||||
url_ = web_contents->GetURL();
|
||||
content::NavigationController& controller = web_contents->GetController();
|
||||
content::NavigationEntry* entry = controller.GetActiveEntry();
|
||||
if (entry != NULL && entry->GetURL().is_valid())
|
||||
favicon_url_ = entry->GetFavicon().url;
|
||||
last_activity_time_ = web_contents->GetLastActiveTime();
|
||||
Target::Target(scoped_refptr<content::DevToolsAgentHost> agent_host)
|
||||
: agent_host_(agent_host) {
|
||||
if (content::WebContents* web_contents = agent_host_->GetWebContents()) {
|
||||
content::NavigationController& controller = web_contents->GetController();
|
||||
content::NavigationEntry* entry = controller.GetActiveEntry();
|
||||
if (entry != NULL && entry->GetURL().is_valid())
|
||||
favicon_url_ = entry->GetFavicon().url;
|
||||
last_activity_time_ = web_contents->GetLastActiveTime();
|
||||
}
|
||||
}
|
||||
|
||||
bool Target::Activate() const {
|
||||
content::RenderViewHost* rvh = agent_host_->GetRenderViewHost();
|
||||
if (!rvh)
|
||||
return false;
|
||||
content::WebContents* web_contents =
|
||||
content::WebContents::FromRenderViewHost(rvh);
|
||||
if (!web_contents)
|
||||
return false;
|
||||
web_contents->GetDelegate()->ActivateContents(web_contents);
|
||||
return true;
|
||||
return agent_host_->Activate();
|
||||
}
|
||||
|
||||
bool Target::Close() const {
|
||||
content::RenderViewHost* rvh = agent_host_->GetRenderViewHost();
|
||||
if (!rvh)
|
||||
return false;
|
||||
rvh->ClosePage();
|
||||
return true;
|
||||
return agent_host_->Close();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -109,8 +128,8 @@ bool Target::Close() const {
|
||||
|
||||
CefDevToolsDelegate::CefDevToolsDelegate(int port) {
|
||||
devtools_http_handler_ = content::DevToolsHttpHandler::Start(
|
||||
new net::TCPListenSocketFactory("127.0.0.1", port),
|
||||
"",
|
||||
CreateSocketFactory(port),
|
||||
std::string(),
|
||||
this,
|
||||
base::FilePath());
|
||||
}
|
||||
@@ -147,14 +166,11 @@ scoped_ptr<content::DevToolsTarget> CefDevToolsDelegate::CreateNewTarget(
|
||||
|
||||
void CefDevToolsDelegate::EnumerateTargets(TargetCallback callback) {
|
||||
TargetList targets;
|
||||
std::vector<content::RenderViewHost*> rvh_list =
|
||||
content::DevToolsAgentHost::GetValidRenderViewHosts();
|
||||
for (std::vector<content::RenderViewHost*>::iterator it = rvh_list.begin();
|
||||
it != rvh_list.end(); ++it) {
|
||||
content::WebContents* web_contents =
|
||||
content::WebContents::FromRenderViewHost(*it);
|
||||
if (web_contents)
|
||||
targets.push_back(new Target(web_contents));
|
||||
content::DevToolsAgentHost::List agents =
|
||||
content::DevToolsAgentHost::GetOrCreateAll();
|
||||
for (content::DevToolsAgentHost::List::iterator it = agents.begin();
|
||||
it != agents.end(); ++it) {
|
||||
targets.push_back(new Target(*it));
|
||||
}
|
||||
callback.Run(targets);
|
||||
}
|
||||
|
@@ -9,10 +9,11 @@
|
||||
#include "libcef/browser/request_context_impl.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/json/json_reader.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/public/browser/devtools_http_handler.h"
|
||||
#include "content/public/browser/devtools_manager.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -44,7 +45,7 @@ CefDevToolsFrontend* CefDevToolsFrontend::Show(
|
||||
CefDevToolsFrontend* devtools_frontend = new CefDevToolsFrontend(
|
||||
static_cast<CefBrowserHostImpl*>(frontend_browser.get()),
|
||||
content::DevToolsAgentHost::GetOrCreateFor(
|
||||
inspected_browser->GetWebContents()->GetRenderViewHost()).get());
|
||||
inspected_browser->GetWebContents()).get());
|
||||
|
||||
// Need to load the URL after creating the DevTools objects.
|
||||
CefDevToolsDelegate* delegate =
|
||||
@@ -75,9 +76,6 @@ CefDevToolsFrontend::CefDevToolsFrontend(
|
||||
: WebContentsObserver(frontend_browser->GetWebContents()),
|
||||
frontend_browser_(frontend_browser),
|
||||
agent_host_(agent_host) {
|
||||
frontend_host_.reset(
|
||||
content::DevToolsClientHost::CreateDevToolsFrontendHost(
|
||||
web_contents(), this));
|
||||
}
|
||||
|
||||
CefDevToolsFrontend::~CefDevToolsFrontend() {
|
||||
@@ -85,10 +83,11 @@ CefDevToolsFrontend::~CefDevToolsFrontend() {
|
||||
|
||||
void CefDevToolsFrontend::RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) {
|
||||
content::DevToolsClientHost::SetupDevToolsFrontendClient(
|
||||
web_contents()->GetRenderViewHost());
|
||||
content::DevToolsManager::GetInstance()->RegisterDevToolsClientHostFor(
|
||||
agent_host_.get(), frontend_host_.get());
|
||||
if (!frontend_host_) {
|
||||
frontend_host_.reset(
|
||||
content::DevToolsFrontendHost::Create(render_view_host, this));
|
||||
agent_host_->AttachClient(this);
|
||||
}
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() {
|
||||
@@ -97,11 +96,58 @@ void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() {
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::WebContentsDestroyed() {
|
||||
content::DevToolsManager::GetInstance()->ClientHostClosing(
|
||||
frontend_host_.get());
|
||||
agent_host_->DetachClient();
|
||||
delete this;
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::InspectedContentsClosing() {
|
||||
void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend(
|
||||
const std::string& message) {
|
||||
std::string method;
|
||||
std::string browser_message;
|
||||
int id = 0;
|
||||
|
||||
base::ListValue* params = NULL;
|
||||
base::DictionaryValue* dict = NULL;
|
||||
scoped_ptr<base::Value> parsed_message(base::JSONReader::Read(message));
|
||||
if (!parsed_message ||
|
||||
!parsed_message->GetAsDictionary(&dict) ||
|
||||
!dict->GetString("method", &method) ||
|
||||
!dict->GetList("params", ¶ms)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (method != "sendMessageToBrowser" ||
|
||||
params->GetSize() != 1 ||
|
||||
!params->GetString(0, &browser_message)) {
|
||||
return;
|
||||
}
|
||||
dict->GetInteger("id", &id);
|
||||
|
||||
agent_host_->DispatchProtocolMessage(browser_message);
|
||||
|
||||
if (id) {
|
||||
std::string code = "InspectorFrontendAPI.embedderMessageAck(" +
|
||||
base::IntToString(id) + ",\"\");";
|
||||
base::string16 javascript = base::UTF8ToUTF16(code);
|
||||
web_contents()->GetMainFrame()->ExecuteJavaScript(javascript);
|
||||
}
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::HandleMessageFromDevToolsFrontendToBackend(
|
||||
const std::string& message) {
|
||||
agent_host_->DispatchProtocolMessage(message);
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::DispatchProtocolMessage(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
const std::string& message) {
|
||||
std::string code = "InspectorFrontendAPI.dispatchMessage(" + message + ");";
|
||||
base::string16 javascript = base::UTF8ToUTF16(code);
|
||||
web_contents()->GetMainFrame()->ExecuteJavaScript(javascript);
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::AgentHostClosed(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
bool replaced) {
|
||||
Close();
|
||||
}
|
||||
|
@@ -12,8 +12,7 @@
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/public/browser/devtools_agent_host.h"
|
||||
#include "content/public/browser/devtools_client_host.h"
|
||||
#include "content/public/browser/devtools_frontend_host_delegate.h"
|
||||
#include "content/public/browser/devtools_frontend_host.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
|
||||
namespace content {
|
||||
@@ -22,7 +21,8 @@ class WebContents;
|
||||
}
|
||||
|
||||
class CefDevToolsFrontend : public content::WebContentsObserver,
|
||||
public content::DevToolsFrontendHostDelegate {
|
||||
public content::DevToolsFrontendHost::Delegate,
|
||||
public content::DevToolsAgentHostClient {
|
||||
public:
|
||||
static CefDevToolsFrontend* Show(
|
||||
CefRefPtr<CefBrowserHostImpl> inspected_browser,
|
||||
@@ -43,20 +43,29 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
|
||||
content::DevToolsAgentHost* agent_host);
|
||||
virtual ~CefDevToolsFrontend();
|
||||
|
||||
// WebContentsObserver overrides
|
||||
// WebContentsObserver overrides.
|
||||
virtual void RenderViewCreated(
|
||||
content::RenderViewHost* render_view_host) OVERRIDE;
|
||||
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE;
|
||||
virtual void WebContentsDestroyed() OVERRIDE;
|
||||
|
||||
// DevToolsFrontendHostDelegate implementation
|
||||
virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {}
|
||||
// content::DevToolsFrontendHost::Delegate implementation.
|
||||
virtual void HandleMessageFromDevToolsFrontend(
|
||||
const std::string& message) OVERRIDE;
|
||||
virtual void HandleMessageFromDevToolsFrontendToBackend(
|
||||
const std::string& message) OVERRIDE;
|
||||
|
||||
virtual void InspectedContentsClosing() OVERRIDE;
|
||||
// content::DevToolsAgentHostClient implementation.
|
||||
virtual void DispatchProtocolMessage(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
const std::string& message) OVERRIDE;
|
||||
virtual void AgentHostClosed(
|
||||
content::DevToolsAgentHost* agent_host,
|
||||
bool replaced) OVERRIDE;
|
||||
|
||||
CefRefPtr<CefBrowserHostImpl> frontend_browser_;
|
||||
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
||||
scoped_ptr<content::DevToolsClientHost> frontend_host_;
|
||||
scoped_ptr<content::DevToolsFrontendHost> frontend_host_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefDevToolsFrontend);
|
||||
};
|
||||
|
@@ -103,10 +103,10 @@ void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged() {
|
||||
|
||||
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
|
||||
int render_process_id,
|
||||
int render_view_id,
|
||||
int render_frame_id,
|
||||
int page_request_id,
|
||||
const GURL& security_origin,
|
||||
const content::MediaStreamDevice& device,
|
||||
content::MediaStreamType stream_type,
|
||||
content::MediaRequestState state) {
|
||||
}
|
||||
|
||||
|
@@ -46,10 +46,10 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||
virtual void OnVideoCaptureDevicesChanged() OVERRIDE;
|
||||
virtual void OnMediaRequestStateChanged(
|
||||
int render_process_id,
|
||||
int render_view_id,
|
||||
int render_frame_id,
|
||||
int page_request_id,
|
||||
const GURL& security_origin,
|
||||
const content::MediaStreamDevice& device,
|
||||
content::MediaStreamType stream_type,
|
||||
content::MediaRequestState state) OVERRIDE;
|
||||
virtual void OnCreatingAudioStream(int render_process_id,
|
||||
int render_view_id) OVERRIDE;
|
||||
|
@@ -22,7 +22,8 @@ CefMenuCreatorRunnerLinux::~CefMenuCreatorRunnerLinux() {
|
||||
}
|
||||
|
||||
bool CefMenuCreatorRunnerLinux::RunContextMenu(CefMenuCreator* manager) {
|
||||
menu_.reset(new views::MenuRunner(manager->model()));
|
||||
menu_.reset(
|
||||
new views::MenuRunner(manager->model(), views::MenuRunner::CONTEXT_MENU));
|
||||
|
||||
gfx::Point screen_point;
|
||||
|
||||
@@ -57,8 +58,7 @@ bool CefMenuCreatorRunnerLinux::RunContextMenu(CefMenuCreator* manager) {
|
||||
menu_->RunMenuAt(manager->browser()->window_widget(),
|
||||
NULL, gfx::Rect(screen_point, gfx::Size()),
|
||||
views::MENU_ANCHOR_TOPRIGHT,
|
||||
ui::MENU_SOURCE_NONE,
|
||||
views::MenuRunner::CONTEXT_MENU);
|
||||
ui::MENU_SOURCE_NONE);
|
||||
UNUSED(result);
|
||||
|
||||
return true;
|
||||
@@ -74,4 +74,3 @@ bool CefMenuCreatorRunnerLinux::FormatLabel(base::string16& label) {
|
||||
const char16 replace[] = {L'&', 0};
|
||||
return base::ReplaceChars(label, replace, base::string16(), &label);
|
||||
}
|
||||
|
||||
|
@@ -18,13 +18,13 @@
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/print_messages.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/notification_details.h"
|
||||
#include "content/public/browser/notification_service.h"
|
||||
#include "content/public/browser/notification_source.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "grit/generated_resources.h"
|
||||
#include "printing/metafile_impl.h"
|
||||
#include "printing/printed_document.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
@@ -57,7 +57,7 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
inside_inner_message_loop_(false),
|
||||
cookie_(0),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
DCHECK(queue_.get());
|
||||
#if (defined(OS_POSIX) && !defined(OS_MACOSX)) || \
|
||||
defined(WIN_PDF_METAFILE_FOR_PRINTING)
|
||||
expecting_first_page_ = true;
|
||||
@@ -128,6 +128,9 @@ void PrintViewManagerBase::OnPdfToEmfConverted(
|
||||
const PrintHostMsg_DidPrintPage_Params& params,
|
||||
double scale_factor,
|
||||
const std::vector<base::FilePath>& emf_files) {
|
||||
if (!print_job_.get())
|
||||
return;
|
||||
|
||||
PrintedDocument* document = print_job_->document();
|
||||
if (!document)
|
||||
return;
|
||||
@@ -526,12 +529,12 @@ bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
// The job was initiated by a script. Time to get the corresponding worker
|
||||
// thread.
|
||||
scoped_refptr<PrinterQuery> queued_query = queue_->PopPrinterQuery(cookie);
|
||||
if (!queued_query) {
|
||||
if (!queued_query.get()) {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!CreateNewPrintJob(queued_query)) {
|
||||
if (!CreateNewPrintJob(queued_query.get())) {
|
||||
// Don't kill anything.
|
||||
return false;
|
||||
}
|
||||
@@ -568,7 +571,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
|
||||
scoped_refptr<printing::PrinterQuery> printer_query;
|
||||
printer_query = queue_->PopPrinterQuery(cookie);
|
||||
if (!printer_query)
|
||||
if (!printer_query.get())
|
||||
return;
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::IO, FROM_HERE,
|
||||
|
@@ -8,20 +8,20 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/browser/printing/printing_ui_web_contents_observer.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/common/print_messages.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/common/child_process_host.h"
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "chrome/browser/printing/print_dialog_cloud.h"
|
||||
#endif
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
@@ -49,7 +51,7 @@ static base::LazyInstance<PrintingSequencePathMap>
|
||||
g_printing_file_descriptor_map = LAZY_INSTANCE_INITIALIZER;
|
||||
#endif
|
||||
|
||||
void RenderParamsFromPrintSettings(const printing::PrintSettings& settings,
|
||||
void RenderParamsFromPrintSettings(const PrintSettings& settings,
|
||||
PrintMsg_Print_Params* params) {
|
||||
params->page_size = settings.page_setup_device_units().physical_size();
|
||||
params->content_size.SetSize(
|
||||
@@ -85,7 +87,7 @@ PrintingMessageFilter::PrintingMessageFilter(int render_process_id)
|
||||
: content::BrowserMessageFilter(PrintMsgStart),
|
||||
render_process_id_(render_process_id),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
DCHECK(queue_.get());
|
||||
}
|
||||
|
||||
PrintingMessageFilter::~PrintingMessageFilter() {
|
||||
@@ -174,8 +176,8 @@ void PrintingMessageFilter::OnAllocateTempFileForPrinting(
|
||||
content::WebContents* wc = GetWebContentsForRenderView(render_view_id);
|
||||
if (!wc)
|
||||
return;
|
||||
printing::PrintViewManagerBasic* print_view_manager =
|
||||
printing::PrintViewManagerBasic::FromWebContents(wc);
|
||||
PrintViewManagerBasic* print_view_manager =
|
||||
PrintViewManagerBasic::FromWebContents(wc);
|
||||
// The file descriptor is originally created in & passed from the Android
|
||||
// side, and it will handle the closing.
|
||||
const base::FileDescriptor& file_descriptor =
|
||||
@@ -208,11 +210,11 @@ void PrintingMessageFilter::OnTempFileForPrintingWritten(int render_view_id,
|
||||
content::WebContents* wc = GetWebContentsForRenderView(render_view_id);
|
||||
if (!wc)
|
||||
return;
|
||||
printing::PrintViewManagerBasic* print_view_manager =
|
||||
printing::PrintViewManagerBasic::FromWebContents(wc);
|
||||
PrintViewManagerBasic* print_view_manager =
|
||||
PrintViewManagerBasic::FromWebContents(wc);
|
||||
const base::FileDescriptor& file_descriptor =
|
||||
print_view_manager->file_descriptor();
|
||||
printing::PrintingContextAndroid::PdfWritingDone(file_descriptor.fd, true);
|
||||
PrintingContextAndroid::PdfWritingDone(file_descriptor.fd, true);
|
||||
// Invalidate the file descriptor so it doesn't accidentally get reused.
|
||||
print_view_manager->set_file_descriptor(base::FileDescriptor(-1, false));
|
||||
#endif
|
||||
@@ -244,46 +246,6 @@ content::WebContents* PrintingMessageFilter::GetWebContentsForRenderView(
|
||||
return view ? content::WebContents::FromRenderViewHost(view) : NULL;
|
||||
}
|
||||
|
||||
struct PrintingMessageFilter::GetPrintSettingsForRenderViewParams {
|
||||
printing::PrinterQuery::GetSettingsAskParam ask_user_for_settings;
|
||||
int expected_page_count;
|
||||
bool has_selection;
|
||||
printing::MarginType margin_type;
|
||||
};
|
||||
|
||||
void PrintingMessageFilter::GetPrintSettingsForRenderView(
|
||||
int render_view_id,
|
||||
GetPrintSettingsForRenderViewParams params,
|
||||
const base::Closure& callback,
|
||||
scoped_refptr<printing::PrinterQuery> printer_query) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
content::WebContents* wc = GetWebContentsForRenderView(render_view_id);
|
||||
if (wc) {
|
||||
scoped_ptr<PrintingUIWebContentsObserver> wc_observer(
|
||||
new PrintingUIWebContentsObserver(wc));
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::IO, FROM_HERE,
|
||||
base::Bind(&printing::PrinterQuery::GetSettings, printer_query,
|
||||
params.ask_user_for_settings, base::Passed(&wc_observer),
|
||||
params.expected_page_count, params.has_selection,
|
||||
params.margin_type, callback));
|
||||
} else {
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::IO, FROM_HERE,
|
||||
base::Bind(&PrintingMessageFilter::OnGetPrintSettingsFailed, this,
|
||||
callback, printer_query));
|
||||
}
|
||||
}
|
||||
|
||||
void PrintingMessageFilter::OnGetPrintSettingsFailed(
|
||||
const base::Closure& callback,
|
||||
scoped_refptr<printing::PrinterQuery> printer_query) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
printer_query->GetSettingsDone(printing::PrintSettings(),
|
||||
printing::PrintingContext::FAILED);
|
||||
callback.Run();
|
||||
}
|
||||
|
||||
void PrintingMessageFilter::OnIsPrintingEnabled(bool* is_enabled) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
*is_enabled = true;
|
||||
@@ -291,33 +253,32 @@ void PrintingMessageFilter::OnIsPrintingEnabled(bool* is_enabled) {
|
||||
|
||||
void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
scoped_refptr<printing::PrinterQuery> printer_query;
|
||||
scoped_refptr<PrinterQuery> printer_query;
|
||||
printer_query = queue_->PopPrinterQuery(0);
|
||||
if (!printer_query)
|
||||
printer_query = queue_->CreatePrinterQuery();
|
||||
if (!printer_query.get()) {
|
||||
printer_query =
|
||||
queue_->CreatePrinterQuery(render_process_id_, reply_msg->routing_id());
|
||||
}
|
||||
|
||||
// Loads default settings. This is asynchronous, only the IPC message sender
|
||||
// will hang until the settings are retrieved.
|
||||
GetPrintSettingsForRenderViewParams params;
|
||||
params.ask_user_for_settings = printing::PrinterQuery::DEFAULTS;
|
||||
params.expected_page_count = 0;
|
||||
params.has_selection = false;
|
||||
params.margin_type = printing::DEFAULT_MARGINS;
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::UI, FROM_HERE,
|
||||
base::Bind(&PrintingMessageFilter::GetPrintSettingsForRenderView, this,
|
||||
reply_msg->routing_id(), params,
|
||||
base::Bind(&PrintingMessageFilter::OnGetDefaultPrintSettingsReply,
|
||||
this, printer_query, reply_msg),
|
||||
printer_query));
|
||||
printer_query->GetSettings(
|
||||
PrinterQuery::DEFAULTS,
|
||||
0,
|
||||
false,
|
||||
DEFAULT_MARGINS,
|
||||
base::Bind(&PrintingMessageFilter::OnGetDefaultPrintSettingsReply,
|
||||
this,
|
||||
printer_query,
|
||||
reply_msg));
|
||||
}
|
||||
|
||||
void PrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||
scoped_refptr<printing::PrinterQuery> printer_query,
|
||||
scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_Print_Params params;
|
||||
if (!printer_query.get() ||
|
||||
printer_query->last_status() != printing::PrintingContext::OK) {
|
||||
printer_query->last_status() != PrintingContext::OK) {
|
||||
params.Reset();
|
||||
} else {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(), ¶ms);
|
||||
@@ -339,27 +300,25 @@ void PrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||
void PrintingMessageFilter::OnScriptedPrint(
|
||||
const PrintHostMsg_ScriptedPrint_Params& params,
|
||||
IPC::Message* reply_msg) {
|
||||
scoped_refptr<printing::PrinterQuery> printer_query =
|
||||
scoped_refptr<PrinterQuery> printer_query =
|
||||
queue_->PopPrinterQuery(params.cookie);
|
||||
if (!printer_query)
|
||||
printer_query = queue_->CreatePrinterQuery();
|
||||
GetPrintSettingsForRenderViewParams settings_params;
|
||||
settings_params.ask_user_for_settings = printing::PrinterQuery::ASK_USER;
|
||||
settings_params.expected_page_count = params.expected_pages_count;
|
||||
settings_params.has_selection = params.has_selection;
|
||||
settings_params.margin_type = params.margin_type;
|
||||
|
||||
BrowserThread::PostTask(
|
||||
BrowserThread::UI, FROM_HERE,
|
||||
base::Bind(&PrintingMessageFilter::GetPrintSettingsForRenderView, this,
|
||||
reply_msg->routing_id(), settings_params,
|
||||
base::Bind(&PrintingMessageFilter::OnScriptedPrintReply, this,
|
||||
printer_query, reply_msg),
|
||||
printer_query));
|
||||
if (!printer_query.get()) {
|
||||
printer_query =
|
||||
queue_->CreatePrinterQuery(render_process_id_, reply_msg->routing_id());
|
||||
}
|
||||
printer_query->GetSettings(
|
||||
PrinterQuery::ASK_USER,
|
||||
params.expected_pages_count,
|
||||
params.has_selection,
|
||||
params.margin_type,
|
||||
base::Bind(&PrintingMessageFilter::OnScriptedPrintReply,
|
||||
this,
|
||||
printer_query,
|
||||
reply_msg));
|
||||
}
|
||||
|
||||
void PrintingMessageFilter::OnScriptedPrintReply(
|
||||
scoped_refptr<printing::PrinterQuery> printer_query,
|
||||
scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_PrintPages_Params params;
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -367,14 +326,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
|
||||
// |reply_msg| before we can get the routing ID for the Android code.
|
||||
int routing_id = reply_msg->routing_id();
|
||||
#endif
|
||||
if (printer_query->last_status() != printing::PrintingContext::OK ||
|
||||
if (printer_query->last_status() != PrintingContext::OK ||
|
||||
!printer_query->settings().dpi()) {
|
||||
params.Reset();
|
||||
} else {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params);
|
||||
params.params.document_cookie = printer_query->cookie();
|
||||
params.pages =
|
||||
printing::PageRange::GetPages(printer_query->settings().ranges());
|
||||
params.pages = PageRange::GetPages(printer_query->settings().ranges());
|
||||
}
|
||||
PrintHostMsg_ScriptedPrint::WriteReplyParams(reply_msg, params);
|
||||
Send(reply_msg);
|
||||
@@ -401,8 +359,8 @@ void PrintingMessageFilter::UpdateFileDescriptor(int render_view_id, int fd) {
|
||||
content::WebContents* wc = GetWebContentsForRenderView(render_view_id);
|
||||
if (!wc)
|
||||
return;
|
||||
printing::PrintViewManagerBasic* print_view_manager =
|
||||
printing::PrintViewManagerBasic::FromWebContents(wc);
|
||||
PrintViewManagerBasic* print_view_manager =
|
||||
PrintViewManagerBasic::FromWebContents(wc);
|
||||
print_view_manager->set_file_descriptor(base::FileDescriptor(fd, false));
|
||||
}
|
||||
#endif
|
||||
@@ -410,30 +368,45 @@ void PrintingMessageFilter::UpdateFileDescriptor(int render_view_id, int fd) {
|
||||
void PrintingMessageFilter::OnUpdatePrintSettings(
|
||||
int document_cookie, const base::DictionaryValue& job_settings,
|
||||
IPC::Message* reply_msg) {
|
||||
scoped_refptr<printing::PrinterQuery> printer_query;
|
||||
scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
|
||||
|
||||
scoped_refptr<PrinterQuery> printer_query;
|
||||
printer_query = queue_->PopPrinterQuery(document_cookie);
|
||||
if (!printer_query)
|
||||
printer_query = queue_->CreatePrinterQuery();
|
||||
if (!printer_query.get()) {
|
||||
int host_id = render_process_id_;
|
||||
int routing_id = reply_msg->routing_id();
|
||||
if (!new_settings->GetInteger(printing::kPreviewInitiatorHostId,
|
||||
&host_id) ||
|
||||
!new_settings->GetInteger(printing::kPreviewInitiatorRoutingId,
|
||||
&routing_id)) {
|
||||
host_id = content::ChildProcessHost::kInvalidUniqueID;
|
||||
routing_id = content::ChildProcessHost::kInvalidUniqueID;
|
||||
}
|
||||
printer_query = queue_->CreatePrinterQuery(host_id, routing_id);
|
||||
}
|
||||
printer_query->SetSettings(
|
||||
job_settings,
|
||||
new_settings.Pass(),
|
||||
base::Bind(&PrintingMessageFilter::OnUpdatePrintSettingsReply, this,
|
||||
printer_query, reply_msg));
|
||||
}
|
||||
|
||||
void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
scoped_refptr<printing::PrinterQuery> printer_query,
|
||||
scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_PrintPages_Params params;
|
||||
if (!printer_query.get() ||
|
||||
printer_query->last_status() != printing::PrintingContext::OK) {
|
||||
printer_query->last_status() != PrintingContext::OK) {
|
||||
params.Reset();
|
||||
} else {
|
||||
RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params);
|
||||
params.params.document_cookie = printer_query->cookie();
|
||||
params.pages =
|
||||
printing::PageRange::GetPages(printer_query->settings().ranges());
|
||||
params.pages = PageRange::GetPages(printer_query->settings().ranges());
|
||||
}
|
||||
PrintHostMsg_UpdatePrintSettings::WriteReplyParams(reply_msg, params);
|
||||
PrintHostMsg_UpdatePrintSettings::WriteReplyParams(
|
||||
reply_msg,
|
||||
params,
|
||||
printer_query &&
|
||||
(printer_query->last_status() == printing::PrintingContext::CANCEL));
|
||||
Send(reply_msg);
|
||||
// If user hasn't cancelled.
|
||||
if (printer_query.get()) {
|
||||
@@ -444,3 +417,5 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace printing
|
||||
|
@@ -26,10 +26,10 @@ class WebContents;
|
||||
}
|
||||
|
||||
namespace printing {
|
||||
class PrinterQuery;
|
||||
|
||||
class PrintJobManager;
|
||||
class PrintQueriesQueue;
|
||||
}
|
||||
class PrinterQuery;
|
||||
|
||||
// This class filters out incoming printing related IPC messages for the
|
||||
// renderer process on the IPC thread.
|
||||
@@ -81,35 +81,21 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
// to base::Bind.
|
||||
struct GetPrintSettingsForRenderViewParams;
|
||||
|
||||
// Retrieve print settings. Uses |render_view_id| to get a parent
|
||||
// for any UI created if needed.
|
||||
void GetPrintSettingsForRenderView(
|
||||
int render_view_id,
|
||||
GetPrintSettingsForRenderViewParams params,
|
||||
const base::Closure& callback,
|
||||
scoped_refptr<printing::PrinterQuery> printer_query);
|
||||
|
||||
void OnGetPrintSettingsFailed(
|
||||
const base::Closure& callback,
|
||||
scoped_refptr<printing::PrinterQuery> printer_query);
|
||||
|
||||
// Checks if printing is enabled.
|
||||
void OnIsPrintingEnabled(bool* is_enabled);
|
||||
|
||||
// Get the default print setting.
|
||||
void OnGetDefaultPrintSettings(IPC::Message* reply_msg);
|
||||
void OnGetDefaultPrintSettingsReply(
|
||||
scoped_refptr<printing::PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
void OnGetDefaultPrintSettingsReply(scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
|
||||
// The renderer host have to show to the user the print dialog and returns
|
||||
// the selected print settings. The task is handled by the print worker
|
||||
// thread and the UI thread. The reply occurs on the IO thread.
|
||||
void OnScriptedPrint(const PrintHostMsg_ScriptedPrint_Params& params,
|
||||
IPC::Message* reply_msg);
|
||||
void OnScriptedPrintReply(
|
||||
scoped_refptr<printing::PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
void OnScriptedPrintReply(scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
|
||||
// Modify the current print settings based on |job_settings|. The task is
|
||||
// handled by the print worker thread and the UI thread. The reply occurs on
|
||||
@@ -117,15 +103,16 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
void OnUpdatePrintSettings(int document_cookie,
|
||||
const base::DictionaryValue& job_settings,
|
||||
IPC::Message* reply_msg);
|
||||
void OnUpdatePrintSettingsReply(
|
||||
scoped_refptr<printing::PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
void OnUpdatePrintSettingsReply(scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
|
||||
const int render_process_id_;
|
||||
|
||||
scoped_refptr<printing::PrintQueriesQueue> queue_;
|
||||
scoped_refptr<PrintQueriesQueue> queue_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PrintingMessageFilter);
|
||||
};
|
||||
|
||||
} // namespace printing
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_
|
||||
|
@@ -68,6 +68,10 @@ class CefRootLayer : public ui::Layer, public ui::LayerDelegate {
|
||||
virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE {
|
||||
}
|
||||
|
||||
virtual void OnDelegatedFrameDamage(
|
||||
const gfx::Rect& damage_rect_in_dip) OVERRIDE {
|
||||
}
|
||||
|
||||
virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {
|
||||
}
|
||||
|
||||
@@ -172,7 +176,9 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
#if !defined(OS_MACOSX)
|
||||
// On OS X the ui::Compositor is created/owned by the platform view.
|
||||
compositor_.reset(
|
||||
new ui::Compositor(compositor_widget_, content::GetContextFactory()));
|
||||
new ui::Compositor(compositor_widget_,
|
||||
content::GetContextFactory(),
|
||||
base::MessageLoopProxy::current()));
|
||||
#endif
|
||||
compositor_->SetRootLayer(root_layer_.get());
|
||||
|
||||
@@ -185,9 +191,16 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR(
|
||||
}
|
||||
|
||||
CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() {
|
||||
// Marking the DelegatedFrameHost as removed from the window hierarchy is
|
||||
// necessary to remove all connections to its old ui::Compositor.
|
||||
if (is_showing_)
|
||||
delegated_frame_host_->WasHidden();
|
||||
delegated_frame_host_->RemovingFromWindow();
|
||||
|
||||
PlatformDestroyCompositorWidget();
|
||||
|
||||
delegated_frame_host_.reset(NULL);
|
||||
compositor_.reset(NULL);
|
||||
PlatformDestroyCompositorWidget();
|
||||
root_layer_.reset(NULL);
|
||||
}
|
||||
|
||||
@@ -341,9 +354,9 @@ void CefRenderWidgetHostViewOSR::WasShown() {
|
||||
|
||||
is_showing_ = true;
|
||||
if (render_widget_host_)
|
||||
render_widget_host_->WasShown();
|
||||
render_widget_host_->WasShown(ui::LatencyInfo());
|
||||
delegated_frame_host_->AddedToWindow();
|
||||
delegated_frame_host_->WasShown();
|
||||
delegated_frame_host_->WasShown(ui::LatencyInfo());
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::WasHidden() {
|
||||
@@ -472,21 +485,13 @@ void CefRenderWidgetHostViewOSR::SelectionBoundsChanged(
|
||||
const ViewHostMsg_SelectionBounds_Params& params) {
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::ScrollOffsetChanged() {
|
||||
if (!browser_impl_)
|
||||
return;
|
||||
|
||||
browser_impl_->GetClient()->GetRenderHandler()->
|
||||
OnScrollOffsetChanged(browser_impl_.get());
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurface(
|
||||
const gfx::Rect& src_subrect,
|
||||
const gfx::Size& dst_size,
|
||||
const base::Callback<void(bool, const SkBitmap&)>& callback,
|
||||
const SkBitmap::Config config) {
|
||||
const SkColorType color_type) {
|
||||
delegated_frame_host_->CopyFromCompositingSurface(
|
||||
src_subrect, dst_size, callback, config);
|
||||
src_subrect, dst_size, callback, color_type);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceToVideoFrame(
|
||||
@@ -596,6 +601,12 @@ gfx::GLSurfaceHandle CefRenderWidgetHostViewOSR::GetCompositingSurface() {
|
||||
GetSharedSurfaceHandle();
|
||||
}
|
||||
|
||||
content::BrowserAccessibilityManager*
|
||||
CefRenderWidgetHostViewOSR::CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(OS_MACOSX) && defined(USE_AURA)
|
||||
void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
|
||||
const gfx::Range& range,
|
||||
@@ -615,11 +626,6 @@ content::RenderWidgetHostImpl* CefRenderWidgetHostViewOSR::GetHost() {
|
||||
return render_widget_host_;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::SchedulePaintInRect(
|
||||
const gfx::Rect& damage_rect_in_dip) {
|
||||
root_layer_->SchedulePaint(damage_rect_in_dip);
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::IsVisible() {
|
||||
return IsShowing();
|
||||
}
|
||||
@@ -909,13 +915,11 @@ void CefRenderWidgetHostViewOSR::PrepareTextureCopyOutputResult(
|
||||
bitmap_size.height() != result_size.height()) {
|
||||
// Create a new bitmap if the size has changed.
|
||||
bitmap_.reset(new SkBitmap);
|
||||
bitmap_->setConfig(SkBitmap::kARGB_8888_Config,
|
||||
result_size.width(),
|
||||
result_size.height(),
|
||||
0,
|
||||
kOpaque_SkAlphaType);
|
||||
if (!bitmap_->allocPixels())
|
||||
if (!bitmap_->allocN32Pixels(result_size.width(),
|
||||
result_size.height(),
|
||||
true)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
content::ImageTransportFactory* factory =
|
||||
@@ -944,7 +948,7 @@ void CefRenderWidgetHostViewOSR::PrepareTextureCopyOutputResult(
|
||||
gfx::Rect(result_size),
|
||||
result_size,
|
||||
pixels,
|
||||
SkBitmap::kARGB_8888_Config,
|
||||
kN32_SkColorType,
|
||||
base::Bind(
|
||||
&CefRenderWidgetHostViewOSR::CopyFromCompositingSurfaceFinishedProxy,
|
||||
weak_ptr_factory_.GetWeakPtr(),
|
||||
|
@@ -17,6 +17,10 @@
|
||||
#include "content/browser/renderer_host/render_widget_host_view_base.h"
|
||||
#include "ui/compositor/compositor.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "content/browser/compositor/browser_compositor_view_mac.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "ui/gfx/win/window_impl.h"
|
||||
#endif
|
||||
@@ -32,8 +36,10 @@ class CefWebContentsViewOSR;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#ifdef __OBJC__
|
||||
@class CALayer;
|
||||
@class NSWindow;
|
||||
#else
|
||||
class CALayer;
|
||||
class NSWindow;
|
||||
#endif
|
||||
#endif
|
||||
@@ -62,6 +68,9 @@ class CefWindowX11;
|
||||
|
||||
class CefRenderWidgetHostViewOSR
|
||||
: public content::RenderWidgetHostViewBase,
|
||||
#if defined(OS_MACOSX)
|
||||
public content::BrowserCompositorViewMacClient,
|
||||
#endif
|
||||
public content::DelegatedFrameHostClient {
|
||||
public:
|
||||
explicit CefRenderWidgetHostViewOSR(content::RenderWidgetHost* widget);
|
||||
@@ -128,12 +137,11 @@ class CefRenderWidgetHostViewOSR
|
||||
virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE;
|
||||
virtual void SelectionBoundsChanged(
|
||||
const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE;
|
||||
virtual void ScrollOffsetChanged() OVERRIDE;
|
||||
virtual void CopyFromCompositingSurface(
|
||||
const gfx::Rect& src_subrect,
|
||||
const gfx::Size& dst_size,
|
||||
const base::Callback<void(bool, const SkBitmap&)>& callback,
|
||||
const SkBitmap::Config config) OVERRIDE;
|
||||
const SkColorType color_type) OVERRIDE;
|
||||
virtual void CopyFromCompositingSurfaceToVideoFrame(
|
||||
const gfx::Rect& src_subrect,
|
||||
const scoped_refptr<media::VideoFrame>& target,
|
||||
@@ -158,6 +166,9 @@ class CefRenderWidgetHostViewOSR
|
||||
virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE;
|
||||
virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
|
||||
virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
|
||||
virtual content::BrowserAccessibilityManager*
|
||||
CreateBrowserAccessibilityManager(
|
||||
content::BrowserAccessibilityDelegate* delegate) OVERRIDE;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
virtual bool PostProcessEventForPluginIme(
|
||||
@@ -176,12 +187,19 @@ class CefRenderWidgetHostViewOSR
|
||||
virtual gfx::NativeViewId GetParentForWindowlessPlugin() const OVERRIDE;
|
||||
#endif
|
||||
|
||||
// DelegatedFrameHost implementation.
|
||||
#if defined(OS_MACOSX)
|
||||
// BrowserCompositorViewMacClient implementation.
|
||||
virtual bool BrowserCompositorViewShouldAckImmediately() const OVERRIDE;
|
||||
virtual void BrowserCompositorViewFrameSwapped(
|
||||
const std::vector<ui::LatencyInfo>& latency_info) OVERRIDE;
|
||||
virtual NSView* BrowserCompositorSuperview() OVERRIDE;
|
||||
virtual ui::Layer* BrowserCompositorRootLayer() OVERRIDE;
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
// DelegatedFrameHostClient implementation.
|
||||
virtual ui::Compositor* GetCompositor() const OVERRIDE;
|
||||
virtual ui::Layer* GetLayer() OVERRIDE;
|
||||
virtual content::RenderWidgetHostImpl* GetHost() OVERRIDE;
|
||||
virtual void SchedulePaintInRect(
|
||||
const gfx::Rect& damage_rect_in_dip) OVERRIDE;
|
||||
virtual bool IsVisible() OVERRIDE;
|
||||
virtual scoped_ptr<content::ResizeLock> CreateResizeLock(
|
||||
bool defer_compositor_lock) OVERRIDE;
|
||||
@@ -295,6 +313,8 @@ class CefRenderWidgetHostViewOSR
|
||||
scoped_ptr<gfx::WindowImpl> window_;
|
||||
#elif defined(OS_MACOSX)
|
||||
NSWindow* window_;
|
||||
CALayer* background_layer_;
|
||||
scoped_ptr<content::BrowserCompositorViewMac> compositor_view_;
|
||||
#elif defined(USE_X11)
|
||||
CefWindowX11* window_;
|
||||
#endif
|
||||
|
@@ -10,7 +10,8 @@
|
||||
#include "libcef/browser/browser_host_impl.h"
|
||||
#include "libcef/browser/text_input_client_osr_mac.h"
|
||||
|
||||
#include "content/browser/compositor/browser_compositor_view_private_mac.h"
|
||||
#include "content/browser/compositor/browser_compositor_view_mac.h"
|
||||
#include "ui/events/latency_info.h"
|
||||
|
||||
#if !defined(UNUSED)
|
||||
#define UNUSED(x) ((void)(x)) /* to avoid warnings */
|
||||
@@ -86,6 +87,30 @@ void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged(
|
||||
client->composition_bounds_ = character_bounds;
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::BrowserCompositorViewShouldAckImmediately()
|
||||
const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::BrowserCompositorViewFrameSwapped(
|
||||
const std::vector<ui::LatencyInfo>& all_latency_info) {
|
||||
if (!render_widget_host_)
|
||||
return;
|
||||
for (auto latency_info : all_latency_info) {
|
||||
latency_info.AddLatencyNumber(
|
||||
ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
|
||||
render_widget_host_->FrameSwapped(latency_info);
|
||||
}
|
||||
}
|
||||
|
||||
NSView* CefRenderWidgetHostViewOSR::BrowserCompositorSuperview() {
|
||||
return [window_ contentView];
|
||||
}
|
||||
|
||||
ui::Layer* CefRenderWidgetHostViewOSR::BrowserCompositorRootLayer() {
|
||||
return root_layer_.get();
|
||||
}
|
||||
|
||||
CefTextInputContext CefRenderWidgetHostViewOSR::GetNSTextInputContext() {
|
||||
if (!text_input_context_osr_mac_) {
|
||||
CefTextInputClientOSRMac* text_input_client_osr_mac =
|
||||
@@ -260,21 +285,30 @@ void CefRenderWidgetHostViewOSR::PlatformCreateCompositorWidget() {
|
||||
styleMask:NSBorderlessWindowMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
BrowserCompositorViewCocoa* view = [[BrowserCompositorViewCocoa alloc] init];
|
||||
[window_ setContentView:view];
|
||||
compositor_.reset([view compositor]);
|
||||
|
||||
// Create a CALayer which is used by BrowserCompositorViewMac for rendering.
|
||||
background_layer_ = [[[CALayer alloc] init] retain];
|
||||
[background_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
||||
NSView* content_view = [window_ contentView];
|
||||
[content_view setLayer:background_layer_];
|
||||
[content_view setWantsLayer:YES];
|
||||
|
||||
compositor_view_.reset(new content::BrowserCompositorViewMac(this));
|
||||
compositor_.reset(compositor_view_->GetCompositor());
|
||||
DCHECK(compositor_);
|
||||
compositor_widget_ = view;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::PlatformDestroyCompositorWidget() {
|
||||
DCHECK(window_);
|
||||
|
||||
// Compositor is owned by and will be freed by BrowserCompositorViewCocoa.
|
||||
// Compositor is owned by and will be freed by BrowserCompositorViewMac.
|
||||
ui::Compositor* compositor = compositor_.release();
|
||||
UNUSED(compositor);
|
||||
|
||||
[window_ close];
|
||||
window_ = nil;
|
||||
compositor_widget_ = gfx::kNullAcceleratedWidget;
|
||||
[background_layer_ release];
|
||||
background_layer_ = nil;
|
||||
|
||||
compositor_view_.reset(NULL);
|
||||
}
|
||||
|
@@ -62,12 +62,10 @@ void CefResourceDispatcherHostDelegate::RequestBeginning(
|
||||
net::URLRequest* request,
|
||||
content::ResourceContext* resource_context,
|
||||
content::AppCacheService* appcache_service,
|
||||
ResourceType::Type resource_type,
|
||||
int child_id,
|
||||
int route_id,
|
||||
content::ResourceType resource_type,
|
||||
ScopedVector<content::ResourceThrottle>* throttles) {
|
||||
if (resource_type == ResourceType::MAIN_FRAME ||
|
||||
resource_type == ResourceType::SUB_FRAME) {
|
||||
if (resource_type == content::ResourceType::RESOURCE_TYPE_MAIN_FRAME ||
|
||||
resource_type == content::ResourceType::RESOURCE_TYPE_SUB_FRAME) {
|
||||
int64 frame_id = -1;
|
||||
|
||||
// ResourceRequestInfo will not exist for requests originating from
|
||||
@@ -94,8 +92,7 @@ void CefResourceDispatcherHostDelegate::RequestBeginning(
|
||||
bool CefResourceDispatcherHostDelegate::HandleExternalProtocol(
|
||||
const GURL& url,
|
||||
int child_id,
|
||||
int route_id,
|
||||
bool initiated_by_user_gesture) {
|
||||
int route_id) {
|
||||
CefRefPtr<CefBrowserHostImpl> browser =
|
||||
CefBrowserHostImpl::GetBrowserForView(child_id, route_id);
|
||||
if (browser.get())
|
||||
|
@@ -21,14 +21,11 @@ class CefResourceDispatcherHostDelegate
|
||||
net::URLRequest* request,
|
||||
content::ResourceContext* resource_context,
|
||||
content::AppCacheService* appcache_service,
|
||||
ResourceType::Type resource_type,
|
||||
int child_id,
|
||||
int route_id,
|
||||
content::ResourceType resource_type,
|
||||
ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE;
|
||||
virtual bool HandleExternalProtocol(const GURL& url,
|
||||
int child_id,
|
||||
int route_id,
|
||||
bool initiated_by_user_gesture) OVERRIDE;
|
||||
int route_id) OVERRIDE;
|
||||
virtual void OnRequestRedirected(
|
||||
const GURL& redirect_url,
|
||||
net::URLRequest* request,
|
||||
|
@@ -44,7 +44,7 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
[colorAttr colorUsingColorSpaceName:NSDeviceRGBColorSpace]);
|
||||
}
|
||||
underlines->push_back(blink::WebCompositionUnderline(
|
||||
range.location, NSMaxRange(range), color, [style intValue] > 1));
|
||||
range.location, NSMaxRange(range), color, [style intValue] > 1, 0));
|
||||
}
|
||||
i = range.location + range.length;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ extern "C" {
|
||||
} else {
|
||||
// Use a thin black underline by default.
|
||||
underlines_.push_back(blink::WebCompositionUnderline(0, length,
|
||||
SK_ColorBLACK, false));
|
||||
SK_ColorBLACK, false, 0));
|
||||
}
|
||||
|
||||
// If we are handling a key down event, then SetComposition() will be
|
||||
|
@@ -41,7 +41,9 @@ bool CefTraceSubscriber::BeginTracing(
|
||||
done_callback = base::Bind(&CefCompletionCallback::OnComplete, callback);
|
||||
|
||||
TracingController::GetInstance()->EnableRecording(
|
||||
categories, TracingController::DEFAULT_OPTIONS, done_callback);
|
||||
base::debug::CategoryFilter(categories),
|
||||
base::debug::TraceOptions(),
|
||||
done_callback);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -44,8 +44,8 @@
|
||||
#include "net/http/http_util.h"
|
||||
#include "net/http/transport_security_state.h"
|
||||
#include "net/proxy/proxy_service.h"
|
||||
#include "net/ssl/default_server_bound_cert_store.h"
|
||||
#include "net/ssl/server_bound_cert_service.h"
|
||||
#include "net/ssl/channel_id_service.h"
|
||||
#include "net/ssl/default_channel_id_store.h"
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
#include "url/url_constants.h"
|
||||
#include "net/url_request/http_user_agent_settings.h"
|
||||
@@ -141,8 +141,8 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
|
||||
storage_->set_network_delegate(new CefNetworkDelegate);
|
||||
|
||||
storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
|
||||
new net::DefaultServerBoundCertStore(NULL),
|
||||
storage_->set_channel_id_service(new net::ChannelIDService(
|
||||
new net::DefaultChannelIDStore(NULL),
|
||||
base::WorkerPool::GetTaskRunner(true)));
|
||||
storage_->set_http_user_agent_settings(
|
||||
new CefHttpUserAgentSettings("en-us,en"));
|
||||
@@ -201,8 +201,8 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
url_request_context_->cert_verifier();
|
||||
network_session_params.transport_security_state =
|
||||
url_request_context_->transport_security_state();
|
||||
network_session_params.server_bound_cert_service =
|
||||
url_request_context_->server_bound_cert_service();
|
||||
network_session_params.channel_id_service =
|
||||
url_request_context_->channel_id_service();
|
||||
network_session_params.proxy_service =
|
||||
url_request_context_->proxy_service();
|
||||
network_session_params.ssl_config_service =
|
||||
|
@@ -151,7 +151,7 @@ void CefURLRequestContextProxy::Initialize(
|
||||
set_host_resolver(context->host_resolver());
|
||||
set_cert_verifier(context->cert_verifier());
|
||||
set_transport_security_state(context->transport_security_state());
|
||||
set_server_bound_cert_service(context->server_bound_cert_service());
|
||||
set_channel_id_service(context->channel_id_service());
|
||||
set_fraudulent_certificate_reporter(
|
||||
context->fraudulent_certificate_reporter());
|
||||
set_proxy_service(context->proxy_service());
|
||||
|
@@ -96,20 +96,13 @@ void CefWebContentsViewOSR::SetOverscrollControllerEnabled(bool enabled) {
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void CefWebContentsViewOSR::SetAllowOverlappingViews(bool overlapping) {
|
||||
void CefWebContentsViewOSR::SetAllowOtherViews(bool allow) {
|
||||
}
|
||||
|
||||
bool CefWebContentsViewOSR::GetAllowOverlappingViews() const {
|
||||
bool CefWebContentsViewOSR::GetAllowOtherViews() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefWebContentsViewOSR::SetOverlayView(
|
||||
content::WebContentsView* overlay,
|
||||
const gfx::Point& offset) {
|
||||
}
|
||||
void CefWebContentsViewOSR::RemoveOverlayView() {
|
||||
}
|
||||
|
||||
bool CefWebContentsViewOSR::IsEventTracking() const {
|
||||
return false;
|
||||
}
|
||||
|
@@ -48,11 +48,8 @@ class CefWebContentsViewOSR : public content::WebContentsView,
|
||||
virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
virtual void SetAllowOverlappingViews(bool overlapping) OVERRIDE;
|
||||
virtual bool GetAllowOverlappingViews() const OVERRIDE;
|
||||
virtual void SetOverlayView(content::WebContentsView* overlay,
|
||||
const gfx::Point& offset) OVERRIDE;
|
||||
virtual void RemoveOverlayView() OVERRIDE;
|
||||
virtual void SetAllowOtherViews(bool allow) OVERRIDE;
|
||||
virtual bool GetAllowOtherViews() const OVERRIDE;
|
||||
virtual bool IsEventTracking() const OVERRIDE;
|
||||
virtual void CloseTabAfterEventTracking() OVERRIDE;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user