mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-26 17:07:47 +01:00
Update to Chromium revision 261035.
- The CefSettings.release_dcheck_enabled option has been removed. This functionality can be enabled by setting the dcheck_always_on=1 gyp variable before building CEF/Chromium. See http://crbug.com/350462 for details. - The UR_FLAG_ALLOW_COOKIES option has been removed and the functionality has been merged into UR_FLAG_ALLOW_CACHED_CREDENTIALS. - Mac: [NSApplication sharedApplication] should no longer be called in the renderer process. See http://crbug.com/306348 for details. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1641 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
11df06b1ad
commit
199a3faafe
@ -17,5 +17,5 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
|
||||||
'chromium_revision': '251746',
|
'chromium_revision': '261035',
|
||||||
}
|
}
|
||||||
|
24
cef.gyp
24
cef.gyp
@ -10,10 +10,10 @@
|
|||||||
'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
|
'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
|
||||||
'framework_name': 'Chromium Embedded Framework',
|
'framework_name': 'Chromium Embedded Framework',
|
||||||
'revision': '<!(python tools/revision.py)',
|
'revision': '<!(python tools/revision.py)',
|
||||||
'chrome_version': '<!(python ../chrome/tools/build/version.py -f ../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
|
'chrome_version': '<!(python ../build/util/version.py -f ../chrome/VERSION -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
|
||||||
# Need to be creative to match dylib version formatting requirements.
|
# Need to be creative to match dylib version formatting requirements.
|
||||||
'version_mac_dylib':
|
'version_mac_dylib':
|
||||||
'<!(python ../chrome/tools/build/version.py -f VERSION -f ../chrome/VERSION -t "@CEF_MAJOR@<(revision).@BUILD_HI@.@BUILD_LO@" -e "BUILD_HI=int(BUILD)/256" -e "BUILD_LO=int(BUILD)%256")',
|
'<!(python ../build/util/version.py -f VERSION -f ../chrome/VERSION -t "@CEF_MAJOR@<(revision).@BUILD_HI@.@BUILD_LO@" -e "BUILD_HI=int(BUILD)/256" -e "BUILD_LO=int(BUILD)%256")',
|
||||||
},
|
},
|
||||||
'includes': [
|
'includes': [
|
||||||
# Bring in the source file lists.
|
# Bring in the source file lists.
|
||||||
@ -391,7 +391,7 @@
|
|||||||
'<(DEPTH)/testing/gtest.gyp:gtest',
|
'<(DEPTH)/testing/gtest.gyp:gtest',
|
||||||
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
|
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
|
||||||
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
|
||||||
'<(DEPTH)/ui/ui.gyp:ui',
|
'<(DEPTH)/ui/base/ui_base.gyp:ui_base',
|
||||||
'libcef_dll_wrapper',
|
'libcef_dll_wrapper',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
@ -743,7 +743,6 @@
|
|||||||
'cef_resources',
|
'cef_resources',
|
||||||
],
|
],
|
||||||
'variables': {
|
'variables': {
|
||||||
'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
|
|
||||||
'make_pack_header_path': 'tools/make_pack_header.py',
|
'make_pack_header_path': 'tools/make_pack_header.py',
|
||||||
},
|
},
|
||||||
'actions': [
|
'actions': [
|
||||||
@ -758,16 +757,9 @@
|
|||||||
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
|
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
|
||||||
'<(grit_out_dir)/cef_resources.pak',
|
'<(grit_out_dir)/cef_resources.pak',
|
||||||
],
|
],
|
||||||
|
'pak_output': '<(PRODUCT_DIR)/cef.pak',
|
||||||
},
|
},
|
||||||
'inputs': [
|
'includes': [ '../build/repack_action.gypi' ],
|
||||||
'<(repack_path)',
|
|
||||||
'<@(pak_inputs)',
|
|
||||||
],
|
|
||||||
'outputs': [
|
|
||||||
'<(PRODUCT_DIR)/cef.pak',
|
|
||||||
],
|
|
||||||
'action': ['python', '<(repack_path)', '<@(_outputs)',
|
|
||||||
'<@(pak_inputs)'],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'action_name': 'make_pack_resources_header',
|
'action_name': 'make_pack_resources_header',
|
||||||
@ -866,7 +858,7 @@
|
|||||||
'<(DEPTH)/third_party/WebKit/Source/core/core.gyp:webcore',
|
'<(DEPTH)/third_party/WebKit/Source/core/core.gyp:webcore',
|
||||||
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
|
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
|
||||||
'<(DEPTH)/ui/gl/gl.gyp:gl',
|
'<(DEPTH)/ui/gl/gl.gyp:gl',
|
||||||
'<(DEPTH)/ui/ui.gyp:ui',
|
'<(DEPTH)/ui/base/ui_base.gyp:ui_base',
|
||||||
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
|
'<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
|
||||||
'<(DEPTH)/webkit/storage_browser.gyp:webkit_storage_browser',
|
'<(DEPTH)/webkit/storage_browser.gyp:webkit_storage_browser',
|
||||||
'<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
|
'<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
|
||||||
@ -1050,6 +1042,8 @@
|
|||||||
'libcef/renderer/dom_node_impl.h',
|
'libcef/renderer/dom_node_impl.h',
|
||||||
'libcef/renderer/frame_impl.cc',
|
'libcef/renderer/frame_impl.cc',
|
||||||
'libcef/renderer/frame_impl.h',
|
'libcef/renderer/frame_impl.h',
|
||||||
|
'libcef/renderer/render_frame_observer.cc',
|
||||||
|
'libcef/renderer/render_frame_observer.h',
|
||||||
'libcef/renderer/render_message_filter.cc',
|
'libcef/renderer/render_message_filter.cc',
|
||||||
'libcef/renderer/render_message_filter.h',
|
'libcef/renderer/render_message_filter.h',
|
||||||
'libcef/renderer/render_process_observer.cc',
|
'libcef/renderer/render_process_observer.cc',
|
||||||
@ -1124,8 +1118,6 @@
|
|||||||
[ 'OS=="mac"', {
|
[ 'OS=="mac"', {
|
||||||
'sources': [
|
'sources': [
|
||||||
'<@(includes_mac)',
|
'<@(includes_mac)',
|
||||||
'libcef/browser/application_mac.h',
|
|
||||||
'libcef/browser/application_mac.mm',
|
|
||||||
'libcef/browser/backing_store_osr.cc',
|
'libcef/browser/backing_store_osr.cc',
|
||||||
'libcef/browser/backing_store_osr.h',
|
'libcef/browser/backing_store_osr.h',
|
||||||
'libcef/browser/browser_host_impl_mac.mm',
|
'libcef/browser/browser_host_impl_mac.mm',
|
||||||
|
@ -296,12 +296,6 @@ typedef struct _cef_settings_t {
|
|||||||
///
|
///
|
||||||
cef_log_severity_t log_severity;
|
cef_log_severity_t log_severity;
|
||||||
|
|
||||||
///
|
|
||||||
// Enable DCHECK in release mode to ease debugging. Also configurable using the
|
|
||||||
// "enable-release-dcheck" command-line switch.
|
|
||||||
///
|
|
||||||
int release_dcheck_enabled;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
// Custom flags that will be used when initializing the V8 JavaScript engine.
|
// Custom flags that will be used when initializing the V8 JavaScript engine.
|
||||||
// The consequences of using custom flags may not be well tested. Also
|
// The consequences of using custom flags may not be well tested. Also
|
||||||
@ -1035,16 +1029,11 @@ typedef enum {
|
|||||||
UR_FLAG_SKIP_CACHE = 1 << 0,
|
UR_FLAG_SKIP_CACHE = 1 << 0,
|
||||||
|
|
||||||
///
|
///
|
||||||
// If set user name, password, and cookies may be sent with the request.
|
// If set user name, password, and cookies may be sent with the request, and
|
||||||
|
// cookies may be saved from the response.
|
||||||
///
|
///
|
||||||
UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1,
|
UR_FLAG_ALLOW_CACHED_CREDENTIALS = 1 << 1,
|
||||||
|
|
||||||
///
|
|
||||||
// If set cookies may be sent with the request and saved from the response.
|
|
||||||
// UR_FLAG_ALLOW_CACHED_CREDENTIALS must also be set.
|
|
||||||
///
|
|
||||||
UR_FLAG_ALLOW_COOKIES = 1 << 2,
|
|
||||||
|
|
||||||
///
|
///
|
||||||
// If set upload progress events will be generated when a request has a body.
|
// If set upload progress events will be generated when a request has a body.
|
||||||
///
|
///
|
||||||
@ -1635,7 +1624,6 @@ typedef enum {
|
|||||||
DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
|
DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
|
||||||
DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
|
DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
|
||||||
DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
|
DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
|
||||||
DOM_EVENT_CATEGORY_BEFORE_LOAD = 0x10000,
|
|
||||||
} cef_dom_event_category_t;
|
} cef_dom_event_category_t;
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -365,7 +365,6 @@ struct CefSettingsTraits {
|
|||||||
cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,
|
cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,
|
||||||
copy);
|
copy);
|
||||||
target->log_severity = src->log_severity;
|
target->log_severity = src->log_severity;
|
||||||
target->release_dcheck_enabled = src->release_dcheck_enabled;
|
|
||||||
cef_string_set(src->javascript_flags.str, src->javascript_flags.length,
|
cef_string_set(src->javascript_flags.str, src->javascript_flags.length,
|
||||||
&target->javascript_flags, copy);
|
&target->javascript_flags, copy);
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
||||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
||||||
// be found in the LICENSE file.
|
|
||||||
|
|
||||||
#ifndef CEF_LIBCEF_BROWSER_APPLICATION_MAC_H_
|
|
||||||
#define CEF_LIBCEF_BROWSER_APPLICATION_MAC_H_
|
|
||||||
|
|
||||||
// Create the CefCrApplication instance used by secondary processes.
|
|
||||||
void CefCrApplicationCreate();
|
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_BROWSER_APPLICATION_MAC_H_
|
|
@ -1,46 +0,0 @@
|
|||||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors.
|
|
||||||
// Portions copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
#include "libcef/browser/application_mac.h"
|
|
||||||
|
|
||||||
#include "base/mac/scoped_sending_event.h"
|
|
||||||
#include "base/message_loop/message_pump_mac.h"
|
|
||||||
|
|
||||||
@interface CefCrApplication : NSApplication<CrAppProtocol,
|
|
||||||
CrAppControlProtocol> {
|
|
||||||
@private
|
|
||||||
BOOL handlingSendEvent_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// CrAppProtocol:
|
|
||||||
- (BOOL)isHandlingSendEvent;
|
|
||||||
|
|
||||||
// CrAppControlProtocol:
|
|
||||||
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent;
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation CefCrApplication
|
|
||||||
|
|
||||||
- (BOOL)isHandlingSendEvent {
|
|
||||||
return handlingSendEvent_;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)sendEvent:(NSEvent*)event {
|
|
||||||
BOOL wasHandlingSendEvent = handlingSendEvent_;
|
|
||||||
handlingSendEvent_ = YES;
|
|
||||||
[super sendEvent:event];
|
|
||||||
handlingSendEvent_ = wasHandlingSendEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
|
|
||||||
handlingSendEvent_ = handlingSendEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
void CefCrApplicationCreate() {
|
|
||||||
[CefCrApplication sharedApplication];
|
|
||||||
}
|
|
@ -29,10 +29,9 @@ BackingStoreOSR::BackingStoreOSR(content::RenderWidgetHost* widget,
|
|||||||
device_scale_factor_(scale_factor) {
|
device_scale_factor_(scale_factor) {
|
||||||
gfx::Size pixel_size = gfx::ToFlooredSize(
|
gfx::Size pixel_size = gfx::ToFlooredSize(
|
||||||
gfx::ScaleSize(size, device_scale_factor_));
|
gfx::ScaleSize(size, device_scale_factor_));
|
||||||
device_.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
|
SkImageInfo info = SkImageInfo::MakeN32Premul(pixel_size.width(),
|
||||||
pixel_size.width(),
|
pixel_size.height());
|
||||||
pixel_size.height(),
|
device_.reset(SkBitmapDevice::Create(info));
|
||||||
true));
|
|
||||||
canvas_.reset(new SkCanvas(device_.get()));
|
canvas_.reset(new SkCanvas(device_.get()));
|
||||||
|
|
||||||
canvas_->drawColor(SK_ColorWHITE);
|
canvas_->drawColor(SK_ColorWHITE);
|
||||||
@ -49,11 +48,9 @@ void BackingStoreOSR::ScaleFactorChanged(float scale_factor) {
|
|||||||
gfx::Size pixel_size = gfx::ToFlooredSize(
|
gfx::Size pixel_size = gfx::ToFlooredSize(
|
||||||
gfx::ScaleSize(size(), device_scale_factor_));
|
gfx::ScaleSize(size(), device_scale_factor_));
|
||||||
|
|
||||||
scoped_ptr<SkBaseDevice> new_device(
|
SkImageInfo info = SkImageInfo::MakeN32Premul(pixel_size.width(),
|
||||||
new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
|
pixel_size.height());
|
||||||
pixel_size.width(),
|
scoped_ptr<SkBaseDevice> new_device(SkBitmapDevice::Create(info));
|
||||||
pixel_size.height(),
|
|
||||||
true));
|
|
||||||
|
|
||||||
scoped_ptr<SkCanvas> new_canvas(new SkCanvas(new_device.get()));
|
scoped_ptr<SkCanvas> new_canvas(new SkCanvas(new_device.get()));
|
||||||
|
|
||||||
|
@ -12,11 +12,13 @@
|
|||||||
class CefBrowserContext : public content::BrowserContext {
|
class CefBrowserContext : public content::BrowserContext {
|
||||||
public:
|
public:
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||||
content::ProtocolHandlerMap* protocol_handlers) = 0;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) = 0;
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) = 0;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_BROWSER_BROWSER_CONTEXT_H_
|
#endif // CEF_LIBCEF_BROWSER_BROWSER_CONTEXT_H_
|
||||||
|
@ -255,6 +255,7 @@ void CefBrowserContextImpl::RequestMidiSysExPermission(
|
|||||||
int render_view_id,
|
int render_view_id,
|
||||||
int bridge_id,
|
int bridge_id,
|
||||||
const GURL& requesting_frame,
|
const GURL& requesting_frame,
|
||||||
|
bool user_gesture,
|
||||||
const MidiSysExPermissionCallback& callback) {
|
const MidiSysExPermissionCallback& callback) {
|
||||||
// TODO(CEF): Implement Web MIDI API permission handling.
|
// TODO(CEF): Implement Web MIDI API permission handling.
|
||||||
callback.Run(false);
|
callback.Run(false);
|
||||||
@ -298,12 +299,14 @@ quota::SpecialStoragePolicy* CefBrowserContextImpl::GetSpecialStoragePolicy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||||
content::ProtocolHandlerMap* protocol_handlers) {
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) {
|
||||||
DCHECK(!url_request_getter_);
|
DCHECK(!url_request_getter_);
|
||||||
url_request_getter_ = new CefURLRequestContextGetter(
|
url_request_getter_ = new CefURLRequestContextGetter(
|
||||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
|
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
|
||||||
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
|
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
|
||||||
protocol_handlers);
|
protocol_handlers,
|
||||||
|
protocol_interceptors.Pass());
|
||||||
resource_context_->set_url_request_context_getter(url_request_getter_.get());
|
resource_context_->set_url_request_context_getter(url_request_getter_.get());
|
||||||
return url_request_getter_.get();
|
return url_request_getter_.get();
|
||||||
}
|
}
|
||||||
@ -312,6 +315,7 @@ net::URLRequestContextGetter*
|
|||||||
CefBrowserContextImpl::CreateRequestContextForStoragePartition(
|
CefBrowserContextImpl::CreateRequestContextForStoragePartition(
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) {
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ class CefBrowserContextImpl : public CefBrowserContext {
|
|||||||
int render_view_id,
|
int render_view_id,
|
||||||
int bridge_id,
|
int bridge_id,
|
||||||
const GURL& requesting_frame,
|
const GURL& requesting_frame,
|
||||||
|
bool user_gesture,
|
||||||
const MidiSysExPermissionCallback& callback) OVERRIDE;
|
const MidiSysExPermissionCallback& callback) OVERRIDE;
|
||||||
virtual void CancelMidiSysExPermissionRequest(
|
virtual void CancelMidiSysExPermissionRequest(
|
||||||
int render_process_id,
|
int render_process_id,
|
||||||
@ -66,11 +67,13 @@ class CefBrowserContextImpl : public CefBrowserContext {
|
|||||||
|
|
||||||
// CefBrowserContext methods.
|
// CefBrowserContext methods.
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||||
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class CefResourceContext;
|
class CefResourceContext;
|
||||||
|
@ -117,6 +117,7 @@ void CefBrowserContextProxy::RequestMidiSysExPermission(
|
|||||||
int render_view_id,
|
int render_view_id,
|
||||||
int bridge_id,
|
int bridge_id,
|
||||||
const GURL& requesting_frame,
|
const GURL& requesting_frame,
|
||||||
|
bool user_gesture,
|
||||||
const MidiSysExPermissionCallback& callback) {
|
const MidiSysExPermissionCallback& callback) {
|
||||||
// TODO(CEF): Implement Web MIDI API permission handling.
|
// TODO(CEF): Implement Web MIDI API permission handling.
|
||||||
callback.Run(false);
|
callback.Run(false);
|
||||||
@ -156,7 +157,8 @@ quota::SpecialStoragePolicy* CefBrowserContextProxy::GetSpecialStoragePolicy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
net::URLRequestContextGetter* CefBrowserContextProxy::CreateRequestContext(
|
net::URLRequestContextGetter* CefBrowserContextProxy::CreateRequestContext(
|
||||||
content::ProtocolHandlerMap* protocol_handlers) {
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) {
|
||||||
DCHECK(!url_request_getter_);
|
DCHECK(!url_request_getter_);
|
||||||
url_request_getter_ =
|
url_request_getter_ =
|
||||||
new CefURLRequestContextGetterProxy(handler_,
|
new CefURLRequestContextGetterProxy(handler_,
|
||||||
@ -170,6 +172,7 @@ net::URLRequestContextGetter*
|
|||||||
CefBrowserContextProxy::CreateRequestContextForStoragePartition(
|
CefBrowserContextProxy::CreateRequestContextForStoragePartition(
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) {
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
|||||||
int render_view_id,
|
int render_view_id,
|
||||||
int bridge_id,
|
int bridge_id,
|
||||||
const GURL& requesting_frame,
|
const GURL& requesting_frame,
|
||||||
|
bool user_gesture,
|
||||||
const MidiSysExPermissionCallback& callback) OVERRIDE;
|
const MidiSysExPermissionCallback& callback) OVERRIDE;
|
||||||
virtual void CancelMidiSysExPermissionRequest(
|
virtual void CancelMidiSysExPermissionRequest(
|
||||||
int render_process_id,
|
int render_process_id,
|
||||||
@ -74,11 +75,13 @@ class CefBrowserContextProxy : public CefBrowserContext {
|
|||||||
|
|
||||||
// CefBrowserContext methods.
|
// CefBrowserContext methods.
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||||
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
|
||||||
|
|
||||||
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }
|
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ void CefBrowserHostImpl::CloseBrowser(bool force_close) {
|
|||||||
if (contents && contents->NeedToFireBeforeUnload()) {
|
if (contents && contents->NeedToFireBeforeUnload()) {
|
||||||
// Will result in a call to BeforeUnloadFired() and, if the close isn't
|
// Will result in a call to BeforeUnloadFired() and, if the close isn't
|
||||||
// canceled, CloseContents().
|
// canceled, CloseContents().
|
||||||
contents->GetRenderViewHost()->FirePageBeforeUnload(false);
|
contents->GetMainFrame()->DispatchBeforeUnload(false);
|
||||||
} else {
|
} else {
|
||||||
CloseContents(contents);
|
CloseContents(contents);
|
||||||
}
|
}
|
||||||
@ -1415,8 +1415,11 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetFrameForRequest(
|
|||||||
content::ResourceRequestInfo::ForRequest(request);
|
content::ResourceRequestInfo::ForRequest(request);
|
||||||
if (!info)
|
if (!info)
|
||||||
return NULL;
|
return NULL;
|
||||||
return GetOrCreateFrame(info->GetFrameID(), info->GetParentFrameID(),
|
return GetOrCreateFrame(info->GetRenderFrameID(),
|
||||||
info->IsMainFrame(), base::string16(), GURL());
|
info->GetParentRenderFrameID(),
|
||||||
|
info->IsMainFrame(),
|
||||||
|
base::string16(),
|
||||||
|
GURL());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
|
void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
|
||||||
@ -1731,7 +1734,8 @@ content::WebContents* CefBrowserHostImpl::OpenURLFromTab(
|
|||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserHostImpl::LoadingStateChanged(content::WebContents* source) {
|
void CefBrowserHostImpl::LoadingStateChanged(content::WebContents* source,
|
||||||
|
bool to_different_document) {
|
||||||
int current_index =
|
int current_index =
|
||||||
web_contents_->GetController().GetLastCommittedEntryIndex();
|
web_contents_->GetController().GetLastCommittedEntryIndex();
|
||||||
int max_index = web_contents_->GetController().GetEntryCount() - 1;
|
int max_index = web_contents_->GetController().GetEntryCount() - 1;
|
||||||
@ -1939,7 +1943,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
|
|||||||
|
|
||||||
void CefBrowserHostImpl::WebContentsCreated(
|
void CefBrowserHostImpl::WebContentsCreated(
|
||||||
content::WebContents* source_contents,
|
content::WebContents* source_contents,
|
||||||
int64 source_frame_id,
|
int opener_render_frame_id,
|
||||||
const base::string16& frame_name,
|
const base::string16& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
content::WebContents* new_contents) {
|
content::WebContents* new_contents) {
|
||||||
@ -2025,7 +2029,8 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
|||||||
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||||
if (!command_line.HasSwitch(switches::kEnableMediaStream)) {
|
if (!command_line.HasSwitch(switches::kEnableMediaStream)) {
|
||||||
// Cancel the request.
|
// Cancel the request.
|
||||||
callback.Run(devices, scoped_ptr<content::MediaStreamUI>());
|
callback.Run(devices, content::MEDIA_DEVICE_PERMISSION_DENIED,
|
||||||
|
scoped_ptr<content::MediaStreamUI>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2059,7 +2064,8 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
callback.Run(devices, scoped_ptr<content::MediaStreamUI>());
|
callback.Run(devices, content::MEDIA_DEVICE_OK,
|
||||||
|
scoped_ptr<content::MediaStreamUI>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,7 +313,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
|||||||
virtual content::WebContents* OpenURLFromTab(
|
virtual content::WebContents* OpenURLFromTab(
|
||||||
content::WebContents* source,
|
content::WebContents* source,
|
||||||
const content::OpenURLParams& params) OVERRIDE;
|
const content::OpenURLParams& params) OVERRIDE;
|
||||||
virtual void LoadingStateChanged(content::WebContents* source) OVERRIDE;
|
virtual void LoadingStateChanged(content::WebContents* source,
|
||||||
|
bool to_different_document) OVERRIDE;
|
||||||
virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
virtual void CloseContents(content::WebContents* source) OVERRIDE;
|
||||||
virtual void UpdateTargetURL(content::WebContents* source,
|
virtual void UpdateTargetURL(content::WebContents* source,
|
||||||
int32 page_id,
|
int32 page_id,
|
||||||
@ -352,7 +353,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
|||||||
const std::string& partition_id,
|
const std::string& partition_id,
|
||||||
content::SessionStorageNamespace* session_storage_namespace) OVERRIDE;
|
content::SessionStorageNamespace* session_storage_namespace) OVERRIDE;
|
||||||
virtual void WebContentsCreated(content::WebContents* source_contents,
|
virtual void WebContentsCreated(content::WebContents* source_contents,
|
||||||
int64 source_frame_id,
|
int opener_render_frame_id,
|
||||||
const base::string16& frame_name,
|
const base::string16& frame_name,
|
||||||
const GURL& target_url,
|
const GURL& target_url,
|
||||||
content::WebContents* new_contents) OVERRIDE;
|
content::WebContents* new_contents) OVERRIDE;
|
||||||
|
@ -85,7 +85,7 @@ void AddFiltersForAcceptTypes(GtkFileChooser* chooser,
|
|||||||
bool has_filter = false;
|
bool has_filter = false;
|
||||||
|
|
||||||
for (size_t i = 0; i < accept_types.size(); ++i) {
|
for (size_t i = 0; i < accept_types.size(); ++i) {
|
||||||
std::string ascii_type = UTF16ToASCII(accept_types[i]);
|
std::string ascii_type = base::UTF16ToASCII(accept_types[i]);
|
||||||
if (ascii_type.length()) {
|
if (ascii_type.length()) {
|
||||||
// Just treat as extension if contains '.' as the first character.
|
// Just treat as extension if contains '.' as the first character.
|
||||||
if (ascii_type[0] == '.') {
|
if (ascii_type[0] == '.') {
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "content/public/browser/web_contents.h"
|
#include "content/public/browser/web_contents.h"
|
||||||
@ -128,7 +129,7 @@ NSMutableArray* GetFileTypesFromAcceptTypes(
|
|||||||
const std::vector<base::string16>& accept_types) {
|
const std::vector<base::string16>& accept_types) {
|
||||||
NSMutableArray* acceptArray = [[NSMutableArray alloc] init];
|
NSMutableArray* acceptArray = [[NSMutableArray alloc] init];
|
||||||
for (size_t i=0; i<accept_types.size(); i++) {
|
for (size_t i=0; i<accept_types.size(); i++) {
|
||||||
std::string ascii_type = UTF16ToASCII(accept_types[i]);
|
std::string ascii_type = base::UTF16ToASCII(accept_types[i]);
|
||||||
if (ascii_type.length()) {
|
if (ascii_type.length()) {
|
||||||
// Just treat as extension if contains '.' as the first character.
|
// Just treat as extension if contains '.' as the first character.
|
||||||
if (ascii_type[0] == '.') {
|
if (ascii_type[0] == '.') {
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "base/win/registry.h"
|
#include "base/win/registry.h"
|
||||||
#include "base/win/windows_version.h"
|
#include "base/win/windows_version.h"
|
||||||
|
#include "content/common/cursors/webcursor.h"
|
||||||
#include "content/public/browser/native_web_keyboard_event.h"
|
#include "content/public/browser/native_web_keyboard_event.h"
|
||||||
#include "content/public/browser/web_contents_view.h"
|
#include "content/public/browser/web_contents_view.h"
|
||||||
#include "content/public/common/file_chooser_params.h"
|
#include "content/public/common/file_chooser_params.h"
|
||||||
@ -39,7 +40,6 @@
|
|||||||
#include "ui/views/layout/fill_layout.h"
|
#include "ui/views/layout/fill_layout.h"
|
||||||
#include "ui/views/widget/widget.h"
|
#include "ui/views/widget/widget.h"
|
||||||
#include "ui/views/widget/widget_delegate.h"
|
#include "ui/views/widget/widget_delegate.h"
|
||||||
#include "webkit/common/cursors/webcursor.h"
|
|
||||||
|
|
||||||
#pragma comment(lib, "dwmapi.lib")
|
#pragma comment(lib, "dwmapi.lib")
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ void WriteTempFileAndView(scoped_refptr<base::RefCountedString> str) {
|
|||||||
tmp_file = tmp_file.AddExtension(L"txt");
|
tmp_file = tmp_file.AddExtension(L"txt");
|
||||||
|
|
||||||
const std::string& data = str->data();
|
const std::string& data = str->data();
|
||||||
int write_ct = file_util::WriteFile(tmp_file, data.c_str(), data.size());
|
int write_ct = base::WriteFile(tmp_file, data.c_str(), data.size());
|
||||||
DCHECK_EQ(static_cast<int>(data.size()), write_ct);
|
DCHECK_EQ(static_cast<int>(data.size()), write_ct);
|
||||||
|
|
||||||
ui::win::OpenItemViaShell(tmp_file);
|
ui::win::OpenItemViaShell(tmp_file);
|
||||||
@ -213,7 +213,7 @@ std::wstring GetFilterStringFromAcceptTypes(
|
|||||||
std::vector<std::wstring> descriptions;
|
std::vector<std::wstring> descriptions;
|
||||||
|
|
||||||
for (size_t i = 0; i < accept_types.size(); ++i) {
|
for (size_t i = 0; i < accept_types.size(); ++i) {
|
||||||
std::string ascii_type = UTF16ToASCII(accept_types[i]);
|
std::string ascii_type = base::UTF16ToASCII(accept_types[i]);
|
||||||
if (ascii_type.length()) {
|
if (ascii_type.length()) {
|
||||||
// Just treat as extension if contains '.' as the first character.
|
// Just treat as extension if contains '.' as the first character.
|
||||||
if (ascii_type[0] == '.') {
|
if (ascii_type[0] == '.') {
|
||||||
@ -448,7 +448,7 @@ WORD KeyStatesToWord() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// From webkit/common/cursors/webcursor_win.cc.
|
// From content/common/cursors/webcursor_win.cc.
|
||||||
|
|
||||||
using blink::WebCursorInfo;
|
using blink::WebCursorInfo;
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ void CefBrowserMessageFilter::OnCreateWindow(
|
|||||||
CefContentBrowserClient::LastCreateWindowParams lcwp;
|
CefContentBrowserClient::LastCreateWindowParams lcwp;
|
||||||
lcwp.opener_process_id = host_->GetID();
|
lcwp.opener_process_id = host_->GetID();
|
||||||
lcwp.opener_view_id = params.opener_id;
|
lcwp.opener_view_id = params.opener_id;
|
||||||
lcwp.opener_frame_id = params.opener_frame_id;
|
lcwp.opener_frame_id = params.opener_render_frame_id;
|
||||||
lcwp.target_url = params.target_url;
|
lcwp.target_url = params.target_url;
|
||||||
lcwp.target_frame_name = params.frame_name;
|
lcwp.target_frame_name = params.frame_name;
|
||||||
CefContentBrowserClient::Get()->set_last_create_window_params(lcwp);
|
CefContentBrowserClient::Get()->set_last_create_window_params(lcwp);
|
||||||
|
@ -266,12 +266,7 @@ class CefBrowserURLRequest::Context
|
|||||||
if (cef_flags & UR_FLAG_SKIP_CACHE)
|
if (cef_flags & UR_FLAG_SKIP_CACHE)
|
||||||
load_flags |= net::LOAD_BYPASS_CACHE;
|
load_flags |= net::LOAD_BYPASS_CACHE;
|
||||||
|
|
||||||
if (cef_flags & UR_FLAG_ALLOW_CACHED_CREDENTIALS) {
|
if (!(cef_flags & UR_FLAG_ALLOW_CACHED_CREDENTIALS)) {
|
||||||
if (!(cef_flags & UR_FLAG_ALLOW_COOKIES)) {
|
|
||||||
load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
|
|
||||||
load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
|
load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
|
||||||
load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
|
load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
|
||||||
load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;
|
load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;
|
||||||
|
@ -30,6 +30,11 @@ MetricsService* ChromeBrowserProcessStub::metrics_service() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rappor::RapporService* ChromeBrowserProcessStub::rappor_service() {
|
||||||
|
NOTIMPLEMENTED();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
IOThread* ChromeBrowserProcessStub::io_thread() {
|
IOThread* ChromeBrowserProcessStub::io_thread() {
|
||||||
NOTIMPLEMENTED();
|
NOTIMPLEMENTED();
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -109,17 +114,10 @@ GpuModeManager* ChromeBrowserProcessStub::gpu_mode_manager() {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
AutomationProviderList*
|
|
||||||
ChromeBrowserProcessStub::GetAutomationProviderList() {
|
|
||||||
NOTIMPLEMENTED();
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChromeBrowserProcessStub::CreateDevToolsHttpProtocolHandler(
|
void ChromeBrowserProcessStub::CreateDevToolsHttpProtocolHandler(
|
||||||
chrome::HostDesktopType host_desktop_type,
|
chrome::HostDesktopType host_desktop_type,
|
||||||
const std::string& ip,
|
const std::string& ip,
|
||||||
int port,
|
int port) {
|
||||||
const std::string& frontend_url) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int ChromeBrowserProcessStub::AddRefModule() {
|
unsigned int ChromeBrowserProcessStub::AddRefModule() {
|
||||||
|
@ -32,6 +32,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
|||||||
virtual void ResourceDispatcherHostCreated() OVERRIDE;
|
virtual void ResourceDispatcherHostCreated() OVERRIDE;
|
||||||
virtual void EndSession() OVERRIDE;
|
virtual void EndSession() OVERRIDE;
|
||||||
virtual MetricsService* metrics_service() OVERRIDE;
|
virtual MetricsService* metrics_service() OVERRIDE;
|
||||||
|
virtual rappor::RapporService* rappor_service() OVERRIDE;
|
||||||
virtual IOThread* io_thread() OVERRIDE;
|
virtual IOThread* io_thread() OVERRIDE;
|
||||||
virtual WatchDogThread* watchdog_thread() OVERRIDE;
|
virtual WatchDogThread* watchdog_thread() OVERRIDE;
|
||||||
virtual ProfileManager* profile_manager() OVERRIDE;
|
virtual ProfileManager* profile_manager() OVERRIDE;
|
||||||
@ -48,12 +49,10 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
|||||||
virtual IconManager* icon_manager() OVERRIDE;
|
virtual IconManager* icon_manager() OVERRIDE;
|
||||||
virtual GLStringManager* gl_string_manager() OVERRIDE;
|
virtual GLStringManager* gl_string_manager() OVERRIDE;
|
||||||
virtual GpuModeManager* gpu_mode_manager() OVERRIDE;
|
virtual GpuModeManager* gpu_mode_manager() OVERRIDE;
|
||||||
virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE;
|
|
||||||
virtual void CreateDevToolsHttpProtocolHandler(
|
virtual void CreateDevToolsHttpProtocolHandler(
|
||||||
chrome::HostDesktopType host_desktop_type,
|
chrome::HostDesktopType host_desktop_type,
|
||||||
const std::string& ip,
|
const std::string& ip,
|
||||||
int port,
|
int port) OVERRIDE;
|
||||||
const std::string& frontend_url) OVERRIDE;
|
|
||||||
virtual unsigned int AddRefModule() OVERRIDE;
|
virtual unsigned int AddRefModule() OVERRIDE;
|
||||||
virtual unsigned int ReleaseModule() OVERRIDE;
|
virtual unsigned int ReleaseModule() OVERRIDE;
|
||||||
virtual bool IsShuttingDown() OVERRIDE;
|
virtual bool IsShuttingDown() OVERRIDE;
|
||||||
|
@ -28,11 +28,11 @@
|
|||||||
#include "content/browser/net/view_http_cache_job_factory.h"
|
#include "content/browser/net/view_http_cache_job_factory.h"
|
||||||
#include "content/browser/net/view_blob_internals_job_factory.h"
|
#include "content/browser/net/view_blob_internals_job_factory.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
|
#include "content/public/common/user_agent.h"
|
||||||
#include "grit/cef_resources.h"
|
#include "grit/cef_resources.h"
|
||||||
#include "ipc/ipc_channel.h"
|
#include "ipc/ipc_channel.h"
|
||||||
#include "net/url_request/url_request.h"
|
#include "net/url_request/url_request.h"
|
||||||
#include "v8/include/v8.h"
|
#include "v8/include/v8.h"
|
||||||
#include "webkit/common/user_agent/user_agent_util.h"
|
|
||||||
|
|
||||||
namespace scheme {
|
namespace scheme {
|
||||||
|
|
||||||
@ -271,11 +271,11 @@ class Delegate : public InternalHandlerDelegate {
|
|||||||
parser.Add("OS", GetOSType());
|
parser.Add("OS", GetOSType());
|
||||||
parser.Add("WEBKIT",
|
parser.Add("WEBKIT",
|
||||||
base::StringPrintf("%d.%d",
|
base::StringPrintf("%d.%d",
|
||||||
webkit_glue::GetWebKitMajorVersion(),
|
content::GetWebKitMajorVersion(),
|
||||||
webkit_glue::GetWebKitMinorVersion()));
|
content::GetWebKitMinorVersion()));
|
||||||
parser.Add("JAVASCRIPT", v8::V8::GetVersion());
|
parser.Add("JAVASCRIPT", v8::V8::GetVersion());
|
||||||
parser.Add("FLASH", std::string()); // Value populated asynchronously.
|
parser.Add("FLASH", std::string()); // Value populated asynchronously.
|
||||||
parser.Add("USERAGENT", content::GetUserAgent(GURL()));
|
parser.Add("USERAGENT", CefContentClient::Get()->GetUserAgent());
|
||||||
parser.Add("COMMANDLINE", GetCommandLine());
|
parser.Add("COMMANDLINE", GetCommandLine());
|
||||||
parser.Add("MODULEPATH", GetModulePath());
|
parser.Add("MODULEPATH", GetModulePath());
|
||||||
parser.Add("CACHEPATH", CefString(CefContext::Get()->cache_path().value()));
|
parser.Add("CACHEPATH", CefString(CefContext::Get()->cache_path().value()));
|
||||||
|
@ -567,10 +567,13 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
|
|||||||
|
|
||||||
net::URLRequestContextGetter* CefContentBrowserClient::CreateRequestContext(
|
net::URLRequestContextGetter* CefContentBrowserClient::CreateRequestContext(
|
||||||
content::BrowserContext* content_browser_context,
|
content::BrowserContext* content_browser_context,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) {
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) {
|
||||||
CefBrowserContext* cef_browser_context =
|
CefBrowserContext* cef_browser_context =
|
||||||
static_cast<CefBrowserContext*>(content_browser_context);
|
static_cast<CefBrowserContext*>(content_browser_context);
|
||||||
return cef_browser_context->CreateRequestContext(protocol_handlers);
|
return cef_browser_context->CreateRequestContext(
|
||||||
|
protocol_handlers,
|
||||||
|
protocol_interceptors.Pass());
|
||||||
}
|
}
|
||||||
|
|
||||||
net::URLRequestContextGetter*
|
net::URLRequestContextGetter*
|
||||||
@ -578,11 +581,15 @@ CefContentBrowserClient::CreateRequestContextForStoragePartition(
|
|||||||
content::BrowserContext* content_browser_context,
|
content::BrowserContext* content_browser_context,
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) {
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) {
|
||||||
CefBrowserContext* cef_browser_context =
|
CefBrowserContext* cef_browser_context =
|
||||||
static_cast<CefBrowserContext*>(content_browser_context);
|
static_cast<CefBrowserContext*>(content_browser_context);
|
||||||
return cef_browser_context->CreateRequestContextForStoragePartition(
|
return cef_browser_context->CreateRequestContextForStoragePartition(
|
||||||
partition_path, in_memory, protocol_handlers);
|
partition_path,
|
||||||
|
in_memory,
|
||||||
|
protocol_handlers,
|
||||||
|
protocol_interceptors.Pass());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefContentBrowserClient::IsHandledURL(const GURL& url) {
|
bool CefContentBrowserClient::IsHandledURL(const GURL& url) {
|
||||||
@ -610,7 +617,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||||||
#endif
|
#endif
|
||||||
switches::kDisablePackLoading,
|
switches::kDisablePackLoading,
|
||||||
switches::kEnableCrashReporter,
|
switches::kEnableCrashReporter,
|
||||||
switches::kEnableReleaseDcheck,
|
|
||||||
switches::kLang,
|
switches::kLang,
|
||||||
switches::kLocalesDirPath,
|
switches::kLocalesDirPath,
|
||||||
switches::kLogFile,
|
switches::kLogFile,
|
||||||
@ -873,7 +879,7 @@ std::string CefContentBrowserClient::GetDefaultDownloadName() {
|
|||||||
|
|
||||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||||
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
|
||||||
const CommandLine& command_line,
|
const base::CommandLine& command_line,
|
||||||
int child_process_id,
|
int child_process_id,
|
||||||
std::vector<content::FileDescriptorInfo>* mappings) {
|
std::vector<content::FileDescriptorInfo>* mappings) {
|
||||||
int crash_signal_fd = GetCrashSignalFD(command_line);
|
int crash_signal_fd = GetCrashSignalFD(command_line);
|
||||||
|
@ -88,14 +88,16 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
content::RenderProcessHost* host) OVERRIDE;
|
content::RenderProcessHost* host) OVERRIDE;
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContext(
|
virtual net::URLRequestContextGetter* CreateRequestContext(
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
|
||||||
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||||
content::BrowserContext* browser_context,
|
content::BrowserContext* browser_context,
|
||||||
const base::FilePath& partition_path,
|
const base::FilePath& partition_path,
|
||||||
bool in_memory,
|
bool in_memory,
|
||||||
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
|
||||||
virtual bool IsHandledURL(const GURL& url) OVERRIDE;
|
virtual bool IsHandledURL(const GURL& url) OVERRIDE;
|
||||||
virtual void AppendExtraCommandLineSwitches(CommandLine* command_line,
|
virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||||
int child_process_id) OVERRIDE;
|
int child_process_id) OVERRIDE;
|
||||||
virtual content::QuotaPermissionContext*
|
virtual content::QuotaPermissionContext*
|
||||||
CreateQuotaPermissionContext() OVERRIDE;
|
CreateQuotaPermissionContext() OVERRIDE;
|
||||||
@ -139,7 +141,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
|||||||
|
|
||||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||||
virtual void GetAdditionalMappedFilesForChildProcess(
|
virtual void GetAdditionalMappedFilesForChildProcess(
|
||||||
const CommandLine& command_line,
|
const base::CommandLine& command_line,
|
||||||
int child_process_id,
|
int child_process_id,
|
||||||
std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
|
std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,10 +31,6 @@
|
|||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
#include "ui/base/ui_base_switches.h"
|
#include "ui/base/ui_base_switches.h"
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
|
||||||
#include "libcef/browser/application_mac.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
#include "content/public/app/startup_helper_win.h"
|
#include "content/public/app/startup_helper_win.h"
|
||||||
#include "sandbox/win/src/sandbox_types.h"
|
#include "sandbox/win/src/sandbox_types.h"
|
||||||
@ -80,11 +76,6 @@ int CefExecuteProcess(const CefMainArgs& args,
|
|||||||
if (process_type.empty())
|
if (process_type.empty())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
|
||||||
// Create the CefCrApplication instance.
|
|
||||||
CefCrApplicationCreate();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CefMainDelegate main_delegate(application);
|
CefMainDelegate main_delegate(application);
|
||||||
|
|
||||||
// Execute the secondary process.
|
// Execute the secondary process.
|
||||||
@ -95,12 +86,18 @@ int CefExecuteProcess(const CefMainArgs& args,
|
|||||||
windows_sandbox_info = &sandbox_info;
|
windows_sandbox_info = &sandbox_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
return content::ContentMain(args.instance,
|
content::ContentMainParams params(&main_delegate);
|
||||||
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info),
|
params.instance = args.instance;
|
||||||
&main_delegate);
|
params.sandbox_info =
|
||||||
|
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info);
|
||||||
|
|
||||||
|
return content::ContentMain(params);
|
||||||
#else
|
#else
|
||||||
return content::ContentMain(args.argc, const_cast<const char**>(args.argv),
|
content::ContentMainParams params(&main_delegate);
|
||||||
&main_delegate);
|
params.argc = args.argc;
|
||||||
|
params.argv = const_cast<const char**>(args.argv);
|
||||||
|
|
||||||
|
return content::ContentMain(params);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,13 +269,18 @@ bool CefContext::Initialize(const CefMainArgs& args,
|
|||||||
settings_.no_sandbox = true;
|
settings_.no_sandbox = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_code = main_runner_->Initialize(args.instance,
|
content::ContentMainParams params(main_delegate_.get());
|
||||||
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info),
|
params.instance = args.instance;
|
||||||
main_delegate_.get());
|
params.sandbox_info =
|
||||||
|
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info);
|
||||||
|
|
||||||
|
exit_code = main_runner_->Initialize(params);
|
||||||
#else
|
#else
|
||||||
exit_code = main_runner_->Initialize(args.argc,
|
content::ContentMainParams params(main_delegate_.get());
|
||||||
const_cast<const char**>(args.argv),
|
params.argc = args.argc;
|
||||||
main_delegate_.get());
|
params.argv = const_cast<const char**>(args.argv);
|
||||||
|
|
||||||
|
exit_code = main_runner_->Initialize(params);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DCHECK_LT(exit_code, 0);
|
DCHECK_LT(exit_code, 0);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "content/public/browser/devtools_http_handler.h"
|
#include "content/public/browser/devtools_http_handler.h"
|
||||||
#include "content/public/browser/devtools_manager.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/render_view_host.h"
|
||||||
#include "content/public/browser/web_contents.h"
|
#include "content/public/browser/web_contents.h"
|
||||||
#include "content/public/browser/web_contents_view.h"
|
#include "content/public/browser/web_contents_view.h"
|
||||||
@ -84,8 +85,7 @@ void CefDevToolsFrontend::RenderViewCreated(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame(int32 page_id) {
|
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame(int32 page_id) {
|
||||||
web_contents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
|
web_contents()->GetMainFrame()->ExecuteJavaScript(
|
||||||
base::string16(),
|
|
||||||
base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);"));
|
base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
#include "base/prefs/pref_service.h"
|
#include "base/prefs/pref_service.h"
|
||||||
#include "chrome/common/pref_names.h"
|
#include "chrome/common/pref_names.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/browser/media_devices_monitor.h"
|
#include "content/public/browser/media_capture_devices.h"
|
||||||
#include "content/public/common/media_stream_request.h"
|
|
||||||
|
|
||||||
using content::BrowserThread;
|
using content::BrowserThread;
|
||||||
using content::MediaStreamDevices;
|
using content::MediaStreamDevices;
|
||||||
@ -40,8 +39,7 @@ CefMediaCaptureDevicesDispatcher*
|
|||||||
return Singleton<CefMediaCaptureDevicesDispatcher>::get();
|
return Singleton<CefMediaCaptureDevicesDispatcher>::get();
|
||||||
}
|
}
|
||||||
|
|
||||||
CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher()
|
CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher() {}
|
||||||
: devices_enumerated_(false) {}
|
|
||||||
|
|
||||||
CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {}
|
CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {}
|
||||||
|
|
||||||
@ -53,41 +51,6 @@ void CefMediaCaptureDevicesDispatcher::RegisterPrefs(
|
|||||||
std::string());
|
std::string());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::AddObserver(Observer* observer) {
|
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
||||||
if (!observers_.HasObserver(observer))
|
|
||||||
observers_.AddObserver(observer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::RemoveObserver(Observer* observer) {
|
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
||||||
observers_.RemoveObserver(observer);
|
|
||||||
}
|
|
||||||
|
|
||||||
const MediaStreamDevices&
|
|
||||||
CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() {
|
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
||||||
if (!devices_enumerated_) {
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::IO, FROM_HERE,
|
|
||||||
base::Bind(&content::EnsureMonitorCaptureDevices));
|
|
||||||
devices_enumerated_ = true;
|
|
||||||
}
|
|
||||||
return audio_devices_;
|
|
||||||
}
|
|
||||||
|
|
||||||
const MediaStreamDevices&
|
|
||||||
CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() {
|
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
|
||||||
if (!devices_enumerated_) {
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::IO, FROM_HERE,
|
|
||||||
base::Bind(&content::EnsureMonitorCaptureDevices));
|
|
||||||
devices_enumerated_ = true;
|
|
||||||
}
|
|
||||||
return video_devices_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::GetDefaultDevices(
|
void CefMediaCaptureDevicesDispatcher::GetDefaultDevices(
|
||||||
PrefService* prefs,
|
PrefService* prefs,
|
||||||
bool audio,
|
bool audio,
|
||||||
@ -132,24 +95,10 @@ void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged(
|
void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged() {
|
||||||
const content::MediaStreamDevices& devices) {
|
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::UI, FROM_HERE,
|
|
||||||
base::Bind(
|
|
||||||
&CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread,
|
|
||||||
base::Unretained(this), devices));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged(
|
void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged() {
|
||||||
const content::MediaStreamDevices& devices) {
|
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::UI, FROM_HERE,
|
|
||||||
base::Bind(
|
|
||||||
&CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread,
|
|
||||||
base::Unretained(this), devices));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
|
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
|
||||||
@ -159,23 +108,6 @@ void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
|
|||||||
const GURL& security_origin,
|
const GURL& security_origin,
|
||||||
const content::MediaStreamDevice& device,
|
const content::MediaStreamDevice& device,
|
||||||
content::MediaRequestState state) {
|
content::MediaRequestState state) {
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
|
|
||||||
BrowserThread::PostTask(
|
|
||||||
BrowserThread::UI, FROM_HERE,
|
|
||||||
base::Bind(
|
|
||||||
&CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread,
|
|
||||||
base::Unretained(this), render_process_id, render_view_id,
|
|
||||||
page_request_id, device, state));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlayingChanged(
|
|
||||||
int render_process_id,
|
|
||||||
int render_view_id,
|
|
||||||
int stream_id,
|
|
||||||
bool is_playing,
|
|
||||||
float power_dbfs,
|
|
||||||
bool clipped) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
||||||
@ -183,34 +115,27 @@ void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
|
|||||||
int render_view_id) {
|
int render_view_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread(
|
void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlaying(
|
||||||
const content::MediaStreamDevices& devices) {
|
int render_process_id,
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
int render_frame_id,
|
||||||
devices_enumerated_ = true;
|
int stream_id,
|
||||||
audio_devices_ = devices;
|
const ReadPowerAndClipCallback& power_read_callback) {
|
||||||
FOR_EACH_OBSERVER(Observer, observers_,
|
|
||||||
OnUpdateAudioDevices(audio_devices_));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread(
|
void CefMediaCaptureDevicesDispatcher::OnAudioStreamStopped(
|
||||||
const content::MediaStreamDevices& devices){
|
int render_process_id,
|
||||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
int render_frame_id,
|
||||||
devices_enumerated_ = true;
|
int stream_id) {
|
||||||
video_devices_ = devices;
|
|
||||||
FOR_EACH_OBSERVER(Observer, observers_,
|
|
||||||
OnUpdateVideoDevices(video_devices_));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
|
const MediaStreamDevices&
|
||||||
int render_process_id,
|
CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() {
|
||||||
int render_view_id,
|
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||||
int page_request_id,
|
return content::MediaCaptureDevices::GetInstance()->GetAudioCaptureDevices();
|
||||||
const content::MediaStreamDevice& device,
|
}
|
||||||
content::MediaRequestState state) {
|
|
||||||
FOR_EACH_OBSERVER(Observer, observers_,
|
const MediaStreamDevices&
|
||||||
OnRequestUpdate(render_process_id,
|
CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() {
|
||||||
render_view_id,
|
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
||||||
page_request_id,
|
return content::MediaCaptureDevices::GetInstance()->GetVideoCaptureDevices();
|
||||||
device,
|
|
||||||
state));
|
|
||||||
}
|
}
|
||||||
|
@ -19,46 +19,14 @@ class PrefService;
|
|||||||
// layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc].
|
// layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc].
|
||||||
class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||||
public:
|
public:
|
||||||
class Observer {
|
|
||||||
public:
|
|
||||||
// Handle an information update consisting of a up-to-date audio capture
|
|
||||||
// device lists. This happens when a microphone is plugged in or unplugged.
|
|
||||||
virtual void OnUpdateAudioDevices(
|
|
||||||
const content::MediaStreamDevices& devices) {}
|
|
||||||
|
|
||||||
// Handle an information update consisting of a up-to-date video capture
|
|
||||||
// device lists. This happens when a camera is plugged in or unplugged.
|
|
||||||
virtual void OnUpdateVideoDevices(
|
|
||||||
const content::MediaStreamDevices& devices) {}
|
|
||||||
|
|
||||||
// Handle an information update related to a media stream request.
|
|
||||||
virtual void OnRequestUpdate(
|
|
||||||
int render_process_id,
|
|
||||||
int render_view_id,
|
|
||||||
int page_request_id,
|
|
||||||
const content::MediaStreamDevice& device,
|
|
||||||
const content::MediaRequestState state) {}
|
|
||||||
|
|
||||||
virtual ~Observer() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
static CefMediaCaptureDevicesDispatcher* GetInstance();
|
static CefMediaCaptureDevicesDispatcher* GetInstance();
|
||||||
|
|
||||||
// Registers the preferences related to Media Stream default devices.
|
// Registers the preferences related to Media Stream default devices.
|
||||||
static void RegisterPrefs(PrefRegistrySimple* registry);
|
static void RegisterPrefs(PrefRegistrySimple* registry);
|
||||||
|
|
||||||
// Methods for observers. Called on UI thread.
|
|
||||||
// Observers should add themselves on construction and remove themselves
|
|
||||||
// on destruction.
|
|
||||||
void AddObserver(Observer* observer);
|
|
||||||
void RemoveObserver(Observer* observer);
|
|
||||||
const content::MediaStreamDevices& GetAudioCaptureDevices();
|
|
||||||
const content::MediaStreamDevices& GetVideoCaptureDevices();
|
|
||||||
|
|
||||||
// Helper to get the default devices which can be used by the media request,
|
// Helper to get the default devices which can be used by the media request,
|
||||||
// if the return list is empty, it means there is no available device on the
|
// if the return list is empty, it means there is no available device on the
|
||||||
// OS.
|
// OS. Called on the UI thread.
|
||||||
// Called on the UI thread.
|
|
||||||
void GetDefaultDevices(PrefService* prefs,
|
void GetDefaultDevices(PrefService* prefs,
|
||||||
bool audio,
|
bool audio,
|
||||||
bool video,
|
bool video,
|
||||||
@ -67,17 +35,15 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
|||||||
// Helper for picking the device that was requested for an OpenDevice request.
|
// Helper for picking the device that was requested for an OpenDevice request.
|
||||||
// If the device requested is not available it will revert to using the first
|
// If the device requested is not available it will revert to using the first
|
||||||
// available one instead or will return an empty list if no devices of the
|
// available one instead or will return an empty list if no devices of the
|
||||||
// requested kind are present.
|
// requested kind are present. Called on the UI thread.
|
||||||
void GetRequestedDevice(const std::string& requested_device_id,
|
void GetRequestedDevice(const std::string& requested_device_id,
|
||||||
bool audio,
|
bool audio,
|
||||||
bool video,
|
bool video,
|
||||||
content::MediaStreamDevices* devices);
|
content::MediaStreamDevices* devices);
|
||||||
|
|
||||||
// Overridden from content::MediaObserver:
|
// Overridden from content::MediaObserver:
|
||||||
virtual void OnAudioCaptureDevicesChanged(
|
virtual void OnAudioCaptureDevicesChanged() OVERRIDE;
|
||||||
const content::MediaStreamDevices& devices) OVERRIDE;
|
virtual void OnVideoCaptureDevicesChanged() OVERRIDE;
|
||||||
virtual void OnVideoCaptureDevicesChanged(
|
|
||||||
const content::MediaStreamDevices& devices) OVERRIDE;
|
|
||||||
virtual void OnMediaRequestStateChanged(
|
virtual void OnMediaRequestStateChanged(
|
||||||
int render_process_id,
|
int render_process_id,
|
||||||
int render_view_id,
|
int render_view_id,
|
||||||
@ -85,15 +51,17 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
|||||||
const GURL& security_origin,
|
const GURL& security_origin,
|
||||||
const content::MediaStreamDevice& device,
|
const content::MediaStreamDevice& device,
|
||||||
content::MediaRequestState state) OVERRIDE;
|
content::MediaRequestState state) OVERRIDE;
|
||||||
virtual void OnAudioStreamPlayingChanged(
|
|
||||||
int render_process_id,
|
|
||||||
int render_view_id,
|
|
||||||
int stream_id,
|
|
||||||
bool is_playing,
|
|
||||||
float power_dbfs,
|
|
||||||
bool clipped) OVERRIDE;
|
|
||||||
virtual void OnCreatingAudioStream(int render_process_id,
|
virtual void OnCreatingAudioStream(int render_process_id,
|
||||||
int render_view_id) OVERRIDE;
|
int render_view_id) OVERRIDE;
|
||||||
|
virtual void OnAudioStreamPlaying(
|
||||||
|
int render_process_id,
|
||||||
|
int render_frame_id,
|
||||||
|
int stream_id,
|
||||||
|
const ReadPowerAndClipCallback& power_read_callback) OVERRIDE;
|
||||||
|
virtual void OnAudioStreamStopped(
|
||||||
|
int render_process_id,
|
||||||
|
int render_frame_id,
|
||||||
|
int stream_id) OVERRIDE;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
|
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
|
||||||
@ -101,28 +69,8 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
|||||||
CefMediaCaptureDevicesDispatcher();
|
CefMediaCaptureDevicesDispatcher();
|
||||||
virtual ~CefMediaCaptureDevicesDispatcher();
|
virtual ~CefMediaCaptureDevicesDispatcher();
|
||||||
|
|
||||||
// Called by the MediaObserver() functions, executed on UI thread.
|
const content::MediaStreamDevices& GetAudioCaptureDevices();
|
||||||
void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices);
|
const content::MediaStreamDevices& GetVideoCaptureDevices();
|
||||||
void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices);
|
|
||||||
void UpdateMediaRequestStateOnUIThread(
|
|
||||||
int render_process_id,
|
|
||||||
int render_view_id,
|
|
||||||
int page_request_id,
|
|
||||||
const content::MediaStreamDevice& device,
|
|
||||||
content::MediaRequestState state);
|
|
||||||
|
|
||||||
// A list of cached audio capture devices.
|
|
||||||
content::MediaStreamDevices audio_devices_;
|
|
||||||
|
|
||||||
// A list of cached video capture devices.
|
|
||||||
content::MediaStreamDevices video_devices_;
|
|
||||||
|
|
||||||
// A list of observers for the device update notifications.
|
|
||||||
ObserverList<Observer> observers_;
|
|
||||||
|
|
||||||
// Flag to indicate if device enumeration has been done/doing.
|
|
||||||
// Only accessed on UI thread.
|
|
||||||
bool devices_enumerated_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
|
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
|
||||||
|
@ -84,8 +84,8 @@ bool CefMenuCreator::CreateContextMenu(
|
|||||||
client->GetContextMenuHandler();
|
client->GetContextMenuHandler();
|
||||||
if (handler.get()) {
|
if (handler.get()) {
|
||||||
CefRefPtr<CefFrame> frame;
|
CefRefPtr<CefFrame> frame;
|
||||||
if (params_.frame_id > 0)
|
if (render_frame_id_ > 0)
|
||||||
frame = browser_->GetFrame(params_.frame_id);
|
frame = browser_->GetFrame(render_frame_id_);
|
||||||
if (!frame.get())
|
if (!frame.get())
|
||||||
frame = browser_->GetMainFrame();
|
frame = browser_->GetMainFrame();
|
||||||
|
|
||||||
@ -138,8 +138,8 @@ void CefMenuCreator::ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
|
|||||||
client->GetContextMenuHandler();
|
client->GetContextMenuHandler();
|
||||||
if (handler.get()) {
|
if (handler.get()) {
|
||||||
CefRefPtr<CefFrame> frame;
|
CefRefPtr<CefFrame> frame;
|
||||||
if (params_.frame_id > 0)
|
if (render_frame_id_ > 0)
|
||||||
frame = browser_->GetFrame(params_.frame_id);
|
frame = browser_->GetFrame(render_frame_id_);
|
||||||
if (!frame.get())
|
if (!frame.get())
|
||||||
frame = browser_->GetMainFrame();
|
frame = browser_->GetMainFrame();
|
||||||
|
|
||||||
@ -189,8 +189,8 @@ void CefMenuCreator::MenuClosed(CefRefPtr<CefMenuModelImpl> source) {
|
|||||||
client->GetContextMenuHandler();
|
client->GetContextMenuHandler();
|
||||||
if (handler.get()) {
|
if (handler.get()) {
|
||||||
CefRefPtr<CefFrame> frame;
|
CefRefPtr<CefFrame> frame;
|
||||||
if (params_.frame_id > 0)
|
if (render_frame_id_ > 0)
|
||||||
frame = browser_->GetFrame(params_.frame_id);
|
frame = browser_->GetFrame(render_frame_id_);
|
||||||
if (!frame.get())
|
if (!frame.get())
|
||||||
frame = browser_->GetMainFrame();
|
frame = browser_->GetMainFrame();
|
||||||
|
|
||||||
|
@ -158,10 +158,9 @@ void PrintViewManagerBase::OnDidPrintPage(
|
|||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
bool big_emf = (params.data_size && params.data_size >= kMetafileMaxSize);
|
bool big_emf = (params.data_size && params.data_size >= kMetafileMaxSize);
|
||||||
const CommandLine* cmdline = CommandLine::ForCurrentProcess();
|
|
||||||
int raster_size = std::min(params.page_size.GetArea(),
|
int raster_size = std::min(params.page_size.GetArea(),
|
||||||
kMaxRasterSizeInPixels);
|
kMaxRasterSizeInPixels);
|
||||||
if (big_emf || (cmdline && cmdline->HasSwitch(switches::kPrintRaster))) {
|
if (big_emf) {
|
||||||
scoped_ptr<NativeMetafile> raster_metafile(
|
scoped_ptr<NativeMetafile> raster_metafile(
|
||||||
metafile->RasterizeMetafile(raster_size));
|
metafile->RasterizeMetafile(raster_size));
|
||||||
if (raster_metafile.get()) {
|
if (raster_metafile.get()) {
|
||||||
|
@ -9,11 +9,11 @@
|
|||||||
|
|
||||||
#include "base/message_loop/message_loop.h"
|
#include "base/message_loop/message_loop.h"
|
||||||
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
#include "content/browser/renderer_host/render_widget_host_impl.h"
|
||||||
|
#include "content/common/cursors/webcursor.h"
|
||||||
#include "content/public/browser/content_browser_client.h"
|
#include "content/public/browser/content_browser_client.h"
|
||||||
#include "content/public/browser/render_view_host.h"
|
#include "content/public/browser/render_view_host.h"
|
||||||
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
|
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
|
||||||
#include "ui/gfx/size_conversions.h"
|
#include "ui/gfx/size_conversions.h"
|
||||||
#include "webkit/common/cursors/webcursor.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -180,19 +180,20 @@ void CefRenderWidgetHostViewOSR::Focus() {
|
|||||||
void CefRenderWidgetHostViewOSR::Blur() {
|
void CefRenderWidgetHostViewOSR::Blur() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::UpdateCursor(const WebCursor& cursor) {
|
void CefRenderWidgetHostViewOSR::UpdateCursor(
|
||||||
|
const content::WebCursor& cursor) {
|
||||||
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::UpdateCursor");
|
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::UpdateCursor");
|
||||||
if (!browser_impl_.get())
|
if (!browser_impl_.get())
|
||||||
return;
|
return;
|
||||||
#if defined(USE_AURA)
|
#if defined(USE_AURA)
|
||||||
WebCursor web_cursor = cursor;
|
content::WebCursor web_cursor = cursor;
|
||||||
|
|
||||||
ui::PlatformCursor platform_cursor;
|
ui::PlatformCursor platform_cursor;
|
||||||
if (web_cursor.IsCustom()) {
|
if (web_cursor.IsCustom()) {
|
||||||
// |web_cursor| owns the resulting |platform_cursor|.
|
// |web_cursor| owns the resulting |platform_cursor|.
|
||||||
platform_cursor = web_cursor.GetPlatformCursor();
|
platform_cursor = web_cursor.GetPlatformCursor();
|
||||||
} else {
|
} else {
|
||||||
WebCursor::CursorInfo cursor_info;
|
content::WebCursor::CursorInfo cursor_info;
|
||||||
cursor.GetCursorInfo(&cursor_info);
|
cursor.GetCursorInfo(&cursor_info);
|
||||||
platform_cursor = browser_impl_->GetPlatformCursor(cursor_info.type);
|
platform_cursor = browser_impl_->GetPlatformCursor(cursor_info.type);
|
||||||
}
|
}
|
||||||
@ -201,7 +202,7 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(const WebCursor& cursor) {
|
|||||||
browser_impl_->GetBrowser(), platform_cursor);
|
browser_impl_->GetBrowser(), platform_cursor);
|
||||||
#elif defined(OS_MACOSX) || defined(TOOLKIT_GTK)
|
#elif defined(OS_MACOSX) || defined(TOOLKIT_GTK)
|
||||||
// |web_cursor| owns the resulting |native_cursor|.
|
// |web_cursor| owns the resulting |native_cursor|.
|
||||||
WebCursor web_cursor = cursor;
|
content::WebCursor web_cursor = cursor;
|
||||||
CefCursorHandle native_cursor = web_cursor.GetNativeCursor();
|
CefCursorHandle native_cursor = web_cursor.GetNativeCursor();
|
||||||
browser_impl_->GetClient()->GetRenderHandler()->OnCursorChange(
|
browser_impl_->GetClient()->GetRenderHandler()->OnCursorChange(
|
||||||
browser_impl_->GetBrowser(), native_cursor);
|
browser_impl_->GetBrowser(), native_cursor);
|
||||||
|
@ -117,7 +117,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
|
|||||||
const std::vector<content::WebPluginGeometry>& moves) OVERRIDE;
|
const std::vector<content::WebPluginGeometry>& moves) OVERRIDE;
|
||||||
virtual void Focus() OVERRIDE;
|
virtual void Focus() OVERRIDE;
|
||||||
virtual void Blur() OVERRIDE;
|
virtual void Blur() OVERRIDE;
|
||||||
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
|
virtual void UpdateCursor(const content::WebCursor& cursor) OVERRIDE;
|
||||||
virtual void SetIsLoading(bool is_loading) OVERRIDE;
|
virtual void SetIsLoading(bool is_loading) OVERRIDE;
|
||||||
virtual void TextInputTypeChanged(ui::TextInputType type,
|
virtual void TextInputTypeChanged(ui::TextInputType type,
|
||||||
ui::TextInputMode mode,
|
ui::TextInputMode mode,
|
||||||
|
@ -75,7 +75,7 @@ void CefResourceDispatcherHostDelegate::RequestBeginning(
|
|||||||
const content::ResourceRequestInfo* info =
|
const content::ResourceRequestInfo* info =
|
||||||
content::ResourceRequestInfo::ForRequest(request);
|
content::ResourceRequestInfo::ForRequest(request);
|
||||||
if (info)
|
if (info)
|
||||||
frame_id = info->GetFrameID();
|
frame_id = info->GetRenderFrameID();
|
||||||
|
|
||||||
if (frame_id >= 0) {
|
if (frame_id >= 0) {
|
||||||
CefRefPtr<CefRequestImpl> cef_request(new CefRequestImpl);
|
CefRefPtr<CefRequestImpl> cef_request(new CefRequestImpl);
|
||||||
|
@ -187,7 +187,7 @@ void CefResourceRequestJob::Start() {
|
|||||||
|
|
||||||
if (SetHeaderIfMissing(headerMap,
|
if (SetHeaderIfMissing(headerMap,
|
||||||
net::HttpRequestHeaders::kUserAgent,
|
net::HttpRequestHeaders::kUserAgent,
|
||||||
ua_settings->GetUserAgent(request_->url()))) {
|
ua_settings->GetUserAgent())) {
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,47 +122,6 @@ int CefNetworkDelegate::OnBeforeURLRequest(
|
|||||||
return net::OK;
|
return net::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CefNetworkDelegate::OnBeforeSendHeaders(
|
|
||||||
net::URLRequest* request,
|
|
||||||
const net::CompletionCallback& callback,
|
|
||||||
net::HttpRequestHeaders* headers) {
|
|
||||||
return net::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnSendHeaders(
|
|
||||||
net::URLRequest* request,
|
|
||||||
const net::HttpRequestHeaders& headers) {
|
|
||||||
}
|
|
||||||
|
|
||||||
int CefNetworkDelegate::OnHeadersReceived(
|
|
||||||
net::URLRequest* request,
|
|
||||||
const net::CompletionCallback& callback,
|
|
||||||
const net::HttpResponseHeaders* original_response_headers,
|
|
||||||
scoped_refptr<net::HttpResponseHeaders>* override_response_headers) {
|
|
||||||
return net::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
|
|
||||||
const GURL& new_location) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnResponseStarted(net::URLRequest* request) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
|
|
||||||
int bytes_read) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnCompleted(net::URLRequest* request, bool started) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnURLRequestDestroyed(net::URLRequest* request) {
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefNetworkDelegate::OnPACScriptError(int line_number,
|
|
||||||
const base::string16& error) {
|
|
||||||
}
|
|
||||||
|
|
||||||
net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired(
|
net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired(
|
||||||
net::URLRequest* request,
|
net::URLRequest* request,
|
||||||
const net::AuthChallengeInfo& auth_info,
|
const net::AuthChallengeInfo& auth_info,
|
||||||
@ -218,30 +177,3 @@ net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired(
|
|||||||
|
|
||||||
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
|
return AUTH_REQUIRED_RESPONSE_NO_ACTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request,
|
|
||||||
const net::CookieList& cookie_list) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CefNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
|
|
||||||
const std::string& cookie_line,
|
|
||||||
net::CookieOptions* options) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CefNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
|
||||||
const base::FilePath& path) const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CefNetworkDelegate::OnCanThrottleRequest(
|
|
||||||
const net::URLRequest& request) const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CefNetworkDelegate::OnBeforeSocketStreamConnect(
|
|
||||||
net::SocketStream* socket,
|
|
||||||
const net::CompletionCallback& callback) {
|
|
||||||
return net::OK;
|
|
||||||
}
|
|
||||||
|
@ -20,43 +20,11 @@ class CefNetworkDelegate : public net::NetworkDelegate {
|
|||||||
virtual int OnBeforeURLRequest(net::URLRequest* request,
|
virtual int OnBeforeURLRequest(net::URLRequest* request,
|
||||||
const net::CompletionCallback& callback,
|
const net::CompletionCallback& callback,
|
||||||
GURL* new_url) OVERRIDE;
|
GURL* new_url) OVERRIDE;
|
||||||
virtual int OnBeforeSendHeaders(net::URLRequest* request,
|
|
||||||
const net::CompletionCallback& callback,
|
|
||||||
net::HttpRequestHeaders* headers) OVERRIDE;
|
|
||||||
virtual void OnSendHeaders(net::URLRequest* request,
|
|
||||||
const net::HttpRequestHeaders& headers) OVERRIDE;
|
|
||||||
virtual int OnHeadersReceived(
|
|
||||||
net::URLRequest* request,
|
|
||||||
const net::CompletionCallback& callback,
|
|
||||||
const net::HttpResponseHeaders* original_response_headers,
|
|
||||||
scoped_refptr<net::HttpResponseHeaders>* override_response_headers)
|
|
||||||
OVERRIDE;
|
|
||||||
virtual void OnBeforeRedirect(net::URLRequest* request,
|
|
||||||
const GURL& new_location) OVERRIDE;
|
|
||||||
virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
|
|
||||||
virtual void OnRawBytesRead(const net::URLRequest& request, int bytes_read)
|
|
||||||
OVERRIDE;
|
|
||||||
virtual void OnCompleted(net::URLRequest* request, bool started) OVERRIDE;
|
|
||||||
virtual void OnURLRequestDestroyed(net::URLRequest* request) OVERRIDE;
|
|
||||||
virtual void OnPACScriptError(int line_number, const base::string16& error)
|
|
||||||
OVERRIDE;
|
|
||||||
virtual AuthRequiredResponse OnAuthRequired(
|
virtual AuthRequiredResponse OnAuthRequired(
|
||||||
net::URLRequest* request,
|
net::URLRequest* request,
|
||||||
const net::AuthChallengeInfo& auth_info,
|
const net::AuthChallengeInfo& auth_info,
|
||||||
const AuthCallback& callback,
|
const AuthCallback& callback,
|
||||||
net::AuthCredentials* credentials) OVERRIDE;
|
net::AuthCredentials* credentials) OVERRIDE;
|
||||||
virtual bool OnCanGetCookies(const net::URLRequest& request,
|
|
||||||
const net::CookieList& cookie_list) OVERRIDE;
|
|
||||||
virtual bool OnCanSetCookie(const net::URLRequest& request,
|
|
||||||
const std::string& cookie_line,
|
|
||||||
net::CookieOptions* options) OVERRIDE;
|
|
||||||
virtual bool OnCanAccessFile(const net::URLRequest& request,
|
|
||||||
const base::FilePath& path) const OVERRIDE;
|
|
||||||
virtual bool OnCanThrottleRequest(
|
|
||||||
const net::URLRequest& request) const OVERRIDE;
|
|
||||||
virtual int OnBeforeSocketStreamConnect(
|
|
||||||
net::SocketStream* stream,
|
|
||||||
const net::CompletionCallback& callback) OVERRIDE;
|
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate);
|
DISALLOW_COPY_AND_ASSIGN(CefNetworkDelegate);
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "libcef/browser/url_request_context_proxy.h"
|
#include "libcef/browser/url_request_context_proxy.h"
|
||||||
#include "libcef/browser/url_request_interceptor.h"
|
#include "libcef/browser/url_request_interceptor.h"
|
||||||
#include "libcef/common/cef_switches.h"
|
#include "libcef/common/cef_switches.h"
|
||||||
|
#include "libcef/common/content_client.h"
|
||||||
|
|
||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/file_util.h"
|
#include "base/file_util.h"
|
||||||
@ -47,6 +48,7 @@
|
|||||||
#include "net/ssl/server_bound_cert_service.h"
|
#include "net/ssl/server_bound_cert_service.h"
|
||||||
#include "net/ssl/ssl_config_service_defaults.h"
|
#include "net/ssl/ssl_config_service_defaults.h"
|
||||||
#include "net/url_request/http_user_agent_settings.h"
|
#include "net/url_request/http_user_agent_settings.h"
|
||||||
|
#include "net/url_request/protocol_intercept_job_factory.h"
|
||||||
#include "net/url_request/url_request.h"
|
#include "net/url_request/url_request.h"
|
||||||
#include "net/url_request/url_request_context.h"
|
#include "net/url_request/url_request_context.h"
|
||||||
#include "net/url_request/url_request_context_storage.h"
|
#include "net/url_request/url_request_context_storage.h"
|
||||||
@ -82,9 +84,9 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
|
|||||||
return http_accept_language_;
|
return http_accept_language_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::string GetUserAgent(const GURL& url) const OVERRIDE {
|
virtual std::string GetUserAgent() const OVERRIDE {
|
||||||
CEF_REQUIRE_IOT();
|
CEF_REQUIRE_IOT();
|
||||||
return content::GetUserAgent(url);
|
return CefContentClient::Get()->GetUserAgent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -98,9 +100,11 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
|
|||||||
CefURLRequestContextGetter::CefURLRequestContextGetter(
|
CefURLRequestContextGetter::CefURLRequestContextGetter(
|
||||||
base::MessageLoop* io_loop,
|
base::MessageLoop* io_loop,
|
||||||
base::MessageLoop* file_loop,
|
base::MessageLoop* file_loop,
|
||||||
content::ProtocolHandlerMap* protocol_handlers)
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors)
|
||||||
: io_loop_(io_loop),
|
: io_loop_(io_loop),
|
||||||
file_loop_(file_loop) {
|
file_loop_(file_loop),
|
||||||
|
protocol_interceptors_(protocol_interceptors.Pass()) {
|
||||||
// Must first be created on the UI thread.
|
// Must first be created on the UI thread.
|
||||||
CEF_REQUIRE_UIT();
|
CEF_REQUIRE_UIT();
|
||||||
|
|
||||||
@ -230,7 +234,19 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
|||||||
ftp_transaction_factory_.get());
|
ftp_transaction_factory_.get());
|
||||||
protocol_handlers_.clear();
|
protocol_handlers_.clear();
|
||||||
|
|
||||||
storage_->set_job_factory(job_factory.release());
|
// Set up interceptors in the reverse order.
|
||||||
|
scoped_ptr<net::URLRequestJobFactory> top_job_factory =
|
||||||
|
job_factory.PassAs<net::URLRequestJobFactory>();
|
||||||
|
for (content::ProtocolHandlerScopedVector::reverse_iterator i =
|
||||||
|
protocol_interceptors_.rbegin();
|
||||||
|
i != protocol_interceptors_.rend();
|
||||||
|
++i) {
|
||||||
|
top_job_factory.reset(new net::ProtocolInterceptJobFactory(
|
||||||
|
top_job_factory.Pass(), make_scoped_ptr(*i)));
|
||||||
|
}
|
||||||
|
protocol_interceptors_.weak_clear();
|
||||||
|
|
||||||
|
storage_->set_job_factory(top_job_factory.release());
|
||||||
|
|
||||||
request_interceptor_.reset(new CefRequestInterceptor);
|
request_interceptor_.reset(new CefRequestInterceptor);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,8 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
|
|||||||
CefURLRequestContextGetter(
|
CefURLRequestContextGetter(
|
||||||
base::MessageLoop* io_loop,
|
base::MessageLoop* io_loop,
|
||||||
base::MessageLoop* file_loop,
|
base::MessageLoop* file_loop,
|
||||||
content::ProtocolHandlerMap* protocol_handlers);
|
content::ProtocolHandlerMap* protocol_handlers,
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors);
|
||||||
virtual ~CefURLRequestContextGetter();
|
virtual ~CefURLRequestContextGetter();
|
||||||
|
|
||||||
// net::URLRequestContextGetter implementation.
|
// net::URLRequestContextGetter implementation.
|
||||||
@ -117,6 +118,7 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
|
|||||||
scoped_ptr<net::URLSecurityManager> url_security_manager_;
|
scoped_ptr<net::URLSecurityManager> url_security_manager_;
|
||||||
scoped_ptr<net::FtpTransactionFactory> ftp_transaction_factory_;
|
scoped_ptr<net::FtpTransactionFactory> ftp_transaction_factory_;
|
||||||
content::ProtocolHandlerMap protocol_handlers_;
|
content::ProtocolHandlerMap protocol_handlers_;
|
||||||
|
content::ProtocolHandlerScopedVector protocol_interceptors_;
|
||||||
net::URLRequestJobFactoryImpl* job_factory_impl_;
|
net::URLRequestJobFactoryImpl* job_factory_impl_;
|
||||||
|
|
||||||
typedef std::set<CefURLRequestContextProxy*> RequestContextProxySet;
|
typedef std::set<CefURLRequestContextProxy*> RequestContextProxySet;
|
||||||
|
@ -53,6 +53,13 @@ class CefCookieStoreProxy : public net::CookieStore {
|
|||||||
cookie_store->DeleteCookieAsync(url, cookie_name, callback);
|
cookie_store->DeleteCookieAsync(url, cookie_name, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void GetAllCookiesForURLAsync(
|
||||||
|
const GURL& url,
|
||||||
|
const GetCookieListCallback& callback) OVERRIDE {
|
||||||
|
scoped_refptr<net::CookieStore> cookie_store = GetCookieStore();
|
||||||
|
cookie_store->GetAllCookiesForURLAsync(url, callback);
|
||||||
|
}
|
||||||
|
|
||||||
virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
|
virtual void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
|
||||||
const base::Time& delete_end,
|
const base::Time& delete_end,
|
||||||
const DeleteCallback& callback)
|
const DeleteCallback& callback)
|
||||||
|
@ -76,7 +76,8 @@ net::URLRequestJob* CefRequestInterceptor::MaybeInterceptRedirect(
|
|||||||
if (!new_url.is_empty() && new_url.is_valid()) {
|
if (!new_url.is_empty() && new_url.is_valid()) {
|
||||||
return new net::URLRequestRedirectJob(
|
return new net::URLRequestRedirectJob(
|
||||||
request, network_delegate, new_url,
|
request, network_delegate, new_url,
|
||||||
net::URLRequestRedirectJob::REDIRECT_302_FOUND);
|
net::URLRequestRedirectJob::REDIRECT_307_TEMPORARY_REDIRECT,
|
||||||
|
"Resource Redirect");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,6 @@ const char kLogSeverity_Error[] = "error";
|
|||||||
const char kLogSeverity_ErrorReport[] = "error-report";
|
const char kLogSeverity_ErrorReport[] = "error-report";
|
||||||
const char kLogSeverity_Disable[] = "disable";
|
const char kLogSeverity_Disable[] = "disable";
|
||||||
|
|
||||||
// Enable DCHECK for release mode.
|
|
||||||
const char kEnableReleaseDcheck[] = "enable-release-dcheck";
|
|
||||||
|
|
||||||
// Path to resources directory.
|
// Path to resources directory.
|
||||||
const char kResourcesDirPath[] = "resources-dir-path";
|
const char kResourcesDirPath[] = "resources-dir-path";
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ extern const char kLogSeverity_Warning[];
|
|||||||
extern const char kLogSeverity_Error[];
|
extern const char kLogSeverity_Error[];
|
||||||
extern const char kLogSeverity_ErrorReport[];
|
extern const char kLogSeverity_ErrorReport[];
|
||||||
extern const char kLogSeverity_Disable[];
|
extern const char kLogSeverity_Disable[];
|
||||||
extern const char kEnableReleaseDcheck[];
|
|
||||||
extern const char kResourcesDirPath[];
|
extern const char kResourcesDirPath[];
|
||||||
extern const char kLocalesDirPath[];
|
extern const char kLocalesDirPath[];
|
||||||
extern const char kDisablePackLoading[];
|
extern const char kDisablePackLoading[];
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "chrome/common/chrome_switches.h"
|
#include "chrome/common/chrome_switches.h"
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
|
#include "content/public/common/user_agent.h"
|
||||||
#include "ui/base/resource/resource_bundle.h"
|
#include "ui/base/resource/resource_bundle.h"
|
||||||
#include "webkit/common/user_agent/user_agent_util.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ void CefContentClient::AddAdditionalSchemes(
|
|||||||
std::string CefContentClient::GetUserAgent() const {
|
std::string CefContentClient::GetUserAgent() const {
|
||||||
std::string product_version;
|
std::string product_version;
|
||||||
|
|
||||||
static CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
|
||||||
if (command_line.HasSwitch(switches::kProductVersion)) {
|
if (command_line.HasSwitch(switches::kProductVersion)) {
|
||||||
product_version =
|
product_version =
|
||||||
command_line.GetSwitchValueASCII(switches::kProductVersion);
|
command_line.GetSwitchValueASCII(switches::kProductVersion);
|
||||||
@ -79,7 +79,7 @@ std::string CefContentClient::GetUserAgent() const {
|
|||||||
CHROME_VERSION_PATCH);
|
CHROME_VERSION_PATCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
return webkit_glue::BuildUserAgentFromProduct(product_version);
|
return content::BuildUserAgentFromProduct(product_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
base::string16 CefContentClient::GetLocalizedString(int message_id) const {
|
base::string16 CefContentClient::GetLocalizedString(int message_id) const {
|
||||||
|
@ -54,10 +54,10 @@ bool CefDragDataImpl::GetFileNames(std::vector<CefString>& names) {
|
|||||||
if (data_.filenames.empty())
|
if (data_.filenames.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::vector<content::DropData::FileInfo>::const_iterator it =
|
std::vector<ui::FileInfo>::const_iterator it =
|
||||||
data_.filenames.begin();
|
data_.filenames.begin();
|
||||||
for (; it != data_.filenames.end(); ++it)
|
for (; it != data_.filenames.end(); ++it)
|
||||||
names.push_back(it->path);
|
names.push_back(it->path.value());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -248,9 +248,6 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||||||
command_line->AppendSwitchASCII(switches::kLogSeverity, log_severity);
|
command_line->AppendSwitchASCII(switches::kLogSeverity, log_severity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings.release_dcheck_enabled)
|
|
||||||
command_line->AppendSwitch(switches::kEnableReleaseDcheck);
|
|
||||||
|
|
||||||
if (settings.javascript_flags.length > 0) {
|
if (settings.javascript_flags.length > 0) {
|
||||||
command_line->AppendSwitchASCII(switches::kJavaScriptFlags,
|
command_line->AppendSwitchASCII(switches::kJavaScriptFlags,
|
||||||
CefString(&settings.javascript_flags));
|
CefString(&settings.javascript_flags));
|
||||||
@ -347,14 +344,6 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||||||
logging::SetMinLogLevel(log_severity);
|
logging::SetMinLogLevel(log_severity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command_line->HasSwitch(switches::kEnableReleaseDcheck)) {
|
|
||||||
log_settings.dcheck_state =
|
|
||||||
logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
|
|
||||||
} else {
|
|
||||||
log_settings.dcheck_state =
|
|
||||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
|
|
||||||
}
|
|
||||||
|
|
||||||
logging::InitLogging(log_settings);
|
logging::InitLogging(log_settings);
|
||||||
|
|
||||||
content::SetContentClient(&content_client_);
|
content::SetContentClient(&content_client_);
|
||||||
|
@ -307,8 +307,6 @@ void CefRequestImpl::Set(const blink::WebURLRequest& request) {
|
|||||||
flags_ |= UR_FLAG_SKIP_CACHE;
|
flags_ |= UR_FLAG_SKIP_CACHE;
|
||||||
if (request.allowStoredCredentials())
|
if (request.allowStoredCredentials())
|
||||||
flags_ |= UR_FLAG_ALLOW_CACHED_CREDENTIALS;
|
flags_ |= UR_FLAG_ALLOW_CACHED_CREDENTIALS;
|
||||||
if (request.allowCookies())
|
|
||||||
flags_ |= UR_FLAG_ALLOW_COOKIES;
|
|
||||||
if (request.reportUploadProgress())
|
if (request.reportUploadProgress())
|
||||||
flags_ |= UR_FLAG_REPORT_UPLOAD_PROGRESS;
|
flags_ |= UR_FLAG_REPORT_UPLOAD_PROGRESS;
|
||||||
if (request.reportLoadTiming())
|
if (request.reportLoadTiming())
|
||||||
@ -351,8 +349,6 @@ void CefRequestImpl::Get(blink::WebURLRequest& request) {
|
|||||||
|
|
||||||
SETBOOLFLAG(request, flags_, setAllowStoredCredentials,
|
SETBOOLFLAG(request, flags_, setAllowStoredCredentials,
|
||||||
UR_FLAG_ALLOW_CACHED_CREDENTIALS);
|
UR_FLAG_ALLOW_CACHED_CREDENTIALS);
|
||||||
SETBOOLFLAG(request, flags_, setAllowCookies,
|
|
||||||
UR_FLAG_ALLOW_COOKIES);
|
|
||||||
SETBOOLFLAG(request, flags_, setReportUploadProgress,
|
SETBOOLFLAG(request, flags_, setReportUploadProgress,
|
||||||
UR_FLAG_REPORT_UPLOAD_PROGRESS);
|
UR_FLAG_REPORT_UPLOAD_PROGRESS);
|
||||||
SETBOOLFLAG(request, flags_, setReportLoadTiming,
|
SETBOOLFLAG(request, flags_, setReportLoadTiming,
|
||||||
|
@ -25,7 +25,7 @@ void AddInternalSchemes(std::vector<std::string>* standard_schemes) {
|
|||||||
|
|
||||||
bool IsInternalHandledScheme(const std::string& scheme) {
|
bool IsInternalHandledScheme(const std::string& scheme) {
|
||||||
static const char* schemes[] = {
|
static const char* schemes[] = {
|
||||||
chrome::kBlobScheme,
|
content::kBlobScheme,
|
||||||
content::kChromeDevToolsScheme,
|
content::kChromeDevToolsScheme,
|
||||||
content::kChromeUIScheme,
|
content::kChromeUIScheme,
|
||||||
content::kDataScheme,
|
content::kDataScheme,
|
||||||
@ -46,7 +46,7 @@ bool IsInternalProtectedScheme(const std::string& scheme) {
|
|||||||
// content/browser/storage_partition_impl_map.cc and are modified by
|
// content/browser/storage_partition_impl_map.cc and are modified by
|
||||||
// InstallInternalProtectedHandlers().
|
// InstallInternalProtectedHandlers().
|
||||||
static const char* schemes[] = {
|
static const char* schemes[] = {
|
||||||
chrome::kBlobScheme,
|
content::kBlobScheme,
|
||||||
content::kChromeUIScheme,
|
content::kChromeUIScheme,
|
||||||
content::kDataScheme,
|
content::kDataScheme,
|
||||||
content::kFileScheme,
|
content::kFileScheme,
|
||||||
|
@ -46,8 +46,6 @@ using blink::WebView;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const int64 kInvalidFrameId = -1;
|
|
||||||
|
|
||||||
blink::WebString FilePathStringToWebString(
|
blink::WebString FilePathStringToWebString(
|
||||||
const base::FilePath::StringType& str) {
|
const base::FilePath::StringType& str) {
|
||||||
#if defined(OS_POSIX)
|
#if defined(OS_POSIX)
|
||||||
@ -228,7 +226,7 @@ void CefBrowserImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) {
|
|||||||
if (main_frame) {
|
if (main_frame) {
|
||||||
WebFrame* cur = main_frame;
|
WebFrame* cur = main_frame;
|
||||||
do {
|
do {
|
||||||
identifiers.push_back(cur->identifier());
|
identifiers.push_back(webkit_glue::GetIdentifier(cur));
|
||||||
cur = cur->traverseNext(true);
|
cur = cur->traverseNext(true);
|
||||||
} while (cur != main_frame);
|
} while (cur != main_frame);
|
||||||
}
|
}
|
||||||
@ -275,7 +273,7 @@ CefBrowserImpl::CefBrowserImpl(content::RenderView* render_view,
|
|||||||
browser_id_(browser_id),
|
browser_id_(browser_id),
|
||||||
is_popup_(is_popup),
|
is_popup_(is_popup),
|
||||||
is_window_rendering_disabled_(is_window_rendering_disabled),
|
is_window_rendering_disabled_(is_window_rendering_disabled),
|
||||||
last_focused_frame_id_(kInvalidFrameId) {
|
last_focused_frame_id_(webkit_glue::kInvalidFrameId) {
|
||||||
response_manager_.reset(new CefResponseManager);
|
response_manager_.reset(new CefResponseManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,7 +378,7 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process,
|
|||||||
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
||||||
blink::WebFrame* frame) {
|
blink::WebFrame* frame) {
|
||||||
DCHECK(frame);
|
DCHECK(frame);
|
||||||
int64 frame_id = frame->identifier();
|
int64 frame_id = webkit_glue::GetIdentifier(frame);
|
||||||
|
|
||||||
// Frames are re-used between page loads. Only add the frame to the map once.
|
// Frames are re-used between page loads. Only add the frame to the map once.
|
||||||
FrameMap::const_iterator it = frames_.find(frame_id);
|
FrameMap::const_iterator it = frames_.find(frame_id);
|
||||||
@ -391,7 +389,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
|||||||
frames_.insert(std::make_pair(frame_id, framePtr));
|
frames_.insert(std::make_pair(frame_id, framePtr));
|
||||||
|
|
||||||
int64 parent_id = frame->parent() == NULL ?
|
int64 parent_id = frame->parent() == NULL ?
|
||||||
kInvalidFrameId : frame->parent()->identifier();
|
webkit_glue::kInvalidFrameId : webkit_glue::GetIdentifier(frame->parent());
|
||||||
base::string16 name = frame->uniqueName();
|
base::string16 name = frame->uniqueName();
|
||||||
|
|
||||||
// Notify the browser that the frame has been identified.
|
// Notify the browser that the frame has been identified.
|
||||||
@ -401,7 +399,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
|
|||||||
}
|
}
|
||||||
|
|
||||||
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64 frame_id) {
|
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64 frame_id) {
|
||||||
if (frame_id == kInvalidFrameId) {
|
if (frame_id == webkit_glue::kInvalidFrameId) {
|
||||||
if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame())
|
if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame())
|
||||||
return GetWebFrameImpl(render_view()->GetWebView()->mainFrame());
|
return GetWebFrameImpl(render_view()->GetWebView()->mainFrame());
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -418,7 +416,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64 frame_id) {
|
|||||||
if (main_frame) {
|
if (main_frame) {
|
||||||
WebFrame* cur = main_frame;
|
WebFrame* cur = main_frame;
|
||||||
do {
|
do {
|
||||||
if (cur->identifier() == frame_id)
|
if (webkit_glue::GetIdentifier(cur) == frame_id)
|
||||||
return GetWebFrameImpl(cur);
|
return GetWebFrameImpl(cur);
|
||||||
cur = cur->traverseNext(true);
|
cur = cur->traverseNext(true);
|
||||||
} while (cur != main_frame);
|
} while (cur != main_frame);
|
||||||
@ -489,7 +487,7 @@ void CefBrowserImpl::DidFailLoad(
|
|||||||
void CefBrowserImpl::DidFinishLoad(blink::WebFrame* frame) {
|
void CefBrowserImpl::DidFinishLoad(blink::WebFrame* frame) {
|
||||||
blink::WebDataSource* ds = frame->dataSource();
|
blink::WebDataSource* ds = frame->dataSource();
|
||||||
Send(new CefHostMsg_DidFinishLoad(routing_id(),
|
Send(new CefHostMsg_DidFinishLoad(routing_id(),
|
||||||
frame->identifier(),
|
webkit_glue::GetIdentifier(frame),
|
||||||
ds->request().url(),
|
ds->request().url(),
|
||||||
!frame->parent(),
|
!frame->parent(),
|
||||||
ds->response().httpStatusCode()));
|
ds->response().httpStatusCode()));
|
||||||
@ -513,7 +511,7 @@ void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebFrame* frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CefBrowserImpl::FrameDetached(WebFrame* frame) {
|
void CefBrowserImpl::FrameDetached(WebFrame* frame) {
|
||||||
int64 frame_id = frame->identifier();
|
int64 frame_id = webkit_glue::GetIdentifier(frame);
|
||||||
|
|
||||||
if (!frames_.empty()) {
|
if (!frames_.empty()) {
|
||||||
// Remove the frame from the map.
|
// Remove the frame from the map.
|
||||||
@ -577,9 +575,9 @@ void CefBrowserImpl::FocusedNodeChanged(const blink::WebNode& node) {
|
|||||||
focused_frame = render_view()->GetWebView()->focusedFrame();
|
focused_frame = render_view()->GetWebView()->focusedFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
int64 frame_id = kInvalidFrameId;
|
int64 frame_id = webkit_glue::kInvalidFrameId;
|
||||||
if (focused_frame != NULL)
|
if (focused_frame != NULL)
|
||||||
frame_id = focused_frame->identifier();
|
frame_id = webkit_glue::GetIdentifier(focused_frame);
|
||||||
|
|
||||||
// Don't send a message if the focused frame has not changed.
|
// Don't send a message if the focused frame has not changed.
|
||||||
if (frame_id == last_focused_frame_id_)
|
if (frame_id == last_focused_frame_id_)
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
MSVC_PUSH_WARNING_LEVEL(0);
|
MSVC_PUSH_WARNING_LEVEL(0);
|
||||||
#include "bindings/v8/V8Binding.h"
|
#include "bindings/v8/V8Binding.h"
|
||||||
#include "bindings/v8/V8RecursionScope.h"
|
#include "bindings/v8/V8RecursionScope.h"
|
||||||
#include "bindings/v8/V8Utilities.h"
|
|
||||||
MSVC_POP_WARNING();
|
MSVC_POP_WARNING();
|
||||||
#undef ceil
|
#undef ceil
|
||||||
|
#undef FROM_HERE
|
||||||
#undef LOG
|
#undef LOG
|
||||||
|
|
||||||
#include "libcef/renderer/content_renderer_client.h"
|
#include "libcef/renderer/content_renderer_client.h"
|
||||||
@ -23,6 +23,7 @@ MSVC_POP_WARNING();
|
|||||||
#include "libcef/common/request_impl.h"
|
#include "libcef/common/request_impl.h"
|
||||||
#include "libcef/common/values_impl.h"
|
#include "libcef/common/values_impl.h"
|
||||||
#include "libcef/renderer/browser_impl.h"
|
#include "libcef/renderer/browser_impl.h"
|
||||||
|
#include "libcef/renderer/render_frame_observer.h"
|
||||||
#include "libcef/renderer/render_message_filter.h"
|
#include "libcef/renderer/render_message_filter.h"
|
||||||
#include "libcef/renderer/render_process_observer.h"
|
#include "libcef/renderer/render_process_observer.h"
|
||||||
#include "libcef/renderer/thread_util.h"
|
#include "libcef/renderer/thread_util.h"
|
||||||
@ -32,9 +33,11 @@ MSVC_POP_WARNING();
|
|||||||
#include "base/command_line.h"
|
#include "base/command_line.h"
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
#include "base/strings/string_number_conversions.h"
|
#include "base/strings/string_number_conversions.h"
|
||||||
|
#include "base/strings/utf_string_conversions.h"
|
||||||
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
||||||
#include "chrome/renderer/printing/print_web_view_helper.h"
|
#include "chrome/renderer/printing/print_web_view_helper.h"
|
||||||
#include "content/child/child_thread.h"
|
#include "content/child/child_thread.h"
|
||||||
|
#include "content/child/worker_task_runner.h"
|
||||||
#include "content/common/frame_messages.h"
|
#include "content/common/frame_messages.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/browser/render_process_host.h"
|
#include "content/public/browser/render_process_host.h"
|
||||||
@ -59,7 +62,6 @@ MSVC_POP_WARNING();
|
|||||||
#include "third_party/WebKit/public/web/WebView.h"
|
#include "third_party/WebKit/public/web/WebView.h"
|
||||||
#include "third_party/WebKit/public/web/WebWorkerInfo.h"
|
#include "third_party/WebKit/public/web/WebWorkerInfo.h"
|
||||||
#include "v8/include/v8.h"
|
#include "v8/include/v8.h"
|
||||||
#include "webkit/child/worker_task_runner.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -92,9 +94,9 @@ class CefPrerendererClient : public content::RenderViewObserver,
|
|||||||
|
|
||||||
// Implementation of SequencedTaskRunner for WebWorker threads.
|
// Implementation of SequencedTaskRunner for WebWorker threads.
|
||||||
class CefWebWorkerTaskRunner : public base::SequencedTaskRunner,
|
class CefWebWorkerTaskRunner : public base::SequencedTaskRunner,
|
||||||
public webkit_glue::WorkerTaskRunner::Observer {
|
public content::WorkerTaskRunner::Observer {
|
||||||
public:
|
public:
|
||||||
CefWebWorkerTaskRunner(webkit_glue::WorkerTaskRunner* runner,
|
CefWebWorkerTaskRunner(content::WorkerTaskRunner* runner,
|
||||||
int worker_id)
|
int worker_id)
|
||||||
: runner_(runner),
|
: runner_(runner),
|
||||||
worker_id_(worker_id) {
|
worker_id_(worker_id) {
|
||||||
@ -134,7 +136,7 @@ class CefWebWorkerTaskRunner : public base::SequencedTaskRunner,
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
webkit_glue::WorkerTaskRunner* runner_;
|
content::WorkerTaskRunner* runner_;
|
||||||
int worker_id_;
|
int worker_id_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -309,8 +311,8 @@ scoped_refptr<base::SequencedTaskRunner>
|
|||||||
return render_task_runner_;
|
return render_task_runner_;
|
||||||
|
|
||||||
// Check if a WebWorker exists for the current thread.
|
// Check if a WebWorker exists for the current thread.
|
||||||
webkit_glue::WorkerTaskRunner* worker_runner =
|
content::WorkerTaskRunner* worker_runner =
|
||||||
webkit_glue::WorkerTaskRunner::Instance();
|
content::WorkerTaskRunner::Instance();
|
||||||
int worker_id = worker_runner->CurrentWorkerId();
|
int worker_id = worker_runner->CurrentWorkerId();
|
||||||
if (worker_id > 0) {
|
if (worker_id > 0) {
|
||||||
base::AutoLock lock_scope(worker_task_runner_lock_);
|
base::AutoLock lock_scope(worker_task_runner_lock_);
|
||||||
@ -425,6 +427,7 @@ void CefContentRendererClient::RenderThreadStarted() {
|
|||||||
|
|
||||||
void CefContentRendererClient::RenderFrameCreated(
|
void CefContentRendererClient::RenderFrameCreated(
|
||||||
content::RenderFrame* render_frame) {
|
content::RenderFrame* render_frame) {
|
||||||
|
new CefRenderFrameObserver(render_frame);
|
||||||
BrowserCreated(render_frame->GetRenderView(), render_frame);
|
BrowserCreated(render_frame->GetRenderView(), render_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,7 +447,7 @@ bool CefContentRendererClient::OverrideCreatePlugin(
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if defined(ENABLE_PLUGINS)
|
#if defined(ENABLE_PLUGINS)
|
||||||
if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType)
|
if (base::UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
content::RenderFrameImpl* render_frame_impl =
|
content::RenderFrameImpl* render_frame_impl =
|
||||||
|
@ -72,7 +72,6 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
|||||||
// single-process mode. Blocks until cleanup is complete.
|
// single-process mode. Blocks until cleanup is complete.
|
||||||
void RunSingleProcessCleanup();
|
void RunSingleProcessCleanup();
|
||||||
|
|
||||||
private:
|
|
||||||
// ContentRendererClient implementation.
|
// ContentRendererClient implementation.
|
||||||
virtual void RenderThreadStarted() OVERRIDE;
|
virtual void RenderThreadStarted() OVERRIDE;
|
||||||
virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE;
|
virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE;
|
||||||
@ -94,13 +93,15 @@ class CefContentRendererClient : public content::ContentRendererClient,
|
|||||||
v8::Handle<v8::Context> context,
|
v8::Handle<v8::Context> context,
|
||||||
int extension_group,
|
int extension_group,
|
||||||
int world_id) OVERRIDE;
|
int world_id) OVERRIDE;
|
||||||
virtual void WillReleaseScriptContext(blink::WebFrame* frame,
|
|
||||||
v8::Handle<v8::Context> context,
|
void WillReleaseScriptContext(blink::WebFrame* frame,
|
||||||
int world_id) OVERRIDE;
|
v8::Handle<v8::Context> context,
|
||||||
|
int world_id);
|
||||||
|
|
||||||
// MessageLoop::DestructionObserver implementation.
|
// MessageLoop::DestructionObserver implementation.
|
||||||
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
|
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
|
||||||
|
|
||||||
|
private:
|
||||||
void BrowserCreated(content::RenderView* render_view,
|
void BrowserCreated(content::RenderView* render_view,
|
||||||
content::RenderFrame* render_frame);
|
content::RenderFrame* render_frame);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetElementById(const CefString& id) {
|
|||||||
|
|
||||||
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetFocusedNode() {
|
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetFocusedNode() {
|
||||||
const WebDocument& document = frame_->document();
|
const WebDocument& document = frame_->document();
|
||||||
return GetOrCreateNode(document.focusedNode());
|
return GetOrCreateNode(document.focusedElement());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CefDOMDocumentImpl::HasSelection() {
|
bool CefDOMDocumentImpl::HasSelection() {
|
||||||
|
@ -75,8 +75,6 @@ CefDOMEventImpl::Category CefDOMEventImpl::GetCategory() {
|
|||||||
flags |= DOM_EVENT_CATEGORY_PROGRESS;
|
flags |= DOM_EVENT_CATEGORY_PROGRESS;
|
||||||
if (event_.isXMLHttpRequestProgressEvent())
|
if (event_.isXMLHttpRequestProgressEvent())
|
||||||
flags |= DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
|
flags |= DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
|
||||||
if (event_.isBeforeLoadEvent())
|
|
||||||
flags |= DOM_EVENT_CATEGORY_BEFORE_LOAD;
|
|
||||||
|
|
||||||
return static_cast<Category>(flags);
|
return static_cast<Category>(flags);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class CefDOMEventListenerWrapper : public WebDOMEventListener,
|
|||||||
frame_(frame),
|
frame_(frame),
|
||||||
listener_(listener) {
|
listener_(listener) {
|
||||||
// Cause this object to be deleted immediately before the frame is closed.
|
// Cause this object to be deleted immediately before the frame is closed.
|
||||||
browser->AddFrameObject(frame->identifier(), this);
|
browser->AddFrameObject(webkit_glue::GetIdentifier(frame), this);
|
||||||
}
|
}
|
||||||
virtual ~CefDOMEventListenerWrapper() {
|
virtual ~CefDOMEventListenerWrapper() {
|
||||||
CEF_REQUIRE_RT();
|
CEF_REQUIRE_RT();
|
||||||
@ -246,7 +246,7 @@ CefString CefDOMNodeImpl::GetValue() {
|
|||||||
value = select_element.value();
|
value = select_element.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
TrimWhitespace(value, TRIM_LEADING, &value);
|
base::TrimWhitespace(value, base::TRIM_LEADING, &value);
|
||||||
str = value;
|
str = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser,
|
|||||||
blink::WebFrame* frame)
|
blink::WebFrame* frame)
|
||||||
: browser_(browser),
|
: browser_(browser),
|
||||||
frame_(frame),
|
frame_(frame),
|
||||||
frame_id_(frame->identifier()) {
|
frame_id_(webkit_glue::GetIdentifier(frame)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CefFrameImpl::~CefFrameImpl() {
|
CefFrameImpl::~CefFrameImpl() {
|
||||||
|
24
libcef/renderer/render_frame_observer.cc
Normal file
24
libcef/renderer/render_frame_observer.cc
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright 2014 The Chromium Embedded Framework Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be found
|
||||||
|
// in the LICENSE file.
|
||||||
|
|
||||||
|
#include "libcef/renderer/render_frame_observer.h"
|
||||||
|
|
||||||
|
#include "libcef/renderer/content_renderer_client.h"
|
||||||
|
|
||||||
|
#include "content/public/renderer/render_frame.h"
|
||||||
|
|
||||||
|
CefRenderFrameObserver::CefRenderFrameObserver(
|
||||||
|
content::RenderFrame* render_frame)
|
||||||
|
: content::RenderFrameObserver(render_frame) {
|
||||||
|
}
|
||||||
|
|
||||||
|
CefRenderFrameObserver::~CefRenderFrameObserver() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void CefRenderFrameObserver::WillReleaseScriptContext(
|
||||||
|
v8::Handle<v8::Context> context,
|
||||||
|
int world_id) {
|
||||||
|
CefContentRendererClient::Get()->WillReleaseScriptContext(
|
||||||
|
render_frame()->GetWebFrame(), context, world_id);
|
||||||
|
}
|
26
libcef/renderer/render_frame_observer.h
Normal file
26
libcef/renderer/render_frame_observer.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright 2014 The Chromium Embedded Framework Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be found
|
||||||
|
// in the LICENSE file.
|
||||||
|
|
||||||
|
#ifndef LIBCEF_RENDERER_RENDER_FRAME_OBSERVER_H_
|
||||||
|
#define LIBCEF_RENDERER_RENDER_FRAME_OBSERVER_H_
|
||||||
|
|
||||||
|
#include "content/public/renderer/render_frame_observer.h"
|
||||||
|
|
||||||
|
namespace content {
|
||||||
|
class RenderFrame;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CefRenderFrameObserver : public content::RenderFrameObserver {
|
||||||
|
public:
|
||||||
|
explicit CefRenderFrameObserver(content::RenderFrame* render_frame);
|
||||||
|
virtual ~CefRenderFrameObserver();
|
||||||
|
|
||||||
|
virtual void WillReleaseScriptContext(v8::Handle<v8::Context> context,
|
||||||
|
int world_id) OVERRIDE;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(CefRenderFrameObserver);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // LIBCEF_RENDERER_RENDER_FRAME_OBSERVER_H_
|
@ -15,12 +15,14 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
MSVC_PUSH_WARNING_LEVEL(0);
|
MSVC_PUSH_WARNING_LEVEL(0);
|
||||||
#include "core/frame/Frame.h"
|
#include "core/frame/Frame.h"
|
||||||
|
#include "core/frame/LocalFrame.h"
|
||||||
#include "core/workers/WorkerGlobalScope.h"
|
#include "core/workers/WorkerGlobalScope.h"
|
||||||
#include "bindings/v8/ScriptController.h"
|
#include "bindings/v8/ScriptController.h"
|
||||||
#include "bindings/v8/V8Binding.h"
|
#include "bindings/v8/V8Binding.h"
|
||||||
#include "bindings/v8/V8RecursionScope.h"
|
#include "bindings/v8/V8RecursionScope.h"
|
||||||
#include "bindings/v8/WorkerScriptController.h"
|
#include "bindings/v8/WorkerScriptController.h"
|
||||||
MSVC_POP_WARNING();
|
MSVC_POP_WARNING();
|
||||||
|
#undef FROM_HERE
|
||||||
#undef LOG
|
#undef LOG
|
||||||
|
|
||||||
#include "libcef/renderer/v8_impl.h"
|
#include "libcef/renderer/v8_impl.h"
|
||||||
@ -31,6 +33,7 @@ MSVC_POP_WARNING();
|
|||||||
#include "libcef/common/tracker.h"
|
#include "libcef/common/tracker.h"
|
||||||
#include "libcef/renderer/browser_impl.h"
|
#include "libcef/renderer/browser_impl.h"
|
||||||
#include "libcef/renderer/thread_util.h"
|
#include "libcef/renderer/thread_util.h"
|
||||||
|
#include "libcef/renderer/webkit_glue.h"
|
||||||
|
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/lazy_instance.h"
|
#include "base/lazy_instance.h"
|
||||||
@ -612,21 +615,16 @@ v8::Local<v8::Value> CallV8Function(v8::Handle<v8::Context> context,
|
|||||||
// Execute the function call using the ScriptController so that inspector
|
// Execute the function call using the ScriptController so that inspector
|
||||||
// instrumentation works.
|
// instrumentation works.
|
||||||
if (CEF_CURRENTLY_ON_RT()) {
|
if (CEF_CURRENTLY_ON_RT()) {
|
||||||
RefPtr<WebCore::Frame> frame = WebCore::toFrameIfNotDetached(context);
|
RefPtr<WebCore::LocalFrame> frame = WebCore::toFrameIfNotDetached(context);
|
||||||
DCHECK(frame);
|
DCHECK(frame);
|
||||||
if (frame &&
|
if (frame &&
|
||||||
frame->script().canExecuteScripts(WebCore::AboutToExecuteScript)) {
|
frame->script().canExecuteScripts(WebCore::AboutToExecuteScript)) {
|
||||||
func_rv = frame->script().callFunction(function, receiver, argc, args);
|
func_rv = frame->script().callFunction(function, receiver, argc, args);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
WebCore::WorkerScriptController* controller =
|
func_rv = WebCore::ScriptController::callFunction(
|
||||||
WebCore::WorkerScriptController::controllerForContext(isolate);
|
WebCore::toExecutionContext(context),
|
||||||
DCHECK(controller);
|
function, receiver, argc, args, isolate);
|
||||||
if (controller) {
|
|
||||||
func_rv = WebCore::ScriptController::callFunction(
|
|
||||||
controller->workerGlobalScope().executionContext(),
|
|
||||||
function, receiver, argc, args, isolate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return func_rv;
|
return func_rv;
|
||||||
@ -932,7 +930,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
|
|||||||
if (webframe) {
|
if (webframe) {
|
||||||
CefRefPtr<CefBrowserImpl> browser =
|
CefRefPtr<CefBrowserImpl> browser =
|
||||||
CefBrowserImpl::GetBrowserForMainFrame(webframe->top());
|
CefBrowserImpl::GetBrowserForMainFrame(webframe->top());
|
||||||
frame = browser->GetFrame(webframe->identifier());
|
frame = browser->GetFrame(webkit_glue::GetIdentifier(webframe));
|
||||||
}
|
}
|
||||||
|
|
||||||
return frame;
|
return frame;
|
||||||
|
@ -31,8 +31,13 @@ MSVC_PUSH_WARNING_LEVEL(0);
|
|||||||
MSVC_POP_WARNING();
|
MSVC_POP_WARNING();
|
||||||
#undef LOG
|
#undef LOG
|
||||||
|
|
||||||
|
#include "base/logging.h"
|
||||||
|
#include "content/public/renderer/render_frame.h"
|
||||||
|
|
||||||
namespace webkit_glue {
|
namespace webkit_glue {
|
||||||
|
|
||||||
|
const int64 kInvalidFrameId = -1;
|
||||||
|
|
||||||
bool CanGoBack(blink::WebView* view) {
|
bool CanGoBack(blink::WebView* view) {
|
||||||
if (!view)
|
if (!view)
|
||||||
return false;
|
return false;
|
||||||
@ -79,4 +84,15 @@ bool SetNodeValue(blink::WebNode& node, const blink::WebString& value) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64 GetIdentifier(blink::WebFrame* frame) {
|
||||||
|
// Each WebFrame will have an associated RenderFrame. The RenderFrame
|
||||||
|
// routing IDs are unique within a given renderer process.
|
||||||
|
content::RenderFrame* render_frame =
|
||||||
|
content::RenderFrame::FromWebFrame(frame);
|
||||||
|
DCHECK(render_frame);
|
||||||
|
if (render_frame)
|
||||||
|
return render_frame->GetRoutingID();
|
||||||
|
return kInvalidFrameId;
|
||||||
|
}
|
||||||
|
|
||||||
} // webkit_glue
|
} // webkit_glue
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#define CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
#define CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include "base/basictypes.h"
|
||||||
|
|
||||||
namespace v8 {
|
namespace v8 {
|
||||||
class Context;
|
class Context;
|
||||||
@ -23,6 +24,8 @@ class WebView;
|
|||||||
|
|
||||||
namespace webkit_glue {
|
namespace webkit_glue {
|
||||||
|
|
||||||
|
extern const int64 kInvalidFrameId;
|
||||||
|
|
||||||
bool CanGoBack(blink::WebView* view);
|
bool CanGoBack(blink::WebView* view);
|
||||||
bool CanGoForward(blink::WebView* view);
|
bool CanGoForward(blink::WebView* view);
|
||||||
void GoBack(blink::WebView* view);
|
void GoBack(blink::WebView* view);
|
||||||
@ -33,6 +36,8 @@ std::string DumpDocumentText(blink::WebFrame* frame);
|
|||||||
|
|
||||||
bool SetNodeValue(blink::WebNode& node, const blink::WebString& value);
|
bool SetNodeValue(blink::WebNode& node, const blink::WebString& value);
|
||||||
|
|
||||||
|
int64 GetIdentifier(blink::WebFrame* frame);
|
||||||
|
|
||||||
} // webkit_glue
|
} // webkit_glue
|
||||||
|
|
||||||
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Index: common.gypi
|
Index: common.gypi
|
||||||
===================================================================
|
===================================================================
|
||||||
--- common.gypi (revision 251746)
|
--- common.gypi (revision 261035)
|
||||||
+++ common.gypi (working copy)
|
+++ common.gypi (working copy)
|
||||||
@@ -9,6 +9,9 @@
|
@@ -9,6 +9,9 @@
|
||||||
# Variables expected to be overriden on the GYP command line (-D) or by
|
# Variables expected to be overriden on the GYP command line (-D) or by
|
||||||
@ -12,7 +12,7 @@ Index: common.gypi
|
|||||||
# Putting a variables dict inside another variables dict looks kind of
|
# Putting a variables dict inside another variables dict looks kind of
|
||||||
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
|
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
|
||||||
# variables within the outer variables dict here. This is necessary
|
# variables within the outer variables dict here. This is necessary
|
||||||
@@ -85,9 +88,9 @@
|
@@ -101,9 +104,9 @@
|
||||||
#
|
#
|
||||||
# TODO(erg): Merge this into the previous block once compiling with
|
# TODO(erg): Merge this into the previous block once compiling with
|
||||||
# aura safely implies including ash capabilities.
|
# aura safely implies including ash capabilities.
|
||||||
@ -27,7 +27,7 @@ Index: common.gypi
|
|||||||
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
|
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
|
||||||
Index: mac/strip_save_dsym
|
Index: mac/strip_save_dsym
|
||||||
===================================================================
|
===================================================================
|
||||||
--- mac/strip_save_dsym (revision 251746)
|
--- mac/strip_save_dsym (revision 261035)
|
||||||
+++ mac/strip_save_dsym (working copy)
|
+++ mac/strip_save_dsym (working copy)
|
||||||
@@ -48,7 +48,7 @@
|
@@ -48,7 +48,7 @@
|
||||||
"bundle"]
|
"bundle"]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Index: public/renderer/content_renderer_client.cc
|
Index: public/renderer/content_renderer_client.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- public/renderer/content_renderer_client.cc (revision 251746)
|
--- public/renderer/content_renderer_client.cc (revision 261035)
|
||||||
+++ public/renderer/content_renderer_client.cc (working copy)
|
+++ public/renderer/content_renderer_client.cc (working copy)
|
||||||
@@ -92,7 +92,6 @@
|
@@ -92,7 +92,6 @@
|
||||||
return false;
|
return false;
|
||||||
@ -20,7 +20,7 @@ Index: public/renderer/content_renderer_client.cc
|
|||||||
const GURL& url,
|
const GURL& url,
|
||||||
Index: public/renderer/content_renderer_client.h
|
Index: public/renderer/content_renderer_client.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- public/renderer/content_renderer_client.h (revision 251746)
|
--- public/renderer/content_renderer_client.h (revision 261035)
|
||||||
+++ public/renderer/content_renderer_client.h (working copy)
|
+++ public/renderer/content_renderer_client.h (working copy)
|
||||||
@@ -175,7 +175,6 @@
|
@@ -175,7 +175,6 @@
|
||||||
// Returns true if a popup window should be allowed.
|
// Returns true if a popup window should be allowed.
|
||||||
@ -38,23 +38,23 @@ Index: public/renderer/content_renderer_client.h
|
|||||||
|
|
||||||
// Returns true if we should fork a new process for the given navigation.
|
// Returns true if we should fork a new process for the given navigation.
|
||||||
// If |send_referrer| is set to false (which is the default), no referrer
|
// If |send_referrer| is set to false (which is the default), no referrer
|
||||||
Index: renderer/render_view_impl.cc
|
Index: renderer/render_frame_impl.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- renderer/render_view_impl.cc (revision 251746)
|
--- renderer/render_frame_impl.cc (revision 261035)
|
||||||
+++ renderer/render_view_impl.cc (working copy)
|
+++ renderer/render_frame_impl.cc (working copy)
|
||||||
@@ -2628,7 +2628,6 @@
|
@@ -2661,7 +2661,6 @@
|
||||||
WebDataSource::ExtraData* extraData, const WebURLRequest& request,
|
WebNavigationType type,
|
||||||
WebNavigationType type, WebNavigationPolicy default_policy,
|
WebNavigationPolicy default_policy,
|
||||||
bool is_redirect) {
|
bool is_redirect) {
|
||||||
-#ifdef OS_ANDROID
|
-#ifdef OS_ANDROID
|
||||||
// The handlenavigation API is deprecated and will be removed once
|
// The handlenavigation API is deprecated and will be removed once
|
||||||
// crbug.com/325351 is resolved.
|
// crbug.com/325351 is resolved.
|
||||||
if (request.url() != GURL(kSwappedOutURL) &&
|
if (request.url() != GURL(kSwappedOutURL) &&
|
||||||
@@ -2643,7 +2642,6 @@
|
@@ -2676,7 +2675,6 @@
|
||||||
is_redirect)) {
|
is_redirect)) {
|
||||||
return blink::WebNavigationPolicyIgnore;
|
return blink::WebNavigationPolicyIgnore;
|
||||||
}
|
}
|
||||||
-#endif
|
-#endif
|
||||||
|
|
||||||
Referrer referrer(GetReferrerFromRequest(frame, request));
|
Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame, request));
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: gyp/generator/ninja.py
|
Index: gyp/generator/ninja.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gyp/generator/ninja.py (revision 1852)
|
--- gyp/generator/ninja.py (revision 1880)
|
||||||
+++ gyp/generator/ninja.py (working copy)
|
+++ gyp/generator/ninja.py (working copy)
|
||||||
@@ -726,7 +726,16 @@
|
@@ -738,7 +738,16 @@
|
||||||
for path in copy['files']:
|
for path in copy['files']:
|
||||||
# Normalize the path so trailing slashes don't confuse us.
|
# Normalize the path so trailing slashes don't confuse us.
|
||||||
path = os.path.normpath(path)
|
path = os.path.normpath(path)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: message_loop.cc
|
Index: message_loop.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- message_loop.cc (revision 248478)
|
--- message_loop.cc (revision 261035)
|
||||||
+++ message_loop.cc (working copy)
|
+++ message_loop.cc (working copy)
|
||||||
@@ -142,7 +142,7 @@
|
@@ -144,7 +144,7 @@
|
||||||
MessageLoop::~MessageLoop() {
|
MessageLoop::~MessageLoop() {
|
||||||
DCHECK_EQ(this, current());
|
DCHECK_EQ(this, current());
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: compositing_iosurface_layer_mac.mm
|
Index: compositing_iosurface_layer_mac.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- compositing_iosurface_layer_mac.mm (revision 251746)
|
--- compositing_iosurface_layer_mac.mm (revision 261035)
|
||||||
+++ compositing_iosurface_layer_mac.mm (working copy)
|
+++ compositing_iosurface_layer_mac.mm (working copy)
|
||||||
@@ -119,7 +119,7 @@
|
@@ -120,7 +120,7 @@
|
||||||
(context_ && context_->cgl_context() != glContext) ||
|
(context_ && context_->cgl_context() != glContext) ||
|
||||||
!renderWidgetHostView_ ||
|
!renderWidgetHostView_ ||
|
||||||
!renderWidgetHostView_->compositing_iosurface_) {
|
!renderWidgetHostView_->compositing_iosurface_) {
|
||||||
@ -13,9 +13,9 @@ Index: compositing_iosurface_layer_mac.mm
|
|||||||
}
|
}
|
||||||
Index: compositing_iosurface_mac.mm
|
Index: compositing_iosurface_mac.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- compositing_iosurface_mac.mm (revision 251746)
|
--- compositing_iosurface_mac.mm (revision 261035)
|
||||||
+++ compositing_iosurface_mac.mm (working copy)
|
+++ compositing_iosurface_mac.mm (working copy)
|
||||||
@@ -360,7 +360,7 @@
|
@@ -362,7 +362,7 @@
|
||||||
glUseProgram(0); CHECK_AND_SAVE_GL_ERROR();
|
glUseProgram(0); CHECK_AND_SAVE_GL_ERROR();
|
||||||
} else {
|
} else {
|
||||||
// Should match the clear color of RenderWidgetHostViewMac.
|
// Should match the clear color of RenderWidgetHostViewMac.
|
||||||
@ -26,7 +26,7 @@ Index: compositing_iosurface_mac.mm
|
|||||||
|
|
||||||
Index: compositing_iosurface_shader_programs_mac.cc
|
Index: compositing_iosurface_shader_programs_mac.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- compositing_iosurface_shader_programs_mac.cc (revision 251746)
|
--- compositing_iosurface_shader_programs_mac.cc (revision 261035)
|
||||||
+++ compositing_iosurface_shader_programs_mac.cc (working copy)
|
+++ compositing_iosurface_shader_programs_mac.cc (working copy)
|
||||||
@@ -11,6 +11,7 @@
|
@@ -11,6 +11,7 @@
|
||||||
#include "base/debug/trace_event.h"
|
#include "base/debug/trace_event.h"
|
||||||
@ -78,7 +78,7 @@ Index: compositing_iosurface_shader_programs_mac.cc
|
|||||||
shader_programs_[which] =
|
shader_programs_[which] =
|
||||||
Index: compositing_iosurface_shader_programs_mac.h
|
Index: compositing_iosurface_shader_programs_mac.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- compositing_iosurface_shader_programs_mac.h (revision 251746)
|
--- compositing_iosurface_shader_programs_mac.h (revision 261035)
|
||||||
+++ compositing_iosurface_shader_programs_mac.h (working copy)
|
+++ compositing_iosurface_shader_programs_mac.h (working copy)
|
||||||
@@ -48,6 +48,8 @@
|
@@ -48,6 +48,8 @@
|
||||||
return rgb_to_yv12_output_format_;
|
return rgb_to_yv12_output_format_;
|
||||||
@ -91,18 +91,18 @@ Index: compositing_iosurface_shader_programs_mac.h
|
|||||||
TransformsRGBToYV12);
|
TransformsRGBToYV12);
|
||||||
Index: render_widget_host_view_mac.mm
|
Index: render_widget_host_view_mac.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- render_widget_host_view_mac.mm (revision 251746)
|
--- render_widget_host_view_mac.mm (revision 261035)
|
||||||
+++ render_widget_host_view_mac.mm (working copy)
|
+++ render_widget_host_view_mac.mm (working copy)
|
||||||
@@ -483,7 +483,7 @@
|
@@ -434,7 +434,7 @@
|
||||||
software_layer_.reset([[CALayer alloc] init]);
|
use_core_animation_ = true;
|
||||||
if (!software_layer_)
|
background_layer_.reset([[CALayer alloc] init]);
|
||||||
LOG(ERROR) << "Failed to create CALayer for software rendering";
|
[background_layer_
|
||||||
- [software_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
|
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
|
||||||
+ [software_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
+ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
||||||
[software_layer_ setDelegate:cocoa_view_];
|
[cocoa_view_ setLayer:background_layer_];
|
||||||
[software_layer_ setContentsGravity:kCAGravityTopLeft];
|
[cocoa_view_ setWantsLayer:YES];
|
||||||
[software_layer_ setFrame:NSRectToCGRect([cocoa_view_ bounds])];
|
}
|
||||||
@@ -2856,7 +2856,7 @@
|
@@ -3087,7 +3087,7 @@
|
||||||
|
|
||||||
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
|
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
|
||||||
CGContextSetFillColorWithColor(context,
|
CGContextSetFillColorWithColor(context,
|
||||||
@ -111,7 +111,7 @@ Index: render_widget_host_view_mac.mm
|
|||||||
CGContextFillRect(context, NSRectToCGRect(r));
|
CGContextFillRect(context, NSRectToCGRect(r));
|
||||||
}
|
}
|
||||||
if (damagedRect.bottom() > rect.bottom()) {
|
if (damagedRect.bottom() > rect.bottom()) {
|
||||||
@@ -2878,7 +2878,7 @@
|
@@ -3109,7 +3109,7 @@
|
||||||
|
|
||||||
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
|
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
|
||||||
CGContextSetFillColorWithColor(context,
|
CGContextSetFillColorWithColor(context,
|
||||||
@ -120,7 +120,7 @@ Index: render_widget_host_view_mac.mm
|
|||||||
CGContextFillRect(context, NSRectToCGRect(r));
|
CGContextFillRect(context, NSRectToCGRect(r));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3037,7 +3037,7 @@
|
@@ -3259,7 +3259,7 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CGContextSetFillColorWithColor(context,
|
CGContextSetFillColorWithColor(context,
|
||||||
@ -129,12 +129,21 @@ Index: render_widget_host_view_mac.mm
|
|||||||
CGContextFillRect(context, dirtyRect);
|
CGContextFillRect(context, dirtyRect);
|
||||||
if (renderWidgetHostView_->whiteout_start_time_.is_null())
|
if (renderWidgetHostView_->whiteout_start_time_.is_null())
|
||||||
renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks::Now();
|
renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks::Now();
|
||||||
@@ -4045,7 +4045,7 @@
|
@@ -4282,7 +4282,7 @@
|
||||||
if (!renderWidgetHostView_->render_widget_host_ ||
|
if (self = [super init]) {
|
||||||
renderWidgetHostView_->render_widget_host_->is_hidden()) {
|
renderWidgetHostView_ = r;
|
||||||
|
|
||||||
|
- [self setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
|
||||||
|
+ [self setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
|
||||||
|
[self setAnchorPoint:CGPointMake(0, 0)];
|
||||||
|
// Setting contents gravity is necessary to prevent the layer from being
|
||||||
|
// scaled during dyanmic resizes (especially with devtools open).
|
||||||
|
@@ -4311,7 +4311,7 @@
|
||||||
|
inContext:context];
|
||||||
|
} else {
|
||||||
CGContextSetFillColorWithColor(context,
|
CGContextSetFillColorWithColor(context,
|
||||||
- CGColorGetConstantColor(kCGColorWhite));
|
- CGColorGetConstantColor(kCGColorWhite));
|
||||||
+ CGColorGetConstantColor(kCGColorClear));
|
+ CGColorGetConstantColor(kCGColorClear));
|
||||||
CGContextFillRect(context, clipRect);
|
CGContextFillRect(context, clipRect);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: core/frame/FrameView.cpp
|
Index: core/frame/FrameView.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- core/frame/FrameView.cpp (revision 167304)
|
--- core/frame/FrameView.cpp (revision 170525)
|
||||||
+++ core/frame/FrameView.cpp (working copy)
|
+++ core/frame/FrameView.cpp (working copy)
|
||||||
@@ -141,8 +141,10 @@
|
@@ -165,8 +165,10 @@
|
||||||
if (!isMainFrame())
|
if (!isMainFrame())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -12,12 +12,12 @@ Index: core/frame/FrameView.cpp
|
|||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PassRefPtr<FrameView> FrameView::create(Frame* frame)
|
PassRefPtr<FrameView> FrameView::create(LocalFrame* frame)
|
||||||
Index: platform/scroll/ScrollbarThemeMacCommon.mm
|
Index: platform/scroll/ScrollbarThemeMacCommon.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- platform/scroll/ScrollbarThemeMacCommon.mm (revision 167304)
|
--- platform/scroll/ScrollbarThemeMacCommon.mm (revision 170525)
|
||||||
+++ platform/scroll/ScrollbarThemeMacCommon.mm (working copy)
|
+++ platform/scroll/ScrollbarThemeMacCommon.mm (working copy)
|
||||||
@@ -369,10 +369,14 @@
|
@@ -358,10 +358,14 @@
|
||||||
// static
|
// static
|
||||||
bool ScrollbarThemeMacCommon::isOverlayAPIAvailable()
|
bool ScrollbarThemeMacCommon::isOverlayAPIAvailable()
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: web_dialog_view.cc
|
Index: web_dialog_view.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- web_dialog_view.cc (revision 248478)
|
--- web_dialog_view.cc (revision 261035)
|
||||||
+++ web_dialog_view.cc (working copy)
|
+++ web_dialog_view.cc (working copy)
|
||||||
@@ -261,13 +261,6 @@
|
@@ -257,13 +257,6 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ Index: web_dialog_view.cc
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// content::WebContentsDelegate implementation:
|
// content::WebContentsDelegate implementation:
|
||||||
|
|
||||||
@@ -347,6 +340,16 @@
|
@@ -337,6 +330,15 @@
|
||||||
*proceed_to_fire_unload = proceed;
|
*proceed_to_fire_unload = proceed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,16 +26,15 @@ Index: web_dialog_view.cc
|
|||||||
+ if (delegate_)
|
+ if (delegate_)
|
||||||
+ return delegate_->HandleContextMenu(params);
|
+ return delegate_->HandleContextMenu(params);
|
||||||
+ return WebDialogWebContentsDelegate::HandleContextMenu(render_frame_host,
|
+ return WebDialogWebContentsDelegate::HandleContextMenu(render_frame_host,
|
||||||
+ params);
|
+ params);
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
+
|
+
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// WebDialogView, private:
|
// WebDialogView, private:
|
||||||
|
|
||||||
Index: web_dialog_view.h
|
Index: web_dialog_view.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- web_dialog_view.h (revision 248478)
|
--- web_dialog_view.h (revision 261035)
|
||||||
+++ web_dialog_view.h (working copy)
|
+++ web_dialog_view.h (working copy)
|
||||||
@@ -74,6 +74,7 @@
|
@@ -74,6 +74,7 @@
|
||||||
virtual const views::Widget* GetWidget() const OVERRIDE;
|
virtual const views::Widget* GetWidget() const OVERRIDE;
|
||||||
@ -54,7 +53,7 @@ Index: web_dialog_view.h
|
|||||||
|
|
||||||
// Overridden from content::WebContentsDelegate:
|
// Overridden from content::WebContentsDelegate:
|
||||||
virtual void MoveContents(content::WebContents* source,
|
virtual void MoveContents(content::WebContents* source,
|
||||||
@@ -114,6 +113,9 @@
|
@@ -115,6 +114,9 @@
|
||||||
virtual void BeforeUnloadFired(content::WebContents* tab,
|
virtual void BeforeUnloadFired(content::WebContents* tab,
|
||||||
bool proceed,
|
bool proceed,
|
||||||
bool* proceed_to_fire_unload) OVERRIDE;
|
bool* proceed_to_fire_unload) OVERRIDE;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Index: desktop_aura/desktop_screen_win.cc
|
Index: desktop_aura/desktop_screen_win.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- desktop_aura/desktop_screen_win.cc (revision 251746)
|
--- desktop_aura/desktop_screen_win.cc (revision 261035)
|
||||||
+++ desktop_aura/desktop_screen_win.cc (working copy)
|
+++ desktop_aura/desktop_screen_win.cc (working copy)
|
||||||
@@ -54,6 +54,8 @@
|
@@ -54,6 +54,8 @@
|
||||||
}
|
}
|
||||||
@ -8,29 +8,29 @@ Index: desktop_aura/desktop_screen_win.cc
|
|||||||
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
|
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
|
||||||
+ if (!window)
|
+ if (!window)
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
aura::WindowEventDispatcher* dispatcher = window->GetDispatcher();
|
aura::WindowTreeHost* host = window->GetHost();
|
||||||
return dispatcher ? dispatcher->host()->GetAcceleratedWidget() : NULL;
|
return host ? host->GetAcceleratedWidget() : NULL;
|
||||||
}
|
}
|
||||||
Index: desktop_aura/desktop_window_tree_host_win.cc
|
Index: desktop_aura/desktop_window_tree_host_win.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- desktop_aura/desktop_window_tree_host_win.cc (revision 251746)
|
--- desktop_aura/desktop_window_tree_host_win.cc (revision 261035)
|
||||||
+++ desktop_aura/desktop_window_tree_host_win.cc (working copy)
|
+++ desktop_aura/desktop_window_tree_host_win.cc (working copy)
|
||||||
@@ -133,7 +133,9 @@
|
@@ -130,7 +130,9 @@
|
||||||
native_widget_delegate_);
|
native_widget_delegate_);
|
||||||
|
|
||||||
HWND parent_hwnd = NULL;
|
HWND parent_hwnd = NULL;
|
||||||
- if (params.parent && params.parent->GetDispatcher()) {
|
- if (params.parent && params.parent->GetHost())
|
||||||
+ if (params.parent_widget) {
|
+ if (params.parent_widget)
|
||||||
+ parent_hwnd = params.parent_widget;
|
+ parent_hwnd = params.parent_widget;
|
||||||
+ } else if (params.parent && params.parent->GetDispatcher()) {
|
+ else if (params.parent && params.parent->GetHost())
|
||||||
parent_hwnd =
|
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
|
||||||
params.parent->GetDispatcher()->host()->GetAcceleratedWidget();
|
|
||||||
}
|
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
|
||||||
Index: widget.cc
|
Index: widget.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- widget.cc (revision 251746)
|
--- widget.cc (revision 261035)
|
||||||
+++ widget.cc (working copy)
|
+++ widget.cc (working copy)
|
||||||
@@ -124,6 +124,7 @@
|
@@ -122,6 +122,7 @@
|
||||||
show_state(ui::SHOW_STATE_DEFAULT),
|
show_state(ui::SHOW_STATE_DEFAULT),
|
||||||
double_buffer(false),
|
double_buffer(false),
|
||||||
parent(NULL),
|
parent(NULL),
|
||||||
@ -38,7 +38,7 @@ Index: widget.cc
|
|||||||
native_widget(NULL),
|
native_widget(NULL),
|
||||||
desktop_window_tree_host(NULL),
|
desktop_window_tree_host(NULL),
|
||||||
top_level(false),
|
top_level(false),
|
||||||
@@ -149,6 +150,7 @@
|
@@ -148,6 +149,7 @@
|
||||||
show_state(ui::SHOW_STATE_DEFAULT),
|
show_state(ui::SHOW_STATE_DEFAULT),
|
||||||
double_buffer(false),
|
double_buffer(false),
|
||||||
parent(NULL),
|
parent(NULL),
|
||||||
@ -46,7 +46,7 @@ Index: widget.cc
|
|||||||
native_widget(NULL),
|
native_widget(NULL),
|
||||||
desktop_window_tree_host(NULL),
|
desktop_window_tree_host(NULL),
|
||||||
top_level(false),
|
top_level(false),
|
||||||
@@ -389,7 +391,12 @@
|
@@ -386,7 +388,12 @@
|
||||||
Minimize();
|
Minimize();
|
||||||
} else if (params.delegate) {
|
} else if (params.delegate) {
|
||||||
SetContentsView(params.delegate->GetContentsView());
|
SetContentsView(params.delegate->GetContentsView());
|
||||||
@ -62,9 +62,9 @@ Index: widget.cc
|
|||||||
}
|
}
|
||||||
Index: widget.h
|
Index: widget.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- widget.h (revision 251746)
|
--- widget.h (revision 261035)
|
||||||
+++ widget.h (working copy)
|
+++ widget.h (working copy)
|
||||||
@@ -197,6 +197,7 @@
|
@@ -200,6 +200,7 @@
|
||||||
// Should the widget be double buffered? Default is false.
|
// Should the widget be double buffered? Default is false.
|
||||||
bool double_buffer;
|
bool double_buffer;
|
||||||
gfx::NativeView parent;
|
gfx::NativeView parent;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: browser/browser_plugin/browser_plugin_guest.cc
|
Index: browser/browser_plugin/browser_plugin_guest.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- browser/browser_plugin/browser_plugin_guest.cc (revision 251746)
|
--- browser/browser_plugin/browser_plugin_guest.cc (revision 261035)
|
||||||
+++ browser/browser_plugin/browser_plugin_guest.cc (working copy)
|
+++ browser/browser_plugin/browser_plugin_guest.cc (working copy)
|
||||||
@@ -789,7 +789,8 @@
|
@@ -794,7 +794,8 @@
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ Index: browser/browser_plugin/browser_plugin_guest.cc
|
|||||||
// http://crbug.com/140315).
|
// http://crbug.com/140315).
|
||||||
Index: browser/browser_plugin/browser_plugin_guest.h
|
Index: browser/browser_plugin/browser_plugin_guest.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- browser/browser_plugin/browser_plugin_guest.h (revision 251746)
|
--- browser/browser_plugin/browser_plugin_guest.h (revision 261035)
|
||||||
+++ browser/browser_plugin/browser_plugin_guest.h (working copy)
|
+++ browser/browser_plugin/browser_plugin_guest.h (working copy)
|
||||||
@@ -204,7 +204,8 @@
|
@@ -204,7 +204,8 @@
|
||||||
double progress) OVERRIDE;
|
double progress) OVERRIDE;
|
||||||
@ -28,9 +28,9 @@ Index: browser/browser_plugin/browser_plugin_guest.h
|
|||||||
const NativeWebKeyboardEvent& event) OVERRIDE;
|
const NativeWebKeyboardEvent& event) OVERRIDE;
|
||||||
Index: browser/web_contents/web_contents_impl.cc
|
Index: browser/web_contents/web_contents_impl.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- browser/web_contents/web_contents_impl.cc (revision 251746)
|
--- browser/web_contents/web_contents_impl.cc (revision 261035)
|
||||||
+++ browser/web_contents/web_contents_impl.cc (working copy)
|
+++ browser/web_contents/web_contents_impl.cc (working copy)
|
||||||
@@ -2727,7 +2727,7 @@
|
@@ -2831,7 +2831,7 @@
|
||||||
void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
|
void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
|
||||||
const ContextMenuParams& params) {
|
const ContextMenuParams& params) {
|
||||||
// Allow WebContentsDelegates to handle the context menu operation first.
|
// Allow WebContentsDelegates to handle the context menu operation first.
|
||||||
@ -41,9 +41,9 @@ Index: browser/web_contents/web_contents_impl.cc
|
|||||||
render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params);
|
render_view_host_delegate_view_->ShowContextMenu(render_frame_host, params);
|
||||||
Index: browser/web_contents/web_contents_view_mac.mm
|
Index: browser/web_contents/web_contents_view_mac.mm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- browser/web_contents/web_contents_view_mac.mm (revision 251746)
|
--- browser/web_contents/web_contents_view_mac.mm (revision 261035)
|
||||||
+++ browser/web_contents/web_contents_view_mac.mm (working copy)
|
+++ browser/web_contents/web_contents_view_mac.mm (working copy)
|
||||||
@@ -233,12 +233,6 @@
|
@@ -227,12 +227,6 @@
|
||||||
void WebContentsViewMac::ShowContextMenu(
|
void WebContentsViewMac::ShowContextMenu(
|
||||||
content::RenderFrameHost* render_frame_host,
|
content::RenderFrameHost* render_frame_host,
|
||||||
const ContextMenuParams& params) {
|
const ContextMenuParams& params) {
|
||||||
@ -58,7 +58,7 @@ Index: browser/web_contents/web_contents_view_mac.mm
|
|||||||
else
|
else
|
||||||
Index: public/browser/web_contents_delegate.cc
|
Index: public/browser/web_contents_delegate.cc
|
||||||
===================================================================
|
===================================================================
|
||||||
--- public/browser/web_contents_delegate.cc (revision 251746)
|
--- public/browser/web_contents_delegate.cc (revision 261035)
|
||||||
+++ public/browser/web_contents_delegate.cc (working copy)
|
+++ public/browser/web_contents_delegate.cc (working copy)
|
||||||
@@ -76,6 +76,7 @@
|
@@ -76,6 +76,7 @@
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ Index: public/browser/web_contents_delegate.cc
|
|||||||
}
|
}
|
||||||
Index: public/browser/web_contents_delegate.h
|
Index: public/browser/web_contents_delegate.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- public/browser/web_contents_delegate.h (revision 251746)
|
--- public/browser/web_contents_delegate.h (revision 261035)
|
||||||
+++ public/browser/web_contents_delegate.h (working copy)
|
+++ public/browser/web_contents_delegate.h (working copy)
|
||||||
@@ -35,6 +35,7 @@
|
@@ -35,6 +35,7 @@
|
||||||
class DownloadItem;
|
class DownloadItem;
|
||||||
@ -80,7 +80,7 @@ Index: public/browser/web_contents_delegate.h
|
|||||||
class RenderViewHost;
|
class RenderViewHost;
|
||||||
class SessionStorageNamespace;
|
class SessionStorageNamespace;
|
||||||
class WebContents;
|
class WebContents;
|
||||||
@@ -228,7 +229,8 @@
|
@@ -231,7 +232,8 @@
|
||||||
virtual int GetExtraRenderViewHeight() const;
|
virtual int GetExtraRenderViewHeight() const;
|
||||||
|
|
||||||
// Returns true if the context menu operation was handled by the delegate.
|
// Returns true if the context menu operation was handled by the delegate.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: WebNode.cpp
|
Index: WebNode.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- WebNode.cpp (revision 166298)
|
--- WebNode.cpp (revision 170525)
|
||||||
+++ WebNode.cpp (working copy)
|
+++ WebNode.cpp (working copy)
|
||||||
@@ -171,7 +171,7 @@
|
@@ -172,7 +172,7 @@
|
||||||
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
|
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
|
||||||
{
|
{
|
||||||
// Please do not add more eventTypes to this list without an API review.
|
// Please do not add more eventTypes to this list without an API review.
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: public/web/WebView.h
|
Index: public/web/WebView.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- public/web/WebView.h (revision 167304)
|
--- public/web/WebView.h (revision 170525)
|
||||||
+++ public/web/WebView.h (working copy)
|
+++ public/web/WebView.h (working copy)
|
||||||
@@ -424,6 +424,7 @@
|
@@ -416,6 +416,7 @@
|
||||||
|
|
||||||
// Sets whether select popup menus should be rendered by the browser.
|
// Sets whether select popup menus should be rendered by the browser.
|
||||||
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
|
||||||
@ -12,11 +12,11 @@ Index: public/web/WebView.h
|
|||||||
virtual void hidePopups() = 0;
|
virtual void hidePopups() = 0;
|
||||||
Index: Source/web/ChromeClientImpl.cpp
|
Index: Source/web/ChromeClientImpl.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Source/web/ChromeClientImpl.cpp (revision 167304)
|
--- Source/web/ChromeClientImpl.cpp (revision 170525)
|
||||||
+++ Source/web/ChromeClientImpl.cpp (working copy)
|
+++ Source/web/ChromeClientImpl.cpp (working copy)
|
||||||
@@ -751,7 +751,7 @@
|
@@ -755,7 +755,7 @@
|
||||||
|
|
||||||
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const
|
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(LocalFrame& frame, PopupMenuClient* client) const
|
||||||
{
|
{
|
||||||
- if (WebViewImpl::useExternalPopupMenus())
|
- if (WebViewImpl::useExternalPopupMenus())
|
||||||
+ if (m_webView->useExternalPopupMenus())
|
+ if (m_webView->useExternalPopupMenus())
|
||||||
@ -25,9 +25,9 @@ Index: Source/web/ChromeClientImpl.cpp
|
|||||||
return adoptRef(new PopupMenuChromium(frame, client));
|
return adoptRef(new PopupMenuChromium(frame, client));
|
||||||
Index: Source/web/WebViewImpl.cpp
|
Index: Source/web/WebViewImpl.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Source/web/WebViewImpl.cpp (revision 167304)
|
--- Source/web/WebViewImpl.cpp (revision 170525)
|
||||||
+++ Source/web/WebViewImpl.cpp (working copy)
|
+++ Source/web/WebViewImpl.cpp (working copy)
|
||||||
@@ -343,6 +343,7 @@
|
@@ -339,6 +339,7 @@
|
||||||
, m_fakePageScaleAnimationPageScaleFactor(0)
|
, m_fakePageScaleAnimationPageScaleFactor(0)
|
||||||
, m_fakePageScaleAnimationUseAnchor(false)
|
, m_fakePageScaleAnimationUseAnchor(false)
|
||||||
, m_contextMenuAllowed(false)
|
, m_contextMenuAllowed(false)
|
||||||
@ -35,7 +35,7 @@ Index: Source/web/WebViewImpl.cpp
|
|||||||
, m_doingDragAndDrop(false)
|
, m_doingDragAndDrop(false)
|
||||||
, m_ignoreInputEvents(false)
|
, m_ignoreInputEvents(false)
|
||||||
, m_compositorDeviceScaleFactorOverride(0)
|
, m_compositorDeviceScaleFactorOverride(0)
|
||||||
@@ -3521,9 +3522,14 @@
|
@@ -3488,9 +3489,14 @@
|
||||||
updateLayerTreeViewport();
|
updateLayerTreeViewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,12 +50,12 @@ Index: Source/web/WebViewImpl.cpp
|
|||||||
+ return m_shouldUseExternalPopupMenus;
|
+ return m_shouldUseExternalPopupMenus;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebViewImpl::startDragging(Frame* frame,
|
void WebViewImpl::startDragging(LocalFrame* frame,
|
||||||
Index: Source/web/WebViewImpl.h
|
Index: Source/web/WebViewImpl.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Source/web/WebViewImpl.h (revision 167304)
|
--- Source/web/WebViewImpl.h (revision 170525)
|
||||||
+++ Source/web/WebViewImpl.h (working copy)
|
+++ Source/web/WebViewImpl.h (working copy)
|
||||||
@@ -401,7 +401,8 @@
|
@@ -390,7 +390,8 @@
|
||||||
|
|
||||||
// Returns true if popup menus should be rendered by the browser, false if
|
// Returns true if popup menus should be rendered by the browser, false if
|
||||||
// they should be rendered by WebKit (which is the default).
|
// they should be rendered by WebKit (which is the default).
|
||||||
@ -65,7 +65,7 @@ Index: Source/web/WebViewImpl.h
|
|||||||
|
|
||||||
bool contextMenuAllowed() const
|
bool contextMenuAllowed() const
|
||||||
{
|
{
|
||||||
@@ -685,6 +686,8 @@
|
@@ -668,6 +669,8 @@
|
||||||
|
|
||||||
bool m_contextMenuAllowed;
|
bool m_contextMenuAllowed;
|
||||||
|
|
||||||
|
@ -94,8 +94,6 @@ void CefTestSuite::Initialize() {
|
|||||||
log_settings.logging_dest = logging::LOG_TO_ALL;
|
log_settings.logging_dest = logging::LOG_TO_ALL;
|
||||||
log_settings.lock_log = logging::LOCK_LOG_FILE;
|
log_settings.lock_log = logging::LOCK_LOG_FILE;
|
||||||
log_settings.delete_old = logging::DELETE_OLD_LOG_FILE;
|
log_settings.delete_old = logging::DELETE_OLD_LOG_FILE;
|
||||||
log_settings.dcheck_state =
|
|
||||||
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS;
|
|
||||||
logging::InitLogging(log_settings);
|
logging::InitLogging(log_settings);
|
||||||
|
|
||||||
// We want process and thread IDs because we may have multiple processes.
|
// We want process and thread IDs because we may have multiple processes.
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
#include "include/internal/cef_types_wrappers.h"
|
#include "include/internal/cef_types_wrappers.h"
|
||||||
#include "base/test/test_suite.h"
|
#include "base/test/test_suite.h"
|
||||||
|
|
||||||
|
namespace base {
|
||||||
class CommandLine;
|
class CommandLine;
|
||||||
|
}
|
||||||
|
|
||||||
class CefTestSuite : public TestSuite {
|
class CefTestSuite : public TestSuite {
|
||||||
public:
|
public:
|
||||||
@ -31,7 +33,7 @@ class CefTestSuite : public TestSuite {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The singleton CommandLine representing the current process's command line.
|
// The singleton CommandLine representing the current process's command line.
|
||||||
static CommandLine* commandline_;
|
static base::CommandLine* commandline_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CEF_TESTS_UNITTESTS_TEST_SUITE_H_
|
#endif // CEF_TESTS_UNITTESTS_TEST_SUITE_H_
|
||||||
|
@ -604,8 +604,7 @@ class RequestTestRunner {
|
|||||||
SetupGetTest();
|
SetupGetTest();
|
||||||
|
|
||||||
// Send cookies.
|
// Send cookies.
|
||||||
settings_.request->SetFlags(UR_FLAG_ALLOW_CACHED_CREDENTIALS |
|
settings_.request->SetFlags(UR_FLAG_ALLOW_CACHED_CREDENTIALS);
|
||||||
UR_FLAG_ALLOW_COOKIES);
|
|
||||||
|
|
||||||
settings_.expect_save_cookie = true;
|
settings_.expect_save_cookie = true;
|
||||||
settings_.expect_send_cookie = true;
|
settings_.expect_send_cookie = true;
|
||||||
@ -653,7 +652,7 @@ class RequestTestRunner {
|
|||||||
const base::FilePath& path =
|
const base::FilePath& path =
|
||||||
post_file_tmpdir_.path().Append(FILE_PATH_LITERAL("example.txt"));
|
post_file_tmpdir_.path().Append(FILE_PATH_LITERAL("example.txt"));
|
||||||
const char content[] = "HELLO FRIEND!";
|
const char content[] = "HELLO FRIEND!";
|
||||||
int write_ct = file_util::WriteFile(path, content, sizeof(content) - 1);
|
int write_ct = base::WriteFile(path, content, sizeof(content) - 1);
|
||||||
EXPECT_EQ(static_cast<int>(sizeof(content) - 1), write_ct);
|
EXPECT_EQ(static_cast<int>(sizeof(content) - 1), write_ct);
|
||||||
SetUploadFile(settings_.request, path);
|
SetUploadFile(settings_.request, path);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user