Update to Chromium revision 272007.

- Remove CefSettings.accelerated_compositing option (see https://crbug.com/363772).
- Remove experimental x-webkit-speech support (see https://crbug.com/223198).
- Execute CefGeolocationHandler callbacks on the UI thread (see https://crbug.com/304341#c212).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1711 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-05-29 17:15:34 +00:00
parent 79bd4dd93c
commit 74b35c30eb
66 changed files with 232 additions and 405 deletions

View File

@@ -43,15 +43,14 @@ class CefGeolocationPermissionContext
callback_(callback) {}
virtual void Continue(bool allow) OVERRIDE {
if (CEF_CURRENTLY_ON_IOT()) {
if (CEF_CURRENTLY_ON_UIT()) {
if (!callback_.is_null()) {
// Callback must be executed on the UI thread.
CEF_POST_TASK(CEF_UIT,
base::Bind(&CallbackImpl::Run, callback_, allow));
callback_.Run(allow);
context_->RemoveCallback(bridge_id_);
}
} else {
CEF_POST_TASK(CEF_IOT,
CEF_POST_TASK(CEF_UIT,
base::Bind(&CallbackImpl::Continue, this, allow));
}
}
@@ -77,18 +76,16 @@ class CefGeolocationPermissionContext
CefGeolocationPermissionContext() {}
virtual void RequestGeolocationPermission(
int render_process_id,
int render_view_id,
content::WebContents* web_contents,
int bridge_id,
const GURL& requesting_frame,
bool user_gesture,
base::Callback<void(bool)> callback) // NOLINT(readability/function)
OVERRIDE {
CEF_REQUIRE_IOT();
CEF_REQUIRE_UIT();
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForView(render_process_id,
render_view_id);
CefBrowserHostImpl::GetBrowserForContents(web_contents);
if (browser.get()) {
CefRefPtr<CefClient> client = browser->GetClient();
if (client.get()) {
@@ -110,19 +107,17 @@ class CefGeolocationPermissionContext
}
// Disallow geolocation access by default.
CEF_POST_TASK(CEF_UIT, base::Bind(callback, false));
callback.Run(false);
}
virtual void CancelGeolocationPermissionRequest(
int render_process_id,
int render_view_id,
content::WebContents* web_contents,
int bridge_id,
const GURL& requesting_frame) OVERRIDE {
RemoveCallback(bridge_id);
CefRefPtr<CefBrowserHostImpl> browser =
CefBrowserHostImpl::GetBrowserForView(render_process_id,
render_view_id);
CefBrowserHostImpl::GetBrowserForContents(web_contents);
if (browser.get()) {
CefRefPtr<CefClient> client = browser->GetClient();
if (client.get()) {
@@ -138,7 +133,7 @@ class CefGeolocationPermissionContext
}
void RemoveCallback(int bridge_id) {
CEF_REQUIRE_IOT();
CEF_REQUIRE_UIT();
// Disconnect the callback and remove the reference from the map.
CallbackMap::iterator it = callback_map_.find(bridge_id);
@@ -295,6 +290,10 @@ content::GeolocationPermissionContext*
return geolocation_permission_context_;
}
content::BrowserPluginGuestManager* CefBrowserContextImpl::GetGuestManager() {
return NULL;
}
quota::SpecialStoragePolicy* CefBrowserContextImpl::GetSpecialStoragePolicy() {
return NULL;
}

View File

@@ -63,6 +63,7 @@ class CefBrowserContextImpl : public CefBrowserContext {
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
virtual content::GeolocationPermissionContext*
GetGeolocationPermissionContext() OVERRIDE;
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
// CefBrowserContext methods.

View File

@@ -152,6 +152,10 @@ content::GeolocationPermissionContext*
return parent_->GetGeolocationPermissionContext();
}
content::BrowserPluginGuestManager* CefBrowserContextProxy::GetGuestManager() {
return parent_->GetGuestManager();
}
quota::SpecialStoragePolicy* CefBrowserContextProxy::GetSpecialStoragePolicy() {
return parent_->GetSpecialStoragePolicy();
}

View File

@@ -71,6 +71,7 @@ class CefBrowserContextProxy : public CefBrowserContext {
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
virtual content::GeolocationPermissionContext*
GetGeolocationPermissionContext() OVERRIDE;
virtual content::BrowserPluginGuestManager* GetGuestManager() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
// CefBrowserContext methods.

View File

@@ -47,7 +47,6 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/common/file_chooser_params.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "ui/shell_dialogs/selected_file_info.h"
@@ -585,8 +584,7 @@ class CefBrowserHostImpl::DevToolsWebContentsObserver :
}
// WebContentsObserver methods:
virtual void WebContentsDestroyed(
content::WebContents* web_contents) OVERRIDE {
virtual void WebContentsDestroyed() OVERRIDE {
browser_->OnDevToolsWebContentsDestroyed();
}
@@ -1213,7 +1211,7 @@ gfx::NativeView CefBrowserHostImpl::GetContentView() const {
#else
if (!web_contents_.get())
return NULL;
return web_contents_->GetView()->GetNativeView();
return web_contents_->GetNativeView();
#endif
}
@@ -1502,7 +1500,7 @@ void CefBrowserHostImpl::OnSetFocus(cef_focus_source_t source) {
}
if (web_contents_.get())
web_contents_->GetView()->Focus();
web_contents_->Focus();
#if defined(OS_WIN)
// When windowed rendering is used in combination with Aura on Windows we
@@ -1803,7 +1801,7 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
const content::MediaResponseCallback& callback) {
CEF_CURRENTLY_ON_UIT();
CEF_REQUIRE_UIT();
content::MediaStreamDevices devices;

View File

@@ -14,10 +14,8 @@
#include "base/bind.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"
#include "content/public/common/renderer_preferences.h"
#include "third_party/WebKit/public/web/gtk/WebInputEventFactory.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/views/widget/widget.h"

View File

@@ -19,7 +19,6 @@
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "content/public/common/file_chooser_params.h"
#include "grit/ui_strings.h"
#include "net/base/mime_util.h"
@@ -317,7 +316,7 @@ bool CefBrowserHostImpl::PlatformCreateWindow() {
// Parent the TabContents to the browser view.
const NSRect bounds = [browser_view bounds];
NSView* native_view = web_contents_->GetView()->GetNativeView();
NSView* native_view = web_contents_->GetNativeView();
[browser_view addSubview:native_view];
[native_view setFrame:bounds];
[native_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];

View File

@@ -25,39 +25,22 @@
#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"
#include "grit/cef_strings.h"
#include "grit/ui_strings.h"
#include "grit/ui_unscaled_resources.h"
#include "net/base/mime_util.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "ui/aura/window.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/win/shell.h"
#include "ui/gfx/win/hwnd_util.h"
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
#include "ui/views/widget/widget.h"
#include "ui/views/win/hwnd_util.h"
#pragma comment(lib, "dwmapi.lib")
namespace {
HWND GetHWND(views::Widget* widget) {
gfx::NativeWindow window = widget->GetNativeWindow();
DCHECK(window);
if (!window)
return NULL;
views::DesktopWindowTreeHostWin* host =
static_cast<views::DesktopWindowTreeHostWin*>(window->GetHost());
DCHECK(host);
if (!host)
return NULL;
HWND hwnd = host->GetHWND();
DCHECK(hwnd);
return hwnd;
}
void WriteTempFileAndView(scoped_refptr<base::RefCountedString> str) {
CEF_REQUIRE_FILET();
@@ -630,7 +613,7 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
void CefBrowserHostImpl::PlatformSetViewFocus() {
if (window_widget_)
::SetFocus(GetHWND(window_widget_));
::SetFocus(views::HWNDForWidget(window_widget_));
}
ui::PlatformCursor CefBrowserHostImpl::GetPlatformCursor(

View File

@@ -68,7 +68,7 @@ void CefBrowserMainParts::PreEarlyInitialization() {
void CefBrowserMainParts::ToolkitInitialized() {
#if defined(USE_AURA)
aura::Env::CreateInstance();
CHECK(aura::Env::GetInstance());
DCHECK(!views::ViewsDelegate::views_delegate);
new views::DesktopTestViewsDelegate;

View File

@@ -8,6 +8,7 @@
#include <string>
#include "ipc/ipc_channel_proxy.h"
#include "ipc/message_filter.h"
namespace content {
class RenderProcessHost;
@@ -18,7 +19,7 @@ struct CefProcessHostMsg_GetNewRenderThreadInfo_Params;
struct ViewHostMsg_CreateWindow_Params;
// This class sends and receives control messages on the browser process.
class CefBrowserMessageFilter : public IPC::ChannelProxy::MessageFilter {
class CefBrowserMessageFilter : public IPC::MessageFilter {
public:
explicit CefBrowserMessageFilter(content::RenderProcessHost* host);
virtual ~CefBrowserMessageFilter();

View File

@@ -124,6 +124,4 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) {
// GPU blacklist is not being checked here.
if (cef.webgl == STATE_DISABLED)
web.experimental_webgl_enabled = false;
if (cef.accelerated_compositing == STATE_DISABLED)
web.accelerated_compositing_enabled = false;
}

View File

@@ -234,12 +234,6 @@ component_updater::PnaclComponentInstaller*
return NULL;
}
BookmarkPromptController*
ChromeBrowserProcessStub::bookmark_prompt_controller() {
NOTIMPLEMENTED();
return NULL;
}
MediaFileSystemRegistry*
ChromeBrowserProcessStub::media_file_system_registry() {
NOTIMPLEMENTED();
@@ -257,3 +251,7 @@ WebRtcLogUploader* ChromeBrowserProcessStub::webrtc_log_uploader() {
return NULL;
}
#endif
NetworkTimeTracker* ChromeBrowserProcessStub::network_time_tracker() {
return NULL;
}

View File

@@ -85,13 +85,13 @@ class ChromeBrowserProcessStub : public BrowserProcess {
virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE;
virtual component_updater::PnaclComponentInstaller*
pnacl_component_installer() OVERRIDE;
virtual BookmarkPromptController* bookmark_prompt_controller() OVERRIDE;
virtual MediaFileSystemRegistry*
media_file_system_registry() OVERRIDE;
virtual bool created_local_state() const OVERRIDE;
#if defined(ENABLE_WEBRTC)
virtual WebRtcLogUploader* webrtc_log_uploader() OVERRIDE;
#endif
virtual NetworkTimeTracker* network_time_tracker() OVERRIDE;
private:
std::string locale_;

View File

@@ -219,8 +219,6 @@ class Delegate : public InternalHandlerDelegate {
bool OnCredits(const std::string& path, Action* action) {
if (path == "credits.js") {
action->resource_id = IDR_CEF_CREDITS_JS;
} else if (path == "swiftshader.jpg") {
action->resource_id = IDR_CEF_CREDITS_SWIFTSHADER_JPG;
} else {
action->mime_type = "text/html";
action->resource_id = IDR_CEF_CREDITS_HTML;

View File

@@ -661,11 +661,9 @@ content::MediaObserver* CefContentBrowserClient::GetMediaObserver() {
content::SpeechRecognitionManagerDelegate*
CefContentBrowserClient::GetSpeechRecognitionManagerDelegate() {
#if defined(ENABLE_INPUT_SPEECH)
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kEnableSpeechInput))
return new CefSpeechRecognitionManagerDelegate();
#endif
return NULL;
}

View File

@@ -100,11 +100,6 @@ bool CefContextMenuParamsImpl::IsEditable() {
return const_value().is_editable;
}
bool CefContextMenuParamsImpl::IsSpeechInputEnabled() {
CEF_VALUE_VERIFY_RETURN(false, false);
return const_value().speech_input_enabled;
}
CefContextMenuParamsImpl::EditStateFlags
CefContextMenuParamsImpl::GetEditStateFlags() {
CEF_VALUE_VERIFY_RETURN(false, CM_EDITFLAG_NONE);

View File

@@ -32,7 +32,6 @@ class CefContextMenuParamsImpl
virtual MediaStateFlags GetMediaStateFlags() OVERRIDE;
virtual CefString GetSelectionText() OVERRIDE;
virtual bool IsEditable() OVERRIDE;
virtual bool IsSpeechInputEnabled() OVERRIDE;
virtual EditStateFlags GetEditStateFlags() OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(CefContextMenuParamsImpl);

View File

@@ -44,8 +44,8 @@ class Target : public content::DevToolsTarget {
virtual std::string GetType() const OVERRIDE { return kTargetTypePage; }
virtual std::string GetTitle() const OVERRIDE { return title_; }
virtual std::string GetDescription() const OVERRIDE { return std::string(); }
virtual GURL GetUrl() const OVERRIDE { return url_; }
virtual GURL GetFaviconUrl() const OVERRIDE { return favicon_url_; }
virtual GURL GetURL() const OVERRIDE { return url_; }
virtual GURL GetFaviconURL() const OVERRIDE { return favicon_url_; }
virtual base::TimeTicks GetLastActivityTime() const OVERRIDE {
return last_activity_time_;
}

View File

@@ -16,7 +16,6 @@
#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"
#include "content/public/common/content_client.h"
#include "net/base/net_util.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -63,7 +62,7 @@ void CefDevToolsFrontend::Activate() {
}
void CefDevToolsFrontend::Focus() {
web_contents()->GetView()->Focus();
web_contents()->Focus();
}
void CefDevToolsFrontend::Close() {
@@ -92,13 +91,12 @@ void CefDevToolsFrontend::RenderViewCreated(
agent_host_.get(), frontend_host_.get());
}
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame(int32 page_id) {
void CefDevToolsFrontend::DocumentOnLoadCompletedInMainFrame() {
web_contents()->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("InspectorFrontendAPI.setUseSoftMenu(true);"));
}
void CefDevToolsFrontend::WebContentsDestroyed(
content::WebContents* web_contents) {
void CefDevToolsFrontend::WebContentsDestroyed() {
content::DevToolsManager::GetInstance()->ClientHostClosing(
frontend_host_.get());
delete this;

View File

@@ -46,9 +46,8 @@ class CefDevToolsFrontend : public content::WebContentsObserver,
// WebContentsObserver overrides
virtual void RenderViewCreated(
content::RenderViewHost* render_view_host) OVERRIDE;
virtual void DocumentOnLoadCompletedInMainFrame(int32 page_id) OVERRIDE;
virtual void WebContentsDestroyed(
content::WebContents* web_contents) OVERRIDE;
virtual void DocumentOnLoadCompletedInMainFrame() OVERRIDE;
virtual void WebContentsDestroyed() OVERRIDE;
// DevToolsFrontendHostDelegate implementation
virtual void DispatchOnEmbedder(const std::string& message) OVERRIDE {}

View File

@@ -17,31 +17,25 @@ class CefLocationRequest :
public:
explicit CefLocationRequest(CefRefPtr<CefGetGeolocationCallback> callback)
: callback_(callback) {
CEF_REQUIRE_IOT();
CEF_REQUIRE_UIT();
geo_callback_ = base::Bind(&CefLocationRequest::OnLocationUpdate, this);
content::GeolocationProvider* provider =
content::GeolocationProvider::GetInstance();
provider->AddLocationUpdateCallback(geo_callback_, true);
subscription_ = provider->AddLocationUpdateCallback(geo_callback_, true);
provider->UserDidOptIntoLocationServices();
}
private:
void OnLocationUpdate(const content::Geoposition& position) {
if (CEF_CURRENTLY_ON_UIT()) {
if (callback_) {
CefGeoposition cef_position;
SetPosition(position, cef_position);
callback_->OnLocationUpdate(cef_position);
callback_ = NULL;
}
} else {
content::GeolocationProvider::GetInstance()->RemoveLocationUpdateCallback(
geo_callback_);
geo_callback_.Reset();
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefLocationRequest::OnLocationUpdate, this, position));
CEF_REQUIRE_UIT();
if (callback_) {
CefGeoposition cef_position;
SetPosition(position, cef_position);
callback_->OnLocationUpdate(cef_position);
callback_ = NULL;
}
subscription_.reset();
geo_callback_.Reset();
}
void SetPosition(const content::Geoposition& source, CefGeoposition& target) {
@@ -74,6 +68,7 @@ class CefLocationRequest :
CefRefPtr<CefGetGeolocationCallback> callback_;
content::GeolocationProvider::LocationUpdateCallback geo_callback_;
scoped_ptr<content::GeolocationProvider::Subscription> subscription_;
DISALLOW_COPY_AND_ASSIGN(CefLocationRequest);
};
@@ -91,7 +86,7 @@ bool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback) {
return false;
}
if (CEF_CURRENTLY_ON_IOT()) {
if (CEF_CURRENTLY_ON_UIT()) {
if (content::GeolocationProvider::GetInstance()) {
// Will be released after the callback executes.
new CefLocationRequest(callback);
@@ -99,7 +94,7 @@ bool CefGetGeolocation(CefRefPtr<CefGetGeolocationCallback> callback) {
}
return false;
} else {
CEF_POST_TASK(CEF_IOT,
CEF_POST_TASK(CEF_UIT,
base::Bind(base::IgnoreResult(CefGetGeolocation), callback));
return true;
}

View File

@@ -36,7 +36,8 @@ bool CefMenuCreatorRunnerLinux::RunContextMenu(CefMenuCreator* manager) {
views::MenuRunner::RunResult result =
menu_->RunMenuAt(manager->browser()->window_widget(),
NULL, gfx::Rect(screen_point, gfx::Size()),
views::MenuItemView::TOPRIGHT, ui::MENU_SOURCE_NONE,
views::MENU_ANCHOR_TOPRIGHT,
ui::MENU_SOURCE_NONE,
views::MenuRunner::CONTEXT_MENU);
UNUSED(result);

View File

@@ -8,7 +8,6 @@
#include "base/message_loop/message_loop.h"
#include "base/compiler_specific.h"
#import "base/mac/scoped_sending_event.h"
#include "content/public/browser/web_contents_view.h"
#import "ui/base/cocoa/menu_controller.h"
CefMenuCreatorRunnerMac::CefMenuCreatorRunnerMac()
@@ -29,7 +28,7 @@ bool CefMenuCreatorRunnerMac::RunContextMenu(CefMenuCreator* manager) {
useWithPopUpButtonCell:NO];
NSView* parent_view =
manager->browser()->GetWebContents()->GetView()->GetContentNativeView();
manager->browser()->GetWebContents()->GetContentNativeView();
// Synthesize an event for the click, as there is no certainty that
// [NSApp currentEvent] will return a valid event.

View File

@@ -6,7 +6,6 @@
#include "libcef/browser/browser_host_impl.h"
#include "base/message_loop/message_loop.h"
#include "content/public/browser/web_contents_view.h"
#include "ui/aura/window.h"
#include "ui/gfx/point.h"
#include "ui/views/controls/menu/menu_2.h"

View File

@@ -26,7 +26,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "grit/generated_resources.h"
#include "printing/metafile_impl.h"
#include "printing/printed_document.h"

View File

@@ -106,10 +106,9 @@ void PrintingMessageFilter::OverrideThreadForMessage(
#endif
}
bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) {
bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP_EX(PrintingMessageFilter, message, *message_was_ok)
IPC_BEGIN_MESSAGE_MAP(PrintingMessageFilter, message)
#if defined(OS_WIN)
IPC_MESSAGE_HANDLER(PrintHostMsg_DuplicateSection, OnDuplicateSection)
#endif

View File

@@ -41,8 +41,7 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
virtual void OverrideThreadForMessage(
const IPC::Message& message,
content::BrowserThread::ID* thread) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
private:
virtual ~PrintingMessageFilter();

View File

@@ -1,18 +1,18 @@
// 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 "base/logging.h"
#include "components/user_prefs/pref_registry_syncable.h"
namespace user_prefs {
// Required by PrefProxyConfigTrackerImpl::RegisterUserPrefs.
void PrefRegistrySyncable::RegisterDictionaryPref(
// 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 "base/logging.h"
#include "components/pref_registry/pref_registry_syncable.h"
namespace user_prefs {
// Required by PrefProxyConfigTrackerImpl::RegisterUserPrefs.
void PrefRegistrySyncable::RegisterDictionaryPref(
const char* path,
base::DictionaryValue* default_value,
PrefSyncStatus sync_status) {
NOTREACHED();
}
} // namespace user_prefs
PrefSyncStatus sync_status) {
NOTREACHED();
}
} // namespace user_prefs

View File

@@ -36,6 +36,7 @@
#include "net/url_request/url_request_http_job.h"
#include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "url/third_party/mozilla/url_parse.h"
#include "url/url_util.h"
using net::URLRequestStatus;
@@ -43,8 +44,8 @@ using net::URLRequestStatus;
namespace {
bool IsStandardScheme(const std::string& scheme) {
url_parse::Component scheme_comp(0, scheme.length());
return url_util::IsStandard(scheme.c_str(), scheme_comp);
url::Component scheme_comp(0, scheme.length());
return url::IsStandard(scheme.c_str(), scheme_comp);
}
// Copied from net/url_request/url_request_job_manager.cc.

View File

@@ -176,7 +176,7 @@ int CefBytesReader::Seek(int64 offset, int whence) {
rv = 0;
break;
case SEEK_END: {
int64 offset_abs = abs(offset);
int64 offset_abs = std::abs(offset);
if (offset_abs > datasize_)
break;
offset_ = datasize_ - offset_abs;
@@ -267,7 +267,7 @@ int CefBytesWriter::Seek(int64 offset, int whence) {
rv = 0;
break;
case SEEK_END: {
int64 offset_abs = abs(offset);
int64 offset_abs = std::abs(offset);
if (offset_abs > datasize_)
break;
offset_ = datasize_ - offset_abs;

View File

@@ -50,9 +50,9 @@ namespace {
blink::WebString FilePathStringToWebString(
const base::FilePath::StringType& str) {
#if defined(OS_POSIX)
return base::WideToUTF16Hack(base::SysNativeMBToWide(str));
return base::WideToUTF16(base::SysNativeMBToWide(str));
#elif defined(OS_WIN)
return base::WideToUTF16Hack(str);
return base::WideToUTF16(str);
#endif
}

View File

@@ -199,14 +199,15 @@ void CefContentRendererClient::OnBrowserDestroyed(CefBrowserImpl* browser) {
void CefContentRendererClient::WebKitInitialized() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
// Create global objects associated with the default Isolate.
CefV8IsolateCreated();
blink::WebRuntimeFeatures::enableMediaPlayer(
media::IsMediaLibraryInitialized());
// TODO(cef): Enable these once the implementation supports it.
blink::WebRuntimeFeatures::enableNotifications(false);
blink::WebRuntimeFeatures::enableSpeechInput(
command_line.HasSwitch(switches::kEnableSpeechInput));
blink::WebRuntimeFeatures::enableMediaStream(
command_line.HasSwitch(switches::kEnableMediaStream));
@@ -401,9 +402,6 @@ void CefContentRendererClient::RenderThreadStarted() {
blink::WebPrerenderingSupport::initialize(new CefPrerenderingSupport());
// Create global objects associated with the default Isolate.
CefV8IsolateCreated();
// Retrieve the new render thread information synchronously.
CefProcessHostMsg_GetNewRenderThreadInfo_Params params;
thread->Send(new CefProcessHostMsg_GetNewRenderThreadInfo(&params));

View File

@@ -8,9 +8,10 @@
#include <string>
#include "ipc/ipc_channel_proxy.h"
#include "ipc/message_filter.h"
// This class sends and receives control messages on the renderer process.
class CefRenderMessageFilter : public IPC::ChannelProxy::MessageFilter {
class CefRenderMessageFilter : public IPC::MessageFilter {
public:
CefRenderMessageFilter();
virtual ~CefRenderMessageFilter();

View File

@@ -19,8 +19,6 @@ MSVC_PUSH_WARNING_LEVEL(0);
#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
@@ -41,6 +39,7 @@ MSVC_POP_WARNING();
#include "base/threading/thread_local.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScriptController.h"
#include "url/gurl.h"
@@ -499,9 +498,6 @@ void GetCefString(v8::Handle<v8::String> str, CefString& out) {
// V8 function callback.
void FunctionCallbackImpl(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
WebCore::V8RecursionScope recursion_scope(
isolate,
WebCore::toExecutionContext(isolate->GetCurrentContext()));
CefV8Handler* handler =
static_cast<CefV8Handler*>(v8::External::Cast(*info.Data())->Value());
@@ -540,9 +536,6 @@ void AccessorGetterCallbackImpl(
v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = info.GetIsolate();
WebCore::V8RecursionScope recursion_scope(
isolate,
WebCore::toExecutionContext(isolate->GetCurrentContext()));
v8::Handle<v8::Object> obj = info.This();
@@ -581,9 +574,6 @@ void AccessorSetterCallbackImpl(
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) {
v8::Isolate* isolate = info.GetIsolate();
WebCore::V8RecursionScope recursion_scope(
isolate,
WebCore::toExecutionContext(isolate->GetCurrentContext()));
v8::Handle<v8::Object> obj = info.This();
@@ -1039,7 +1029,7 @@ blink::WebFrame* CefV8ContextImpl::GetWebFrame() {
CEF_REQUIRE_RT();
v8::HandleScope handle_scope(handle_->isolate());
v8::Context::Scope context_scope(GetV8Context());
return blink::WebFrame::frameForCurrentContext();
return blink::WebLocalFrame::frameForCurrentContext();
}

View File

@@ -12,7 +12,6 @@
<include name="IDR_CEF_DEVTOOLS_DISCOVERY_PAGE" file="devtools_discovery_page.html" type="BINDATA" />
<include name="IDR_CEF_CREDITS_HTML" file="${about_credits_file}" use_base_dir="false" type="BINDATA" />
<include name="IDR_CEF_CREDITS_JS" file="..\..\..\chrome\browser\resources\about_credits.js" type="BINDATA" />
<include name="IDR_CEF_CREDITS_SWIFTSHADER_JPG" file="..\..\..\chrome\browser\resources\swiftshader.jpg" type="BINDATA" />
<include name="IDR_CEF_LICENSE_TXT" file="..\..\LICENSE.txt" type="BINDATA" />
<include name="IDR_CEF_VERSION_HTML" file="about_version.html" type="BINDATA" />
<include name="IDR_PRINT_PREVIEW_PAGE" file="print_preview_page_stub.html" type="BINDATA" />