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:
Marshall Greenblatt 2014-04-04 16:50:38 +00:00
parent 11df06b1ad
commit 199a3faafe
73 changed files with 431 additions and 631 deletions

View File

@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '251746',
'chromium_revision': '261035',
}

24
cef.gyp
View File

@ -10,10 +10,10 @@
'about_credits_file': '<(SHARED_INTERMEDIATE_DIR)/about_credits.html',
'framework_name': 'Chromium Embedded Framework',
'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.
'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': [
# Bring in the source file lists.
@ -391,7 +391,7 @@
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'<(DEPTH)/ui/ui.gyp:ui',
'<(DEPTH)/ui/base/ui_base.gyp:ui_base',
'libcef_dll_wrapper',
],
'sources': [
@ -743,7 +743,6 @@
'cef_resources',
],
'variables': {
'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
'make_pack_header_path': 'tools/make_pack_header.py',
},
'actions': [
@ -758,16 +757,9 @@
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
'<(grit_out_dir)/cef_resources.pak',
],
'pak_output': '<(PRODUCT_DIR)/cef.pak',
},
'inputs': [
'<(repack_path)',
'<@(pak_inputs)',
],
'outputs': [
'<(PRODUCT_DIR)/cef.pak',
],
'action': ['python', '<(repack_path)', '<@(_outputs)',
'<@(pak_inputs)'],
'includes': [ '../build/repack_action.gypi' ],
},
{
'action_name': 'make_pack_resources_header',
@ -866,7 +858,7 @@
'<(DEPTH)/third_party/WebKit/Source/core/core.gyp:webcore',
'<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
'<(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)/webkit/storage_browser.gyp:webkit_storage_browser',
'<(DEPTH)/webkit/storage_common.gyp:webkit_storage_common',
@ -1050,6 +1042,8 @@
'libcef/renderer/dom_node_impl.h',
'libcef/renderer/frame_impl.cc',
'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.h',
'libcef/renderer/render_process_observer.cc',
@ -1124,8 +1118,6 @@
[ 'OS=="mac"', {
'sources': [
'<@(includes_mac)',
'libcef/browser/application_mac.h',
'libcef/browser/application_mac.mm',
'libcef/browser/backing_store_osr.cc',
'libcef/browser/backing_store_osr.h',
'libcef/browser/browser_host_impl_mac.mm',

View File

@ -296,12 +296,6 @@ typedef struct _cef_settings_t {
///
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.
// The consequences of using custom flags may not be well tested. Also
@ -1035,16 +1029,11 @@ typedef enum {
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,
///
// 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.
///
@ -1635,7 +1624,6 @@ typedef enum {
DOM_EVENT_CATEGORY_POPSTATE = 0x2000,
DOM_EVENT_CATEGORY_PROGRESS = 0x4000,
DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS = 0x8000,
DOM_EVENT_CATEGORY_BEFORE_LOAD = 0x10000,
} cef_dom_event_category_t;
///

View File

@ -365,7 +365,6 @@ struct CefSettingsTraits {
cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,
copy);
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,
&target->javascript_flags, copy);

View File

@ -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_

View File

@ -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];
}

View File

@ -29,10 +29,9 @@ BackingStoreOSR::BackingStoreOSR(content::RenderWidgetHost* widget,
device_scale_factor_(scale_factor) {
gfx::Size pixel_size = gfx::ToFlooredSize(
gfx::ScaleSize(size, device_scale_factor_));
device_.reset(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
pixel_size.width(),
pixel_size.height(),
true));
SkImageInfo info = SkImageInfo::MakeN32Premul(pixel_size.width(),
pixel_size.height());
device_.reset(SkBitmapDevice::Create(info));
canvas_.reset(new SkCanvas(device_.get()));
canvas_->drawColor(SK_ColorWHITE);
@ -49,11 +48,9 @@ void BackingStoreOSR::ScaleFactorChanged(float scale_factor) {
gfx::Size pixel_size = gfx::ToFlooredSize(
gfx::ScaleSize(size(), device_scale_factor_));
scoped_ptr<SkBaseDevice> new_device(
new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
pixel_size.width(),
pixel_size.height(),
true));
SkImageInfo info = SkImageInfo::MakeN32Premul(pixel_size.width(),
pixel_size.height());
scoped_ptr<SkBaseDevice> new_device(SkBitmapDevice::Create(info));
scoped_ptr<SkCanvas> new_canvas(new SkCanvas(new_device.get()));

View File

@ -12,11 +12,13 @@
class CefBrowserContext : public content::BrowserContext {
public:
virtual net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) = 0;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) = 0;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) = 0;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) = 0;
};
#endif // CEF_LIBCEF_BROWSER_BROWSER_CONTEXT_H_

View File

@ -255,6 +255,7 @@ void CefBrowserContextImpl::RequestMidiSysExPermission(
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
bool user_gesture,
const MidiSysExPermissionCallback& callback) {
// TODO(CEF): Implement Web MIDI API permission handling.
callback.Run(false);
@ -298,12 +299,14 @@ quota::SpecialStoragePolicy* CefBrowserContextImpl::GetSpecialStoragePolicy() {
}
net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) {
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
DCHECK(!url_request_getter_);
url_request_getter_ = new CefURLRequestContextGetter(
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
protocol_handlers);
protocol_handlers,
protocol_interceptors.Pass());
resource_context_->set_url_request_context_getter(url_request_getter_.get());
return url_request_getter_.get();
}
@ -312,6 +315,7 @@ net::URLRequestContextGetter*
CefBrowserContextImpl::CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) {
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
return NULL;
}

View File

@ -44,6 +44,7 @@ class CefBrowserContextImpl : public CefBrowserContext {
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
bool user_gesture,
const MidiSysExPermissionCallback& callback) OVERRIDE;
virtual void CancelMidiSysExPermissionRequest(
int render_process_id,
@ -66,11 +67,13 @@ class CefBrowserContextImpl : public CefBrowserContext {
// CefBrowserContext methods.
virtual net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
private:
class CefResourceContext;

View File

@ -117,6 +117,7 @@ void CefBrowserContextProxy::RequestMidiSysExPermission(
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
bool user_gesture,
const MidiSysExPermissionCallback& callback) {
// TODO(CEF): Implement Web MIDI API permission handling.
callback.Run(false);
@ -156,7 +157,8 @@ quota::SpecialStoragePolicy* CefBrowserContextProxy::GetSpecialStoragePolicy() {
}
net::URLRequestContextGetter* CefBrowserContextProxy::CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) {
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
DCHECK(!url_request_getter_);
url_request_getter_ =
new CefURLRequestContextGetterProxy(handler_,
@ -170,6 +172,7 @@ net::URLRequestContextGetter*
CefBrowserContextProxy::CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) {
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
return NULL;
}

View File

@ -52,6 +52,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
bool user_gesture,
const MidiSysExPermissionCallback& callback) OVERRIDE;
virtual void CancelMidiSysExPermissionRequest(
int render_process_id,
@ -74,11 +75,13 @@ class CefBrowserContextProxy : public CefBrowserContext {
// CefBrowserContext methods.
virtual net::URLRequestContextGetter* CreateRequestContext(
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
CefRefPtr<CefRequestContextHandler> handler() const { return handler_; }

View File

@ -672,7 +672,7 @@ void CefBrowserHostImpl::CloseBrowser(bool force_close) {
if (contents && contents->NeedToFireBeforeUnload()) {
// Will result in a call to BeforeUnloadFired() and, if the close isn't
// canceled, CloseContents().
contents->GetRenderViewHost()->FirePageBeforeUnload(false);
contents->GetMainFrame()->DispatchBeforeUnload(false);
} else {
CloseContents(contents);
}
@ -1415,8 +1415,11 @@ CefRefPtr<CefFrame> CefBrowserHostImpl::GetFrameForRequest(
content::ResourceRequestInfo::ForRequest(request);
if (!info)
return NULL;
return GetOrCreateFrame(info->GetFrameID(), info->GetParentFrameID(),
info->IsMainFrame(), base::string16(), GURL());
return GetOrCreateFrame(info->GetRenderFrameID(),
info->GetParentRenderFrameID(),
info->IsMainFrame(),
base::string16(),
GURL());
}
void CefBrowserHostImpl::Navigate(const CefNavigateParams& params) {
@ -1731,7 +1734,8 @@ content::WebContents* CefBrowserHostImpl::OpenURLFromTab(
return source;
}
void CefBrowserHostImpl::LoadingStateChanged(content::WebContents* source) {
void CefBrowserHostImpl::LoadingStateChanged(content::WebContents* source,
bool to_different_document) {
int current_index =
web_contents_->GetController().GetLastCommittedEntryIndex();
int max_index = web_contents_->GetController().GetEntryCount() - 1;
@ -1939,7 +1943,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
void CefBrowserHostImpl::WebContentsCreated(
content::WebContents* source_contents,
int64 source_frame_id,
int opener_render_frame_id,
const base::string16& frame_name,
const GURL& target_url,
content::WebContents* new_contents) {
@ -2025,7 +2029,8 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (!command_line.HasSwitch(switches::kEnableMediaStream)) {
// Cancel the request.
callback.Run(devices, scoped_ptr<content::MediaStreamUI>());
callback.Run(devices, content::MEDIA_DEVICE_PERMISSION_DENIED,
scoped_ptr<content::MediaStreamUI>());
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>());
}

View File

@ -313,7 +313,8 @@ class CefBrowserHostImpl : public CefBrowserHost,
virtual content::WebContents* OpenURLFromTab(
content::WebContents* source,
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 UpdateTargetURL(content::WebContents* source,
int32 page_id,
@ -352,7 +353,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const std::string& partition_id,
content::SessionStorageNamespace* session_storage_namespace) OVERRIDE;
virtual void WebContentsCreated(content::WebContents* source_contents,
int64 source_frame_id,
int opener_render_frame_id,
const base::string16& frame_name,
const GURL& target_url,
content::WebContents* new_contents) OVERRIDE;

View File

@ -85,7 +85,7 @@ void AddFiltersForAcceptTypes(GtkFileChooser* chooser,
bool has_filter = false;
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()) {
// Just treat as extension if contains '.' as the first character.
if (ascii_type[0] == '.') {

View File

@ -17,6 +17,7 @@
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
@ -128,7 +129,7 @@ NSMutableArray* GetFileTypesFromAcceptTypes(
const std::vector<base::string16>& accept_types) {
NSMutableArray* acceptArray = [[NSMutableArray alloc] init];
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()) {
// Just treat as extension if contains '.' as the first character.
if (ascii_type[0] == '.') {

View File

@ -22,6 +22,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.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/web_contents_view.h"
#include "content/public/common/file_chooser_params.h"
@ -39,7 +40,6 @@
#include "ui/views/layout/fill_layout.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
#include "webkit/common/cursors/webcursor.h"
#pragma comment(lib, "dwmapi.lib")
@ -74,7 +74,7 @@ void WriteTempFileAndView(scoped_refptr<base::RefCountedString> str) {
tmp_file = tmp_file.AddExtension(L"txt");
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);
ui::win::OpenItemViaShell(tmp_file);
@ -213,7 +213,7 @@ std::wstring GetFilterStringFromAcceptTypes(
std::vector<std::wstring> descriptions;
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()) {
// Just treat as extension if contains '.' as the first character.
if (ascii_type[0] == '.') {
@ -448,7 +448,7 @@ WORD KeyStatesToWord() {
return result;
}
// From webkit/common/cursors/webcursor_win.cc.
// From content/common/cursors/webcursor_win.cc.
using blink::WebCursorInfo;

View File

@ -100,7 +100,7 @@ void CefBrowserMessageFilter::OnCreateWindow(
CefContentBrowserClient::LastCreateWindowParams lcwp;
lcwp.opener_process_id = host_->GetID();
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_frame_name = params.frame_name;
CefContentBrowserClient::Get()->set_last_create_window_params(lcwp);

View File

@ -266,12 +266,7 @@ class CefBrowserURLRequest::Context
if (cef_flags & UR_FLAG_SKIP_CACHE)
load_flags |= net::LOAD_BYPASS_CACHE;
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 {
if (!(cef_flags & UR_FLAG_ALLOW_CACHED_CREDENTIALS)) {
load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA;
load_flags |= net::LOAD_DO_NOT_SEND_COOKIES;
load_flags |= net::LOAD_DO_NOT_SAVE_COOKIES;

View File

@ -30,6 +30,11 @@ MetricsService* ChromeBrowserProcessStub::metrics_service() {
return NULL;
}
rappor::RapporService* ChromeBrowserProcessStub::rappor_service() {
NOTIMPLEMENTED();
return NULL;
}
IOThread* ChromeBrowserProcessStub::io_thread() {
NOTIMPLEMENTED();
return NULL;
@ -109,17 +114,10 @@ GpuModeManager* ChromeBrowserProcessStub::gpu_mode_manager() {
return NULL;
}
AutomationProviderList*
ChromeBrowserProcessStub::GetAutomationProviderList() {
NOTIMPLEMENTED();
return NULL;
}
void ChromeBrowserProcessStub::CreateDevToolsHttpProtocolHandler(
chrome::HostDesktopType host_desktop_type,
const std::string& ip,
int port,
const std::string& frontend_url) {
int port) {
}
unsigned int ChromeBrowserProcessStub::AddRefModule() {

View File

@ -32,6 +32,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
virtual void ResourceDispatcherHostCreated() OVERRIDE;
virtual void EndSession() OVERRIDE;
virtual MetricsService* metrics_service() OVERRIDE;
virtual rappor::RapporService* rappor_service() OVERRIDE;
virtual IOThread* io_thread() OVERRIDE;
virtual WatchDogThread* watchdog_thread() OVERRIDE;
virtual ProfileManager* profile_manager() OVERRIDE;
@ -48,12 +49,10 @@ class ChromeBrowserProcessStub : public BrowserProcess {
virtual IconManager* icon_manager() OVERRIDE;
virtual GLStringManager* gl_string_manager() OVERRIDE;
virtual GpuModeManager* gpu_mode_manager() OVERRIDE;
virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE;
virtual void CreateDevToolsHttpProtocolHandler(
chrome::HostDesktopType host_desktop_type,
const std::string& ip,
int port,
const std::string& frontend_url) OVERRIDE;
int port) OVERRIDE;
virtual unsigned int AddRefModule() OVERRIDE;
virtual unsigned int ReleaseModule() OVERRIDE;
virtual bool IsShuttingDown() OVERRIDE;

View File

@ -28,11 +28,11 @@
#include "content/browser/net/view_http_cache_job_factory.h"
#include "content/browser/net/view_blob_internals_job_factory.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/user_agent.h"
#include "grit/cef_resources.h"
#include "ipc/ipc_channel.h"
#include "net/url_request/url_request.h"
#include "v8/include/v8.h"
#include "webkit/common/user_agent/user_agent_util.h"
namespace scheme {
@ -271,11 +271,11 @@ class Delegate : public InternalHandlerDelegate {
parser.Add("OS", GetOSType());
parser.Add("WEBKIT",
base::StringPrintf("%d.%d",
webkit_glue::GetWebKitMajorVersion(),
webkit_glue::GetWebKitMinorVersion()));
content::GetWebKitMajorVersion(),
content::GetWebKitMinorVersion()));
parser.Add("JAVASCRIPT", v8::V8::GetVersion());
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("MODULEPATH", GetModulePath());
parser.Add("CACHEPATH", CefString(CefContext::Get()->cache_path().value()));

View File

@ -567,10 +567,13 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
net::URLRequestContextGetter* CefContentBrowserClient::CreateRequestContext(
content::BrowserContext* content_browser_context,
content::ProtocolHandlerMap* protocol_handlers) {
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
CefBrowserContext* cef_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*
@ -578,11 +581,15 @@ CefContentBrowserClient::CreateRequestContextForStoragePartition(
content::BrowserContext* content_browser_context,
const base::FilePath& partition_path,
bool in_memory,
content::ProtocolHandlerMap* protocol_handlers) {
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) {
CefBrowserContext* cef_browser_context =
static_cast<CefBrowserContext*>(content_browser_context);
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) {
@ -610,7 +617,6 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
#endif
switches::kDisablePackLoading,
switches::kEnableCrashReporter,
switches::kEnableReleaseDcheck,
switches::kLang,
switches::kLocalesDirPath,
switches::kLogFile,
@ -873,7 +879,7 @@ std::string CefContentBrowserClient::GetDefaultDownloadName() {
#if defined(OS_POSIX) && !defined(OS_MACOSX)
void CefContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
const CommandLine& command_line,
const base::CommandLine& command_line,
int child_process_id,
std::vector<content::FileDescriptorInfo>* mappings) {
int crash_signal_fd = GetCrashSignalFD(command_line);

View File

@ -88,14 +88,16 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
content::RenderProcessHost* host) OVERRIDE;
virtual net::URLRequestContextGetter* CreateRequestContext(
content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers) OVERRIDE;
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors) OVERRIDE;
virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
content::BrowserContext* browser_context,
const base::FilePath& partition_path,
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 void AppendExtraCommandLineSwitches(CommandLine* command_line,
virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) OVERRIDE;
virtual content::QuotaPermissionContext*
CreateQuotaPermissionContext() OVERRIDE;
@ -139,7 +141,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
#if defined(OS_POSIX) && !defined(OS_MACOSX)
virtual void GetAdditionalMappedFilesForChildProcess(
const CommandLine& command_line,
const base::CommandLine& command_line,
int child_process_id,
std::vector<content::FileDescriptorInfo>* mappings) OVERRIDE;
#endif

View File

@ -31,10 +31,6 @@
#include "content/public/common/content_switches.h"
#include "ui/base/ui_base_switches.h"
#if defined(OS_MACOSX)
#include "libcef/browser/application_mac.h"
#endif
#if defined(OS_WIN)
#include "content/public/app/startup_helper_win.h"
#include "sandbox/win/src/sandbox_types.h"
@ -80,11 +76,6 @@ int CefExecuteProcess(const CefMainArgs& args,
if (process_type.empty())
return -1;
#if defined(OS_MACOSX)
// Create the CefCrApplication instance.
CefCrApplicationCreate();
#endif
CefMainDelegate main_delegate(application);
// Execute the secondary process.
@ -95,12 +86,18 @@ int CefExecuteProcess(const CefMainArgs& args,
windows_sandbox_info = &sandbox_info;
}
return content::ContentMain(args.instance,
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info),
&main_delegate);
content::ContentMainParams params(&main_delegate);
params.instance = args.instance;
params.sandbox_info =
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info);
return content::ContentMain(params);
#else
return content::ContentMain(args.argc, const_cast<const char**>(args.argv),
&main_delegate);
content::ContentMainParams params(&main_delegate);
params.argc = args.argc;
params.argv = const_cast<const char**>(args.argv);
return content::ContentMain(params);
#endif
}
@ -272,13 +269,18 @@ bool CefContext::Initialize(const CefMainArgs& args,
settings_.no_sandbox = true;
}
exit_code = main_runner_->Initialize(args.instance,
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info),
main_delegate_.get());
content::ContentMainParams params(main_delegate_.get());
params.instance = args.instance;
params.sandbox_info =
static_cast<sandbox::SandboxInterfaceInfo*>(windows_sandbox_info);
exit_code = main_runner_->Initialize(params);
#else
exit_code = main_runner_->Initialize(args.argc,
const_cast<const char**>(args.argv),
main_delegate_.get());
content::ContentMainParams params(main_delegate_.get());
params.argc = args.argc;
params.argv = const_cast<const char**>(args.argv);
exit_code = main_runner_->Initialize(params);
#endif
DCHECK_LT(exit_code, 0);

View File

@ -13,6 +13,7 @@
#include "base/strings/utf_string_conversions.h"
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/devtools_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@ -84,8 +85,7 @@ void CefDevToolsFrontend::RenderViewCreated(
}
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame(int32 page_id) {
web_contents()->GetRenderViewHost()->ExecuteJavascriptInWebFrame(
base::string16(),
web_contents()->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);"));
}

View File

@ -8,8 +8,7 @@
#include "base/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_devices_monitor.h"
#include "content/public/common/media_stream_request.h"
#include "content/public/browser/media_capture_devices.h"
using content::BrowserThread;
using content::MediaStreamDevices;
@ -40,8 +39,7 @@ CefMediaCaptureDevicesDispatcher*
return Singleton<CefMediaCaptureDevicesDispatcher>::get();
}
CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher()
: devices_enumerated_(false) {}
CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher() {}
CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {}
@ -53,41 +51,6 @@ void CefMediaCaptureDevicesDispatcher::RegisterPrefs(
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(
PrefService* prefs,
bool audio,
@ -132,24 +95,10 @@ void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
}
}
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::OnAudioCaptureDevicesChanged() {
}
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::OnVideoCaptureDevicesChanged() {
}
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
@ -159,23 +108,6 @@ void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
const GURL& security_origin,
const content::MediaStreamDevice& device,
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(
@ -183,34 +115,27 @@ void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
int render_view_id) {
}
void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread(
const content::MediaStreamDevices& devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
devices_enumerated_ = true;
audio_devices_ = devices;
FOR_EACH_OBSERVER(Observer, observers_,
OnUpdateAudioDevices(audio_devices_));
void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlaying(
int render_process_id,
int render_frame_id,
int stream_id,
const ReadPowerAndClipCallback& power_read_callback) {
}
void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread(
const content::MediaStreamDevices& devices){
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
devices_enumerated_ = true;
video_devices_ = devices;
FOR_EACH_OBSERVER(Observer, observers_,
OnUpdateVideoDevices(video_devices_));
void CefMediaCaptureDevicesDispatcher::OnAudioStreamStopped(
int render_process_id,
int render_frame_id,
int stream_id) {
}
void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
int render_process_id,
int render_view_id,
int page_request_id,
const content::MediaStreamDevice& device,
content::MediaRequestState state) {
FOR_EACH_OBSERVER(Observer, observers_,
OnRequestUpdate(render_process_id,
render_view_id,
page_request_id,
device,
state));
const MediaStreamDevices&
CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return content::MediaCaptureDevices::GetInstance()->GetAudioCaptureDevices();
}
const MediaStreamDevices&
CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
return content::MediaCaptureDevices::GetInstance()->GetVideoCaptureDevices();
}

View File

@ -19,46 +19,14 @@ class PrefService;
// layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc].
class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
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();
// Registers the preferences related to Media Stream default devices.
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,
// if the return list is empty, it means there is no available device on the
// OS.
// Called on the UI thread.
// OS. Called on the UI thread.
void GetDefaultDevices(PrefService* prefs,
bool audio,
bool video,
@ -67,17 +35,15 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
// 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
// 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,
bool audio,
bool video,
content::MediaStreamDevices* devices);
// Overridden from content::MediaObserver:
virtual void OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnVideoCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnAudioCaptureDevicesChanged() OVERRIDE;
virtual void OnVideoCaptureDevicesChanged() OVERRIDE;
virtual void OnMediaRequestStateChanged(
int render_process_id,
int render_view_id,
@ -85,15 +51,17 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
const GURL& security_origin,
const content::MediaStreamDevice& device,
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,
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:
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
@ -101,28 +69,8 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
CefMediaCaptureDevicesDispatcher();
virtual ~CefMediaCaptureDevicesDispatcher();
// Called by the MediaObserver() functions, executed on UI thread.
void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices);
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_;
const content::MediaStreamDevices& GetAudioCaptureDevices();
const content::MediaStreamDevices& GetVideoCaptureDevices();
};
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_

View File

@ -84,8 +84,8 @@ bool CefMenuCreator::CreateContextMenu(
client->GetContextMenuHandler();
if (handler.get()) {
CefRefPtr<CefFrame> frame;
if (params_.frame_id > 0)
frame = browser_->GetFrame(params_.frame_id);
if (render_frame_id_ > 0)
frame = browser_->GetFrame(render_frame_id_);
if (!frame.get())
frame = browser_->GetMainFrame();
@ -138,8 +138,8 @@ void CefMenuCreator::ExecuteCommand(CefRefPtr<CefMenuModelImpl> source,
client->GetContextMenuHandler();
if (handler.get()) {
CefRefPtr<CefFrame> frame;
if (params_.frame_id > 0)
frame = browser_->GetFrame(params_.frame_id);
if (render_frame_id_ > 0)
frame = browser_->GetFrame(render_frame_id_);
if (!frame.get())
frame = browser_->GetMainFrame();
@ -189,8 +189,8 @@ void CefMenuCreator::MenuClosed(CefRefPtr<CefMenuModelImpl> source) {
client->GetContextMenuHandler();
if (handler.get()) {
CefRefPtr<CefFrame> frame;
if (params_.frame_id > 0)
frame = browser_->GetFrame(params_.frame_id);
if (render_frame_id_ > 0)
frame = browser_->GetFrame(render_frame_id_);
if (!frame.get())
frame = browser_->GetMainFrame();

View File

@ -158,10 +158,9 @@ void PrintViewManagerBase::OnDidPrintPage(
#if defined(OS_WIN)
bool big_emf = (params.data_size && params.data_size >= kMetafileMaxSize);
const CommandLine* cmdline = CommandLine::ForCurrentProcess();
int raster_size = std::min(params.page_size.GetArea(),
kMaxRasterSizeInPixels);
if (big_emf || (cmdline && cmdline->HasSwitch(switches::kPrintRaster))) {
if (big_emf) {
scoped_ptr<NativeMetafile> raster_metafile(
metafile->RasterizeMetafile(raster_size));
if (raster_metafile.get()) {

View File

@ -9,11 +9,11 @@
#include "base/message_loop/message_loop.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/render_view_host.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
#include "ui/gfx/size_conversions.h"
#include "webkit/common/cursors/webcursor.h"
namespace {
@ -180,19 +180,20 @@ void CefRenderWidgetHostViewOSR::Focus() {
void CefRenderWidgetHostViewOSR::Blur() {
}
void CefRenderWidgetHostViewOSR::UpdateCursor(const WebCursor& cursor) {
void CefRenderWidgetHostViewOSR::UpdateCursor(
const content::WebCursor& cursor) {
TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::UpdateCursor");
if (!browser_impl_.get())
return;
#if defined(USE_AURA)
WebCursor web_cursor = cursor;
content::WebCursor web_cursor = cursor;
ui::PlatformCursor platform_cursor;
if (web_cursor.IsCustom()) {
// |web_cursor| owns the resulting |platform_cursor|.
platform_cursor = web_cursor.GetPlatformCursor();
} else {
WebCursor::CursorInfo cursor_info;
content::WebCursor::CursorInfo cursor_info;
cursor.GetCursorInfo(&cursor_info);
platform_cursor = browser_impl_->GetPlatformCursor(cursor_info.type);
}
@ -201,7 +202,7 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(const WebCursor& cursor) {
browser_impl_->GetBrowser(), platform_cursor);
#elif defined(OS_MACOSX) || defined(TOOLKIT_GTK)
// |web_cursor| owns the resulting |native_cursor|.
WebCursor web_cursor = cursor;
content::WebCursor web_cursor = cursor;
CefCursorHandle native_cursor = web_cursor.GetNativeCursor();
browser_impl_->GetClient()->GetRenderHandler()->OnCursorChange(
browser_impl_->GetBrowser(), native_cursor);

View File

@ -117,7 +117,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
const std::vector<content::WebPluginGeometry>& moves) OVERRIDE;
virtual void Focus() 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 TextInputTypeChanged(ui::TextInputType type,
ui::TextInputMode mode,

View File

@ -75,7 +75,7 @@ void CefResourceDispatcherHostDelegate::RequestBeginning(
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request);
if (info)
frame_id = info->GetFrameID();
frame_id = info->GetRenderFrameID();
if (frame_id >= 0) {
CefRefPtr<CefRequestImpl> cef_request(new CefRequestImpl);

View File

@ -187,7 +187,7 @@ void CefResourceRequestJob::Start() {
if (SetHeaderIfMissing(headerMap,
net::HttpRequestHeaders::kUserAgent,
ua_settings->GetUserAgent(request_->url()))) {
ua_settings->GetUserAgent())) {
changed = true;
}
}

View File

@ -122,47 +122,6 @@ int CefNetworkDelegate::OnBeforeURLRequest(
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::URLRequest* request,
const net::AuthChallengeInfo& auth_info,
@ -218,30 +177,3 @@ net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired(
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;
}

View File

@ -20,43 +20,11 @@ class CefNetworkDelegate : public net::NetworkDelegate {
virtual int OnBeforeURLRequest(net::URLRequest* request,
const net::CompletionCallback& callback,
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(
net::URLRequest* request,
const net::AuthChallengeInfo& auth_info,
const AuthCallback& callback,
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);
};

View File

@ -18,6 +18,7 @@
#include "libcef/browser/url_request_context_proxy.h"
#include "libcef/browser/url_request_interceptor.h"
#include "libcef/common/cef_switches.h"
#include "libcef/common/content_client.h"
#include "base/command_line.h"
#include "base/file_util.h"
@ -47,6 +48,7 @@
#include "net/ssl/server_bound_cert_service.h"
#include "net/ssl/ssl_config_service_defaults.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_context.h"
#include "net/url_request/url_request_context_storage.h"
@ -82,9 +84,9 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
return http_accept_language_;
}
virtual std::string GetUserAgent(const GURL& url) const OVERRIDE {
virtual std::string GetUserAgent() const OVERRIDE {
CEF_REQUIRE_IOT();
return content::GetUserAgent(url);
return CefContentClient::Get()->GetUserAgent();
}
private:
@ -98,9 +100,11 @@ class CefHttpUserAgentSettings : public net::HttpUserAgentSettings {
CefURLRequestContextGetter::CefURLRequestContextGetter(
base::MessageLoop* io_loop,
base::MessageLoop* file_loop,
content::ProtocolHandlerMap* protocol_handlers)
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors)
: 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.
CEF_REQUIRE_UIT();
@ -230,7 +234,19 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
ftp_transaction_factory_.get());
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);
}

View File

@ -81,7 +81,8 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
CefURLRequestContextGetter(
base::MessageLoop* io_loop,
base::MessageLoop* file_loop,
content::ProtocolHandlerMap* protocol_handlers);
content::ProtocolHandlerMap* protocol_handlers,
content::ProtocolHandlerScopedVector protocol_interceptors);
virtual ~CefURLRequestContextGetter();
// net::URLRequestContextGetter implementation.
@ -117,6 +118,7 @@ class CefURLRequestContextGetter : public net::URLRequestContextGetter {
scoped_ptr<net::URLSecurityManager> url_security_manager_;
scoped_ptr<net::FtpTransactionFactory> ftp_transaction_factory_;
content::ProtocolHandlerMap protocol_handlers_;
content::ProtocolHandlerScopedVector protocol_interceptors_;
net::URLRequestJobFactoryImpl* job_factory_impl_;
typedef std::set<CefURLRequestContextProxy*> RequestContextProxySet;

View File

@ -53,6 +53,13 @@ class CefCookieStoreProxy : public net::CookieStore {
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,
const base::Time& delete_end,
const DeleteCallback& callback)

View File

@ -76,7 +76,8 @@ net::URLRequestJob* CefRequestInterceptor::MaybeInterceptRedirect(
if (!new_url.is_empty() && new_url.is_valid()) {
return new net::URLRequestRedirectJob(
request, network_delegate, new_url,
net::URLRequestRedirectJob::REDIRECT_302_FOUND);
net::URLRequestRedirectJob::REDIRECT_307_TEMPORARY_REDIRECT,
"Resource Redirect");
}
}
}

View File

@ -18,9 +18,6 @@ const char kLogSeverity_Error[] = "error";
const char kLogSeverity_ErrorReport[] = "error-report";
const char kLogSeverity_Disable[] = "disable";
// Enable DCHECK for release mode.
const char kEnableReleaseDcheck[] = "enable-release-dcheck";
// Path to resources directory.
const char kResourcesDirPath[] = "resources-dir-path";

View File

@ -18,7 +18,6 @@ extern const char kLogSeverity_Warning[];
extern const char kLogSeverity_Error[];
extern const char kLogSeverity_ErrorReport[];
extern const char kLogSeverity_Disable[];
extern const char kEnableReleaseDcheck[];
extern const char kResourcesDirPath[];
extern const char kLocalesDirPath[];
extern const char kDisablePackLoading[];

View File

@ -15,8 +15,8 @@
#include "base/strings/stringprintf.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/user_agent.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/common/user_agent/user_agent_util.h"
namespace {
@ -69,7 +69,7 @@ void CefContentClient::AddAdditionalSchemes(
std::string CefContentClient::GetUserAgent() const {
std::string product_version;
static CommandLine& command_line = *CommandLine::ForCurrentProcess();
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kProductVersion)) {
product_version =
command_line.GetSwitchValueASCII(switches::kProductVersion);
@ -79,7 +79,7 @@ std::string CefContentClient::GetUserAgent() const {
CHROME_VERSION_PATCH);
}
return webkit_glue::BuildUserAgentFromProduct(product_version);
return content::BuildUserAgentFromProduct(product_version);
}
base::string16 CefContentClient::GetLocalizedString(int message_id) const {

View File

@ -54,10 +54,10 @@ bool CefDragDataImpl::GetFileNames(std::vector<CefString>& names) {
if (data_.filenames.empty())
return false;
std::vector<content::DropData::FileInfo>::const_iterator it =
std::vector<ui::FileInfo>::const_iterator it =
data_.filenames.begin();
for (; it != data_.filenames.end(); ++it)
names.push_back(it->path);
names.push_back(it->path.value());
return true;
}

View File

@ -248,9 +248,6 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
command_line->AppendSwitchASCII(switches::kLogSeverity, log_severity);
}
if (settings.release_dcheck_enabled)
command_line->AppendSwitch(switches::kEnableReleaseDcheck);
if (settings.javascript_flags.length > 0) {
command_line->AppendSwitchASCII(switches::kJavaScriptFlags,
CefString(&settings.javascript_flags));
@ -347,14 +344,6 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
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);
content::SetContentClient(&content_client_);

View File

@ -307,8 +307,6 @@ void CefRequestImpl::Set(const blink::WebURLRequest& request) {
flags_ |= UR_FLAG_SKIP_CACHE;
if (request.allowStoredCredentials())
flags_ |= UR_FLAG_ALLOW_CACHED_CREDENTIALS;
if (request.allowCookies())
flags_ |= UR_FLAG_ALLOW_COOKIES;
if (request.reportUploadProgress())
flags_ |= UR_FLAG_REPORT_UPLOAD_PROGRESS;
if (request.reportLoadTiming())
@ -351,8 +349,6 @@ void CefRequestImpl::Get(blink::WebURLRequest& request) {
SETBOOLFLAG(request, flags_, setAllowStoredCredentials,
UR_FLAG_ALLOW_CACHED_CREDENTIALS);
SETBOOLFLAG(request, flags_, setAllowCookies,
UR_FLAG_ALLOW_COOKIES);
SETBOOLFLAG(request, flags_, setReportUploadProgress,
UR_FLAG_REPORT_UPLOAD_PROGRESS);
SETBOOLFLAG(request, flags_, setReportLoadTiming,

View File

@ -25,7 +25,7 @@ void AddInternalSchemes(std::vector<std::string>* standard_schemes) {
bool IsInternalHandledScheme(const std::string& scheme) {
static const char* schemes[] = {
chrome::kBlobScheme,
content::kBlobScheme,
content::kChromeDevToolsScheme,
content::kChromeUIScheme,
content::kDataScheme,
@ -46,7 +46,7 @@ bool IsInternalProtectedScheme(const std::string& scheme) {
// content/browser/storage_partition_impl_map.cc and are modified by
// InstallInternalProtectedHandlers().
static const char* schemes[] = {
chrome::kBlobScheme,
content::kBlobScheme,
content::kChromeUIScheme,
content::kDataScheme,
content::kFileScheme,

View File

@ -46,8 +46,6 @@ using blink::WebView;
namespace {
const int64 kInvalidFrameId = -1;
blink::WebString FilePathStringToWebString(
const base::FilePath::StringType& str) {
#if defined(OS_POSIX)
@ -228,7 +226,7 @@ void CefBrowserImpl::GetFrameIdentifiers(std::vector<int64>& identifiers) {
if (main_frame) {
WebFrame* cur = main_frame;
do {
identifiers.push_back(cur->identifier());
identifiers.push_back(webkit_glue::GetIdentifier(cur));
cur = cur->traverseNext(true);
} while (cur != main_frame);
}
@ -275,7 +273,7 @@ CefBrowserImpl::CefBrowserImpl(content::RenderView* render_view,
browser_id_(browser_id),
is_popup_(is_popup),
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);
}
@ -380,7 +378,7 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process,
CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
blink::WebFrame* 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.
FrameMap::const_iterator it = frames_.find(frame_id);
@ -391,7 +389,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
frames_.insert(std::make_pair(frame_id, framePtr));
int64 parent_id = frame->parent() == NULL ?
kInvalidFrameId : frame->parent()->identifier();
webkit_glue::kInvalidFrameId : webkit_glue::GetIdentifier(frame->parent());
base::string16 name = frame->uniqueName();
// Notify the browser that the frame has been identified.
@ -401,7 +399,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(
}
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())
return GetWebFrameImpl(render_view()->GetWebView()->mainFrame());
return NULL;
@ -418,7 +416,7 @@ CefRefPtr<CefFrameImpl> CefBrowserImpl::GetWebFrameImpl(int64 frame_id) {
if (main_frame) {
WebFrame* cur = main_frame;
do {
if (cur->identifier() == frame_id)
if (webkit_glue::GetIdentifier(cur) == frame_id)
return GetWebFrameImpl(cur);
cur = cur->traverseNext(true);
} while (cur != main_frame);
@ -489,7 +487,7 @@ void CefBrowserImpl::DidFailLoad(
void CefBrowserImpl::DidFinishLoad(blink::WebFrame* frame) {
blink::WebDataSource* ds = frame->dataSource();
Send(new CefHostMsg_DidFinishLoad(routing_id(),
frame->identifier(),
webkit_glue::GetIdentifier(frame),
ds->request().url(),
!frame->parent(),
ds->response().httpStatusCode()));
@ -513,7 +511,7 @@ void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebFrame* frame,
}
void CefBrowserImpl::FrameDetached(WebFrame* frame) {
int64 frame_id = frame->identifier();
int64 frame_id = webkit_glue::GetIdentifier(frame);
if (!frames_.empty()) {
// Remove the frame from the map.
@ -577,9 +575,9 @@ void CefBrowserImpl::FocusedNodeChanged(const blink::WebNode& node) {
focused_frame = render_view()->GetWebView()->focusedFrame();
}
int64 frame_id = kInvalidFrameId;
int64 frame_id = webkit_glue::kInvalidFrameId;
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.
if (frame_id == last_focused_frame_id_)

View File

@ -9,9 +9,9 @@
MSVC_PUSH_WARNING_LEVEL(0);
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8RecursionScope.h"
#include "bindings/v8/V8Utilities.h"
MSVC_POP_WARNING();
#undef ceil
#undef FROM_HERE
#undef LOG
#include "libcef/renderer/content_renderer_client.h"
@ -23,6 +23,7 @@ MSVC_POP_WARNING();
#include "libcef/common/request_impl.h"
#include "libcef/common/values_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_process_observer.h"
#include "libcef/renderer/thread_util.h"
@ -32,9 +33,11 @@ MSVC_POP_WARNING();
#include "base/command_line.h"
#include "base/path_service.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/printing/print_web_view_helper.h"
#include "content/child/child_thread.h"
#include "content/child/worker_task_runner.h"
#include "content/common/frame_messages.h"
#include "content/public/browser/browser_thread.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/WebWorkerInfo.h"
#include "v8/include/v8.h"
#include "webkit/child/worker_task_runner.h"
namespace {
@ -92,9 +94,9 @@ class CefPrerendererClient : public content::RenderViewObserver,
// Implementation of SequencedTaskRunner for WebWorker threads.
class CefWebWorkerTaskRunner : public base::SequencedTaskRunner,
public webkit_glue::WorkerTaskRunner::Observer {
public content::WorkerTaskRunner::Observer {
public:
CefWebWorkerTaskRunner(webkit_glue::WorkerTaskRunner* runner,
CefWebWorkerTaskRunner(content::WorkerTaskRunner* runner,
int worker_id)
: runner_(runner),
worker_id_(worker_id) {
@ -134,7 +136,7 @@ class CefWebWorkerTaskRunner : public base::SequencedTaskRunner,
}
private:
webkit_glue::WorkerTaskRunner* runner_;
content::WorkerTaskRunner* runner_;
int worker_id_;
};
@ -309,8 +311,8 @@ scoped_refptr<base::SequencedTaskRunner>
return render_task_runner_;
// Check if a WebWorker exists for the current thread.
webkit_glue::WorkerTaskRunner* worker_runner =
webkit_glue::WorkerTaskRunner::Instance();
content::WorkerTaskRunner* worker_runner =
content::WorkerTaskRunner::Instance();
int worker_id = worker_runner->CurrentWorkerId();
if (worker_id > 0) {
base::AutoLock lock_scope(worker_task_runner_lock_);
@ -425,6 +427,7 @@ void CefContentRendererClient::RenderThreadStarted() {
void CefContentRendererClient::RenderFrameCreated(
content::RenderFrame* render_frame) {
new CefRenderFrameObserver(render_frame);
BrowserCreated(render_frame->GetRenderView(), render_frame);
}
@ -444,7 +447,7 @@ bool CefContentRendererClient::OverrideCreatePlugin(
return false;
#if defined(ENABLE_PLUGINS)
if (UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType)
if (base::UTF16ToASCII(params.mimeType) == content::kBrowserPluginMimeType)
return false;
content::RenderFrameImpl* render_frame_impl =

View File

@ -72,7 +72,6 @@ class CefContentRendererClient : public content::ContentRendererClient,
// single-process mode. Blocks until cleanup is complete.
void RunSingleProcessCleanup();
private:
// ContentRendererClient implementation.
virtual void RenderThreadStarted() OVERRIDE;
virtual void RenderFrameCreated(content::RenderFrame* render_frame) OVERRIDE;
@ -94,13 +93,15 @@ class CefContentRendererClient : public content::ContentRendererClient,
v8::Handle<v8::Context> context,
int extension_group,
int world_id) OVERRIDE;
virtual void WillReleaseScriptContext(blink::WebFrame* frame,
v8::Handle<v8::Context> context,
int world_id) OVERRIDE;
void WillReleaseScriptContext(blink::WebFrame* frame,
v8::Handle<v8::Context> context,
int world_id);
// MessageLoop::DestructionObserver implementation.
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
private:
void BrowserCreated(content::RenderView* render_view,
content::RenderFrame* render_frame);

View File

@ -88,7 +88,7 @@ CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetElementById(const CefString& id) {
CefRefPtr<CefDOMNode> CefDOMDocumentImpl::GetFocusedNode() {
const WebDocument& document = frame_->document();
return GetOrCreateNode(document.focusedNode());
return GetOrCreateNode(document.focusedElement());
}
bool CefDOMDocumentImpl::HasSelection() {

View File

@ -75,8 +75,6 @@ CefDOMEventImpl::Category CefDOMEventImpl::GetCategory() {
flags |= DOM_EVENT_CATEGORY_PROGRESS;
if (event_.isXMLHttpRequestProgressEvent())
flags |= DOM_EVENT_CATEGORY_XMLHTTPREQUEST_PROGRESS;
if (event_.isBeforeLoadEvent())
flags |= DOM_EVENT_CATEGORY_BEFORE_LOAD;
return static_cast<Category>(flags);
}

View File

@ -47,7 +47,7 @@ class CefDOMEventListenerWrapper : public WebDOMEventListener,
frame_(frame),
listener_(listener) {
// 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() {
CEF_REQUIRE_RT();
@ -246,7 +246,7 @@ CefString CefDOMNodeImpl::GetValue() {
value = select_element.value();
}
TrimWhitespace(value, TRIM_LEADING, &value);
base::TrimWhitespace(value, base::TRIM_LEADING, &value);
str = value;
}
}

View File

@ -28,7 +28,7 @@ CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser,
blink::WebFrame* frame)
: browser_(browser),
frame_(frame),
frame_id_(frame->identifier()) {
frame_id_(webkit_glue::GetIdentifier(frame)) {
}
CefFrameImpl::~CefFrameImpl() {

View 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);
}

View 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_

View File

@ -15,12 +15,14 @@
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "core/frame/Frame.h"
#include "core/frame/LocalFrame.h"
#include "core/workers/WorkerGlobalScope.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8RecursionScope.h"
#include "bindings/v8/WorkerScriptController.h"
MSVC_POP_WARNING();
#undef FROM_HERE
#undef LOG
#include "libcef/renderer/v8_impl.h"
@ -31,6 +33,7 @@ MSVC_POP_WARNING();
#include "libcef/common/tracker.h"
#include "libcef/renderer/browser_impl.h"
#include "libcef/renderer/thread_util.h"
#include "libcef/renderer/webkit_glue.h"
#include "base/bind.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
// instrumentation works.
if (CEF_CURRENTLY_ON_RT()) {
RefPtr<WebCore::Frame> frame = WebCore::toFrameIfNotDetached(context);
RefPtr<WebCore::LocalFrame> frame = WebCore::toFrameIfNotDetached(context);
DCHECK(frame);
if (frame &&
frame->script().canExecuteScripts(WebCore::AboutToExecuteScript)) {
func_rv = frame->script().callFunction(function, receiver, argc, args);
}
} else {
WebCore::WorkerScriptController* controller =
WebCore::WorkerScriptController::controllerForContext(isolate);
DCHECK(controller);
if (controller) {
func_rv = WebCore::ScriptController::callFunction(
controller->workerGlobalScope().executionContext(),
function, receiver, argc, args, isolate);
}
func_rv = WebCore::ScriptController::callFunction(
WebCore::toExecutionContext(context),
function, receiver, argc, args, isolate);
}
return func_rv;
@ -932,7 +930,7 @@ CefRefPtr<CefFrame> CefV8ContextImpl::GetFrame() {
if (webframe) {
CefRefPtr<CefBrowserImpl> browser =
CefBrowserImpl::GetBrowserForMainFrame(webframe->top());
frame = browser->GetFrame(webframe->identifier());
frame = browser->GetFrame(webkit_glue::GetIdentifier(webframe));
}
return frame;

View File

@ -31,8 +31,13 @@ MSVC_PUSH_WARNING_LEVEL(0);
MSVC_POP_WARNING();
#undef LOG
#include "base/logging.h"
#include "content/public/renderer/render_frame.h"
namespace webkit_glue {
const int64 kInvalidFrameId = -1;
bool CanGoBack(blink::WebView* view) {
if (!view)
return false;
@ -79,4 +84,15 @@ bool SetNodeValue(blink::WebNode& node, const blink::WebString& value) {
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

View File

@ -7,6 +7,7 @@
#define CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_
#include <string>
#include "base/basictypes.h"
namespace v8 {
class Context;
@ -23,6 +24,8 @@ class WebView;
namespace webkit_glue {
extern const int64 kInvalidFrameId;
bool CanGoBack(blink::WebView* view);
bool CanGoForward(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);
int64 GetIdentifier(blink::WebFrame* frame);
} // webkit_glue
#endif // CEF_LIBCEF_RENDERER_WEBKIT_GLUE_H_

View File

@ -1,6 +1,6 @@
Index: common.gypi
===================================================================
--- common.gypi (revision 251746)
--- common.gypi (revision 261035)
+++ common.gypi (working copy)
@@ -9,6 +9,9 @@
# 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
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# 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
# 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', {
Index: mac/strip_save_dsym
===================================================================
--- mac/strip_save_dsym (revision 251746)
--- mac/strip_save_dsym (revision 261035)
+++ mac/strip_save_dsym (working copy)
@@ -48,7 +48,7 @@
"bundle"]

View File

@ -1,6 +1,6 @@
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)
@@ -92,7 +92,6 @@
return false;
@ -20,7 +20,7 @@ Index: public/renderer/content_renderer_client.cc
const GURL& url,
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)
@@ -175,7 +175,6 @@
// 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.
// 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_view_impl.cc (working copy)
@@ -2628,7 +2628,6 @@
WebDataSource::ExtraData* extraData, const WebURLRequest& request,
WebNavigationType type, WebNavigationPolicy default_policy,
--- renderer/render_frame_impl.cc (revision 261035)
+++ renderer/render_frame_impl.cc (working copy)
@@ -2661,7 +2661,6 @@
WebNavigationType type,
WebNavigationPolicy default_policy,
bool is_redirect) {
-#ifdef OS_ANDROID
// The handlenavigation API is deprecated and will be removed once
// crbug.com/325351 is resolved.
if (request.url() != GURL(kSwappedOutURL) &&
@@ -2643,7 +2642,6 @@
@@ -2676,7 +2675,6 @@
is_redirect)) {
return blink::WebNavigationPolicyIgnore;
}
-#endif
Referrer referrer(GetReferrerFromRequest(frame, request));
Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame, request));

View File

@ -1,8 +1,8 @@
Index: gyp/generator/ninja.py
===================================================================
--- gyp/generator/ninja.py (revision 1852)
--- gyp/generator/ninja.py (revision 1880)
+++ gyp/generator/ninja.py (working copy)
@@ -726,7 +726,16 @@
@@ -738,7 +738,16 @@
for path in copy['files']:
# Normalize the path so trailing slashes don't confuse us.
path = os.path.normpath(path)

View File

@ -1,8 +1,8 @@
Index: message_loop.cc
===================================================================
--- message_loop.cc (revision 248478)
--- message_loop.cc (revision 261035)
+++ message_loop.cc (working copy)
@@ -142,7 +142,7 @@
@@ -144,7 +144,7 @@
MessageLoop::~MessageLoop() {
DCHECK_EQ(this, current());

View File

@ -1,8 +1,8 @@
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)
@@ -119,7 +119,7 @@
@@ -120,7 +120,7 @@
(context_ && context_->cgl_context() != glContext) ||
!renderWidgetHostView_ ||
!renderWidgetHostView_->compositing_iosurface_) {
@ -13,9 +13,9 @@ Index: compositing_iosurface_layer_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)
@@ -360,7 +360,7 @@
@@ -362,7 +362,7 @@
glUseProgram(0); CHECK_AND_SAVE_GL_ERROR();
} else {
// Should match the clear color of RenderWidgetHostViewMac.
@ -26,7 +26,7 @@ Index: compositing_iosurface_mac.mm
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)
@@ -11,6 +11,7 @@
#include "base/debug/trace_event.h"
@ -78,7 +78,7 @@ Index: compositing_iosurface_shader_programs_mac.cc
shader_programs_[which] =
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)
@@ -48,6 +48,8 @@
return rgb_to_yv12_output_format_;
@ -91,18 +91,18 @@ Index: compositing_iosurface_shader_programs_mac.h
TransformsRGBToYV12);
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)
@@ -483,7 +483,7 @@
software_layer_.reset([[CALayer alloc] init]);
if (!software_layer_)
LOG(ERROR) << "Failed to create CALayer for software rendering";
- [software_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
+ [software_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
[software_layer_ setDelegate:cocoa_view_];
[software_layer_ setContentsGravity:kCAGravityTopLeft];
[software_layer_ setFrame:NSRectToCGRect([cocoa_view_ bounds])];
@@ -2856,7 +2856,7 @@
@@ -434,7 +434,7 @@
use_core_animation_ = true;
background_layer_.reset([[CALayer alloc] init]);
[background_layer_
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
+ setBackgroundColor:CGColorGetConstantColor(kCGColorClear)];
[cocoa_view_ setLayer:background_layer_];
[cocoa_view_ setWantsLayer:YES];
}
@@ -3087,7 +3087,7 @@
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
CGContextSetFillColorWithColor(context,
@ -111,7 +111,7 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, NSRectToCGRect(r));
}
if (damagedRect.bottom() > rect.bottom()) {
@@ -2878,7 +2878,7 @@
@@ -3109,7 +3109,7 @@
NSRect r = [self flipRectToNSRect:gfx::Rect(x, y, width, height)];
CGContextSetFillColorWithColor(context,
@ -120,7 +120,7 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, NSRectToCGRect(r));
}
}
@@ -3037,7 +3037,7 @@
@@ -3259,7 +3259,7 @@
}
} else {
CGContextSetFillColorWithColor(context,
@ -129,12 +129,21 @@ Index: render_widget_host_view_mac.mm
CGContextFillRect(context, dirtyRect);
if (renderWidgetHostView_->whiteout_start_time_.is_null())
renderWidgetHostView_->whiteout_start_time_ = base::TimeTicks::Now();
@@ -4045,7 +4045,7 @@
if (!renderWidgetHostView_->render_widget_host_ ||
renderWidgetHostView_->render_widget_host_->is_hidden()) {
@@ -4282,7 +4282,7 @@
if (self = [super init]) {
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,
- CGColorGetConstantColor(kCGColorWhite));
+ CGColorGetConstantColor(kCGColorClear));
CGContextFillRect(context, clipRect);
return;
}
}

View File

@ -1,8 +1,8 @@
Index: core/frame/FrameView.cpp
===================================================================
--- core/frame/FrameView.cpp (revision 167304)
--- core/frame/FrameView.cpp (revision 170525)
+++ core/frame/FrameView.cpp (working copy)
@@ -141,8 +141,10 @@
@@ -165,8 +165,10 @@
if (!isMainFrame())
return;
@ -12,12 +12,12 @@ Index: core/frame/FrameView.cpp
+#endif
}
PassRefPtr<FrameView> FrameView::create(Frame* frame)
PassRefPtr<FrameView> FrameView::create(LocalFrame* frame)
Index: platform/scroll/ScrollbarThemeMacCommon.mm
===================================================================
--- platform/scroll/ScrollbarThemeMacCommon.mm (revision 167304)
--- platform/scroll/ScrollbarThemeMacCommon.mm (revision 170525)
+++ platform/scroll/ScrollbarThemeMacCommon.mm (working copy)
@@ -369,10 +369,14 @@
@@ -358,10 +358,14 @@
// static
bool ScrollbarThemeMacCommon::isOverlayAPIAvailable()
{

View File

@ -1,8 +1,8 @@
Index: web_dialog_view.cc
===================================================================
--- web_dialog_view.cc (revision 248478)
--- web_dialog_view.cc (revision 261035)
+++ web_dialog_view.cc (working copy)
@@ -261,13 +261,6 @@
@@ -257,13 +257,6 @@
return true;
}
@ -16,7 +16,7 @@ Index: web_dialog_view.cc
////////////////////////////////////////////////////////////////////////////////
// content::WebContentsDelegate implementation:
@@ -347,6 +340,16 @@
@@ -337,6 +330,15 @@
*proceed_to_fire_unload = proceed;
}
@ -26,16 +26,15 @@ Index: web_dialog_view.cc
+ if (delegate_)
+ return delegate_->HandleContextMenu(params);
+ return WebDialogWebContentsDelegate::HandleContextMenu(render_frame_host,
+ params);
+ params);
+}
+
+
////////////////////////////////////////////////////////////////////////////////
// WebDialogView, private:
Index: web_dialog_view.h
===================================================================
--- web_dialog_view.h (revision 248478)
--- web_dialog_view.h (revision 261035)
+++ web_dialog_view.h (working copy)
@@ -74,6 +74,7 @@
virtual const views::Widget* GetWidget() const OVERRIDE;
@ -54,7 +53,7 @@ Index: web_dialog_view.h
// Overridden from content::WebContentsDelegate:
virtual void MoveContents(content::WebContents* source,
@@ -114,6 +113,9 @@
@@ -115,6 +114,9 @@
virtual void BeforeUnloadFired(content::WebContents* tab,
bool proceed,
bool* proceed_to_fire_unload) OVERRIDE;

View File

@ -1,6 +1,6 @@
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)
@@ -54,6 +54,8 @@
}
@ -8,29 +8,29 @@ Index: desktop_aura/desktop_screen_win.cc
HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
+ if (!window)
+ return NULL;
aura::WindowEventDispatcher* dispatcher = window->GetDispatcher();
return dispatcher ? dispatcher->host()->GetAcceleratedWidget() : NULL;
aura::WindowTreeHost* host = window->GetHost();
return host ? host->GetAcceleratedWidget() : NULL;
}
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)
@@ -133,7 +133,9 @@
@@ -130,7 +130,9 @@
native_widget_delegate_);
HWND parent_hwnd = NULL;
- if (params.parent && params.parent->GetDispatcher()) {
+ if (params.parent_widget) {
- if (params.parent && params.parent->GetHost())
+ if (params.parent_widget)
+ parent_hwnd = params.parent_widget;
+ } else if (params.parent && params.parent->GetDispatcher()) {
parent_hwnd =
params.parent->GetDispatcher()->host()->GetAcceleratedWidget();
}
+ else if (params.parent && params.parent->GetHost())
parent_hwnd = params.parent->GetHost()->GetAcceleratedWidget();
message_handler_->set_remove_standard_frame(params.remove_standard_frame);
Index: widget.cc
===================================================================
--- widget.cc (revision 251746)
--- widget.cc (revision 261035)
+++ widget.cc (working copy)
@@ -124,6 +124,7 @@
@@ -122,6 +122,7 @@
show_state(ui::SHOW_STATE_DEFAULT),
double_buffer(false),
parent(NULL),
@ -38,7 +38,7 @@ Index: widget.cc
native_widget(NULL),
desktop_window_tree_host(NULL),
top_level(false),
@@ -149,6 +150,7 @@
@@ -148,6 +149,7 @@
show_state(ui::SHOW_STATE_DEFAULT),
double_buffer(false),
parent(NULL),
@ -46,7 +46,7 @@ Index: widget.cc
native_widget(NULL),
desktop_window_tree_host(NULL),
top_level(false),
@@ -389,7 +391,12 @@
@@ -386,7 +388,12 @@
Minimize();
} else if (params.delegate) {
SetContentsView(params.delegate->GetContentsView());
@ -62,9 +62,9 @@ Index: widget.cc
}
Index: widget.h
===================================================================
--- widget.h (revision 251746)
--- widget.h (revision 261035)
+++ widget.h (working copy)
@@ -197,6 +197,7 @@
@@ -200,6 +200,7 @@
// Should the widget be double buffered? Default is false.
bool double_buffer;
gfx::NativeView parent;

View File

@ -1,8 +1,8 @@
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)
@@ -789,7 +789,8 @@
@@ -794,7 +794,8 @@
return this;
}
@ -14,7 +14,7 @@ Index: browser/browser_plugin/browser_plugin_guest.cc
// http://crbug.com/140315).
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)
@@ -204,7 +204,8 @@
double progress) OVERRIDE;
@ -28,9 +28,9 @@ Index: browser/browser_plugin/browser_plugin_guest.h
const NativeWebKeyboardEvent& event) OVERRIDE;
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)
@@ -2727,7 +2727,7 @@
@@ -2831,7 +2831,7 @@
void WebContentsImpl::ShowContextMenu(RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
// 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);
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)
@@ -233,12 +233,6 @@
@@ -227,12 +227,6 @@
void WebContentsViewMac::ShowContextMenu(
content::RenderFrameHost* render_frame_host,
const ContextMenuParams& params) {
@ -58,7 +58,7 @@ Index: browser/web_contents/web_contents_view_mac.mm
else
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)
@@ -76,6 +76,7 @@
}
@ -70,7 +70,7 @@ Index: public/browser/web_contents_delegate.cc
}
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)
@@ -35,6 +35,7 @@
class DownloadItem;
@ -80,7 +80,7 @@ Index: public/browser/web_contents_delegate.h
class RenderViewHost;
class SessionStorageNamespace;
class WebContents;
@@ -228,7 +229,8 @@
@@ -231,7 +232,8 @@
virtual int GetExtraRenderViewHeight() const;
// Returns true if the context menu operation was handled by the delegate.

View File

@ -1,8 +1,8 @@
Index: WebNode.cpp
===================================================================
--- WebNode.cpp (revision 166298)
--- WebNode.cpp (revision 170525)
+++ WebNode.cpp (working copy)
@@ -171,7 +171,7 @@
@@ -172,7 +172,7 @@
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
// Please do not add more eventTypes to this list without an API review.

View File

@ -1,8 +1,8 @@
Index: public/web/WebView.h
===================================================================
--- public/web/WebView.h (revision 167304)
--- public/web/WebView.h (revision 170525)
+++ 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.
BLINK_EXPORT static void setUseExternalPopupMenus(bool);
@ -12,11 +12,11 @@ Index: public/web/WebView.h
virtual void hidePopups() = 0;
Index: Source/web/ChromeClientImpl.cpp
===================================================================
--- Source/web/ChromeClientImpl.cpp (revision 167304)
--- Source/web/ChromeClientImpl.cpp (revision 170525)
+++ 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 (m_webView->useExternalPopupMenus())
@ -25,9 +25,9 @@ Index: Source/web/ChromeClientImpl.cpp
return adoptRef(new PopupMenuChromium(frame, client));
Index: Source/web/WebViewImpl.cpp
===================================================================
--- Source/web/WebViewImpl.cpp (revision 167304)
--- Source/web/WebViewImpl.cpp (revision 170525)
+++ Source/web/WebViewImpl.cpp (working copy)
@@ -343,6 +343,7 @@
@@ -339,6 +339,7 @@
, m_fakePageScaleAnimationPageScaleFactor(0)
, m_fakePageScaleAnimationUseAnchor(false)
, m_contextMenuAllowed(false)
@ -35,7 +35,7 @@ Index: Source/web/WebViewImpl.cpp
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_compositorDeviceScaleFactorOverride(0)
@@ -3521,9 +3522,14 @@
@@ -3488,9 +3489,14 @@
updateLayerTreeViewport();
}
@ -50,12 +50,12 @@ Index: Source/web/WebViewImpl.cpp
+ return m_shouldUseExternalPopupMenus;
}
void WebViewImpl::startDragging(Frame* frame,
void WebViewImpl::startDragging(LocalFrame* frame,
Index: Source/web/WebViewImpl.h
===================================================================
--- Source/web/WebViewImpl.h (revision 167304)
--- Source/web/WebViewImpl.h (revision 170525)
+++ 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
// they should be rendered by WebKit (which is the default).
@ -65,7 +65,7 @@ Index: Source/web/WebViewImpl.h
bool contextMenuAllowed() const
{
@@ -685,6 +686,8 @@
@@ -668,6 +669,8 @@
bool m_contextMenuAllowed;

View File

@ -94,8 +94,6 @@ void CefTestSuite::Initialize() {
log_settings.logging_dest = logging::LOG_TO_ALL;
log_settings.lock_log = logging::LOCK_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);
// We want process and thread IDs because we may have multiple processes.

View File

@ -10,7 +10,9 @@
#include "include/internal/cef_types_wrappers.h"
#include "base/test/test_suite.h"
namespace base {
class CommandLine;
}
class CefTestSuite : public TestSuite {
public:
@ -31,7 +33,7 @@ class CefTestSuite : public TestSuite {
#endif
// The singleton CommandLine representing the current process's command line.
static CommandLine* commandline_;
static base::CommandLine* commandline_;
};
#endif // CEF_TESTS_UNITTESTS_TEST_SUITE_H_

View File

@ -604,8 +604,7 @@ class RequestTestRunner {
SetupGetTest();
// Send cookies.
settings_.request->SetFlags(UR_FLAG_ALLOW_CACHED_CREDENTIALS |
UR_FLAG_ALLOW_COOKIES);
settings_.request->SetFlags(UR_FLAG_ALLOW_CACHED_CREDENTIALS);
settings_.expect_save_cookie = true;
settings_.expect_send_cookie = true;
@ -653,7 +652,7 @@ class RequestTestRunner {
const base::FilePath& path =
post_file_tmpdir_.path().Append(FILE_PATH_LITERAL("example.txt"));
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);
SetUploadFile(settings_.request, path);