diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index b4d4942fd..a47728fb7 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -17,5 +17,5 @@ { 'chromium_url': 'http://src.chromium.org/svn/trunk/src', - 'chromium_revision': '231322', + 'chromium_revision': '233896', } diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 3f1a407d4..0f7b36c6a 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -485,12 +485,6 @@ typedef struct _cef_browser_settings_t { /// cef_state_t tab_to_links; - /// - // Controls whether style sheets can be used. Also configurable using the - // "disable-author-and-user-styles" command-line switch. - /// - cef_state_t author_and_user_styles; - /// // Controls whether local storage can be used. Also configurable using the // "disable-local-storage" command-line switch. diff --git a/include/internal/cef_types_wrappers.h b/include/internal/cef_types_wrappers.h index a13f08b96..8c201faf7 100644 --- a/include/internal/cef_types_wrappers.h +++ b/include/internal/cef_types_wrappers.h @@ -449,7 +449,6 @@ struct CefBrowserSettingsTraits { src->image_shrink_standalone_to_fit; target->text_area_resize = src->text_area_resize; target->tab_to_links = src->tab_to_links; - target->author_and_user_styles = src->author_and_user_styles; target->local_storage = src->local_storage; target->databases= src->databases; target->application_cache = src->application_cache; diff --git a/libcef/browser/browser_context_impl.cc b/libcef/browser/browser_context_impl.cc index d31d04092..c0fa1e29d 100644 --- a/libcef/browser/browser_context_impl.cc +++ b/libcef/browser/browser_context_impl.cc @@ -253,12 +253,20 @@ net::URLRequestContextGetter* void CefBrowserContextImpl::RequestMIDISysExPermission( int render_process_id, int render_view_id, + int bridge_id, const GURL& requesting_frame, const MIDISysExPermissionCallback& callback) { // TODO(CEF): Implement Web MIDI API permission handling. callback.Run(false); } +void CefBrowserContextImpl::CancelMIDISysExPermissionRequest( + int render_process_id, + int render_view_id, + int bridge_id, + const GURL& requesting_frame) { +} + content::ResourceContext* CefBrowserContextImpl::GetResourceContext() { return resource_context_.get(); } diff --git a/libcef/browser/browser_context_impl.h b/libcef/browser/browser_context_impl.h index cf5d02992..e03592baf 100644 --- a/libcef/browser/browser_context_impl.h +++ b/libcef/browser/browser_context_impl.h @@ -42,8 +42,14 @@ class CefBrowserContextImpl : public CefBrowserContext { virtual void RequestMIDISysExPermission( int render_process_id, int render_view_id, + int bridge_id, const GURL& requesting_frame, const MIDISysExPermissionCallback& callback) OVERRIDE; + virtual void CancelMIDISysExPermissionRequest( + int render_process_id, + int render_view_id, + int bridge_id, + const GURL& requesting_frame) OVERRIDE; virtual content::ResourceContext* GetResourceContext() OVERRIDE; virtual content::GeolocationPermissionContext* GetGeolocationPermissionContext() OVERRIDE; diff --git a/libcef/browser/browser_context_proxy.cc b/libcef/browser/browser_context_proxy.cc index d15d9b507..2c9df8942 100644 --- a/libcef/browser/browser_context_proxy.cc +++ b/libcef/browser/browser_context_proxy.cc @@ -115,12 +115,20 @@ net::URLRequestContextGetter* void CefBrowserContextProxy::RequestMIDISysExPermission( int render_process_id, int render_view_id, + int bridge_id, const GURL& requesting_frame, const MIDISysExPermissionCallback& callback) { // TODO(CEF): Implement Web MIDI API permission handling. callback.Run(false); } +void CefBrowserContextProxy::CancelMIDISysExPermissionRequest( + int render_process_id, + int render_view_id, + int bridge_id, + const GURL& requesting_frame) { +} + content::ResourceContext* CefBrowserContextProxy::GetResourceContext() { return resource_context_.get(); } diff --git a/libcef/browser/browser_context_proxy.h b/libcef/browser/browser_context_proxy.h index a834a8f88..7887b52eb 100644 --- a/libcef/browser/browser_context_proxy.h +++ b/libcef/browser/browser_context_proxy.h @@ -50,8 +50,14 @@ class CefBrowserContextProxy : public CefBrowserContext { virtual void RequestMIDISysExPermission( int render_process_id, int render_view_id, + int bridge_id, const GURL& requesting_frame, const MIDISysExPermissionCallback& callback) OVERRIDE; + virtual void CancelMIDISysExPermissionRequest( + int render_process_id, + int render_view_id, + int bridge_id, + const GURL& requesting_frame) OVERRIDE; virtual content::ResourceContext* GetResourceContext() OVERRIDE; virtual content::GeolocationPermissionContext* GetGeolocationPermissionContext() OVERRIDE; diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 0f8d538e8..f58a957f9 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -107,16 +107,16 @@ void ShowDevToolsWithHelper(ShowDevToolsHelper* helper) { bool GetCefKeyEvent(const content::NativeWebKeyboardEvent& event, CefKeyEvent& cef_event) { switch (event.type) { - case WebKit::WebKeyboardEvent::RawKeyDown: + case blink::WebKeyboardEvent::RawKeyDown: cef_event.type = KEYEVENT_RAWKEYDOWN; break; - case WebKit::WebKeyboardEvent::KeyDown: + case blink::WebKeyboardEvent::KeyDown: cef_event.type = KEYEVENT_KEYDOWN; break; - case WebKit::WebKeyboardEvent::KeyUp: + case blink::WebKeyboardEvent::KeyUp: cef_event.type = KEYEVENT_KEYUP; break; - case WebKit::WebKeyboardEvent::Char: + case blink::WebKeyboardEvent::Char: cef_event.type = KEYEVENT_CHAR; break; default: @@ -124,15 +124,15 @@ bool GetCefKeyEvent(const content::NativeWebKeyboardEvent& event, } cef_event.modifiers = 0; - if (event.modifiers & WebKit::WebKeyboardEvent::ShiftKey) + if (event.modifiers & blink::WebKeyboardEvent::ShiftKey) cef_event.modifiers |= EVENTFLAG_SHIFT_DOWN; - if (event.modifiers & WebKit::WebKeyboardEvent::ControlKey) + if (event.modifiers & blink::WebKeyboardEvent::ControlKey) cef_event.modifiers |= EVENTFLAG_CONTROL_DOWN; - if (event.modifiers & WebKit::WebKeyboardEvent::AltKey) + if (event.modifiers & blink::WebKeyboardEvent::AltKey) cef_event.modifiers |= EVENTFLAG_ALT_DOWN; - if (event.modifiers & WebKit::WebKeyboardEvent::MetaKey) + if (event.modifiers & blink::WebKeyboardEvent::MetaKey) cef_event.modifiers |= EVENTFLAG_COMMAND_DOWN; - if (event.modifiers & WebKit::WebKeyboardEvent::IsKeyPad) + if (event.modifiers & blink::WebKeyboardEvent::IsKeyPad) cef_event.modifiers |= EVENTFLAG_IS_KEY_PAD; cef_event.windows_key_code = event.windowsKeyCode; @@ -679,7 +679,7 @@ void CefBrowserHostImpl::Find(int identifier, const CefString& searchText, if (!web_contents_) return; - WebKit::WebFindOptions options; + blink::WebFindOptions options; options.forward = forward; options.matchCase = matchCase; options.findNext = findNext; @@ -891,7 +891,7 @@ void CefBrowserHostImpl::SendMouseClickEvent(const CefMouseEvent& event, return; } - WebKit::WebMouseEvent web_event; + blink::WebMouseEvent web_event; PlatformTranslateClickEvent(web_event, event, type, mouseUp, clickCount); SendMouseEvent(web_event); @@ -906,7 +906,7 @@ void CefBrowserHostImpl::SendMouseMoveEvent(const CefMouseEvent& event, return; } - WebKit::WebMouseEvent web_event; + blink::WebMouseEvent web_event; PlatformTranslateMoveEvent(web_event, event, mouseLeave); SendMouseEvent(web_event); @@ -921,7 +921,7 @@ void CefBrowserHostImpl::SendMouseWheelEvent(const CefMouseEvent& event, return; } - WebKit::WebMouseWheelEvent web_event; + blink::WebMouseWheelEvent web_event; PlatformTranslateWheelEvent(web_event, event, deltaX, deltaY); if (!IsWindowRenderingDisabled()) { @@ -945,33 +945,33 @@ int CefBrowserHostImpl::TranslateModifiers(uint32 cef_modifiers) { int webkit_modifiers = 0; // Set modifiers based on key state. if (cef_modifiers & EVENTFLAG_SHIFT_DOWN) - webkit_modifiers |= WebKit::WebInputEvent::ShiftKey; + webkit_modifiers |= blink::WebInputEvent::ShiftKey; if (cef_modifiers & EVENTFLAG_CONTROL_DOWN) - webkit_modifiers |= WebKit::WebInputEvent::ControlKey; + webkit_modifiers |= blink::WebInputEvent::ControlKey; if (cef_modifiers & EVENTFLAG_ALT_DOWN) - webkit_modifiers |= WebKit::WebInputEvent::AltKey; + webkit_modifiers |= blink::WebInputEvent::AltKey; if (cef_modifiers & EVENTFLAG_COMMAND_DOWN) - webkit_modifiers |= WebKit::WebInputEvent::MetaKey; + webkit_modifiers |= blink::WebInputEvent::MetaKey; if (cef_modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) - webkit_modifiers |= WebKit::WebInputEvent::LeftButtonDown; + webkit_modifiers |= blink::WebInputEvent::LeftButtonDown; if (cef_modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON) - webkit_modifiers |= WebKit::WebInputEvent::MiddleButtonDown; + webkit_modifiers |= blink::WebInputEvent::MiddleButtonDown; if (cef_modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON) - webkit_modifiers |= WebKit::WebInputEvent::RightButtonDown; + webkit_modifiers |= blink::WebInputEvent::RightButtonDown; if (cef_modifiers & EVENTFLAG_CAPS_LOCK_ON) - webkit_modifiers |= WebKit::WebInputEvent::CapsLockOn; + webkit_modifiers |= blink::WebInputEvent::CapsLockOn; if (cef_modifiers & EVENTFLAG_NUM_LOCK_ON) - webkit_modifiers |= WebKit::WebInputEvent::NumLockOn; + webkit_modifiers |= blink::WebInputEvent::NumLockOn; if (cef_modifiers & EVENTFLAG_IS_LEFT) - webkit_modifiers |= WebKit::WebInputEvent::IsLeft; + webkit_modifiers |= blink::WebInputEvent::IsLeft; if (cef_modifiers & EVENTFLAG_IS_RIGHT) - webkit_modifiers |= WebKit::WebInputEvent::IsRight; + webkit_modifiers |= blink::WebInputEvent::IsRight; if (cef_modifiers & EVENTFLAG_IS_KEY_PAD) - webkit_modifiers |= WebKit::WebInputEvent::IsKeyPad; + webkit_modifiers |= blink::WebInputEvent::IsKeyPad; return webkit_modifiers; } -void CefBrowserHostImpl::SendMouseEvent(const WebKit::WebMouseEvent& event) { +void CefBrowserHostImpl::SendMouseEvent(const blink::WebMouseEvent& event) { if (!IsWindowRenderingDisabled()) { content::RenderWidgetHost* widget = web_contents()->GetRenderViewHost(); if (widget) @@ -1772,7 +1772,7 @@ void CefBrowserHostImpl::HandleKeyboardEvent( bool CefBrowserHostImpl::CanDragEnter( content::WebContents* source, const content::DropData& data, - WebKit::WebDragOperationsMask mask) { + blink::WebDragOperationsMask mask) { CefRefPtr handler = client_->GetDragHandler(); if (handler.get()) { CefRefPtr drag_data(new CefDragDataImpl(data)); diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 71b83e4bd..690943f1f 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -34,7 +34,7 @@ namespace content { struct NativeWebKeyboardEvent; } -namespace WebKit { +namespace blink { class WebMouseEvent; class WebMouseWheelEvent; class WebInputEvent; @@ -321,7 +321,7 @@ class CefBrowserHostImpl : public CefBrowserHost, virtual bool CanDragEnter( content::WebContents* source, const content::DropData& data, - WebKit::WebDragOperationsMask operations_allowed) OVERRIDE; + blink::WebDragOperationsMask operations_allowed) OVERRIDE; virtual bool ShouldCreateWebContents( content::WebContents* web_contents, int route_id, @@ -453,21 +453,21 @@ class CefBrowserHostImpl : public CefBrowserHost, void PlatformTranslateKeyEvent(content::NativeWebKeyboardEvent& native_event, const CefKeyEvent& key_event); - void PlatformTranslateClickEvent(WebKit::WebMouseEvent& web_event, + void PlatformTranslateClickEvent(blink::WebMouseEvent& web_event, const CefMouseEvent& mouse_event, CefBrowserHost::MouseButtonType type, bool mouseUp, int clickCount); - void PlatformTranslateMoveEvent(WebKit::WebMouseEvent& web_event, + void PlatformTranslateMoveEvent(blink::WebMouseEvent& web_event, const CefMouseEvent& mouse_event, bool mouseLeave); - void PlatformTranslateWheelEvent(WebKit::WebMouseWheelEvent& web_event, + void PlatformTranslateWheelEvent(blink::WebMouseWheelEvent& web_event, const CefMouseEvent& mouse_event, int deltaX, int deltaY); - void PlatformTranslateMouseEvent(WebKit::WebMouseEvent& web_event, + void PlatformTranslateMouseEvent(blink::WebMouseEvent& web_event, const CefMouseEvent& mouse_event); int TranslateModifiers(uint32 cefKeyStates); - void SendMouseEvent(const WebKit::WebMouseEvent& web_event); + void SendMouseEvent(const blink::WebMouseEvent& web_event); void OnAddressChange(CefRefPtr frame, const GURL& url); diff --git a/libcef/browser/browser_host_impl_gtk.cc b/libcef/browser/browser_host_impl_gtk.cc index 7af748157..65228529f 100644 --- a/libcef/browser/browser_host_impl_gtk.cc +++ b/libcef/browser/browser_host_impl_gtk.cc @@ -443,13 +443,13 @@ void CefBrowserHostImpl::PlatformTranslateKeyEvent( switch (key_event.type) { case KEYEVENT_RAWKEYDOWN: case KEYEVENT_KEYDOWN: - result.type = WebKit::WebInputEvent::RawKeyDown; + result.type = blink::WebInputEvent::RawKeyDown; break; case KEYEVENT_KEYUP: - result.type = WebKit::WebInputEvent::KeyUp; + result.type = blink::WebInputEvent::KeyUp; break; case KEYEVENT_CHAR: - result.type = WebKit::WebInputEvent::Char; + result.type = blink::WebInputEvent::Char; break; default: NOTREACHED(); @@ -457,7 +457,7 @@ void CefBrowserHostImpl::PlatformTranslateKeyEvent( } void CefBrowserHostImpl::PlatformTranslateClickEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event, MouseButtonType type, bool mouseUp, int clickCount) { @@ -465,19 +465,19 @@ void CefBrowserHostImpl::PlatformTranslateClickEvent( switch (type) { case MBT_LEFT: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonLeft; break; case MBT_MIDDLE: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonMiddle; break; case MBT_RIGHT: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonRight; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonRight; break; default: NOTREACHED(); @@ -487,37 +487,37 @@ void CefBrowserHostImpl::PlatformTranslateClickEvent( } void CefBrowserHostImpl::PlatformTranslateMoveEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event, bool mouseLeave) { PlatformTranslateMouseEvent(result, mouse_event); if (!mouseLeave) { - result.type = WebKit::WebInputEvent::MouseMove; + result.type = blink::WebInputEvent::MouseMove; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.button = blink::WebMouseEvent::ButtonLeft; else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.button = blink::WebMouseEvent::ButtonMiddle; else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonRight; + result.button = blink::WebMouseEvent::ButtonRight; else - result.button = WebKit::WebMouseEvent::ButtonNone; + result.button = blink::WebMouseEvent::ButtonNone; } else { - result.type = WebKit::WebInputEvent::MouseLeave; - result.button = WebKit::WebMouseEvent::ButtonNone; + result.type = blink::WebInputEvent::MouseLeave; + result.button = blink::WebMouseEvent::ButtonNone; } result.clickCount = 0; } void CefBrowserHostImpl::PlatformTranslateWheelEvent( - WebKit::WebMouseWheelEvent& result, + blink::WebMouseWheelEvent& result, const CefMouseEvent& mouse_event, int deltaX, int deltaY) { - result = WebKit::WebMouseWheelEvent(); + result = blink::WebMouseWheelEvent(); PlatformTranslateMouseEvent(result, mouse_event); - result.type = WebKit::WebInputEvent::MouseWheel; + result.type = blink::WebInputEvent::MouseWheel; static const double scrollbarPixelsPerGtkTick = 40.0; result.deltaX = deltaX; @@ -528,21 +528,21 @@ void CefBrowserHostImpl::PlatformTranslateWheelEvent( // Unless the phase and momentumPhase are passed in as parameters to this // function, there is no way to know them - result.phase = WebKit::WebMouseWheelEvent::PhaseNone; - result.momentumPhase = WebKit::WebMouseWheelEvent::PhaseNone; + result.phase = blink::WebMouseWheelEvent::PhaseNone; + result.momentumPhase = blink::WebMouseWheelEvent::PhaseNone; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.button = blink::WebMouseEvent::ButtonLeft; else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.button = blink::WebMouseEvent::ButtonMiddle; else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonRight; + result.button = blink::WebMouseEvent::ButtonRight; else - result.button = WebKit::WebMouseEvent::ButtonNone; + result.button = blink::WebMouseEvent::ButtonNone; } void CefBrowserHostImpl::PlatformTranslateMouseEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event) { // position result.x = mouse_event.x; diff --git a/libcef/browser/browser_host_impl_mac.mm b/libcef/browser/browser_host_impl_mac.mm index a766c1620..d67a75123 100644 --- a/libcef/browser/browser_host_impl_mac.mm +++ b/libcef/browser/browser_host_impl_mac.mm @@ -521,13 +521,13 @@ void CefBrowserHostImpl::PlatformTranslateKeyEvent( native_event = content::NativeWebKeyboardEvent(synthetic_event); if (key_event.type == KEYEVENT_CHAR) - native_event.type = WebKit::WebInputEvent::Char; + native_event.type = blink::WebInputEvent::Char; native_event.isSystemKey = key_event.is_system_key; } void CefBrowserHostImpl::PlatformTranslateClickEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event, MouseButtonType type, bool mouseUp, int clickCount) { @@ -535,19 +535,19 @@ void CefBrowserHostImpl::PlatformTranslateClickEvent( switch (type) { case MBT_LEFT: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonLeft; break; case MBT_MIDDLE: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonMiddle; break; case MBT_RIGHT: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonRight; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonRight; break; default: NOTREACHED(); @@ -557,37 +557,37 @@ void CefBrowserHostImpl::PlatformTranslateClickEvent( } void CefBrowserHostImpl::PlatformTranslateMoveEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event, bool mouseLeave) { PlatformTranslateMouseEvent(result, mouse_event); if (!mouseLeave) { - result.type = WebKit::WebInputEvent::MouseMove; + result.type = blink::WebInputEvent::MouseMove; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.button = blink::WebMouseEvent::ButtonLeft; else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.button = blink::WebMouseEvent::ButtonMiddle; else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonRight; + result.button = blink::WebMouseEvent::ButtonRight; else - result.button = WebKit::WebMouseEvent::ButtonNone; + result.button = blink::WebMouseEvent::ButtonNone; } else { - result.type = WebKit::WebInputEvent::MouseLeave; - result.button = WebKit::WebMouseEvent::ButtonNone; + result.type = blink::WebInputEvent::MouseLeave; + result.button = blink::WebMouseEvent::ButtonNone; } result.clickCount = 0; } void CefBrowserHostImpl::PlatformTranslateWheelEvent( - WebKit::WebMouseWheelEvent& result, + blink::WebMouseWheelEvent& result, const CefMouseEvent& mouse_event, int deltaX, int deltaY) { - result = WebKit::WebMouseWheelEvent(); + result = blink::WebMouseWheelEvent(); PlatformTranslateMouseEvent(result, mouse_event); - result.type = WebKit::WebInputEvent::MouseWheel; + result.type = blink::WebInputEvent::MouseWheel; static const double scrollbarPixelsPerCocoaTick = 40.0; result.deltaX = deltaX; @@ -598,21 +598,21 @@ void CefBrowserHostImpl::PlatformTranslateWheelEvent( // Unless the phase and momentumPhase are passed in as parameters to this // function, there is no way to know them - result.phase = WebKit::WebMouseWheelEvent::PhaseNone; - result.momentumPhase = WebKit::WebMouseWheelEvent::PhaseNone; + result.phase = blink::WebMouseWheelEvent::PhaseNone; + result.momentumPhase = blink::WebMouseWheelEvent::PhaseNone; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.button = blink::WebMouseEvent::ButtonLeft; else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.button = blink::WebMouseEvent::ButtonMiddle; else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonRight; + result.button = blink::WebMouseEvent::ButtonRight; else - result.button = WebKit::WebMouseEvent::ButtonNone; + result.button = blink::WebMouseEvent::ButtonNone; } void CefBrowserHostImpl::PlatformTranslateMouseEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event) { // position result.x = mouse_event.x; diff --git a/libcef/browser/browser_host_impl_win.cc b/libcef/browser/browser_host_impl_win.cc index b8d5fa0a5..089b598ee 100644 --- a/libcef/browser/browser_host_impl_win.cc +++ b/libcef/browser/browser_host_impl_win.cc @@ -695,31 +695,31 @@ void CefBrowserHostImpl::PlatformTranslateKeyEvent( switch (key_event.type) { case KEYEVENT_RAWKEYDOWN: case KEYEVENT_KEYDOWN: - result.type = WebKit::WebInputEvent::RawKeyDown; + result.type = blink::WebInputEvent::RawKeyDown; break; case KEYEVENT_KEYUP: - result.type = WebKit::WebInputEvent::KeyUp; + result.type = blink::WebInputEvent::KeyUp; break; case KEYEVENT_CHAR: - result.type = WebKit::WebInputEvent::Char; + result.type = blink::WebInputEvent::Char; break; default: NOTREACHED(); } - if (result.type == WebKit::WebInputEvent::Char || - result.type == WebKit::WebInputEvent::RawKeyDown) { + if (result.type == blink::WebInputEvent::Char || + result.type == blink::WebInputEvent::RawKeyDown) { result.text[0] = result.windowsKeyCode; result.unmodifiedText[0] = result.windowsKeyCode; } - if (result.type != WebKit::WebInputEvent::Char) + if (result.type != blink::WebInputEvent::Char) result.setKeyIdentifierFromWindowsKeyCode(); result.modifiers |= TranslateModifiers(key_event.modifiers); } void CefBrowserHostImpl::PlatformTranslateClickEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event, CefBrowserHost::MouseButtonType type, bool mouseUp, int clickCount) { @@ -727,19 +727,19 @@ void CefBrowserHostImpl::PlatformTranslateClickEvent( switch (type) { case MBT_LEFT: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonLeft; break; case MBT_MIDDLE: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonMiddle; break; case MBT_RIGHT: - result.type = mouseUp ? WebKit::WebInputEvent::MouseUp : - WebKit::WebInputEvent::MouseDown; - result.button = WebKit::WebMouseEvent::ButtonRight; + result.type = mouseUp ? blink::WebInputEvent::MouseUp : + blink::WebInputEvent::MouseDown; + result.button = blink::WebMouseEvent::ButtonRight; break; default: NOTREACHED(); @@ -749,37 +749,37 @@ void CefBrowserHostImpl::PlatformTranslateClickEvent( } void CefBrowserHostImpl::PlatformTranslateMoveEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event, bool mouseLeave) { PlatformTranslateMouseEvent(result, mouse_event); if (!mouseLeave) { - result.type = WebKit::WebInputEvent::MouseMove; + result.type = blink::WebInputEvent::MouseMove; if (mouse_event.modifiers & EVENTFLAG_LEFT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonLeft; + result.button = blink::WebMouseEvent::ButtonLeft; else if (mouse_event.modifiers & EVENTFLAG_MIDDLE_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonMiddle; + result.button = blink::WebMouseEvent::ButtonMiddle; else if (mouse_event.modifiers & EVENTFLAG_RIGHT_MOUSE_BUTTON) - result.button = WebKit::WebMouseEvent::ButtonRight; + result.button = blink::WebMouseEvent::ButtonRight; else - result.button = WebKit::WebMouseEvent::ButtonNone; + result.button = blink::WebMouseEvent::ButtonNone; } else { - result.type = WebKit::WebInputEvent::MouseLeave; - result.button = WebKit::WebMouseEvent::ButtonNone; + result.type = blink::WebInputEvent::MouseLeave; + result.button = blink::WebMouseEvent::ButtonNone; } result.clickCount = 0; } void CefBrowserHostImpl::PlatformTranslateWheelEvent( - WebKit::WebMouseWheelEvent& result, + blink::WebMouseWheelEvent& result, const CefMouseEvent& mouse_event, int deltaX, int deltaY) { PlatformTranslateMouseEvent(result, mouse_event); - result.type = WebKit::WebInputEvent::MouseWheel; - result.button = WebKit::WebMouseEvent::ButtonNone; + result.type = blink::WebInputEvent::MouseWheel; + result.button = blink::WebMouseEvent::ButtonNone; float wheelDelta; bool horizontalScroll = false; @@ -818,7 +818,7 @@ void CefBrowserHostImpl::PlatformTranslateWheelEvent( } void CefBrowserHostImpl::PlatformTranslateMouseEvent( - WebKit::WebMouseEvent& result, + blink::WebMouseEvent& result, const CefMouseEvent& mouse_event) { // position result.x = mouse_event.x; diff --git a/libcef/browser/browser_settings.cc b/libcef/browser/browser_settings.cc index 7faa22e3b..ecea65db4 100644 --- a/libcef/browser/browser_settings.cc +++ b/libcef/browser/browser_settings.cc @@ -49,8 +49,6 @@ void SetDefaults(WebPreferences& web) { !command_line.HasSwitch(switches::kDisableTextAreaResize); web.tabs_to_links = !command_line.HasSwitch(switches::kDisableTabToLinks); - web.author_and_user_styles_enabled = - !command_line.HasSwitch(switches::kDisableAuthorAndUserStyles); } // Helper macro for setting a WebPreferences variable based on the value of a @@ -131,7 +129,6 @@ void BrowserToWebSettings(const CefBrowserSettings& cef, WebPreferences& web) { web.shrinks_standalone_images_to_fit); SET_STATE(cef.text_area_resize, web.text_areas_are_resizable); SET_STATE(cef.tab_to_links, web.tabs_to_links); - SET_STATE(cef.author_and_user_styles, web.author_and_user_styles_enabled); SET_STATE(cef.local_storage, web.local_storage_enabled); SET_STATE(cef.databases, web.databases_enabled); SET_STATE(cef.application_cache, web.application_cache_enabled); diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index e8ad6f6f4..3c649de43 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -247,7 +247,7 @@ class CefPluginServiceFilter : public content::PluginServiceFilter { } }; -void TranslatePopupFeatures(const WebKit::WebWindowFeatures& webKitFeatures, +void TranslatePopupFeatures(const blink::WebWindowFeatures& webKitFeatures, CefPopupFeatures& features) { features.x = static_cast(webKitFeatures.x); features.xSet = webKitFeatures.xSet; @@ -633,7 +633,7 @@ bool CefContentBrowserClient::CanCreateWindow( const GURL& target_url, const content::Referrer& referrer, WindowOpenDisposition disposition, - const WebKit::WebWindowFeatures& features, + const blink::WebWindowFeatures& features, bool user_gesture, bool opener_suppressed, content::ResourceContext* context, diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 03c979592..e9cabda65 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -116,7 +116,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { const GURL& target_url, const content::Referrer& referrer, WindowOpenDisposition disposition, - const WebKit::WebWindowFeatures& features, + const blink::WebWindowFeatures& features, bool user_gesture, bool opener_suppressed, content::ResourceContext* context, diff --git a/libcef/browser/context_menu_params_impl.cc b/libcef/browser/context_menu_params_impl.cc index e5e82a5ef..968f410d8 100644 --- a/libcef/browser/context_menu_params_impl.cc +++ b/libcef/browser/context_menu_params_impl.cc @@ -35,7 +35,7 @@ CefContextMenuParamsImpl::TypeFlags CefContextMenuParamsImpl::GetTypeFlags() { type_flags |= CM_TYPEFLAG_FRAME; if (!params.link_url.is_empty()) type_flags |= CM_TYPEFLAG_LINK; - if (params.media_type != WebKit::WebContextMenuData::MediaTypeNone) + if (params.media_type != blink::WebContextMenuData::MediaTypeNone) type_flags |= CM_TYPEFLAG_MEDIA; if (!params.selection_text.empty()) type_flags |= CM_TYPEFLAG_SELECTION; diff --git a/libcef/browser/printing/printing_message_filter.cc b/libcef/browser/printing/printing_message_filter.cc index f34aa6875..4fbdd9545 100644 --- a/libcef/browser/printing/printing_message_filter.cc +++ b/libcef/browser/printing/printing_message_filter.cc @@ -64,19 +64,19 @@ void RenderParamsFromPrintSettings(const printing::PrintSettings& settings, params->margin_left = settings.page_setup_device_units().content_area().x(); params->dpi = settings.dpi(); // Currently hardcoded at 1.25. See PrintSettings' constructor. - params->min_shrink = settings.min_shrink; + params->min_shrink = settings.min_shrink(); // Currently hardcoded at 2.0. See PrintSettings' constructor. - params->max_shrink = settings.max_shrink; + params->max_shrink = settings.max_shrink(); // Currently hardcoded at 72dpi. See PrintSettings' constructor. - params->desired_dpi = settings.desired_dpi; + params->desired_dpi = settings.desired_dpi(); // Always use an invalid cookie. params->document_cookie = 0; - params->selection_only = settings.selection_only; + params->selection_only = settings.selection_only(); params->supports_alpha_blend = settings.supports_alpha_blend(); - params->should_print_backgrounds = settings.should_print_backgrounds; - params->display_header_footer = settings.display_header_footer; - params->title = settings.title; - params->url = settings.url; + params->should_print_backgrounds = settings.should_print_backgrounds(); + params->display_header_footer = settings.display_header_footer(); + params->title = settings.title(); + params->url = settings.url(); } } // namespace @@ -375,7 +375,7 @@ void PrintingMessageFilter::OnScriptedPrintReply( RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params); params.params.document_cookie = printer_query->cookie(); params.pages = - printing::PageRange::GetPages(printer_query->settings().ranges); + printing::PageRange::GetPages(printer_query->settings().ranges()); } PrintHostMsg_ScriptedPrint::WriteReplyParams(reply_msg, params); Send(reply_msg); @@ -432,7 +432,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( RenderParamsFromPrintSettings(printer_query->settings(), ¶ms.params); params.params.document_cookie = printer_query->cookie(); params.pages = - printing::PageRange::GetPages(printer_query->settings().ranges); + printing::PageRange::GetPages(printer_query->settings().ranges()); } PrintHostMsg_UpdatePrintSettings::WriteReplyParams(reply_msg, params); Send(reply_msg); diff --git a/libcef/browser/render_widget_host_view_osr.cc b/libcef/browser/render_widget_host_view_osr.cc index 68cc8c9dc..56c6b34c1 100644 --- a/libcef/browser/render_widget_host_view_osr.cc +++ b/libcef/browser/render_widget_host_view_osr.cc @@ -19,15 +19,15 @@ namespace { const float kDefaultScaleFactor = 1.0; -static WebKit::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) { - WebKit::WebScreenInfo webScreenInfo; +static blink::WebScreenInfo webScreenInfoFrom(const CefScreenInfo& src) { + blink::WebScreenInfo webScreenInfo; webScreenInfo.deviceScaleFactor = src.device_scale_factor; webScreenInfo.depth = src.depth; webScreenInfo.depthPerComponent = src.depth_per_component; webScreenInfo.isMonochrome = src.is_monochrome; - webScreenInfo.rect = WebKit::WebRect(src.rect.x, src.rect.y, + webScreenInfo.rect = blink::WebRect(src.rect.x, src.rect.y, src.rect.width, src.rect.height); - webScreenInfo.availableRect = WebKit::WebRect(src.available_rect.x, + webScreenInfo.availableRect = blink::WebRect(src.available_rect.x, src.available_rect.y, src.available_rect.width, src.available_rect.height); @@ -250,7 +250,7 @@ void CefRenderWidgetHostViewOSR::WillWmDestroy() { } #endif -void CefRenderWidgetHostViewOSR::GetScreenInfo(WebKit::WebScreenInfo* results) { +void CefRenderWidgetHostViewOSR::GetScreenInfo(blink::WebScreenInfo* results) { if (!browser_impl_.get()) return; @@ -358,6 +358,10 @@ bool CefRenderWidgetHostViewOSR::CanCopyToVideoFrame() const { void CefRenderWidgetHostViewOSR::OnAcceleratedCompositingStateChange() { } +void CefRenderWidgetHostViewOSR::AcceleratedSurfaceInitialized( + int host_id, int route_id) { +} + void CefRenderWidgetHostViewOSR::SetHasHorizontalScrollbar( bool has_horizontal_scrollbar) { } @@ -576,11 +580,11 @@ void CefRenderWidgetHostViewOSR::SendKeyEvent( } void CefRenderWidgetHostViewOSR::SendMouseEvent( - const WebKit::WebMouseEvent& event) { + const blink::WebMouseEvent& event) { TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::SendMouseEvent"); if (!IsPopupWidget() && popup_host_view_) { if (popup_host_view_->popup_position_.Contains(event.x, event.y)) { - WebKit::WebMouseEvent popup_event(event); + blink::WebMouseEvent popup_event(event); popup_event.x -= popup_host_view_->popup_position_.x(); popup_event.y -= popup_host_view_->popup_position_.y(); popup_event.windowX = popup_event.x; @@ -596,11 +600,11 @@ void CefRenderWidgetHostViewOSR::SendMouseEvent( } void CefRenderWidgetHostViewOSR::SendMouseWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { TRACE_EVENT0("libcef", "CefRenderWidgetHostViewOSR::SendMouseWheelEvent"); if (!IsPopupWidget() && popup_host_view_) { if (popup_host_view_->popup_position_.Contains(event.x, event.y)) { - WebKit::WebMouseWheelEvent popup_event(event); + blink::WebMouseWheelEvent popup_event(event); popup_event.x -= popup_host_view_->popup_position_.x(); popup_event.y -= popup_host_view_->popup_position_.y(); popup_event.windowX = popup_event.x; diff --git a/libcef/browser/render_widget_host_view_osr.h b/libcef/browser/render_widget_host_view_osr.h index 1c0718b02..6bc088463 100644 --- a/libcef/browser/render_widget_host_view_osr.h +++ b/libcef/browser/render_widget_host_view_osr.h @@ -137,7 +137,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase { #if defined(OS_WIN) && !defined(USE_AURA) virtual void WillWmDestroy() OVERRIDE; #endif - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual void OnAccessibilityEvents( const std::vector& params) @@ -159,6 +159,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase { const base::Callback& callback) OVERRIDE; virtual bool CanCopyToVideoFrame() const OVERRIDE; virtual void OnAcceleratedCompositingStateChange() OVERRIDE; + virtual void AcceleratedSurfaceInitialized( + int host_id, int route_id) OVERRIDE; virtual void SetHasHorizontalScrollbar( bool has_horizontal_scrollbar) OVERRIDE; virtual void SetScrollOffsetPinning( @@ -191,8 +193,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase { virtual void SetBackground(const SkBitmap& background) OVERRIDE; void SendKeyEvent(const content::NativeWebKeyboardEvent& event); - void SendMouseEvent(const WebKit::WebMouseEvent& event); - void SendMouseWheelEvent(const WebKit::WebMouseWheelEvent& event); + void SendMouseEvent(const blink::WebMouseEvent& event); + void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); void Invalidate(const gfx::Rect& rect, CefBrowserHost::PaintElementType type); @@ -215,7 +217,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase { void set_parent_host_view(CefRenderWidgetHostViewOSR* parent_view); bool IsPopupWidget() const { - return popup_type_ != WebKit::WebPopupTypeNone; + return popup_type_ != blink::WebPopupTypeNone; } private: diff --git a/libcef/browser/text_input_client_osr_mac.h b/libcef/browser/text_input_client_osr_mac.h index d487b2983..0cb87f24a 100644 --- a/libcef/browser/text_input_client_osr_mac.h +++ b/libcef/browser/text_input_client_osr_mac.h @@ -62,7 +62,7 @@ string16 markedText_; // Underline information of the |markedText_|. - std::vector underlines_; + std::vector underlines_; // Indicates if doCommandBySelector method receives any edit command when // handling a key down event. diff --git a/libcef/browser/text_input_client_osr_mac.mm b/libcef/browser/text_input_client_osr_mac.mm index b899e8237..672dfdec6 100644 --- a/libcef/browser/text_input_client_osr_mac.mm +++ b/libcef/browser/text_input_client_osr_mac.mm @@ -13,7 +13,7 @@ namespace { // TODO(suzhe): Upstream this function. -WebKit::WebColor WebColorFromNSColor(NSColor *color) { +blink::WebColor WebColorFromNSColor(NSColor *color) { CGFloat r, g, b, a; [color getRed:&r green:&g blue:&b alpha:&a]; @@ -27,7 +27,7 @@ WebKit::WebColor WebColorFromNSColor(NSColor *color) { // Extract underline information from an attributed string. Mostly copied from // third_party/WebKit/Source/WebKit/mac/WebView/WebHTMLView.mm void ExtractUnderlines(NSAttributedString* string, - std::vector* underlines) { + std::vector* underlines) { int length = [[string string] length]; int i = 0; while (i < length) { @@ -37,13 +37,13 @@ void ExtractUnderlines(NSAttributedString* string, inRange:NSMakeRange(i, length - i)]; NSNumber *style = [attrs objectForKey: NSUnderlineStyleAttributeName]; if (style) { - WebKit::WebColor color = SK_ColorBLACK; + blink::WebColor color = SK_ColorBLACK; if (NSColor *colorAttr = [attrs objectForKey:NSUnderlineColorAttributeName]) { color = WebColorFromNSColor( [colorAttr colorUsingColorSpaceName:NSDeviceRGBColorSpace]); } - underlines->push_back(WebKit::WebCompositionUnderline( + underlines->push_back(blink::WebCompositionUnderline( range.location, NSMaxRange(range), color, [style intValue] > 1)); } i = range.location + range.length; @@ -150,7 +150,7 @@ extern "C" { ExtractUnderlines(aString, &underlines_); } else { // Use a thin black underline by default. - underlines_.push_back(WebKit::WebCompositionUnderline(0, length, + underlines_.push_back(blink::WebCompositionUnderline(0, length, SK_ColorBLACK, false)); } @@ -305,7 +305,7 @@ extern "C" { textToBeInserted_.length() <= 1) { content::NativeWebKeyboardEvent event(keyEvent); if (textToBeInserted_.length() == 1) { - event.type = WebKit::WebInputEvent::Type::Char; + event.type = blink::WebInputEvent::Type::Char; event.text[0] = textToBeInserted_[0]; event.text[1] = 0; } diff --git a/libcef/browser/web_contents_view_osr.cc b/libcef/browser/web_contents_view_osr.cc index f0c752248..33fd739c7 100644 --- a/libcef/browser/web_contents_view_osr.cc +++ b/libcef/browser/web_contents_view_osr.cc @@ -123,7 +123,7 @@ bool CefWebContentsViewOSR::GetAllowOverlappingViews() const { void CefWebContentsViewOSR::StartDragging( const content::DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const content::DragEventSourceInfo& event_info) { diff --git a/libcef/browser/web_contents_view_osr.h b/libcef/browser/web_contents_view_osr.h index 7f0a73e7d..252a65292 100644 --- a/libcef/browser/web_contents_view_osr.h +++ b/libcef/browser/web_contents_view_osr.h @@ -60,7 +60,7 @@ class CefWebContentsViewOSR : public content::WebContentsViewPort, // RenderViewHostDelegateView methods. virtual void StartDragging( const content::DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const content::DragEventSourceInfo& event_info) OVERRIDE; diff --git a/libcef/common/cef_messages.h b/libcef/common/cef_messages.h index 17dbc6c97..2b0c7d4b6 100644 --- a/libcef/common/cef_messages.h +++ b/libcef/common/cef_messages.h @@ -80,7 +80,7 @@ IPC_STRUCT_BEGIN(CefMsg_LoadRequest_Params) // The URL to send in the "Referer" header field. Can be empty if there is // no referrer. IPC_STRUCT_MEMBER(GURL, referrer) - // One of the WebKit::WebReferrerPolicy values. + // One of the blink::WebReferrerPolicy values. IPC_STRUCT_MEMBER(int, referrer_policy) // Identifies the frame within the RenderView that sent the request. diff --git a/libcef/common/cef_switches.cc b/libcef/common/cef_switches.cc index 80fbf74b7..d5e17ae74 100644 --- a/libcef/common/cef_switches.cc +++ b/libcef/common/cef_switches.cc @@ -77,9 +77,6 @@ const char kDisableTextAreaResize[] = "disable-text-area-resize"; // Disable using the tab key to advance focus to links. const char kDisableTabToLinks[] = "disable-tab-to-links"; -// Disable user style sheets. -const char kDisableAuthorAndUserStyles[] = "disable-author-and-user-styles"; - // Persist session cookies. const char kPersistSessionCookies[] = "persist-session-cookies"; diff --git a/libcef/common/cef_switches.h b/libcef/common/cef_switches.h index fdead7942..c53588529 100644 --- a/libcef/common/cef_switches.h +++ b/libcef/common/cef_switches.h @@ -36,7 +36,6 @@ extern const char kDisableImageLoading[]; extern const char kImageShrinkStandaloneToFit[]; extern const char kDisableTextAreaResize[]; extern const char kDisableTabToLinks[]; -extern const char kDisableAuthorAndUserStyles[]; extern const char kPersistSessionCookies[]; extern const char kEnableMediaStream[]; extern const char kEnableSpeechInput[]; diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index dd6ca6a19..4603f7f07 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -282,7 +282,7 @@ void CefRequestImpl::Get(net::URLRequest* request) { } } -void CefRequestImpl::Set(const WebKit::WebURLRequest& request) { +void CefRequestImpl::Set(const blink::WebURLRequest& request) { DCHECK(!request.isNull()); AutoLock lock_scope(this); @@ -291,7 +291,7 @@ void CefRequestImpl::Set(const WebKit::WebURLRequest& request) { url_ = request.url().spec().utf16(); method_ = request.httpMethod(); - const WebKit::WebHTTPBody& body = request.httpBody(); + const blink::WebHTTPBody& body = request.httpBody(); if (!body.isNull()) { postdata_ = new CefPostDataImpl(); static_cast(postdata_.get())->Set(body); @@ -303,7 +303,7 @@ void CefRequestImpl::Set(const WebKit::WebURLRequest& request) { GetHeaderMap(request, headermap_); flags_ = UR_FLAG_NONE; - if (request.cachePolicy() == WebKit::WebURLRequest::ReloadIgnoringCacheData) + if (request.cachePolicy() == blink::WebURLRequest::ReloadIgnoringCacheData) flags_ |= UR_FLAG_SKIP_CACHE; if (request.allowStoredCredentials()) flags_ |= UR_FLAG_ALLOW_CACHED_CREDENTIALS; @@ -322,18 +322,18 @@ void CefRequestImpl::Set(const WebKit::WebURLRequest& request) { ::ResourceType::FromTargetType(request.targetType())); } -void CefRequestImpl::Get(WebKit::WebURLRequest& request) { +void CefRequestImpl::Get(blink::WebURLRequest& request) { request.initialize(); AutoLock lock_scope(this); GURL gurl = GURL(url_.ToString()); - request.setURL(WebKit::WebURL(gurl)); + request.setURL(blink::WebURL(gurl)); std::string method(method_); - request.setHTTPMethod(WebKit::WebString::fromUTF8(method.c_str())); - request.setTargetType(WebKit::WebURLRequest::TargetIsMainFrame); + request.setHTTPMethod(blink::WebString::fromUTF8(method.c_str())); + request.setTargetType(blink::WebURLRequest::TargetIsMainFrame); - WebKit::WebHTTPBody body; + blink::WebHTTPBody body; if (postdata_.get()) { body.initialize(); static_cast(postdata_.get())->Get(body); @@ -343,8 +343,8 @@ void CefRequestImpl::Get(WebKit::WebURLRequest& request) { SetHeaderMap(headermap_, request); request.setCachePolicy((flags_ & UR_FLAG_SKIP_CACHE) ? - WebKit::WebURLRequest::ReloadIgnoringCacheData : - WebKit::WebURLRequest::UseProtocolCachePolicy); + blink::WebURLRequest::ReloadIgnoringCacheData : + blink::WebURLRequest::UseProtocolCachePolicy); #define SETBOOLFLAG(obj, flags, method, FLAG) \ obj.method((flags & (FLAG)) == (FLAG)) @@ -362,7 +362,7 @@ void CefRequestImpl::Get(WebKit::WebURLRequest& request) { if (!first_party_for_cookies_.empty()) { GURL gurl = GURL(first_party_for_cookies_.ToString()); - request.setFirstPartyForCookies(WebKit::WebURL(gurl)); + request.setFirstPartyForCookies(blink::WebURL(gurl)); } } @@ -391,14 +391,14 @@ void CefRequestImpl::GetHeaderMap(const net::HttpRequestHeaders& headers, // static -void CefRequestImpl::GetHeaderMap(const WebKit::WebURLRequest& request, +void CefRequestImpl::GetHeaderMap(const blink::WebURLRequest& request, HeaderMap& map) { - class HeaderVisitor : public WebKit::WebHTTPHeaderVisitor { + class HeaderVisitor : public blink::WebHTTPHeaderVisitor { public: explicit HeaderVisitor(HeaderMap* map) : map_(map) {} - virtual void visitHeader(const WebKit::WebString& name, - const WebKit::WebString& value) { + virtual void visitHeader(const blink::WebString& name, + const blink::WebString& value) { map_->insert(std::make_pair(string16(name), string16(value))); } @@ -412,7 +412,7 @@ void CefRequestImpl::GetHeaderMap(const WebKit::WebURLRequest& request, // static void CefRequestImpl::SetHeaderMap(const HeaderMap& map, - WebKit::WebURLRequest& request) { + blink::WebURLRequest& request) { HeaderMap::const_iterator it = map.begin(); for (; it != map.end(); ++it) request.setHTTPHeaderField(string16(it->first), string16(it->second)); @@ -547,12 +547,12 @@ net::UploadDataStream* CefPostDataImpl::Get() { return new net::UploadDataStream(element_readers.Pass(), 0); } -void CefPostDataImpl::Set(const WebKit::WebHTTPBody& data) { +void CefPostDataImpl::Set(const blink::WebHTTPBody& data) { AutoLock lock_scope(this); CHECK_READONLY_RETURN_VOID(); CefRefPtr postelem; - WebKit::WebHTTPBody::Element element; + blink::WebHTTPBody::Element element; size_t size = data.elementCount(); for (size_t i = 0; i < size; ++i) { if (data.elementAt(i, element)) { @@ -563,16 +563,16 @@ void CefPostDataImpl::Set(const WebKit::WebHTTPBody& data) { } } -void CefPostDataImpl::Get(WebKit::WebHTTPBody& data) { +void CefPostDataImpl::Get(blink::WebHTTPBody& data) { AutoLock lock_scope(this); - WebKit::WebHTTPBody::Element element; + blink::WebHTTPBody::Element element; ElementVector::iterator it = elements_.begin(); for (; it != elements_.end(); ++it) { static_cast(it->get())->Get(element); - if (element.type == WebKit::WebHTTPBody::Element::TypeData) { + if (element.type == blink::WebHTTPBody::Element::TypeData) { data.appendData(element.data); - } else if (element.type == WebKit::WebHTTPBody::Element::TypeFile) { + } else if (element.type == blink::WebHTTPBody::Element::TypeFile) { data.appendFile(element.filePath); } else { NOTREACHED(); @@ -759,29 +759,29 @@ net::UploadElementReader* CefPostDataElementImpl::Get() { } } -void CefPostDataElementImpl::Set(const WebKit::WebHTTPBody::Element& element) { +void CefPostDataElementImpl::Set(const blink::WebHTTPBody::Element& element) { AutoLock lock_scope(this); CHECK_READONLY_RETURN_VOID(); - if (element.type == WebKit::WebHTTPBody::Element::TypeData) { + if (element.type == blink::WebHTTPBody::Element::TypeData) { SetToBytes(element.data.size(), static_cast(element.data.data())); - } else if (element.type == WebKit::WebHTTPBody::Element::TypeFile) { + } else if (element.type == blink::WebHTTPBody::Element::TypeFile) { SetToFile(string16(element.filePath)); } else { NOTREACHED(); } } -void CefPostDataElementImpl::Get(WebKit::WebHTTPBody::Element& element) { +void CefPostDataElementImpl::Get(blink::WebHTTPBody::Element& element) { AutoLock lock_scope(this); if (type_ == PDE_TYPE_BYTES) { - element.type = WebKit::WebHTTPBody::Element::TypeData; + element.type = blink::WebHTTPBody::Element::TypeData; element.data.assign( static_cast(data_.bytes.bytes), data_.bytes.size); } else if (type_ == PDE_TYPE_FILE) { - element.type = WebKit::WebHTTPBody::Element::TypeFile; + element.type = blink::WebHTTPBody::Element::TypeFile; element.filePath.assign(string16(CefString(&data_.filename))); } else { NOTREACHED(); diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index 5830f69ee..8bc44c783 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -18,7 +18,7 @@ class UploadElementReader; class URLRequest; }; -namespace WebKit { +namespace blink { class WebURLRequest; } @@ -55,19 +55,19 @@ class CefRequestImpl : public CefRequest { void Get(net::URLRequest* request); // Populate this object from a WebURLRequest object. - void Set(const WebKit::WebURLRequest& request); + void Set(const blink::WebURLRequest& request); // Populate the WebURLRequest object from this object. - void Get(WebKit::WebURLRequest& request); + void Get(blink::WebURLRequest& request); void SetReadOnly(bool read_only); static void GetHeaderMap(const net::HttpRequestHeaders& headers, HeaderMap& map); - static void GetHeaderMap(const WebKit::WebURLRequest& request, + static void GetHeaderMap(const blink::WebURLRequest& request, HeaderMap& map); static void SetHeaderMap(const HeaderMap& map, - WebKit::WebURLRequest& request); + blink::WebURLRequest& request); protected: CefString url_; @@ -105,8 +105,8 @@ class CefPostDataImpl : public CefPostData { void Set(const net::UploadDataStream& data_stream); void Get(net::UploadData& data); net::UploadDataStream* Get(); - void Set(const WebKit::WebHTTPBody& data); - void Get(WebKit::WebHTTPBody& data); + void Set(const blink::WebHTTPBody& data); + void Get(blink::WebHTTPBody& data); void SetReadOnly(bool read_only); @@ -141,8 +141,8 @@ class CefPostDataElementImpl : public CefPostDataElement { void Set(const net::UploadElementReader& element_reader); void Get(net::UploadElement& element); net::UploadElementReader* Get(); - void Set(const WebKit::WebHTTPBody::Element& element); - void Get(WebKit::WebHTTPBody::Element& element); + void Set(const blink::WebHTTPBody::Element& element); + void Get(blink::WebHTTPBody::Element& element); void SetReadOnly(bool read_only); diff --git a/libcef/common/response_impl.cc b/libcef/common/response_impl.cc index 1cbd6853e..19c8a9980 100644 --- a/libcef/common/response_impl.cc +++ b/libcef/common/response_impl.cc @@ -168,25 +168,25 @@ void CefResponseImpl::SetResponseHeaders( mime_type_ = mime_type; } -void CefResponseImpl::Set(const WebKit::WebURLResponse& response) { +void CefResponseImpl::Set(const blink::WebURLResponse& response) { DCHECK(!response.isNull()); AutoLock lock_scope(this); CHECK_READONLY_RETURN_VOID(); - WebKit::WebString str; + blink::WebString str; status_code_ = response.httpStatusCode(); str = response.httpStatusText(); status_text_ = CefString(str); str = response.mimeType(); mime_type_ = CefString(str); - class HeaderVisitor : public WebKit::WebHTTPHeaderVisitor { + class HeaderVisitor : public blink::WebHTTPHeaderVisitor { public: explicit HeaderVisitor(HeaderMap* map) : map_(map) {} - virtual void visitHeader(const WebKit::WebString& name, - const WebKit::WebString& value) { + virtual void visitHeader(const blink::WebString& name, + const blink::WebString& value) { map_->insert(std::make_pair(string16(name), string16(value))); } diff --git a/libcef/common/response_impl.h b/libcef/common/response_impl.h index e14e0eecf..fd117153a 100644 --- a/libcef/common/response_impl.h +++ b/libcef/common/response_impl.h @@ -12,7 +12,7 @@ namespace net { class HttpResponseHeaders; } -namespace WebKit { +namespace blink { class WebURLResponse; } @@ -37,7 +37,7 @@ class CefResponseImpl : public CefResponse { net::HttpResponseHeaders* GetResponseHeaders(); void SetResponseHeaders(const net::HttpResponseHeaders& headers); - void Set(const WebKit::WebURLResponse& response); + void Set(const blink::WebURLResponse& response); void SetReadOnly(bool read_only); diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index f40f794e5..4be142679 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -39,17 +39,17 @@ #include "third_party/WebKit/public/web/WebView.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebFrame; -using WebKit::WebScriptSource; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebView; +using blink::WebFrame; +using blink::WebScriptSource; +using blink::WebString; +using blink::WebURL; +using blink::WebView; namespace { const int64 kInvalidFrameId = -1; -WebKit::WebString FilePathStringToWebString( +blink::WebString FilePathStringToWebString( const base::FilePath::StringType& str) { #if defined(OS_POSIX) return WideToUTF16Hack(base::SysNativeMBToWide(str)); @@ -72,7 +72,7 @@ CefRefPtr CefBrowserImpl::GetBrowserForView( // static CefRefPtr CefBrowserImpl::GetBrowserForMainFrame( - WebKit::WebFrame* frame) { + blink::WebFrame* frame) { return CefContentRendererClient::Get()->GetBrowserForMainFrame(frame); } @@ -290,7 +290,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) { WebFrame* web_frame = framePtr->web_frame(); - WebKit::WebURLRequest request(params.url); + blink::WebURLRequest request(params.url); // DidCreateDataSource checks for this value. request.setRequestorID(-1); @@ -299,8 +299,8 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) { request.setHTTPMethod(ASCIIToUTF16(params.method)); if (params.referrer.is_valid()) { - WebString referrer = WebKit::WebSecurityPolicy::generateReferrerHeader( - static_cast(params.referrer_policy), + WebString referrer = blink::WebSecurityPolicy::generateReferrerHeader( + static_cast(params.referrer_policy), params.url, WebString::fromUTF8(params.referrer.spec())); if (!referrer.isEmpty()) @@ -330,7 +330,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) { ASCIIToUTF16("application/x-www-form-urlencoded")); } - WebKit::WebHTTPBody body; + blink::WebHTTPBody body; body.initialize(); const ScopedVector& elements = @@ -340,7 +340,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) { for (; it != elements.end(); ++it) { const net::UploadElement& element = **it; if (element.type() == net::UploadElement::TYPE_BYTES) { - WebKit::WebData data; + blink::WebData data; data.assign(element.bytes(), element.bytes_length()); body.appendData(data); } else if (element.type() == net::UploadElement::TYPE_FILE) { @@ -376,7 +376,7 @@ bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process, } CefRefPtr CefBrowserImpl::GetWebFrameImpl( - WebKit::WebFrame* frame) { + blink::WebFrame* frame) { DCHECK(frame); int64 frame_id = frame->identifier(); @@ -478,14 +478,14 @@ void CefBrowserImpl::DidStopLoading() { } void CefBrowserImpl::DidFailLoad( - WebKit::WebFrame* frame, - const WebKit::WebURLError& error) { + blink::WebFrame* frame, + const blink::WebURLError& error) { OnLoadError(frame, error); OnLoadEnd(frame); } -void CefBrowserImpl::DidFinishLoad(WebKit::WebFrame* frame) { - WebKit::WebDataSource* ds = frame->dataSource(); +void CefBrowserImpl::DidFinishLoad(blink::WebFrame* frame) { + blink::WebDataSource* ds = frame->dataSource(); Send(new CefHostMsg_DidFinishLoad(routing_id(), frame->identifier(), ds->request().url(), @@ -494,18 +494,18 @@ void CefBrowserImpl::DidFinishLoad(WebKit::WebFrame* frame) { OnLoadEnd(frame); } -void CefBrowserImpl::DidStartProvisionalLoad(WebKit::WebFrame* frame) { +void CefBrowserImpl::DidStartProvisionalLoad(blink::WebFrame* frame) { // Send the frame creation notification if necessary. GetWebFrameImpl(frame); } void CefBrowserImpl::DidFailProvisionalLoad( - WebKit::WebFrame* frame, - const WebKit::WebURLError& error) { + blink::WebFrame* frame, + const blink::WebURLError& error) { OnLoadError(frame, error); } -void CefBrowserImpl::DidCommitProvisionalLoad(WebKit::WebFrame* frame, +void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation) { OnLoadStart(frame); } @@ -533,7 +533,7 @@ void CefBrowserImpl::FrameDetached(WebFrame* frame) { Send(new CefHostMsg_FrameDetached(routing_id(), frame_id)); } -void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) { +void CefBrowserImpl::FocusedNodeChanged(const blink::WebNode& node) { // Notify the handler. CefRefPtr app = CefContentClient::Get()->application(); if (app.get()) { @@ -543,9 +543,9 @@ void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) { if (node.isNull()) { handler->OnFocusedNodeChanged(this, GetFocusedFrame(), NULL); } else { - const WebKit::WebDocument& document = node.document(); + const blink::WebDocument& document = node.document(); if (!document.isNull()) { - WebKit::WebFrame* frame = document.frame(); + blink::WebFrame* frame = document.frame(); CefRefPtr documentImpl = new CefDOMDocumentImpl(this, frame); handler->OnFocusedNodeChanged(this, @@ -565,7 +565,7 @@ void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) { // Try to identify the focused frame from the node. if (!node.isNull()) { - const WebKit::WebDocument& document = node.document(); + const blink::WebDocument& document = node.document(); if (!document.isNull()) focused_frame = document.frame(); } @@ -587,9 +587,9 @@ void CefBrowserImpl::FocusedNodeChanged(const WebKit::WebNode& node) { Send(new CefHostMsg_FrameFocusChange(routing_id(), frame_id)); } -void CefBrowserImpl::DidCreateDataSource(WebKit::WebFrame* frame, - WebKit::WebDataSource* ds) { - const WebKit::WebURLRequest& request = ds->request(); +void CefBrowserImpl::DidCreateDataSource(blink::WebFrame* frame, + blink::WebDataSource* ds) { + const blink::WebURLRequest& request = ds->request(); if (request.requestorID() == -1) { // Mark the request as browser-initiated so // RenderViewImpl::decidePolicyForNavigation won't attempt to fork it. @@ -770,7 +770,7 @@ void CefBrowserImpl::OnLoadingStateChange(bool isLoading) { } } -void CefBrowserImpl::OnLoadStart(WebKit::WebFrame* frame) { +void CefBrowserImpl::OnLoadStart(blink::WebFrame* frame) { if (is_swapped_out()) return; @@ -788,7 +788,7 @@ void CefBrowserImpl::OnLoadStart(WebKit::WebFrame* frame) { } } -void CefBrowserImpl::OnLoadEnd(WebKit::WebFrame* frame) { +void CefBrowserImpl::OnLoadEnd(blink::WebFrame* frame) { if (is_swapped_out()) return; @@ -807,8 +807,8 @@ void CefBrowserImpl::OnLoadEnd(WebKit::WebFrame* frame) { } } -void CefBrowserImpl::OnLoadError(WebKit::WebFrame* frame, - const WebKit::WebURLError& error) { +void CefBrowserImpl::OnLoadError(blink::WebFrame* frame, + const blink::WebURLError& error) { if (is_swapped_out()) return; diff --git a/libcef/renderer/browser_impl.h b/libcef/renderer/browser_impl.h index 2d646a200..68daf5f9f 100644 --- a/libcef/renderer/browser_impl.h +++ b/libcef/renderer/browser_impl.h @@ -30,7 +30,7 @@ namespace base { class ListValue; } -namespace WebKit { +namespace blink { class WebFrame; } @@ -50,7 +50,7 @@ class CefBrowserImpl : public CefBrowser, static CefRefPtr GetBrowserForView(content::RenderView* view); // Returns the browser associated with the specified main WebFrame. static CefRefPtr GetBrowserForMainFrame( - WebKit::WebFrame* frame); + blink::WebFrame* frame); // CefBrowser methods. virtual CefRefPtr GetHost() OVERRIDE; @@ -92,7 +92,7 @@ class CefBrowserImpl : public CefBrowser, bool user_initiated); // Returns the matching CefFrameImpl reference or creates a new one. - CefRefPtr GetWebFrameImpl(WebKit::WebFrame* frame); + CefRefPtr GetWebFrameImpl(blink::WebFrame* frame); CefRefPtr GetWebFrameImpl(int64 frame_id); // Frame objects will be deleted immediately before the frame is closed. @@ -114,19 +114,19 @@ class CefBrowserImpl : public CefBrowser, virtual void OnDestruct() OVERRIDE; virtual void DidStartLoading() OVERRIDE; virtual void DidStopLoading() OVERRIDE; - virtual void DidFailLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error) OVERRIDE; - virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE; - virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) OVERRIDE; + virtual void DidFailLoad(blink::WebFrame* frame, + const blink::WebURLError& error) OVERRIDE; + virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE; + virtual void DidStartProvisionalLoad(blink::WebFrame* frame) OVERRIDE; virtual void DidFailProvisionalLoad( - WebKit::WebFrame* frame, - const WebKit::WebURLError& error) OVERRIDE; - virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, + blink::WebFrame* frame, + const blink::WebURLError& error) OVERRIDE; + virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation) OVERRIDE; - virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE; - virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; - virtual void DidCreateDataSource(WebKit::WebFrame* frame, - WebKit::WebDataSource* ds) OVERRIDE; + virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; + virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; + virtual void DidCreateDataSource(blink::WebFrame* frame, + blink::WebDataSource* ds) OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // RenderViewObserver::OnMessageReceived message handlers. @@ -135,9 +135,9 @@ class CefBrowserImpl : public CefBrowser, void OnResponseAck(int request_id); void OnLoadingStateChange(bool isLoading); - void OnLoadStart(WebKit::WebFrame* frame); - void OnLoadEnd(WebKit::WebFrame* frame); - void OnLoadError(WebKit::WebFrame* frame, const WebKit::WebURLError& error); + void OnLoadStart(blink::WebFrame* frame); + void OnLoadEnd(blink::WebFrame* frame); + void OnLoadError(blink::WebFrame* frame, const blink::WebURLError& error); // ID of the browser that this RenderView is associated with. During loading // of cross-origin requests multiple RenderViews may be associated with the diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index 35e3d5cc0..f8db38193 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -60,20 +60,20 @@ MSVC_POP_WARNING(); namespace { -// Stub implementation of WebKit::WebPrerenderingSupport. -class CefPrerenderingSupport : public WebKit::WebPrerenderingSupport { +// Stub implementation of blink::WebPrerenderingSupport. +class CefPrerenderingSupport : public blink::WebPrerenderingSupport { public: virtual ~CefPrerenderingSupport() {} private: - virtual void add(const WebKit::WebPrerender& prerender) OVERRIDE {} - virtual void cancel(const WebKit::WebPrerender& prerender) OVERRIDE {} - virtual void abandon(const WebKit::WebPrerender& prerender) OVERRIDE {} + virtual void add(const blink::WebPrerender& prerender) OVERRIDE {} + virtual void cancel(const blink::WebPrerender& prerender) OVERRIDE {} + virtual void abandon(const blink::WebPrerender& prerender) OVERRIDE {} }; -// Stub implementation of WebKit::WebPrerendererClient. +// Stub implementation of blink::WebPrerendererClient. class CefPrerendererClient : public content::RenderViewObserver, - public WebKit::WebPrerendererClient { + public blink::WebPrerendererClient { public: explicit CefPrerendererClient(content::RenderView* render_view) : content::RenderViewObserver(render_view) { @@ -84,7 +84,7 @@ class CefPrerendererClient : public content::RenderViewObserver, private: virtual ~CefPrerendererClient() {} - virtual void willAddPrerender(WebKit::WebPrerender* prerender) OVERRIDE {} + virtual void willAddPrerender(blink::WebPrerender* prerender) OVERRIDE {} }; // Implementation of SequencedTaskRunner for WebWorker threads. @@ -163,7 +163,7 @@ CefRefPtr CefContentRendererClient::GetBrowserForView( } CefRefPtr CefContentRendererClient::GetBrowserForMainFrame( - WebKit::WebFrame* frame) { + blink::WebFrame* frame) { CEF_REQUIRE_RT_RETURN(NULL); BrowserMap::const_iterator it = browsers_.begin(); @@ -194,15 +194,15 @@ void CefContentRendererClient::OnBrowserDestroyed(CefBrowserImpl* browser) { void CefContentRendererClient::WebKitInitialized() { const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - WebKit::WebRuntimeFeatures::enableMediaPlayer( + blink::WebRuntimeFeatures::enableMediaPlayer( media::IsMediaLibraryInitialized()); // TODO(cef): Enable these once the implementation supports it. - WebKit::WebRuntimeFeatures::enableNotifications(false); + blink::WebRuntimeFeatures::enableNotifications(false); - WebKit::WebRuntimeFeatures::enableSpeechInput( + blink::WebRuntimeFeatures::enableSpeechInput( command_line.HasSwitch(switches::kEnableSpeechInput)); - WebKit::WebRuntimeFeatures::enableMediaStream( + blink::WebRuntimeFeatures::enableMediaStream( command_line.HasSwitch(switches::kEnableMediaStream)); const CefContentClient::SchemeInfoList* schemes = @@ -212,17 +212,17 @@ void CefContentRendererClient::WebKitInitialized() { CefContentClient::SchemeInfoList::const_iterator it = schemes->begin(); for (; it != schemes->end(); ++it) { const CefContentClient::SchemeInfo& info = *it; - const WebKit::WebString& scheme = - WebKit::WebString::fromUTF8(info.scheme_name); + const blink::WebString& scheme = + blink::WebString::fromUTF8(info.scheme_name); if (info.is_standard) { // Standard schemes must also be registered as CORS enabled to support // CORS-restricted requests (for example, XMLHttpRequest redirects). - WebKit::WebSecurityPolicy::registerURLSchemeAsCORSEnabled(scheme); + blink::WebSecurityPolicy::registerURLSchemeAsCORSEnabled(scheme); } if (info.is_local) - WebKit::WebSecurityPolicy::registerURLSchemeAsLocal(scheme); + blink::WebSecurityPolicy::registerURLSchemeAsLocal(scheme); if (info.is_display_isolated) - WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(scheme); + blink::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(scheme); } } @@ -232,10 +232,10 @@ void CefContentRendererClient::WebKitInitialized() { const Cef_CrossOriginWhiteListEntry_Params& entry = cross_origin_whitelist_entries_[i]; GURL gurl = GURL(entry.source_origin); - WebKit::WebSecurityPolicy::addOriginAccessWhitelistEntry( + blink::WebSecurityPolicy::addOriginAccessWhitelistEntry( gurl, - WebKit::WebString::fromUTF8(entry.target_protocol), - WebKit::WebString::fromUTF8(entry.target_domain), + blink::WebString::fromUTF8(entry.target_protocol), + blink::WebString::fromUTF8(entry.target_domain), entry.allow_target_subdomains); } cross_origin_whitelist_entries_.clear(); @@ -394,7 +394,7 @@ void CefContentRendererClient::RenderThreadStarted() { if (!media_path.empty()) media::InitializeMediaLibrary(media_path); - WebKit::WebPrerenderingSupport::initialize(new CefPrerenderingSupport()); + blink::WebPrerenderingSupport::initialize(new CefPrerenderingSupport()); // Create global objects associated with the default Isolate. CefV8IsolateCreated(); @@ -458,9 +458,9 @@ void CefContentRendererClient::RenderViewCreated( bool CefContentRendererClient::OverrideCreatePlugin( content::RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin) { + blink::WebFrame* frame, + const blink::WebPluginParams& params, + blink::WebPlugin** plugin) { CefRefPtr browser = CefBrowserImpl::GetBrowserForMainFrame(frame->top()); if (!browser || !browser->is_window_rendering_disabled()) @@ -504,11 +504,11 @@ bool CefContentRendererClient::OverrideCreatePlugin( if (flash || silverlight) { // Force Flash and Silverlight plugins to use windowless mode. - WebKit::WebPluginParams params_to_use = params; - params_to_use.mimeType = WebKit::WebString::fromUTF8(mime_type); + blink::WebPluginParams params_to_use = params; + params_to_use.mimeType = blink::WebString::fromUTF8(mime_type); size_t size = params.attributeNames.size(); - WebKit::WebVector new_names(size+1), + blink::WebVector new_names(size+1), new_values(size+1); for (size_t i = 0; i < size; ++i) { @@ -536,7 +536,7 @@ bool CefContentRendererClient::OverrideCreatePlugin( } void CefContentRendererClient::DidCreateScriptContext( - WebKit::WebFrame* frame, v8::Handle context, + blink::WebFrame* frame, v8::Handle context, int extension_group, int world_id) { CefRefPtr browserPtr = CefBrowserImpl::GetBrowserForMainFrame(frame->top()); @@ -566,7 +566,7 @@ void CefContentRendererClient::DidCreateScriptContext( } void CefContentRendererClient::WillReleaseScriptContext( - WebKit::WebFrame* frame, v8::Handle context, int world_id) { + blink::WebFrame* frame, v8::Handle context, int world_id) { // Notify the render process handler. CefRefPtr application = CefContentClient::Get()->application(); if (application.get()) { diff --git a/libcef/renderer/content_renderer_client.h b/libcef/renderer/content_renderer_client.h index 17b4e55a0..465d6c3a8 100644 --- a/libcef/renderer/content_renderer_client.h +++ b/libcef/renderer/content_renderer_client.h @@ -36,7 +36,7 @@ class CefContentRendererClient : public content::ContentRendererClient, CefRefPtr GetBrowserForView(content::RenderView* view); // Returns the browser associated with the specified main WebFrame. - CefRefPtr GetBrowserForMainFrame(WebKit::WebFrame* frame); + CefRefPtr GetBrowserForMainFrame(blink::WebFrame* frame); // Called from CefBrowserImpl::OnDestruct(). void OnBrowserDestroyed(CefBrowserImpl* browser); @@ -78,14 +78,14 @@ class CefContentRendererClient : public content::ContentRendererClient, virtual void RenderViewCreated(content::RenderView* render_view) OVERRIDE; virtual bool OverrideCreatePlugin( content::RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin) OVERRIDE; - virtual void DidCreateScriptContext(WebKit::WebFrame* frame, + blink::WebFrame* frame, + const blink::WebPluginParams& params, + blink::WebPlugin** plugin) OVERRIDE; + virtual void DidCreateScriptContext(blink::WebFrame* frame, v8::Handle context, int extension_group, int world_id) OVERRIDE; - virtual void WillReleaseScriptContext(WebKit::WebFrame* frame, + virtual void WillReleaseScriptContext(blink::WebFrame* frame, v8::Handle context, int world_id) OVERRIDE; diff --git a/libcef/renderer/dom_document_impl.cc b/libcef/renderer/dom_document_impl.cc index 9c7396009..1b5f773a1 100644 --- a/libcef/renderer/dom_document_impl.cc +++ b/libcef/renderer/dom_document_impl.cc @@ -15,13 +15,13 @@ #include "third_party/WebKit/public/web/WebNode.h" #include "third_party/WebKit/public/web/WebRange.h" -using WebKit::WebDocument; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebNode; -using WebKit::WebRange; -using WebKit::WebString; -using WebKit::WebURL; +using blink::WebDocument; +using blink::WebElement; +using blink::WebFrame; +using blink::WebNode; +using blink::WebRange; +using blink::WebString; +using blink::WebURL; CefDOMDocumentImpl::CefDOMDocumentImpl(CefBrowserImpl* browser, @@ -199,7 +199,7 @@ CefString CefDOMDocumentImpl::GetCompleteURL(const CefString& partialURL) { } CefRefPtr CefDOMDocumentImpl::GetOrCreateNode( - const WebKit::WebNode& node) { + const blink::WebNode& node) { if (!VerifyContext()) return NULL; @@ -220,7 +220,7 @@ CefRefPtr CefDOMDocumentImpl::GetOrCreateNode( return nodeImpl; } -void CefDOMDocumentImpl::RemoveNode(const WebKit::WebNode& node) { +void CefDOMDocumentImpl::RemoveNode(const blink::WebNode& node) { if (!VerifyContext()) return; diff --git a/libcef/renderer/dom_document_impl.h b/libcef/renderer/dom_document_impl.h index 966da1943..5aa7356ae 100644 --- a/libcef/renderer/dom_document_impl.h +++ b/libcef/renderer/dom_document_impl.h @@ -9,7 +9,7 @@ #include #include "include/cef_dom.h" -namespace WebKit { +namespace blink { class WebFrame; class WebNode; }; @@ -19,7 +19,7 @@ class CefBrowserImpl; class CefDOMDocumentImpl : public CefDOMDocument { public: CefDOMDocumentImpl(CefBrowserImpl* browser, - WebKit::WebFrame* frame); + blink::WebFrame* frame); virtual ~CefDOMDocumentImpl(); // CefDOMDocument methods. @@ -41,11 +41,11 @@ class CefDOMDocumentImpl : public CefDOMDocument { virtual CefString GetCompleteURL(const CefString& partialURL) OVERRIDE; CefBrowserImpl* GetBrowser() { return browser_; } - WebKit::WebFrame* GetFrame() { return frame_; } + blink::WebFrame* GetFrame() { return frame_; } // The document maintains a map of all existing node objects. - CefRefPtr GetOrCreateNode(const WebKit::WebNode& node); - void RemoveNode(const WebKit::WebNode& node); + CefRefPtr GetOrCreateNode(const blink::WebNode& node); + void RemoveNode(const blink::WebNode& node); // Must be called before the object is destroyed. void Detach(); @@ -55,9 +55,9 @@ class CefDOMDocumentImpl : public CefDOMDocument { protected: CefBrowserImpl* browser_; - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; - typedef std::map NodeMap; + typedef std::map NodeMap; NodeMap node_map_; IMPLEMENT_REFCOUNTING(CefDOMDocumentImpl); diff --git a/libcef/renderer/dom_event_impl.cc b/libcef/renderer/dom_event_impl.cc index e9f28e1cc..24c7346a1 100644 --- a/libcef/renderer/dom_event_impl.cc +++ b/libcef/renderer/dom_event_impl.cc @@ -10,12 +10,12 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/web/WebDOMEvent.h" -using WebKit::WebDOMEvent; -using WebKit::WebString; +using blink::WebDOMEvent; +using blink::WebString; CefDOMEventImpl::CefDOMEventImpl(CefRefPtr document, - const WebKit::WebDOMEvent& event) + const blink::WebDOMEvent& event) : document_(document), event_(event) { DCHECK(!event_.isNull()); diff --git a/libcef/renderer/dom_event_impl.h b/libcef/renderer/dom_event_impl.h index 660342433..fd5c1c008 100644 --- a/libcef/renderer/dom_event_impl.h +++ b/libcef/renderer/dom_event_impl.h @@ -14,7 +14,7 @@ class CefDOMDocumentImpl; class CefDOMEventImpl : public CefDOMEvent { public: CefDOMEventImpl(CefRefPtr document, - const WebKit::WebDOMEvent& event); + const blink::WebDOMEvent& event); virtual ~CefDOMEventImpl(); // CefDOMEvent methods. @@ -35,7 +35,7 @@ class CefDOMEventImpl : public CefDOMEvent { protected: CefRefPtr document_; - WebKit::WebDOMEvent event_; + blink::WebDOMEvent event_; IMPLEMENT_REFCOUNTING(CefDOMEventImpl); }; diff --git a/libcef/renderer/dom_node_impl.cc b/libcef/renderer/dom_node_impl.cc index 3f4dc47e7..de3881ae4 100644 --- a/libcef/renderer/dom_node_impl.cc +++ b/libcef/renderer/dom_node_impl.cc @@ -24,16 +24,16 @@ #include "third_party/WebKit/public/web/WebNode.h" #include "third_party/WebKit/public/web/WebSelectElement.h" -using WebKit::WebDocument; -using WebKit::WebDOMEvent; -using WebKit::WebDOMEventListener; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebFormControlElement; -using WebKit::WebInputElement; -using WebKit::WebNode; -using WebKit::WebSelectElement; -using WebKit::WebString; +using blink::WebDocument; +using blink::WebDOMEvent; +using blink::WebDOMEventListener; +using blink::WebElement; +using blink::WebFrame; +using blink::WebFormControlElement; +using blink::WebInputElement; +using blink::WebNode; +using blink::WebSelectElement; +using blink::WebString; namespace { @@ -85,7 +85,7 @@ class CefDOMEventListenerWrapper : public WebDOMEventListener, CefDOMNodeImpl::CefDOMNodeImpl(CefRefPtr document, - const WebKit::WebNode& node) + const blink::WebNode& node) : document_(document), node_(node) { } @@ -359,7 +359,7 @@ CefString CefDOMNodeImpl::GetElementTagName() { return str; } - const WebElement& element = node_.toConst(); + const WebElement& element = node_.toConst(); const WebString& tagname = element.tagName(); if (!tagname.isNull()) str = tagname; @@ -376,7 +376,7 @@ bool CefDOMNodeImpl::HasElementAttributes() { return false; } - const WebElement& element = node_.toConst(); + const WebElement& element = node_.toConst(); return (element.attributeCount() > 0); } @@ -389,7 +389,7 @@ bool CefDOMNodeImpl::HasElementAttribute(const CefString& attrName) { return false; } - const WebElement& element = node_.toConst(); + const WebElement& element = node_.toConst(); return element.hasAttribute(string16(attrName)); } @@ -403,7 +403,7 @@ CefString CefDOMNodeImpl::GetElementAttribute(const CefString& attrName) { return str; } - const WebElement& element = node_.toConst(); + const WebElement& element = node_.toConst(); const WebString& attr = element.getAttribute(string16(attrName)); if (!attr.isNull()) str = attr; @@ -420,7 +420,7 @@ void CefDOMNodeImpl::GetElementAttributes(AttributeMap& attrMap) { return; } - const WebElement& element = node_.toConst(); + const WebElement& element = node_.toConst(); unsigned int len = element.attributeCount(); if (len == 0) return; @@ -442,7 +442,7 @@ bool CefDOMNodeImpl::SetElementAttribute(const CefString& attrName, return false; } - WebElement element = node_.to(); + WebElement element = node_.to(); return element.setAttribute(string16(attrName), string16(value)); } @@ -456,7 +456,7 @@ CefString CefDOMNodeImpl::GetElementInnerText() { return str; } - WebElement element = node_.to(); + WebElement element = node_.to(); const WebString& text = element.innerText(); if (!text.isNull()) str = text; diff --git a/libcef/renderer/dom_node_impl.h b/libcef/renderer/dom_node_impl.h index 478cd6d53..2cab762a4 100644 --- a/libcef/renderer/dom_node_impl.h +++ b/libcef/renderer/dom_node_impl.h @@ -14,7 +14,7 @@ class CefDOMDocumentImpl; class CefDOMNodeImpl : public CefDOMNode { public: CefDOMNodeImpl(CefRefPtr document, - const WebKit::WebNode& node); + const blink::WebNode& node); virtual ~CefDOMNodeImpl(); // CefDOMNode methods. @@ -56,7 +56,7 @@ class CefDOMNodeImpl : public CefDOMNode { protected: CefRefPtr document_; - WebKit::WebNode node_; + blink::WebNode node_; IMPLEMENT_REFCOUNTING(CefDOMNodeImpl); }; diff --git a/libcef/renderer/frame_impl.cc b/libcef/renderer/frame_impl.cc index 22d8afbe7..76337f7de 100644 --- a/libcef/renderer/frame_impl.cc +++ b/libcef/renderer/frame_impl.cc @@ -21,10 +21,10 @@ #include "third_party/WebKit/public/web/WebView.h" #include "third_party/WebKit/public/web/WebScriptSource.h" -using WebKit::WebString; +using blink::WebString; CefFrameImpl::CefFrameImpl(CefBrowserImpl* browser, - WebKit::WebFrame* frame) + blink::WebFrame* frame) : browser_(browser), frame_(frame), frame_id_(frame->identifier()) { @@ -170,7 +170,7 @@ void CefFrameImpl::ExecuteJavaScript(const CefString& jsCode, if (frame_) { GURL gurl = GURL(scriptUrl.ToString()); frame_->executeScript( - WebKit::WebScriptSource(jsCode.ToString16(), gurl, startLine)); + blink::WebScriptSource(jsCode.ToString16(), gurl, startLine)); } } @@ -209,7 +209,7 @@ CefRefPtr CefFrameImpl::GetParent() { CEF_REQUIRE_RT_RETURN(NULL); if (frame_) { - WebKit::WebFrame* parent = frame_->parent(); + blink::WebFrame* parent = frame_->parent(); if (parent) return browser_->GetWebFrameImpl(parent).get(); } @@ -254,7 +254,7 @@ void CefFrameImpl::VisitDOM(CefRefPtr visitor) { // Create a CefDOMDocumentImpl object that is valid only for the scope of this // method. CefRefPtr documentImpl; - const WebKit::WebDocument& document = frame_->document(); + const blink::WebDocument& document = frame_->document(); if (!document.isNull()) documentImpl = new CefDOMDocumentImpl(browser_, frame_); diff --git a/libcef/renderer/frame_impl.h b/libcef/renderer/frame_impl.h index 2d06678d2..414561bb0 100644 --- a/libcef/renderer/frame_impl.h +++ b/libcef/renderer/frame_impl.h @@ -12,7 +12,7 @@ class CefBrowserImpl; -namespace WebKit { +namespace blink { class WebFrame; } @@ -22,7 +22,7 @@ class WebFrame; class CefFrameImpl : public CefFrame { public: CefFrameImpl(CefBrowserImpl* browser, - WebKit::WebFrame* frame); + blink::WebFrame* frame); virtual ~CefFrameImpl(); // CefFrame implementation. @@ -56,11 +56,11 @@ class CefFrameImpl : public CefFrame { void Detach(); - WebKit::WebFrame* web_frame() const { return frame_; } + blink::WebFrame* web_frame() const { return frame_; } protected: CefBrowserImpl* browser_; - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; int64 frame_id_; IMPLEMENT_REFCOUNTING(CefFrameImpl); diff --git a/libcef/renderer/render_process_observer.cc b/libcef/renderer/render_process_observer.cc index 5840318f9..b0b21400b 100644 --- a/libcef/renderer/render_process_observer.cc +++ b/libcef/renderer/render_process_observer.cc @@ -46,20 +46,20 @@ void CefRenderProcessObserver::OnModifyCrossOriginWhitelistEntry( const Cef_CrossOriginWhiteListEntry_Params& params) { GURL gurl = GURL(params.source_origin); if (add) { - WebKit::WebSecurityPolicy::addOriginAccessWhitelistEntry( + blink::WebSecurityPolicy::addOriginAccessWhitelistEntry( gurl, - WebKit::WebString::fromUTF8(params.target_protocol), - WebKit::WebString::fromUTF8(params.target_domain), + blink::WebString::fromUTF8(params.target_protocol), + blink::WebString::fromUTF8(params.target_domain), params.allow_target_subdomains); } else { - WebKit::WebSecurityPolicy::removeOriginAccessWhitelistEntry( + blink::WebSecurityPolicy::removeOriginAccessWhitelistEntry( gurl, - WebKit::WebString::fromUTF8(params.target_protocol), - WebKit::WebString::fromUTF8(params.target_domain), + blink::WebString::fromUTF8(params.target_protocol), + blink::WebString::fromUTF8(params.target_domain), params.allow_target_subdomains); } } void CefRenderProcessObserver::OnClearCrossOriginWhitelist() { - WebKit::WebSecurityPolicy::resetOriginAccessWhitelists(); + blink::WebSecurityPolicy::resetOriginAccessWhitelists(); } diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index 7df746c62..652506251 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -17,23 +17,23 @@ #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebString; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace { -class CefWebURLLoaderClient : public WebKit::WebURLLoaderClient { +class CefWebURLLoaderClient : public blink::WebURLLoaderClient { public: CefWebURLLoaderClient(CefRenderURLRequest::Context* context, int request_flags); virtual ~CefWebURLLoaderClient(); - // WebKit::WebURLLoaderClient methods. + // blink::WebURLLoaderClient methods. virtual void willSendRequest( WebURLLoader* loader, WebURLRequest& newRequest, @@ -105,7 +105,7 @@ class CefRenderURLRequest::Context if (!url.is_valid()) return false; - loader_.reset(WebKit::Platform::current()->createURLLoader()); + loader_.reset(blink::Platform::current()->createURLLoader()); url_client_.reset(new CefWebURLLoaderClient(this, request_->GetFlags())); WebURLRequest urlRequest; @@ -235,7 +235,7 @@ class CefRenderURLRequest::Context CefURLRequest::Status status_; CefURLRequest::ErrorCode error_code_; CefRefPtr response_; - scoped_ptr loader_; + scoped_ptr loader_; scoped_ptr url_client_; int64 upload_data_size_; bool got_upload_progress_complete_; diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index c722ae2cd..0510c3979 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -872,7 +872,7 @@ CefRefPtr CefV8ContextImpl::GetBrowser() { if (!CEF_CURRENTLY_ON_RT()) return browser; - WebKit::WebFrame* webframe = GetWebFrame(); + blink::WebFrame* webframe = GetWebFrame(); if (webframe) browser = CefBrowserImpl::GetBrowserForMainFrame(webframe->top()); @@ -887,7 +887,7 @@ CefRefPtr CefV8ContextImpl::GetFrame() { if (!CEF_CURRENTLY_ON_RT()) return frame; - WebKit::WebFrame* webframe = GetWebFrame(); + blink::WebFrame* webframe = GetWebFrame(); if (webframe) { CefRefPtr browser = CefBrowserImpl::GetBrowserForMainFrame(webframe->top()); @@ -989,11 +989,11 @@ v8::Handle CefV8ContextImpl::GetV8Context() { return handle_->GetNewV8Handle(); } -WebKit::WebFrame* CefV8ContextImpl::GetWebFrame() { +blink::WebFrame* CefV8ContextImpl::GetWebFrame() { CEF_REQUIRE_RT(); v8::HandleScope handle_scope(handle_->isolate()); v8::Context::Scope context_scope(GetV8Context()); - WebKit::WebFrame* frame = WebKit::WebFrame::frameForCurrentContext(); + blink::WebFrame* frame = blink::WebFrame::frameForCurrentContext(); return frame; } diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 3a4a1c9b3..ce204de43 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -20,7 +20,7 @@ class CefTrackNode; class GURL; -namespace WebKit { +namespace blink { class WebFrame; }; @@ -175,7 +175,7 @@ class CefV8ContextImpl : public CefV8Context { CefRefPtr& exception) OVERRIDE; v8::Handle GetV8Context(); - WebKit::WebFrame* GetWebFrame(); + blink::WebFrame* GetWebFrame(); protected: typedef CefV8Handle Handle; diff --git a/libcef/renderer/webkit_glue.cc b/libcef/renderer/webkit_glue.cc index 3f058f5b3..052f1116e 100644 --- a/libcef/renderer/webkit_glue.cc +++ b/libcef/renderer/webkit_glue.cc @@ -37,57 +37,57 @@ MSVC_POP_WARNING(); namespace webkit_glue { -bool CanGoBack(WebKit::WebView* view) { +bool CanGoBack(blink::WebView* view) { if (!view) return false; - WebKit::WebViewImpl* impl = reinterpret_cast(view); + blink::WebViewImpl* impl = reinterpret_cast(view); return (impl->client()->historyBackListCount() > 0); } -bool CanGoForward(WebKit::WebView* view) { +bool CanGoForward(blink::WebView* view) { if (!view) return false; - WebKit::WebViewImpl* impl = reinterpret_cast(view); + blink::WebViewImpl* impl = reinterpret_cast(view); return (impl->client()->historyForwardListCount() > 0); } -void GoBack(WebKit::WebView* view) { +void GoBack(blink::WebView* view) { if (!view) return; - WebKit::WebViewImpl* impl = reinterpret_cast(view); + blink::WebViewImpl* impl = reinterpret_cast(view); if (impl->client()->historyBackListCount() > 0) impl->client()->navigateBackForwardSoon(-1); } -void GoForward(WebKit::WebView* view) { +void GoForward(blink::WebView* view) { if (!view) return; - WebKit::WebViewImpl* impl = reinterpret_cast(view); + blink::WebViewImpl* impl = reinterpret_cast(view); if (impl->client()->historyForwardListCount() > 0) impl->client()->navigateBackForwardSoon(1); } -v8::Isolate* GetV8Isolate(WebKit::WebFrame* frame) { - WebKit::WebFrameImpl* impl = static_cast(frame); +v8::Isolate* GetV8Isolate(blink::WebFrame* frame) { + blink::WebFrameImpl* impl = static_cast(frame); return WebCore::toIsolate(impl->frame()); } -v8::Handle GetV8Context(WebKit::WebFrame* frame) { - WebKit::WebFrameImpl* impl = static_cast(frame); +v8::Handle GetV8Context(blink::WebFrame* frame) { + blink::WebFrameImpl* impl = static_cast(frame); return WebCore::ScriptController::mainWorldContext(impl->frame()); } -std::string DumpDocumentText(WebKit::WebFrame* frame) { +std::string DumpDocumentText(blink::WebFrame* frame) { // We use the document element's text instead of the body text here because // not all documents have a body, such as XML documents. - WebKit::WebElement document_element = frame->document().documentElement(); + blink::WebElement document_element = frame->document().documentElement(); if (document_element.isNull()) return std::string(); return document_element.innerText().utf8(); } -bool SetNodeValue(WebKit::WebNode& node, const WebKit::WebString& value) { +bool SetNodeValue(blink::WebNode& node, const blink::WebString& value) { WebCore::Node* web_node = node.unwrap(); web_node->setNodeValue(value); return true; diff --git a/libcef/renderer/webkit_glue.h b/libcef/renderer/webkit_glue.h index 585dcbc98..d4b6ba556 100644 --- a/libcef/renderer/webkit_glue.h +++ b/libcef/renderer/webkit_glue.h @@ -14,7 +14,7 @@ template class Handle; class Isolate; } -namespace WebKit { +namespace blink { class WebFrame; class WebNode; class WebString; @@ -23,21 +23,21 @@ class WebView; namespace webkit_glue { -bool CanGoBack(WebKit::WebView* view); -bool CanGoForward(WebKit::WebView* view); -void GoBack(WebKit::WebView* view); -void GoForward(WebKit::WebView* view); +bool CanGoBack(blink::WebView* view); +bool CanGoForward(blink::WebView* view); +void GoBack(blink::WebView* view); +void GoForward(blink::WebView* view); // Retrieve the V8 isolate associated with the frame. -v8::Isolate* GetV8Isolate(WebKit::WebFrame* frame); +v8::Isolate* GetV8Isolate(blink::WebFrame* frame); // Retrieve the V8 context associated with the frame. -v8::Handle GetV8Context(WebKit::WebFrame* frame); +v8::Handle GetV8Context(blink::WebFrame* frame); // Returns the text of the document element. -std::string DumpDocumentText(WebKit::WebFrame* frame); +std::string DumpDocumentText(blink::WebFrame* frame); -bool SetNodeValue(WebKit::WebNode& node, const WebKit::WebString& value); +bool SetNodeValue(blink::WebNode& node, const blink::WebString& value); } // webkit_glue diff --git a/patch/patches/message_loop_443.patch b/patch/patches/message_loop_443.patch index cda9e2d8d..6f0d98343 100644 --- a/patch/patches/message_loop_443.patch +++ b/patch/patches/message_loop_443.patch @@ -1,8 +1,8 @@ Index: message_loop.cc =================================================================== ---- message_loop.cc (revision 224845) +--- message_loop.cc (revision 233896) +++ message_loop.cc (working copy) -@@ -201,7 +201,7 @@ +@@ -208,7 +208,7 @@ MessageLoop::~MessageLoop() { DCHECK_EQ(this, current()); diff --git a/patch/patches/spi_webcore_364.patch b/patch/patches/spi_webcore_364.patch index e2381b9fd..50a1cdcdd 100644 --- a/patch/patches/spi_webcore_364.patch +++ b/patch/patches/spi_webcore_364.patch @@ -1,8 +1,8 @@ Index: frame/FrameView.cpp =================================================================== ---- frame/FrameView.cpp (revision 160715) +--- frame/FrameView.cpp (revision 161588) +++ frame/FrameView.cpp (working copy) -@@ -200,8 +200,10 @@ +@@ -201,8 +201,10 @@ if (!isMainFrame()) return; @@ -15,7 +15,7 @@ Index: frame/FrameView.cpp PassRefPtr FrameView::create(Frame* frame) Index: platform/mac/NSScrollerImpDetails.mm =================================================================== ---- platform/mac/NSScrollerImpDetails.mm (revision 160715) +--- platform/mac/NSScrollerImpDetails.mm (revision 161588) +++ platform/mac/NSScrollerImpDetails.mm (working copy) @@ -73,10 +73,14 @@ diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index e2a0aa4cd..d649d4564 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ Index: public/web/WebView.h =================================================================== ---- public/web/WebView.h (revision 160715) +--- public/web/WebView.h (revision 161588) +++ public/web/WebView.h (working copy) -@@ -441,6 +441,7 @@ +@@ -443,6 +443,7 @@ // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void setUseExternalPopupMenus(bool); @@ -12,7 +12,7 @@ Index: public/web/WebView.h // Visited link state -------------------------------------------------- Index: Source/web/ChromeClientImpl.cpp =================================================================== ---- Source/web/ChromeClientImpl.cpp (revision 160715) +--- Source/web/ChromeClientImpl.cpp (revision 161588) +++ Source/web/ChromeClientImpl.cpp (working copy) @@ -871,7 +871,7 @@ @@ -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 160715) +--- Source/web/WebViewImpl.cpp (revision 161588) +++ Source/web/WebViewImpl.cpp (working copy) -@@ -402,6 +402,7 @@ +@@ -403,6 +403,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) -@@ -3643,9 +3644,14 @@ +@@ -3714,9 +3715,14 @@ updateLayerTreeViewport(); } @@ -53,9 +53,9 @@ Index: Source/web/WebViewImpl.cpp void WebViewImpl::startDragging(Frame* frame, Index: Source/web/WebViewImpl.h =================================================================== ---- Source/web/WebViewImpl.h (revision 160715) +--- Source/web/WebViewImpl.h (revision 161588) +++ Source/web/WebViewImpl.h (working copy) -@@ -409,7 +409,8 @@ +@@ -414,7 +414,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 { -@@ -702,6 +703,8 @@ +@@ -710,6 +711,8 @@ bool m_contextMenuAllowed; diff --git a/tools/gyp_cef.py b/tools/gyp_cef.py new file mode 100644 index 000000000..c7cadc870 --- /dev/null +++ b/tools/gyp_cef.py @@ -0,0 +1,18 @@ +# Copyright (c) 2013 The Chromium Embedded Framework Authors. +# Portions copyright 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. + +# This file is (possibly, depending on python version) imported by gyp_cef +# when it creates sub-processes through the multiprocessing library. + +# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for +# imports that don't end in .py (and aren't directories with an +# __init__.py). This wrapper makes "import gyp_cef" work with those old +# versions and makes it possible to execute gyp_cef.py directly on Windows +# where the extension is useful. + +import os + +path = os.path.abspath(os.path.split(__file__)[0]) +execfile(os.path.join(path, 'gyp_cef'))