diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 06:50:46 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 06:50:46 +0000 |
commit | 180ef24f1fd1b1ff309fc35f250336890f702f28 (patch) | |
tree | de5918896ed9780e5cf6098be329060a58f3702e /content | |
parent | 8d7dd7ade794c71be49c7a954c4d4b4ca1ab6c01 (diff) | |
download | chromium_src-180ef24f1fd1b1ff309fc35f250336890f702f28.zip chromium_src-180ef24f1fd1b1ff309fc35f250336890f702f28.tar.gz chromium_src-180ef24f1fd1b1ff309fc35f250336890f702f28.tar.bz2 |
Rename WebKit namespace to blink (part 3)
This CL updates all references to the WebKit namespace in content.
TBR=darin@chromium.org
BUG=295096
Review URL: https://codereview.chromium.org/63253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233513 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
784 files changed, 7562 insertions, 7562 deletions
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc index 6d06995..8131513 100644 --- a/content/browser/accessibility/accessibility_win_browsertest.cc +++ b/content/browser/accessibility/accessibility_win_browsertest.cc @@ -149,7 +149,7 @@ void AccessibilityWinBrowserTest::LoadInitialAccessibilityTreeFromHtml( const std::string& html) { AccessibilityNotificationWaiter waiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventLoadComplete); + blink::WebAXEventLoadComplete); GURL html_data_url("data:text/html," + html); NavigateToURL(shell(), html_data_url); waiter.WaitForNotification(); @@ -504,7 +504,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, scoped_ptr<AccessibilityNotificationWaiter> waiter( new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventFocus)); + blink::WebAXEventFocus)); ExecuteScript(L"document.body.children[0].focus()"); waiter->WaitForNotification(); @@ -516,7 +516,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, // Set the active descendant of the radio group waiter.reset(new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventFocus)); + blink::WebAXEventFocus)); ExecuteScript( L"document.body.children[0].setAttribute('aria-activedescendant', 'li')"); waiter->WaitForNotification(); @@ -549,7 +549,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, scoped_ptr<AccessibilityNotificationWaiter> waiter( new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventCheckedStateChanged)); + blink::WebAXEventCheckedStateChanged)); ExecuteScript(L"document.body.children[0].checked=true"); waiter->WaitForNotification(); @@ -577,7 +577,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventChildrenChanged)); + blink::WebAXEventChildrenChanged)); ExecuteScript(L"document.body.innerHTML='<b>new text</b>'"); waiter->WaitForNotification(); @@ -602,7 +602,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, scoped_ptr<AccessibilityNotificationWaiter> waiter( new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventChildrenChanged)); + blink::WebAXEventChildrenChanged)); ExecuteScript(L"document.body.children[0].style.visibility='visible'"); waiter->WaitForNotification(); @@ -635,7 +635,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, scoped_ptr<AccessibilityNotificationWaiter> waiter( new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventFocus)); + blink::WebAXEventFocus)); ExecuteScript(L"document.body.children[0].focus()"); waiter->WaitForNotification(); @@ -649,7 +649,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, waiter.reset( new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventBlur)); + blink::WebAXEventBlur)); base::win::ScopedComPtr<IAccessible> document_accessible( GetRendererAccessible()); ASSERT_NE(document_accessible.get(), reinterpret_cast<IAccessible*>(NULL)); @@ -685,7 +685,7 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest, scoped_ptr<AccessibilityNotificationWaiter> waiter( new AccessibilityNotificationWaiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventValueChanged)); + blink::WebAXEventValueChanged)); ExecuteScript(L"document.body.children[0].value='new value'"); waiter->WaitForNotification(); diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index a7f6f3e..ca644f3 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc @@ -44,7 +44,7 @@ BrowserAccessibility::~BrowserAccessibility() { } bool BrowserAccessibility::PlatformIsLeaf() const { - return role_ == WebKit::WebAXRoleStaticText || child_count() == 0; + return role_ == blink::WebAXRoleStaticText || child_count() == 0; } uint32 BrowserAccessibility::PlatformChildCount() const { @@ -151,8 +151,8 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsRect() const { // nested web area. BrowserAccessibility* parent = parent_; bool need_to_offset_web_area = - (role_ == WebKit::WebAXRoleWebArea || - role_ == WebKit::WebAXRoleRootWebArea); + (role_ == blink::WebAXRoleWebArea || + role_ == blink::WebAXRoleRootWebArea); while (parent) { if (need_to_offset_web_area && parent->location().width() > 0 && @@ -163,13 +163,13 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsRect() const { // On some platforms, we don't want to take the root scroll offsets // into account. - if (parent->role() == WebKit::WebAXRoleRootWebArea && + if (parent->role() == blink::WebAXRoleRootWebArea && !manager()->UseRootScrollOffsetsWhenComputingBounds()) { break; } - if (parent->role() == WebKit::WebAXRoleWebArea || - parent->role() == WebKit::WebAXRoleRootWebArea) { + if (parent->role() == blink::WebAXRoleWebArea || + parent->role() == blink::WebAXRoleRootWebArea) { int sx = 0; int sy = 0; if (parent->GetIntAttribute(AccessibilityNodeData::ATTR_SCROLL_X, &sx) && @@ -196,7 +196,7 @@ gfx::Rect BrowserAccessibility::GetGlobalBoundsRect() const { gfx::Rect BrowserAccessibility::GetLocalBoundsForRange(int start, int len) const { - DCHECK_EQ(role_, WebKit::WebAXRoleStaticText); + DCHECK_EQ(role_, blink::WebAXRoleStaticText); int end = start + len; int child_start = 0; int child_end = 0; @@ -204,7 +204,7 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsForRange(int start, int len) gfx::Rect bounds; for (size_t i = 0; i < children_.size() && child_end < start + len; ++i) { BrowserAccessibility* child = children_[i]; - DCHECK_EQ(child->role(), WebKit::WebAXRoleInlineTextBox); + DCHECK_EQ(child->role(), blink::WebAXRoleInlineTextBox); std::string child_text; child->GetStringAttribute(AccessibilityNodeData::ATTR_VALUE, &child_text); int child_len = static_cast<int>(child_text.size()); @@ -232,28 +232,28 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsForRange(int start, int len) gfx::Rect child_overlap_rect; switch (text_direction) { - case WebKit::WebAXTextDirectionLR: { + case blink::WebAXTextDirectionLR: { int left = child_rect.x() + start_pixel_offset; int right = child_rect.x() + end_pixel_offset; child_overlap_rect = gfx::Rect(left, child_rect.y(), right - left, child_rect.height()); break; } - case WebKit::WebAXTextDirectionRL: { + case blink::WebAXTextDirectionRL: { int right = child_rect.right() - start_pixel_offset; int left = child_rect.right() - end_pixel_offset; child_overlap_rect = gfx::Rect(left, child_rect.y(), right - left, child_rect.height()); break; } - case WebKit::WebAXTextDirectionTB: { + case blink::WebAXTextDirectionTB: { int top = child_rect.y() + start_pixel_offset; int bottom = child_rect.y() + end_pixel_offset; child_overlap_rect = gfx::Rect(child_rect.x(), top, child_rect.width(), bottom - top); break; } - case WebKit::WebAXTextDirectionBT: { + case blink::WebAXTextDirectionBT: { int bottom = child_rect.bottom() - start_pixel_offset; int top = child_rect.bottom() - end_pixel_offset; child_overlap_rect = gfx::Rect(child_rect.x(), top, @@ -310,7 +310,7 @@ void BrowserAccessibility::Destroy() { PostInitialize(); manager_->NotifyAccessibilityEvent( - WebKit::WebAXEventHide, this); + blink::WebAXEventHide, this); instance_active_ = false; manager_->RemoveNode(this); @@ -555,24 +555,24 @@ bool BrowserAccessibility::GetAriaTristate( return false; // Not set } -bool BrowserAccessibility::HasState(WebKit::WebAXState state_enum) const { +bool BrowserAccessibility::HasState(blink::WebAXState state_enum) const { return (state_ >> state_enum) & 1; } bool BrowserAccessibility::IsEditableText() const { // These roles don't have readonly set, but they're not editable text. - if (role_ == WebKit::WebAXRoleScrollArea || - role_ == WebKit::WebAXRoleColumn || - role_ == WebKit::WebAXRoleTableHeaderContainer) { + if (role_ == blink::WebAXRoleScrollArea || + role_ == blink::WebAXRoleColumn || + role_ == blink::WebAXRoleTableHeaderContainer) { return false; } // Note: WebAXStateReadonly being false means it's either a text control, // or contenteditable. We also check for editable text roles to cover // another element that has role=textbox set on it. - return (!HasState(WebKit::WebAXStateReadonly) || - role_ == WebKit::WebAXRoleTextField || - role_ == WebKit::WebAXRoleTextArea); + return (!HasState(blink::WebAXStateReadonly) || + role_ == blink::WebAXRoleTextField || + role_ == blink::WebAXRoleTextArea); } std::string BrowserAccessibility::GetTextRecursive() const { diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index 1644d66..1f858f1 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h @@ -254,7 +254,7 @@ class CONTENT_EXPORT BrowserAccessibility { bool* is_mixed) const; // Returns true if the bit corresponding to the given state enum is 1. - bool HasState(WebKit::WebAXState state_enum) const; + bool HasState(blink::WebAXState state_enum) const; // Returns true if this node is an editable text field of any kind. bool IsEditableText() const; diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index 2227c38..6fe3afb 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc @@ -30,8 +30,8 @@ bool BrowserAccessibilityAndroid::PlatformIsLeaf() const { // Iframes are always allowed to contain children. if (IsIframe() || - role() == WebKit::WebAXRoleRootWebArea || - role() == WebKit::WebAXRoleWebArea) { + role() == blink::WebAXRoleRootWebArea || + role() == blink::WebAXRoleWebArea) { return false; } @@ -41,11 +41,11 @@ bool BrowserAccessibilityAndroid::PlatformIsLeaf() const { // Headings with text can drop their children. string16 name = GetText(); - if (role() == WebKit::WebAXRoleHeading && !name.empty()) + if (role() == blink::WebAXRoleHeading && !name.empty()) return true; // Focusable nodes with text can drop their children. - if (HasState(WebKit::WebAXStateFocusable) && !name.empty()) + if (HasState(blink::WebAXStateFocusable) && !name.empty()) return true; // Nodes with only static text as children can drop their children. @@ -60,18 +60,18 @@ bool BrowserAccessibilityAndroid::IsCheckable() const { bool is_aria_pressed_defined; bool is_mixed; GetAriaTristate("aria-pressed", &is_aria_pressed_defined, &is_mixed); - if (role() == WebKit::WebAXRoleCheckBox || - role() == WebKit::WebAXRoleRadioButton || + if (role() == blink::WebAXRoleCheckBox || + role() == blink::WebAXRoleRadioButton || is_aria_pressed_defined) { checkable = true; } - if (HasState(WebKit::WebAXStateChecked)) + if (HasState(blink::WebAXStateChecked)) checkable = true; return checkable; } bool BrowserAccessibilityAndroid::IsChecked() const { - return HasState(WebKit::WebAXStateChecked); + return HasState(blink::WebAXStateChecked); } bool BrowserAccessibilityAndroid::IsClickable() const { @@ -79,13 +79,13 @@ bool BrowserAccessibilityAndroid::IsClickable() const { } bool BrowserAccessibilityAndroid::IsEnabled() const { - return HasState(WebKit::WebAXStateEnabled); + return HasState(blink::WebAXStateEnabled); } bool BrowserAccessibilityAndroid::IsFocusable() const { - bool focusable = HasState(WebKit::WebAXStateFocusable); + bool focusable = HasState(blink::WebAXStateFocusable); if (IsIframe() || - role() == WebKit::WebAXRoleWebArea) { + role() == blink::WebAXRoleWebArea) { focusable = false; } return focusable; @@ -96,7 +96,7 @@ bool BrowserAccessibilityAndroid::IsFocused() const { } bool BrowserAccessibilityAndroid::IsPassword() const { - return HasState(WebKit::WebAXStateProtected); + return HasState(blink::WebAXStateProtected); } bool BrowserAccessibilityAndroid::IsScrollable() const { @@ -105,59 +105,59 @@ bool BrowserAccessibilityAndroid::IsScrollable() const { } bool BrowserAccessibilityAndroid::IsSelected() const { - return HasState(WebKit::WebAXStateSelected); + return HasState(blink::WebAXStateSelected); } bool BrowserAccessibilityAndroid::IsVisibleToUser() const { - return !HasState(WebKit::WebAXStateInvisible); + return !HasState(blink::WebAXStateInvisible); } const char* BrowserAccessibilityAndroid::GetClassName() const { const char* class_name = NULL; switch(role()) { - case WebKit::WebAXRoleEditableText: - case WebKit::WebAXRoleSpinButton: - case WebKit::WebAXRoleTextArea: - case WebKit::WebAXRoleTextField: + case blink::WebAXRoleEditableText: + case blink::WebAXRoleSpinButton: + case blink::WebAXRoleTextArea: + case blink::WebAXRoleTextField: class_name = "android.widget.EditText"; break; - case WebKit::WebAXRoleSlider: + case blink::WebAXRoleSlider: class_name = "android.widget.SeekBar"; break; - case WebKit::WebAXRoleComboBox: + case blink::WebAXRoleComboBox: class_name = "android.widget.Spinner"; break; - case WebKit::WebAXRoleButton: - case WebKit::WebAXRoleMenuButton: - case WebKit::WebAXRolePopUpButton: + case blink::WebAXRoleButton: + case blink::WebAXRoleMenuButton: + case blink::WebAXRolePopUpButton: class_name = "android.widget.Button"; break; - case WebKit::WebAXRoleCheckBox: + case blink::WebAXRoleCheckBox: class_name = "android.widget.CheckBox"; break; - case WebKit::WebAXRoleRadioButton: + case blink::WebAXRoleRadioButton: class_name = "android.widget.RadioButton"; break; - case WebKit::WebAXRoleToggleButton: + case blink::WebAXRoleToggleButton: class_name = "android.widget.ToggleButton"; break; - case WebKit::WebAXRoleCanvas: - case WebKit::WebAXRoleImage: + case blink::WebAXRoleCanvas: + case blink::WebAXRoleImage: class_name = "android.widget.Image"; break; - case WebKit::WebAXRoleProgressIndicator: + case blink::WebAXRoleProgressIndicator: class_name = "android.widget.ProgressBar"; break; - case WebKit::WebAXRoleTabList: + case blink::WebAXRoleTabList: class_name = "android.widget.TabWidget"; break; - case WebKit::WebAXRoleGrid: - case WebKit::WebAXRoleTable: + case blink::WebAXRoleGrid: + case blink::WebAXRoleTable: class_name = "android.widget.GridView"; break; - case WebKit::WebAXRoleList: - case WebKit::WebAXRoleListBox: + case blink::WebAXRoleList: + case blink::WebAXRoleListBox: class_name = "android.widget.ListView"; break; default: @@ -170,7 +170,7 @@ const char* BrowserAccessibilityAndroid::GetClassName() const { string16 BrowserAccessibilityAndroid::GetText() const { if (IsIframe() || - role() == WebKit::WebAXRoleWebArea) { + role() == blink::WebAXRoleWebArea) { return string16(); } @@ -192,13 +192,13 @@ string16 BrowserAccessibilityAndroid::GetText() const { } switch(role()) { - case WebKit::WebAXRoleImageMapLink: - case WebKit::WebAXRoleLink: + case blink::WebAXRoleImageMapLink: + case blink::WebAXRoleLink: if (!text.empty()) text += ASCIIToUTF16(" "); text += ASCIIToUTF16("Link"); break; - case WebKit::WebAXRoleHeading: + case blink::WebAXRoleHeading: // Only append "heading" if this node already has text. if (!text.empty()) text += ASCIIToUTF16(" Heading"); @@ -211,12 +211,12 @@ string16 BrowserAccessibilityAndroid::GetText() const { int BrowserAccessibilityAndroid::GetItemIndex() const { int index = 0; switch(role()) { - case WebKit::WebAXRoleListItem: - case WebKit::WebAXRoleListBoxOption: + case blink::WebAXRoleListItem: + case blink::WebAXRoleListBoxOption: index = index_in_parent(); break; - case WebKit::WebAXRoleSlider: - case WebKit::WebAXRoleProgressIndicator: { + case blink::WebAXRoleSlider: + case blink::WebAXRoleProgressIndicator: { float value_for_range; if (GetFloatAttribute( AccessibilityNodeData::ATTR_VALUE_FOR_RANGE, &value_for_range)) { @@ -231,12 +231,12 @@ int BrowserAccessibilityAndroid::GetItemIndex() const { int BrowserAccessibilityAndroid::GetItemCount() const { int count = 0; switch(role()) { - case WebKit::WebAXRoleList: - case WebKit::WebAXRoleListBox: + case blink::WebAXRoleList: + case blink::WebAXRoleListBox: count = PlatformChildCount(); break; - case WebKit::WebAXRoleSlider: - case WebKit::WebAXRoleProgressIndicator: { + case blink::WebAXRoleSlider: + case blink::WebAXRoleProgressIndicator: { float max_value_for_range; if (GetFloatAttribute(AccessibilityNodeData::ATTR_MAX_VALUE_FOR_RANGE, &max_value_for_range)) { @@ -341,7 +341,7 @@ int BrowserAccessibilityAndroid::GetEditableTextLength() const { bool BrowserAccessibilityAndroid::HasFocusableChild() const { for (uint32 i = 0; i < PlatformChildCount(); i++) { BrowserAccessibility* child = PlatformGetChild(i); - if (child->HasState(WebKit::WebAXStateFocusable)) + if (child->HasState(blink::WebAXStateFocusable)) return true; if (static_cast<BrowserAccessibilityAndroid*>(child)->HasFocusableChild()) return true; @@ -352,7 +352,7 @@ bool BrowserAccessibilityAndroid::HasFocusableChild() const { bool BrowserAccessibilityAndroid::HasOnlyStaticTextChildren() const { for (uint32 i = 0; i < PlatformChildCount(); i++) { BrowserAccessibility* child = PlatformGetChild(i); - if (child->role() != WebKit::WebAXRoleStaticText) + if (child->role() != blink::WebAXRoleStaticText) return false; } return true; @@ -374,8 +374,8 @@ void BrowserAccessibilityAndroid::PostInitialize() { } } - if (role_ == WebKit::WebAXRoleAlert && first_time_) - manager_->NotifyAccessibilityEvent(WebKit::WebAXEventAlert, this); + if (role_ == blink::WebAXRoleAlert && first_time_) + manager_->NotifyAccessibilityEvent(blink::WebAXEventAlert, this); string16 live; if (GetString16Attribute( @@ -394,7 +394,7 @@ void BrowserAccessibilityAndroid::NotifyLiveRegionUpdate(string16& aria_live) { string16 text = GetText(); if (cached_text_ != text) { if (!text.empty()) { - manager_->NotifyAccessibilityEvent(WebKit::WebAXEventShow, + manager_->NotifyAccessibilityEvent(blink::WebAXEventShow, this); } cached_text_ = text; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h index d690d81..9ac751f 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.h +++ b/content/browser/accessibility/browser_accessibility_cocoa.h @@ -40,7 +40,7 @@ // Convenience method to get the internal, cross-platform role // from browserAccessibility_. -- (WebKit::WebAXRole)internalRole; +- (blink::WebAXRole)internalRole; // Return the method name for the given attribute. For testing only. - (NSString*)methodNameForAttribute:(NSString*)attribute; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 2b4e0dc..4b88bc6 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -40,129 +40,129 @@ NSString* NSStringForStringAttribute( } struct MapEntry { - WebKit::WebAXRole webKitValue; + blink::WebAXRole webKitValue; NSString* nativeValue; }; -typedef std::map<WebKit::WebAXRole, NSString*> RoleMap; +typedef std::map<blink::WebAXRole, NSString*> RoleMap; // GetState checks the bitmask used in AccessibilityNodeData to check // if the given state was set on the accessibility object. -bool GetState(BrowserAccessibility* accessibility, WebKit::WebAXState state) { +bool GetState(BrowserAccessibility* accessibility, blink::WebAXState state) { return ((accessibility->state() >> state) & 1); } RoleMap BuildRoleMap() { const MapEntry roles[] = { - { WebKit::WebAXRoleAlert, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleAlertDialog, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleAnnotation, NSAccessibilityUnknownRole }, - { WebKit::WebAXRoleApplication, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleArticle, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleBrowser, NSAccessibilityBrowserRole }, - { WebKit::WebAXRoleBusyIndicator, NSAccessibilityBusyIndicatorRole }, - { WebKit::WebAXRoleButton, NSAccessibilityButtonRole }, - { WebKit::WebAXRoleCanvas, NSAccessibilityImageRole }, - { WebKit::WebAXRoleCell, @"AXCell" }, - { WebKit::WebAXRoleCheckBox, NSAccessibilityCheckBoxRole }, - { WebKit::WebAXRoleColorWell, NSAccessibilityColorWellRole }, - { WebKit::WebAXRoleComboBox, NSAccessibilityComboBoxRole }, - { WebKit::WebAXRoleColumn, NSAccessibilityColumnRole }, - { WebKit::WebAXRoleColumnHeader, @"AXCell" }, - { WebKit::WebAXRoleDefinition, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleDescriptionListDetail, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleDescriptionListTerm, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleDialog, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleDirectory, NSAccessibilityListRole }, - { WebKit::WebAXRoleDisclosureTriangle, + { blink::WebAXRoleAlert, NSAccessibilityGroupRole }, + { blink::WebAXRoleAlertDialog, NSAccessibilityGroupRole }, + { blink::WebAXRoleAnnotation, NSAccessibilityUnknownRole }, + { blink::WebAXRoleApplication, NSAccessibilityGroupRole }, + { blink::WebAXRoleArticle, NSAccessibilityGroupRole }, + { blink::WebAXRoleBrowser, NSAccessibilityBrowserRole }, + { blink::WebAXRoleBusyIndicator, NSAccessibilityBusyIndicatorRole }, + { blink::WebAXRoleButton, NSAccessibilityButtonRole }, + { blink::WebAXRoleCanvas, NSAccessibilityImageRole }, + { blink::WebAXRoleCell, @"AXCell" }, + { blink::WebAXRoleCheckBox, NSAccessibilityCheckBoxRole }, + { blink::WebAXRoleColorWell, NSAccessibilityColorWellRole }, + { blink::WebAXRoleComboBox, NSAccessibilityComboBoxRole }, + { blink::WebAXRoleColumn, NSAccessibilityColumnRole }, + { blink::WebAXRoleColumnHeader, @"AXCell" }, + { blink::WebAXRoleDefinition, NSAccessibilityGroupRole }, + { blink::WebAXRoleDescriptionListDetail, NSAccessibilityGroupRole }, + { blink::WebAXRoleDescriptionListTerm, NSAccessibilityGroupRole }, + { blink::WebAXRoleDialog, NSAccessibilityGroupRole }, + { blink::WebAXRoleDirectory, NSAccessibilityListRole }, + { blink::WebAXRoleDisclosureTriangle, NSAccessibilityDisclosureTriangleRole }, - { WebKit::WebAXRoleDiv, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleDocument, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleDrawer, NSAccessibilityDrawerRole }, - { WebKit::WebAXRoleEditableText, NSAccessibilityTextFieldRole }, - { WebKit::WebAXRoleFooter, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleForm, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleGrid, NSAccessibilityGridRole }, - { WebKit::WebAXRoleGroup, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleGrowArea, NSAccessibilityGrowAreaRole }, - { WebKit::WebAXRoleHeading, @"AXHeading" }, - { WebKit::WebAXRoleHelpTag, NSAccessibilityHelpTagRole }, - { WebKit::WebAXRoleHorizontalRule, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleIgnored, NSAccessibilityUnknownRole }, - { WebKit::WebAXRoleImage, NSAccessibilityImageRole }, - { WebKit::WebAXRoleImageMap, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleImageMapLink, NSAccessibilityLinkRole }, - { WebKit::WebAXRoleIncrementor, NSAccessibilityIncrementorRole }, - { WebKit::WebAXRoleLabel, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleApplication, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleBanner, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleComplementary, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleContentInfo, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleMain, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleNavigation, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleSearch, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleLink, NSAccessibilityLinkRole }, - { WebKit::WebAXRoleList, NSAccessibilityListRole }, - { WebKit::WebAXRoleListItem, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleListMarker, @"AXListMarker" }, - { WebKit::WebAXRoleListBox, NSAccessibilityListRole }, - { WebKit::WebAXRoleListBoxOption, NSAccessibilityStaticTextRole }, - { WebKit::WebAXRoleLog, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleMarquee, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleMath, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleMatte, NSAccessibilityMatteRole }, - { WebKit::WebAXRoleMenu, NSAccessibilityMenuRole }, - { WebKit::WebAXRoleMenuBar, NSAccessibilityMenuBarRole }, - { WebKit::WebAXRoleMenuItem, NSAccessibilityMenuItemRole }, - { WebKit::WebAXRoleMenuButton, NSAccessibilityButtonRole }, - { WebKit::WebAXRoleMenuListOption, NSAccessibilityMenuItemRole }, - { WebKit::WebAXRoleMenuListPopup, NSAccessibilityUnknownRole }, - { WebKit::WebAXRoleNote, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleOutline, NSAccessibilityOutlineRole }, - { WebKit::WebAXRoleParagraph, NSAccessibilityGroupRole }, - { WebKit::WebAXRolePopUpButton, NSAccessibilityPopUpButtonRole }, - { WebKit::WebAXRolePresentational, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleProgressIndicator, + { blink::WebAXRoleDiv, NSAccessibilityGroupRole }, + { blink::WebAXRoleDocument, NSAccessibilityGroupRole }, + { blink::WebAXRoleDrawer, NSAccessibilityDrawerRole }, + { blink::WebAXRoleEditableText, NSAccessibilityTextFieldRole }, + { blink::WebAXRoleFooter, NSAccessibilityGroupRole }, + { blink::WebAXRoleForm, NSAccessibilityGroupRole }, + { blink::WebAXRoleGrid, NSAccessibilityGridRole }, + { blink::WebAXRoleGroup, NSAccessibilityGroupRole }, + { blink::WebAXRoleGrowArea, NSAccessibilityGrowAreaRole }, + { blink::WebAXRoleHeading, @"AXHeading" }, + { blink::WebAXRoleHelpTag, NSAccessibilityHelpTagRole }, + { blink::WebAXRoleHorizontalRule, NSAccessibilityGroupRole }, + { blink::WebAXRoleIgnored, NSAccessibilityUnknownRole }, + { blink::WebAXRoleImage, NSAccessibilityImageRole }, + { blink::WebAXRoleImageMap, NSAccessibilityGroupRole }, + { blink::WebAXRoleImageMapLink, NSAccessibilityLinkRole }, + { blink::WebAXRoleIncrementor, NSAccessibilityIncrementorRole }, + { blink::WebAXRoleLabel, NSAccessibilityGroupRole }, + { blink::WebAXRoleApplication, NSAccessibilityGroupRole }, + { blink::WebAXRoleBanner, NSAccessibilityGroupRole }, + { blink::WebAXRoleComplementary, NSAccessibilityGroupRole }, + { blink::WebAXRoleContentInfo, NSAccessibilityGroupRole }, + { blink::WebAXRoleMain, NSAccessibilityGroupRole }, + { blink::WebAXRoleNavigation, NSAccessibilityGroupRole }, + { blink::WebAXRoleSearch, NSAccessibilityGroupRole }, + { blink::WebAXRoleLink, NSAccessibilityLinkRole }, + { blink::WebAXRoleList, NSAccessibilityListRole }, + { blink::WebAXRoleListItem, NSAccessibilityGroupRole }, + { blink::WebAXRoleListMarker, @"AXListMarker" }, + { blink::WebAXRoleListBox, NSAccessibilityListRole }, + { blink::WebAXRoleListBoxOption, NSAccessibilityStaticTextRole }, + { blink::WebAXRoleLog, NSAccessibilityGroupRole }, + { blink::WebAXRoleMarquee, NSAccessibilityGroupRole }, + { blink::WebAXRoleMath, NSAccessibilityGroupRole }, + { blink::WebAXRoleMatte, NSAccessibilityMatteRole }, + { blink::WebAXRoleMenu, NSAccessibilityMenuRole }, + { blink::WebAXRoleMenuBar, NSAccessibilityMenuBarRole }, + { blink::WebAXRoleMenuItem, NSAccessibilityMenuItemRole }, + { blink::WebAXRoleMenuButton, NSAccessibilityButtonRole }, + { blink::WebAXRoleMenuListOption, NSAccessibilityMenuItemRole }, + { blink::WebAXRoleMenuListPopup, NSAccessibilityUnknownRole }, + { blink::WebAXRoleNote, NSAccessibilityGroupRole }, + { blink::WebAXRoleOutline, NSAccessibilityOutlineRole }, + { blink::WebAXRoleParagraph, NSAccessibilityGroupRole }, + { blink::WebAXRolePopUpButton, NSAccessibilityPopUpButtonRole }, + { blink::WebAXRolePresentational, NSAccessibilityGroupRole }, + { blink::WebAXRoleProgressIndicator, NSAccessibilityProgressIndicatorRole }, - { WebKit::WebAXRoleRadioButton, NSAccessibilityRadioButtonRole }, - { WebKit::WebAXRoleRadioGroup, NSAccessibilityRadioGroupRole }, - { WebKit::WebAXRoleRegion, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleRootWebArea, @"AXWebArea" }, - { WebKit::WebAXRoleRow, NSAccessibilityRowRole }, - { WebKit::WebAXRoleRowHeader, @"AXCell" }, - { WebKit::WebAXRoleRuler, NSAccessibilityRulerRole }, - { WebKit::WebAXRoleRulerMarker, NSAccessibilityRulerMarkerRole }, + { blink::WebAXRoleRadioButton, NSAccessibilityRadioButtonRole }, + { blink::WebAXRoleRadioGroup, NSAccessibilityRadioGroupRole }, + { blink::WebAXRoleRegion, NSAccessibilityGroupRole }, + { blink::WebAXRoleRootWebArea, @"AXWebArea" }, + { blink::WebAXRoleRow, NSAccessibilityRowRole }, + { blink::WebAXRoleRowHeader, @"AXCell" }, + { blink::WebAXRoleRuler, NSAccessibilityRulerRole }, + { blink::WebAXRoleRulerMarker, NSAccessibilityRulerMarkerRole }, // TODO(dtseng): we don't correctly support the attributes for these roles. - // { WebKit::WebAXRoleScrollArea, NSAccessibilityScrollAreaRole }, - { WebKit::WebAXRoleScrollBar, NSAccessibilityScrollBarRole }, - { WebKit::WebAXRoleSheet, NSAccessibilitySheetRole }, - { WebKit::WebAXRoleSlider, NSAccessibilitySliderRole }, - { WebKit::WebAXRoleSliderThumb, NSAccessibilityValueIndicatorRole }, - { WebKit::WebAXRoleSpinButton, NSAccessibilitySliderRole }, - { WebKit::WebAXRoleSplitter, NSAccessibilitySplitterRole }, - { WebKit::WebAXRoleSplitGroup, NSAccessibilitySplitGroupRole }, - { WebKit::WebAXRoleStaticText, NSAccessibilityStaticTextRole }, - { WebKit::WebAXRoleStatus, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleSVGRoot, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleSystemWide, NSAccessibilityUnknownRole }, - { WebKit::WebAXRoleTab, NSAccessibilityRadioButtonRole }, - { WebKit::WebAXRoleTabList, NSAccessibilityTabGroupRole }, - { WebKit::WebAXRoleTabPanel, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleTable, NSAccessibilityTableRole }, - { WebKit::WebAXRoleTableHeaderContainer, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleTextArea, NSAccessibilityTextAreaRole }, - { WebKit::WebAXRoleTextField, NSAccessibilityTextFieldRole }, - { WebKit::WebAXRoleTimer, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleToggleButton, NSAccessibilityButtonRole }, - { WebKit::WebAXRoleToolbar, NSAccessibilityToolbarRole }, - { WebKit::WebAXRoleUserInterfaceTooltip, NSAccessibilityGroupRole }, - { WebKit::WebAXRoleTree, NSAccessibilityOutlineRole }, - { WebKit::WebAXRoleTreeGrid, NSAccessibilityTableRole }, - { WebKit::WebAXRoleTreeItem, NSAccessibilityRowRole }, - { WebKit::WebAXRoleValueIndicator, NSAccessibilityValueIndicatorRole }, - { WebKit::WebAXRoleLink, NSAccessibilityLinkRole }, - { WebKit::WebAXRoleWebArea, @"AXWebArea" }, - { WebKit::WebAXRoleWindow, NSAccessibilityWindowRole }, + // { blink::WebAXRoleScrollArea, NSAccessibilityScrollAreaRole }, + { blink::WebAXRoleScrollBar, NSAccessibilityScrollBarRole }, + { blink::WebAXRoleSheet, NSAccessibilitySheetRole }, + { blink::WebAXRoleSlider, NSAccessibilitySliderRole }, + { blink::WebAXRoleSliderThumb, NSAccessibilityValueIndicatorRole }, + { blink::WebAXRoleSpinButton, NSAccessibilitySliderRole }, + { blink::WebAXRoleSplitter, NSAccessibilitySplitterRole }, + { blink::WebAXRoleSplitGroup, NSAccessibilitySplitGroupRole }, + { blink::WebAXRoleStaticText, NSAccessibilityStaticTextRole }, + { blink::WebAXRoleStatus, NSAccessibilityGroupRole }, + { blink::WebAXRoleSVGRoot, NSAccessibilityGroupRole }, + { blink::WebAXRoleSystemWide, NSAccessibilityUnknownRole }, + { blink::WebAXRoleTab, NSAccessibilityRadioButtonRole }, + { blink::WebAXRoleTabList, NSAccessibilityTabGroupRole }, + { blink::WebAXRoleTabPanel, NSAccessibilityGroupRole }, + { blink::WebAXRoleTable, NSAccessibilityTableRole }, + { blink::WebAXRoleTableHeaderContainer, NSAccessibilityGroupRole }, + { blink::WebAXRoleTextArea, NSAccessibilityTextAreaRole }, + { blink::WebAXRoleTextField, NSAccessibilityTextFieldRole }, + { blink::WebAXRoleTimer, NSAccessibilityGroupRole }, + { blink::WebAXRoleToggleButton, NSAccessibilityButtonRole }, + { blink::WebAXRoleToolbar, NSAccessibilityToolbarRole }, + { blink::WebAXRoleUserInterfaceTooltip, NSAccessibilityGroupRole }, + { blink::WebAXRoleTree, NSAccessibilityOutlineRole }, + { blink::WebAXRoleTreeGrid, NSAccessibilityTableRole }, + { blink::WebAXRoleTreeItem, NSAccessibilityRowRole }, + { blink::WebAXRoleValueIndicator, NSAccessibilityValueIndicatorRole }, + { blink::WebAXRoleLink, NSAccessibilityLinkRole }, + { blink::WebAXRoleWebArea, @"AXWebArea" }, + { blink::WebAXRoleWindow, NSAccessibilityWindowRole }, }; RoleMap role_map; @@ -173,7 +173,7 @@ RoleMap BuildRoleMap() { // A mapping of webkit roles to native roles. NSString* NativeRoleFromAccessibilityNodeDataRole( - const WebKit::WebAXRole& role) { + const blink::WebAXRole& role) { CR_DEFINE_STATIC_LOCAL(RoleMap, web_accessibility_to_native_role, (BuildRoleMap())); RoleMap::iterator it = web_accessibility_to_native_role.find(role); @@ -185,32 +185,32 @@ NSString* NativeRoleFromAccessibilityNodeDataRole( RoleMap BuildSubroleMap() { const MapEntry subroles[] = { - { WebKit::WebAXRoleAlert, @"AXApplicationAlert" }, - { WebKit::WebAXRoleAlertDialog, @"AXApplicationAlertDialog" }, - { WebKit::WebAXRoleArticle, @"AXDocumentArticle" }, - { WebKit::WebAXRoleDefinition, @"AXDefinition" }, - { WebKit::WebAXRoleDescriptionListDetail, @"AXDescription" }, - { WebKit::WebAXRoleDescriptionListTerm, @"AXTerm" }, - { WebKit::WebAXRoleDialog, @"AXApplicationDialog" }, - { WebKit::WebAXRoleDocument, @"AXDocument" }, - { WebKit::WebAXRoleFooter, @"AXLandmarkContentInfo" }, - { WebKit::WebAXRoleApplication, @"AXLandmarkApplication" }, - { WebKit::WebAXRoleBanner, @"AXLandmarkBanner" }, - { WebKit::WebAXRoleComplementary, @"AXLandmarkComplementary" }, - { WebKit::WebAXRoleContentInfo, @"AXLandmarkContentInfo" }, - { WebKit::WebAXRoleMain, @"AXLandmarkMain" }, - { WebKit::WebAXRoleNavigation, @"AXLandmarkNavigation" }, - { WebKit::WebAXRoleSearch, @"AXLandmarkSearch" }, - { WebKit::WebAXRoleLog, @"AXApplicationLog" }, - { WebKit::WebAXRoleMarquee, @"AXApplicationMarquee" }, - { WebKit::WebAXRoleMath, @"AXDocumentMath" }, - { WebKit::WebAXRoleNote, @"AXDocumentNote" }, - { WebKit::WebAXRoleRegion, @"AXDocumentRegion" }, - { WebKit::WebAXRoleStatus, @"AXApplicationStatus" }, - { WebKit::WebAXRoleTabPanel, @"AXTabPanel" }, - { WebKit::WebAXRoleTimer, @"AXApplicationTimer" }, - { WebKit::WebAXRoleUserInterfaceTooltip, @"AXUserInterfaceTooltip" }, - { WebKit::WebAXRoleTreeItem, NSAccessibilityOutlineRowSubrole }, + { blink::WebAXRoleAlert, @"AXApplicationAlert" }, + { blink::WebAXRoleAlertDialog, @"AXApplicationAlertDialog" }, + { blink::WebAXRoleArticle, @"AXDocumentArticle" }, + { blink::WebAXRoleDefinition, @"AXDefinition" }, + { blink::WebAXRoleDescriptionListDetail, @"AXDescription" }, + { blink::WebAXRoleDescriptionListTerm, @"AXTerm" }, + { blink::WebAXRoleDialog, @"AXApplicationDialog" }, + { blink::WebAXRoleDocument, @"AXDocument" }, + { blink::WebAXRoleFooter, @"AXLandmarkContentInfo" }, + { blink::WebAXRoleApplication, @"AXLandmarkApplication" }, + { blink::WebAXRoleBanner, @"AXLandmarkBanner" }, + { blink::WebAXRoleComplementary, @"AXLandmarkComplementary" }, + { blink::WebAXRoleContentInfo, @"AXLandmarkContentInfo" }, + { blink::WebAXRoleMain, @"AXLandmarkMain" }, + { blink::WebAXRoleNavigation, @"AXLandmarkNavigation" }, + { blink::WebAXRoleSearch, @"AXLandmarkSearch" }, + { blink::WebAXRoleLog, @"AXApplicationLog" }, + { blink::WebAXRoleMarquee, @"AXApplicationMarquee" }, + { blink::WebAXRoleMath, @"AXDocumentMath" }, + { blink::WebAXRoleNote, @"AXDocumentNote" }, + { blink::WebAXRoleRegion, @"AXDocumentRegion" }, + { blink::WebAXRoleStatus, @"AXApplicationStatus" }, + { blink::WebAXRoleTabPanel, @"AXTabPanel" }, + { blink::WebAXRoleTimer, @"AXApplicationTimer" }, + { blink::WebAXRoleUserInterfaceTooltip, @"AXUserInterfaceTooltip" }, + { blink::WebAXRoleTreeItem, NSAccessibilityOutlineRowSubrole }, }; RoleMap subrole_map; @@ -221,7 +221,7 @@ RoleMap BuildSubroleMap() { // A mapping of webkit roles to native subroles. NSString* NativeSubroleFromAccessibilityNodeDataRole( - const WebKit::WebAXRole& role) { + const blink::WebAXRole& role) { CR_DEFINE_STATIC_LOCAL(RoleMap, web_accessibility_to_native_subrole, (BuildSubroleMap())); RoleMap::iterator it = web_accessibility_to_native_subrole.find(role); @@ -396,8 +396,8 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSArray*)columnHeaders { - if ([self internalRole] != WebKit::WebAXRoleTable && - [self internalRole] != WebKit::WebAXRoleGrid) { + if ([self internalRole] != blink::WebAXRoleTable && + [self internalRole] != blink::WebAXRoleGrid) { return nil; } @@ -409,14 +409,14 @@ NSDictionary* attributeToMethodNameMap = nil; int id = uniqueCellIds[i]; BrowserAccessibility* cell = browserAccessibility_->manager()->GetFromRendererID(id); - if (cell && cell->role() == WebKit::WebAXRoleColumnHeader) + if (cell && cell->role() == blink::WebAXRoleColumnHeader) [ret addObject:cell->ToBrowserAccessibilityCocoa()]; } return ret; } - (NSValue*)columnIndexRange { - if ([self internalRole] != WebKit::WebAXRoleCell) + if ([self internalRole] != blink::WebAXRoleCell) return nil; int column = -1; @@ -474,9 +474,9 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSNumber*)disclosing { - if ([self internalRole] == WebKit::WebAXRoleTreeItem) { + if ([self internalRole] == blink::WebAXRoleTreeItem) { return [NSNumber numberWithBool: - GetState(browserAccessibility_, WebKit::WebAXStateExpanded)]; + GetState(browserAccessibility_, blink::WebAXStateExpanded)]; } else { return nil; } @@ -489,9 +489,9 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSNumber*)disclosureLevel { - WebKit::WebAXRole role = [self internalRole]; - if (role == WebKit::WebAXRoleRow || - role == WebKit::WebAXRoleTreeItem) { + blink::WebAXRole role = [self internalRole]; + if (role == blink::WebAXRoleRow || + role == blink::WebAXRoleTreeItem) { int level = browserAccessibility_->GetIntAttribute( AccessibilityNodeData::ATTR_HIERARCHICAL_LEVEL); // Mac disclosureLevel is 0-based, but web levels are 1-based. @@ -510,7 +510,7 @@ NSDictionary* attributeToMethodNameMap = nil; - (NSNumber*)enabled { return [NSNumber numberWithBool: - GetState(browserAccessibility_, WebKit::WebAXStateEnabled)]; + GetState(browserAccessibility_, blink::WebAXStateEnabled)]; } - (NSNumber*)focused { @@ -522,14 +522,14 @@ NSDictionary* attributeToMethodNameMap = nil; - (id)header { int headerElementId = -1; - if ([self internalRole] == WebKit::WebAXRoleTable || - [self internalRole] == WebKit::WebAXRoleGrid) { + if ([self internalRole] == blink::WebAXRoleTable || + [self internalRole] == blink::WebAXRoleGrid) { browserAccessibility_->GetIntAttribute( AccessibilityNodeData::ATTR_TABLE_HEADER_ID, &headerElementId); - } else if ([self internalRole] == WebKit::WebAXRoleColumn) { + } else if ([self internalRole] == blink::WebAXRoleColumn) { browserAccessibility_->GetIntAttribute( AccessibilityNodeData::ATTR_TABLE_COLUMN_HEADER_ID, &headerElementId); - } else if ([self internalRole] == WebKit::WebAXRoleRow) { + } else if ([self internalRole] == blink::WebAXRoleRow) { browserAccessibility_->GetIntAttribute( AccessibilityNodeData::ATTR_TABLE_ROW_HEADER_ID, &headerElementId); } @@ -549,11 +549,11 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSNumber*)index { - if ([self internalRole] == WebKit::WebAXRoleColumn) { + if ([self internalRole] == blink::WebAXRoleColumn) { int columnIndex = browserAccessibility_->GetIntAttribute( AccessibilityNodeData::ATTR_TABLE_COLUMN_INDEX); return [NSNumber numberWithInt:columnIndex]; - } else if ([self internalRole] == WebKit::WebAXRoleRow) { + } else if ([self internalRole] == blink::WebAXRoleRow) { int rowIndex = browserAccessibility_->GetIntAttribute( AccessibilityNodeData::ATTR_TABLE_ROW_INDEX); return [NSNumber numberWithInt:rowIndex]; @@ -605,10 +605,10 @@ NSDictionary* attributeToMethodNameMap = nil; - (NSString*)orientation { // We present a spin button as a vertical slider, with a role description // of "spin button". - if ([self internalRole] == WebKit::WebAXRoleSpinButton) + if ([self internalRole] == blink::WebAXRoleSpinButton) return NSAccessibilityVerticalOrientationValue; - if (GetState(browserAccessibility_, WebKit::WebAXStateVertical)) + if (GetState(browserAccessibility_, blink::WebAXStateVertical)) return NSAccessibilityVerticalOrientationValue; else return NSAccessibilityHorizontalOrientationValue; @@ -646,18 +646,18 @@ NSDictionary* attributeToMethodNameMap = nil; - (NSNumber*)required { return [NSNumber numberWithBool: - GetState(browserAccessibility_, WebKit::WebAXStateRequired)]; + GetState(browserAccessibility_, blink::WebAXStateRequired)]; } // Returns an enum indicating the role from browserAccessibility_. -- (WebKit::WebAXRole)internalRole { - return static_cast<WebKit::WebAXRole>(browserAccessibility_->role()); +- (blink::WebAXRole)internalRole { + return static_cast<blink::WebAXRole>(browserAccessibility_->role()); } // Returns a string indicating the NSAccessibility role of this object. - (NSString*)role { - WebKit::WebAXRole role = [self internalRole]; - if (role == WebKit::WebAXRoleCanvas && + blink::WebAXRole role = [self internalRole]; + if (role == blink::WebAXRoleCanvas && browserAccessibility_->GetBoolAttribute( AccessibilityNodeData::ATTR_CANVAS_HAS_FALLBACK)) { return NSAccessibilityGroupRole; @@ -691,10 +691,10 @@ NSDictionary* attributeToMethodNameMap = nil; [role isEqualToString:NSAccessibilityRadioButtonRole]) { std::string role; if (browserAccessibility_->GetHtmlAttribute("role", &role)) { - WebKit::WebAXRole internalRole = [self internalRole]; - if ((internalRole != WebKit::WebAXRoleGroup && - internalRole != WebKit::WebAXRoleListItem) || - internalRole == WebKit::WebAXRoleTab) { + blink::WebAXRole internalRole = [self internalRole]; + if ((internalRole != blink::WebAXRoleGroup && + internalRole != blink::WebAXRoleListItem) || + internalRole == blink::WebAXRoleTab) { // TODO(dtseng): This is not localized; see crbug/84814. return base::SysUTF8ToNSString(role); } @@ -702,10 +702,10 @@ NSDictionary* attributeToMethodNameMap = nil; } switch([self internalRole]) { - case WebKit::WebAXRoleFooter: + case blink::WebAXRoleFooter: return base::SysUTF16ToNSString(content_client->GetLocalizedString( IDS_AX_ROLE_FOOTER)); - case WebKit::WebAXRoleSpinButton: + case blink::WebAXRoleSpinButton: // This control is similar to what VoiceOver calls a "stepper". return base::SysUTF16ToNSString(content_client->GetLocalizedString( IDS_AX_ROLE_STEPPER)); @@ -717,8 +717,8 @@ NSDictionary* attributeToMethodNameMap = nil; } - (NSArray*)rowHeaders { - if ([self internalRole] != WebKit::WebAXRoleTable && - [self internalRole] != WebKit::WebAXRoleGrid) { + if ([self internalRole] != blink::WebAXRoleTable && + [self internalRole] != blink::WebAXRoleGrid) { return nil; } @@ -730,14 +730,14 @@ NSDictionary* attributeToMethodNameMap = nil; int id = uniqueCellIds[i]; BrowserAccessibility* cell = browserAccessibility_->manager()->GetFromRendererID(id); - if (cell && cell->role() == WebKit::WebAXRoleRowHeader) + if (cell && cell->role() == blink::WebAXRoleRowHeader) [ret addObject:cell->ToBrowserAccessibilityCocoa()]; } return ret; } - (NSValue*)rowIndexRange { - if ([self internalRole] != WebKit::WebAXRoleCell) + if ([self internalRole] != blink::WebAXRoleCell) return nil; int row = -1; @@ -754,13 +754,13 @@ NSDictionary* attributeToMethodNameMap = nil; - (NSArray*)rows { NSMutableArray* ret = [[[NSMutableArray alloc] init] autorelease]; - if ([self internalRole] == WebKit::WebAXRoleTable|| - [self internalRole] == WebKit::WebAXRoleGrid) { + if ([self internalRole] == blink::WebAXRoleTable|| + [self internalRole] == blink::WebAXRoleGrid) { for (BrowserAccessibilityCocoa* child in [self children]) { if ([[child role] isEqualToString:NSAccessibilityRowRole]) [ret addObject:child]; } - } else if ([self internalRole] == WebKit::WebAXRoleColumn) { + } else if ([self internalRole] == blink::WebAXRoleColumn) { const std::vector<int32>& indirectChildIds = browserAccessibility_->GetIntListAttribute( AccessibilityNodeData::ATTR_INDIRECT_CHILD_IDS); @@ -784,16 +784,16 @@ NSDictionary* attributeToMethodNameMap = nil; // Returns a subrole based upon the role. - (NSString*) subrole { - WebKit::WebAXRole browserAccessibilityRole = [self internalRole]; - if (browserAccessibilityRole == WebKit::WebAXRoleTextField && - GetState(browserAccessibility_, WebKit::WebAXStateProtected)) { + blink::WebAXRole browserAccessibilityRole = [self internalRole]; + if (browserAccessibilityRole == blink::WebAXRoleTextField && + GetState(browserAccessibility_, blink::WebAXStateProtected)) { return @"AXSecureTextField"; } NSString* htmlTag = NSStringForStringAttribute( browserAccessibility_, AccessibilityNodeData::ATTR_HTML_TAG); - if (browserAccessibilityRole == WebKit::WebAXRoleList) { + if (browserAccessibilityRole == blink::WebAXRoleList) { if ([htmlTag isEqualToString:@"ul"] || [htmlTag isEqualToString:@"ol"]) { return @"AXContentList"; @@ -809,7 +809,7 @@ NSDictionary* attributeToMethodNameMap = nil; - (NSArray*)tabs { NSMutableArray* tabSubtree = [[[NSMutableArray alloc] init] autorelease]; - if ([self internalRole] == WebKit::WebAXRoleTab) + if ([self internalRole] == blink::WebAXRoleTab) [tabSubtree addObject:self]; for (uint i=0; i < [[self children] count]; ++i) { @@ -864,9 +864,9 @@ NSDictionary* attributeToMethodNameMap = nil; [role isEqualToString:NSAccessibilityRadioButtonRole]) { int value = 0; value = GetState( - browserAccessibility_, WebKit::WebAXStateChecked) ? 1 : 0; + browserAccessibility_, blink::WebAXStateChecked) ? 1 : 0; value = GetState( - browserAccessibility_, WebKit::WebAXStateSelected) ? + browserAccessibility_, blink::WebAXStateSelected) ? 1 : value; @@ -934,7 +934,7 @@ NSDictionary* attributeToMethodNameMap = nil; - (NSNumber*)visited { return [NSNumber numberWithBool: - GetState(browserAccessibility_, WebKit::WebAXStateVisited)]; + GetState(browserAccessibility_, blink::WebAXStateVisited)]; } - (id)window { @@ -1032,8 +1032,8 @@ NSDictionary* attributeToMethodNameMap = nil; if ([attribute isEqualToString: NSAccessibilityCellForColumnAndRowParameterizedAttribute]) { - if ([self internalRole] != WebKit::WebAXRoleTable && - [self internalRole] != WebKit::WebAXRoleGrid) { + if ([self internalRole] != blink::WebAXRoleTable && + [self internalRole] != blink::WebAXRoleGrid) { return nil; } if (![parameter isKindOfClass:[NSArray self]]) @@ -1053,7 +1053,7 @@ NSDictionary* attributeToMethodNameMap = nil; i < browserAccessibility_->PlatformChildCount(); ++i) { BrowserAccessibility* child = browserAccessibility_->PlatformGetChild(i); - if (child->role() != WebKit::WebAXRoleRow) + if (child->role() != blink::WebAXRoleRow) continue; int rowIndex; if (!child->GetIntAttribute( @@ -1068,7 +1068,7 @@ NSDictionary* attributeToMethodNameMap = nil; j < child->PlatformChildCount(); ++j) { BrowserAccessibility* cell = child->PlatformGetChild(j); - if (cell->role() != WebKit::WebAXRoleCell) + if (cell->role() != blink::WebAXRoleCell) continue; int colIndex; if (!cell->GetIntAttribute( @@ -1341,7 +1341,7 @@ NSDictionary* attributeToMethodNameMap = nil; if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) return GetState(browserAccessibility_, - WebKit::WebAXStateFocusable); + blink::WebAXStateFocusable); if ([attribute isEqualToString:NSAccessibilityValueAttribute]) { return browserAccessibility_->GetBoolAttribute( AccessibilityNodeData::ATTR_CAN_SET_VALUE); diff --git a/content/browser/accessibility/browser_accessibility_gtk.cc b/content/browser/accessibility/browser_accessibility_gtk.cc index acab43b..c89aa2b 100644 --- a/content/browser/accessibility/browser_accessibility_gtk.cc +++ b/content/browser/accessibility/browser_accessibility_gtk.cc @@ -255,11 +255,11 @@ static AtkStateSet* browser_accessibility_ref_state_set(AtkObject* atk_object) { ref_state_set(atk_object); int32 state = obj->state(); - if (state & (1 << WebKit::WebAXStateFocusable)) + if (state & (1 << blink::WebAXStateFocusable)) atk_state_set_add_state(state_set, ATK_STATE_FOCUSABLE); if (obj->manager()->GetFocus(NULL) == obj) atk_state_set_add_state(state_set, ATK_STATE_FOCUSED); - if (state & (1 << WebKit::WebAXStateEnabled)) + if (state & (1 << blink::WebAXStateEnabled)) atk_state_set_add_state(state_set, ATK_STATE_ENABLED); return state_set; @@ -364,9 +364,9 @@ static int GetInterfaceMaskFromObject(BrowserAccessibilityGtk* obj) { interface_mask |= 1 << ATK_COMPONENT_INTERFACE; int role = obj->role(); - if (role == WebKit::WebAXRoleProgressIndicator || - role == WebKit::WebAXRoleScrollBar || - role == WebKit::WebAXRoleSlider) { + if (role == blink::WebAXRoleProgressIndicator || + role == blink::WebAXRoleScrollBar || + role == blink::WebAXRoleSlider) { interface_mask |= 1 << ATK_VALUE_INTERFACE; } @@ -476,37 +476,37 @@ bool BrowserAccessibilityGtk::IsNative() const { void BrowserAccessibilityGtk::InitRoleAndState() { switch(role_) { - case WebKit::WebAXRoleDocument: - case WebKit::WebAXRoleRootWebArea: - case WebKit::WebAXRoleWebArea: + case blink::WebAXRoleDocument: + case blink::WebAXRoleRootWebArea: + case blink::WebAXRoleWebArea: atk_role_ = ATK_ROLE_DOCUMENT_WEB; break; - case WebKit::WebAXRoleGroup: - case WebKit::WebAXRoleDiv: + case blink::WebAXRoleGroup: + case blink::WebAXRoleDiv: atk_role_ = ATK_ROLE_SECTION; break; - case WebKit::WebAXRoleButton: + case blink::WebAXRoleButton: atk_role_ = ATK_ROLE_PUSH_BUTTON; break; - case WebKit::WebAXRoleCheckBox: + case blink::WebAXRoleCheckBox: atk_role_ = ATK_ROLE_CHECK_BOX; break; - case WebKit::WebAXRoleComboBox: + case blink::WebAXRoleComboBox: atk_role_ = ATK_ROLE_COMBO_BOX; break; - case WebKit::WebAXRoleLink: + case blink::WebAXRoleLink: atk_role_ = ATK_ROLE_LINK; break; - case WebKit::WebAXRoleRadioButton: + case blink::WebAXRoleRadioButton: atk_role_ = ATK_ROLE_RADIO_BUTTON; break; - case WebKit::WebAXRoleStaticText: + case blink::WebAXRoleStaticText: atk_role_ = ATK_ROLE_TEXT; break; - case WebKit::WebAXRoleTextArea: + case blink::WebAXRoleTextArea: atk_role_ = ATK_ROLE_ENTRY; break; - case WebKit::WebAXRoleTextField: + case blink::WebAXRoleTextField: atk_role_ = ATK_ROLE_ENTRY; break; default: diff --git a/content/browser/accessibility/browser_accessibility_mac_unittest.mm b/content/browser/accessibility/browser_accessibility_mac_unittest.mm index 5f5d0f2..e1b1a93 100644 --- a/content/browser/accessibility/browser_accessibility_mac_unittest.mm +++ b/content/browser/accessibility/browser_accessibility_mac_unittest.mm @@ -67,7 +67,7 @@ class BrowserAccessibilityTest : public ui::CocoaTest { root.id = 1000; root.location.set_width(500); root.location.set_height(100); - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.AddStringAttribute(AccessibilityNodeData::ATTR_HELP, "HelpText"); root.child_ids.push_back(1001); root.child_ids.push_back(1002); @@ -77,14 +77,14 @@ class BrowserAccessibilityTest : public ui::CocoaTest { child1.SetName("Child1"); child1.location.set_width(250); child1.location.set_height(100); - child1.role = WebKit::WebAXRoleButton; + child1.role = blink::WebAXRoleButton; AccessibilityNodeData child2; child2.id = 1002; child2.location.set_x(250); child2.location.set_width(250); child2.location.set_height(100); - child2.role = WebKit::WebAXRoleHeading; + child2.role = blink::WebAXRoleHeading; delegate_.reset([[MockAccessibilityDelegate alloc] init]); manager_.reset( diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc index 2161fb1..aef3409 100644 --- a/content/browser/accessibility/browser_accessibility_manager.cc +++ b/content/browser/accessibility/browser_accessibility_manager.cc @@ -69,7 +69,7 @@ void BrowserAccessibilityManager::Initialize(const AccessibilityNodeData src) { AccessibilityNodeData BrowserAccessibilityManager::GetEmptyDocument() { AccessibilityNodeData empty_document; empty_document.id = 0; - empty_document.role = WebKit::WebAXRoleRootWebArea; + empty_document.role = blink::WebAXRoleRootWebArea; return empty_document; } @@ -93,7 +93,7 @@ void BrowserAccessibilityManager::GotFocus(bool touch_event_context) { if (!focus_) return; - NotifyAccessibilityEvent(WebKit::WebAXEventFocus, focus_); + NotifyAccessibilityEvent(blink::WebAXEventFocus, focus_); } void BrowserAccessibilityManager::WasHidden() { @@ -102,7 +102,7 @@ void BrowserAccessibilityManager::WasHidden() { void BrowserAccessibilityManager::GotMouseDown() { osk_state_ = OSK_ALLOWED_WITHIN_FOCUSED_OBJECT; - NotifyAccessibilityEvent(WebKit::WebAXEventFocus, focus_); + NotifyAccessibilityEvent(blink::WebAXEventFocus, focus_); } bool BrowserAccessibilityManager::IsOSKAllowed(const gfx::Rect& bounds) { @@ -139,9 +139,9 @@ void BrowserAccessibilityManager::OnAccessibilityEvents( if (!node) continue; - WebKit::WebAXEvent event_type = param.event_type; - if (event_type == WebKit::WebAXEventFocus || - event_type == WebKit::WebAXEventBlur) { + blink::WebAXEvent event_type = param.event_type; + if (event_type == blink::WebAXEventFocus || + event_type == blink::WebAXEventBlur) { SetFocus(node, false); if (osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_HIDDEN && @@ -158,11 +158,11 @@ void BrowserAccessibilityManager::OnAccessibilityEvents( NotifyAccessibilityEvent(event_type, node); // Set initial focus when a page is loaded. - if (event_type == WebKit::WebAXEventLoadComplete) { + if (event_type == blink::WebAXEventLoadComplete) { if (!focus_) SetFocus(root_, false); if (!delegate_ || delegate_->HasFocus()) - NotifyAccessibilityEvent(WebKit::WebAXEventFocus, focus_); + NotifyAccessibilityEvent(blink::WebAXEventFocus, focus_); } } } @@ -333,7 +333,7 @@ bool BrowserAccessibilityManager::UpdateNode(const AccessibilityNodeData& src) { // and this is a serious error. BrowserAccessibility* instance = GetFromRendererID(src.id); if (!instance) { - if (src.role != WebKit::WebAXRoleRootWebArea) + if (src.role != blink::WebAXRoleRootWebArea) return false; instance = CreateNode(NULL, src.id, 0); } @@ -400,7 +400,7 @@ bool BrowserAccessibilityManager::UpdateNode(const AccessibilityNodeData& src) { instance->SwapChildren(new_children); // Handle the case where this node is the new root of the tree. - if (src.role == WebKit::WebAXRoleRootWebArea && + if (src.role == blink::WebAXRoleRootWebArea && (!root_ || root_->renderer_id() != src.id)) { if (root_) root_->Destroy(); @@ -410,9 +410,9 @@ bool BrowserAccessibilityManager::UpdateNode(const AccessibilityNodeData& src) { } // Keep track of what node is focused. - if (src.role != WebKit::WebAXRoleRootWebArea && - src.role != WebKit::WebAXRoleWebArea && - (src.state >> WebKit::WebAXStateFocused & 1)) { + if (src.role != blink::WebAXRoleRootWebArea && + src.role != blink::WebAXRoleWebArea && + (src.state >> blink::WebAXStateFocused & 1)) { SetFocus(instance, false); } return success; diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h index 00217ca..716ee40 100644 --- a/content/browser/accessibility/browser_accessibility_manager.h +++ b/content/browser/accessibility/browser_accessibility_manager.h @@ -70,7 +70,7 @@ class CONTENT_EXPORT BrowserAccessibilityManager { static AccessibilityNodeData GetEmptyDocument(); virtual void NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, BrowserAccessibility* node) { } + blink::WebAXEvent event_type, BrowserAccessibility* node) { } // Return a pointer to the root of the tree, does not make a new reference. BrowserAccessibility* GetRoot(); diff --git a/content/browser/accessibility/browser_accessibility_manager_android.cc b/content/browser/accessibility/browser_accessibility_manager_android.cc index 22479fd..a9fd646 100644 --- a/content/browser/accessibility/browser_accessibility_manager_android.cc +++ b/content/browser/accessibility/browser_accessibility_manager_android.cc @@ -76,8 +76,8 @@ BrowserAccessibilityManagerAndroid::~BrowserAccessibilityManagerAndroid() { AccessibilityNodeData BrowserAccessibilityManagerAndroid::GetEmptyDocument() { AccessibilityNodeData empty_document; empty_document.id = 0; - empty_document.role = WebKit::WebAXRoleRootWebArea; - empty_document.state = 1 << WebKit::WebAXStateReadonly; + empty_document.role = blink::WebAXRoleRootWebArea; + empty_document.state = 1 << blink::WebAXStateReadonly; return empty_document; } @@ -93,7 +93,7 @@ void BrowserAccessibilityManagerAndroid::SetContentViewCore( } void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, + blink::WebAXEvent event_type, BrowserAccessibility* node) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); @@ -107,26 +107,26 @@ void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent( env, obj.obj(), node->renderer_id()); switch (event_type) { - case WebKit::WebAXEventLoadComplete: + case blink::WebAXEventLoadComplete: Java_BrowserAccessibilityManager_handlePageLoaded( env, obj.obj(), focus_->renderer_id()); break; - case WebKit::WebAXEventFocus: + case blink::WebAXEventFocus: Java_BrowserAccessibilityManager_handleFocusChanged( env, obj.obj(), node->renderer_id()); break; - case WebKit::WebAXEventCheckedStateChanged: + case blink::WebAXEventCheckedStateChanged: Java_BrowserAccessibilityManager_handleCheckStateChanged( env, obj.obj(), node->renderer_id()); break; - case WebKit::WebAXEventScrolledToAnchor: + case blink::WebAXEventScrolledToAnchor: Java_BrowserAccessibilityManager_handleScrolledToAnchor( env, obj.obj(), node->renderer_id()); break; - case WebKit::WebAXEventAlert: + case blink::WebAXEventAlert: // An alert is a special case of live region. Fall through to the // next case to handle it. - case WebKit::WebAXEventShow: { + case blink::WebAXEventShow: { // This event is fired when an object appears in a live region. // Speak its text. BrowserAccessibilityAndroid* android_node = @@ -137,13 +137,13 @@ void BrowserAccessibilityManagerAndroid::NotifyAccessibilityEvent( env, android_node->GetText()).obj()); break; } - case WebKit::WebAXEventSelectedTextChanged: + case blink::WebAXEventSelectedTextChanged: Java_BrowserAccessibilityManager_handleTextSelectionChanged( env, obj.obj(), node->renderer_id()); break; - case WebKit::WebAXEventChildrenChanged: - case WebKit::WebAXEventTextChanged: - case WebKit::WebAXEventValueChanged: + case blink::WebAXEventChildrenChanged: + case blink::WebAXEventTextChanged: + case blink::WebAXEventValueChanged: if (node->IsEditableText()) { Java_BrowserAccessibilityManager_handleEditableTextChanged( env, obj.obj(), node->renderer_id()); diff --git a/content/browser/accessibility/browser_accessibility_manager_android.h b/content/browser/accessibility/browser_accessibility_manager_android.h index e241fa8..1b7bded 100644 --- a/content/browser/accessibility/browser_accessibility_manager_android.h +++ b/content/browser/accessibility/browser_accessibility_manager_android.h @@ -34,7 +34,7 @@ class CONTENT_EXPORT BrowserAccessibilityManagerAndroid // Implementation of BrowserAccessibilityManager. virtual void NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; + blink::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; // -------------------------------------------------------------------------- // Methods called from Java via JNI diff --git a/content/browser/accessibility/browser_accessibility_manager_gtk.cc b/content/browser/accessibility/browser_accessibility_manager_gtk.cc index 2b8bbfc..e97f8b2 100644 --- a/content/browser/accessibility/browser_accessibility_manager_gtk.cc +++ b/content/browser/accessibility/browser_accessibility_manager_gtk.cc @@ -38,24 +38,24 @@ BrowserAccessibilityManagerGtk::~BrowserAccessibilityManagerGtk() { AccessibilityNodeData BrowserAccessibilityManagerGtk::GetEmptyDocument() { AccessibilityNodeData empty_document; empty_document.id = 0; - empty_document.role = WebKit::WebAXRoleRootWebArea; + empty_document.role = blink::WebAXRoleRootWebArea; empty_document.state = - 1 << WebKit::WebAXStateReadonly; + 1 << blink::WebAXStateReadonly; return empty_document; } void BrowserAccessibilityManagerGtk::NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, + blink::WebAXEvent event_type, BrowserAccessibility* node) { if (!node->IsNative()) return; AtkObject* atk_object = node->ToBrowserAccessibilityGtk()->GetAtkObject(); switch (event_type) { - case WebKit::WebAXEventChildrenChanged: + case blink::WebAXEventChildrenChanged: RecursivelySendChildrenChanged(GetRoot()->ToBrowserAccessibilityGtk()); break; - case WebKit::WebAXEventFocus: + case blink::WebAXEventFocus: // Note: the focus-event was deprecated in ATK 2.9.4 // See https://bugzilla.gnome.org/show_bug.cgi?id=649575#c8 g_signal_emit_by_name(atk_object, "focus-event", true); diff --git a/content/browser/accessibility/browser_accessibility_manager_gtk.h b/content/browser/accessibility/browser_accessibility_manager_gtk.h index 4c29d8d..97d99d3 100644 --- a/content/browser/accessibility/browser_accessibility_manager_gtk.h +++ b/content/browser/accessibility/browser_accessibility_manager_gtk.h @@ -28,7 +28,7 @@ class CONTENT_EXPORT BrowserAccessibilityManagerGtk // BrowserAccessibilityManager methods virtual void NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; + blink::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; GtkWidget* parent_widget() { return parent_widget_; } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.h b/content/browser/accessibility/browser_accessibility_manager_mac.h index 70ca419..3b00f05 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.h +++ b/content/browser/accessibility/browser_accessibility_manager_mac.h @@ -24,7 +24,7 @@ class CONTENT_EXPORT BrowserAccessibilityManagerMac // Implementation of BrowserAccessibilityManager. virtual void NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; + blink::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; NSView* parent_view() { return parent_view_; } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm index 1abf5fc..8f07f319 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -31,14 +31,14 @@ BrowserAccessibilityManagerMac::BrowserAccessibilityManagerMac( AccessibilityNodeData BrowserAccessibilityManagerMac::GetEmptyDocument() { AccessibilityNodeData empty_document; empty_document.id = 0; - empty_document.role = WebKit::WebAXRoleRootWebArea; + empty_document.role = blink::WebAXRoleRootWebArea; empty_document.state = - 1 << WebKit::WebAXStateReadonly; + 1 << blink::WebAXStateReadonly; return empty_document; } void BrowserAccessibilityManagerMac::NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, + blink::WebAXEvent event_type, BrowserAccessibility* node) { if (!node->IsNative()) return; @@ -46,88 +46,88 @@ void BrowserAccessibilityManagerMac::NotifyAccessibilityEvent( // Refer to AXObjectCache.mm (webkit). NSString* event_id = @""; switch (event_type) { - case WebKit::WebAXEventActiveDescendantChanged: - if (node->role() == WebKit::WebAXRoleTree) + case blink::WebAXEventActiveDescendantChanged: + if (node->role() == blink::WebAXRoleTree) event_id = NSAccessibilitySelectedRowsChangedNotification; else event_id = NSAccessibilityFocusedUIElementChangedNotification; break; - case WebKit::WebAXEventAlert: + case blink::WebAXEventAlert: // Not used on Mac. return; - case WebKit::WebAXEventBlur: + case blink::WebAXEventBlur: // A no-op on Mac. return; - case WebKit::WebAXEventCheckedStateChanged: + case blink::WebAXEventCheckedStateChanged: // Not used on Mac. return; - case WebKit::WebAXEventChildrenChanged: + case blink::WebAXEventChildrenChanged: // TODO(dtseng): no clear equivalent on Mac. return; - case WebKit::WebAXEventFocus: + case blink::WebAXEventFocus: event_id = NSAccessibilityFocusedUIElementChangedNotification; break; - case WebKit::WebAXEventLayoutComplete: + case blink::WebAXEventLayoutComplete: event_id = @"AXLayoutComplete"; break; - case WebKit::WebAXEventLiveRegionChanged: + case blink::WebAXEventLiveRegionChanged: event_id = @"AXLiveRegionChanged"; break; - case WebKit::WebAXEventLoadComplete: + case blink::WebAXEventLoadComplete: event_id = @"AXLoadComplete"; break; - case WebKit::WebAXEventMenuListValueChanged: + case blink::WebAXEventMenuListValueChanged: // Not used on Mac. return; - case WebKit::WebAXEventShow: + case blink::WebAXEventShow: // Not used on Mac. return; - case WebKit::WebAXEventHide: + case blink::WebAXEventHide: // Not used on Mac. return; - case WebKit::WebAXEventRowCountChanged: + case blink::WebAXEventRowCountChanged: event_id = NSAccessibilityRowCountChangedNotification; break; - case WebKit::WebAXEventRowCollapsed: + case blink::WebAXEventRowCollapsed: event_id = @"AXRowCollapsed"; break; - case WebKit::WebAXEventRowExpanded: + case blink::WebAXEventRowExpanded: event_id = @"AXRowExpanded"; break; - case WebKit::WebAXEventScrolledToAnchor: + case blink::WebAXEventScrolledToAnchor: // Not used on Mac. return; - case WebKit::WebAXEventSelectedChildrenChanged: + case blink::WebAXEventSelectedChildrenChanged: event_id = NSAccessibilitySelectedChildrenChangedNotification; break; - case WebKit::WebAXEventSelectedTextChanged: + case blink::WebAXEventSelectedTextChanged: event_id = NSAccessibilitySelectedTextChangedNotification; break; - case WebKit::WebAXEventTextInserted: + case blink::WebAXEventTextInserted: // Not used on Mac. return; - case WebKit::WebAXEventTextRemoved: + case blink::WebAXEventTextRemoved: // Not used on Mac. return; - case WebKit::WebAXEventValueChanged: + case blink::WebAXEventValueChanged: event_id = NSAccessibilityValueChangedNotification; break; - case WebKit::WebAXEventAriaAttributeChanged: + case blink::WebAXEventAriaAttributeChanged: // Not used on Mac. return; - case WebKit::WebAXEventAutocorrectionOccured: + case blink::WebAXEventAutocorrectionOccured: // Not used on Mac. return; - case WebKit::WebAXEventInvalidStatusChanged: + case blink::WebAXEventInvalidStatusChanged: // Not used on Mac. return; - case WebKit::WebAXEventLocationChanged: + case blink::WebAXEventLocationChanged: // Not used on Mac. return; - case WebKit::WebAXEventMenuListItemSelected: + case blink::WebAXEventMenuListItemSelected: // Not used on Mac. return; - case WebKit::WebAXEventTextChanged: + case blink::WebAXEventTextChanged: // Not used on Mac. return; default: diff --git a/content/browser/accessibility/browser_accessibility_manager_unittest.cc b/content/browser/accessibility/browser_accessibility_manager_unittest.cc index fbbf3c4..b0d4836 100644 --- a/content/browser/accessibility/browser_accessibility_manager_unittest.cc +++ b/content/browser/accessibility/browser_accessibility_manager_unittest.cc @@ -93,19 +93,19 @@ TEST(BrowserAccessibilityManagerTest, TestNoLeaks) { AccessibilityNodeData button; button.id = 2; button.SetName("Button"); - button.role = WebKit::WebAXRoleButton; + button.role = blink::WebAXRoleButton; button.state = 0; AccessibilityNodeData checkbox; checkbox.id = 3; checkbox.SetName("Checkbox"); - checkbox.role = WebKit::WebAXRoleCheckBox; + checkbox.role = blink::WebAXRoleCheckBox; checkbox.state = 0; AccessibilityNodeData root; root.id = 1; root.SetName("Document"); - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.state = 0; root.child_ids.push_back(2); root.child_ids.push_back(3); @@ -172,25 +172,25 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects) { AccessibilityNodeData tree1_child1; tree1_child1.id = 2; tree1_child1.SetName("Child1"); - tree1_child1.role = WebKit::WebAXRoleButton; + tree1_child1.role = blink::WebAXRoleButton; tree1_child1.state = 0; AccessibilityNodeData tree1_child2; tree1_child2.id = 3; tree1_child2.SetName("Child2"); - tree1_child2.role = WebKit::WebAXRoleButton; + tree1_child2.role = blink::WebAXRoleButton; tree1_child2.state = 0; AccessibilityNodeData tree1_child3; tree1_child3.id = 4; tree1_child3.SetName("Child3"); - tree1_child3.role = WebKit::WebAXRoleButton; + tree1_child3.role = blink::WebAXRoleButton; tree1_child3.state = 0; AccessibilityNodeData tree1_root; tree1_root.id = 1; tree1_root.SetName("Document"); - tree1_root.role = WebKit::WebAXRoleRootWebArea; + tree1_root.role = blink::WebAXRoleRootWebArea; tree1_root.state = 0; tree1_root.child_ids.push_back(2); tree1_root.child_ids.push_back(3); @@ -207,13 +207,13 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects) { AccessibilityNodeData tree2_child0; tree2_child0.id = 5; tree2_child0.SetName("Child0"); - tree2_child0.role = WebKit::WebAXRoleButton; + tree2_child0.role = blink::WebAXRoleButton; tree2_child0.state = 0; AccessibilityNodeData tree2_root; tree2_root.id = 1; tree2_root.SetName("DocumentChanged"); - tree2_root.role = WebKit::WebAXRoleRootWebArea; + tree2_root.role = blink::WebAXRoleRootWebArea; tree2_root.state = 0; tree2_root.child_ids.push_back(5); tree2_root.child_ids.push_back(2); @@ -255,7 +255,7 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects) { std::vector<AccessibilityHostMsg_EventParams> params; params.push_back(AccessibilityHostMsg_EventParams()); AccessibilityHostMsg_EventParams* msg = ¶ms[0]; - msg->event_type = WebKit::WebAXEventChildrenChanged; + msg->event_type = blink::WebAXEventChildrenChanged; msg->nodes.push_back(tree2_root); msg->nodes.push_back(tree2_child0); msg->id = tree2_root.id; @@ -307,46 +307,46 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects2) { AccessibilityNodeData tree1_grandchild1; tree1_grandchild1.id = 4; tree1_grandchild1.SetName("GrandChild1"); - tree1_grandchild1.role = WebKit::WebAXRoleButton; + tree1_grandchild1.role = blink::WebAXRoleButton; tree1_grandchild1.state = 0; AccessibilityNodeData tree1_child1; tree1_child1.id = 3; tree1_child1.SetName("Child1"); - tree1_child1.role = WebKit::WebAXRoleButton; + tree1_child1.role = blink::WebAXRoleButton; tree1_child1.state = 0; tree1_child1.child_ids.push_back(4); AccessibilityNodeData tree1_grandchild2; tree1_grandchild2.id = 6; tree1_grandchild2.SetName("GrandChild1"); - tree1_grandchild2.role = WebKit::WebAXRoleButton; + tree1_grandchild2.role = blink::WebAXRoleButton; tree1_grandchild2.state = 0; AccessibilityNodeData tree1_child2; tree1_child2.id = 5; tree1_child2.SetName("Child2"); - tree1_child2.role = WebKit::WebAXRoleButton; + tree1_child2.role = blink::WebAXRoleButton; tree1_child2.state = 0; tree1_child2.child_ids.push_back(6); AccessibilityNodeData tree1_grandchild3; tree1_grandchild3.id = 8; tree1_grandchild3.SetName("GrandChild3"); - tree1_grandchild3.role = WebKit::WebAXRoleButton; + tree1_grandchild3.role = blink::WebAXRoleButton; tree1_grandchild3.state = 0; AccessibilityNodeData tree1_child3; tree1_child3.id = 7; tree1_child3.SetName("Child3"); - tree1_child3.role = WebKit::WebAXRoleButton; + tree1_child3.role = blink::WebAXRoleButton; tree1_child3.state = 0; tree1_child3.child_ids.push_back(8); AccessibilityNodeData tree1_container; tree1_container.id = 2; tree1_container.SetName("Container"); - tree1_container.role = WebKit::WebAXRoleGroup; + tree1_container.role = blink::WebAXRoleGroup; tree1_container.state = 0; tree1_container.child_ids.push_back(3); tree1_container.child_ids.push_back(5); @@ -355,7 +355,7 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects2) { AccessibilityNodeData tree1_root; tree1_root.id = 1; tree1_root.SetName("Document"); - tree1_root.role = WebKit::WebAXRoleRootWebArea; + tree1_root.role = blink::WebAXRoleRootWebArea; tree1_root.state = 0; tree1_root.child_ids.push_back(2); @@ -374,20 +374,20 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects2) { AccessibilityNodeData tree2_grandchild0; tree2_grandchild0.id = 9; tree2_grandchild0.SetName("GrandChild0"); - tree2_grandchild0.role = WebKit::WebAXRoleButton; + tree2_grandchild0.role = blink::WebAXRoleButton; tree2_grandchild0.state = 0; AccessibilityNodeData tree2_child0; tree2_child0.id = 10; tree2_child0.SetName("Child0"); - tree2_child0.role = WebKit::WebAXRoleButton; + tree2_child0.role = blink::WebAXRoleButton; tree2_child0.state = 0; tree2_child0.child_ids.push_back(9); AccessibilityNodeData tree2_container; tree2_container.id = 2; tree2_container.SetName("Container"); - tree2_container.role = WebKit::WebAXRoleGroup; + tree2_container.role = blink::WebAXRoleGroup; tree2_container.state = 0; tree2_container.child_ids.push_back(10); tree2_container.child_ids.push_back(3); @@ -432,7 +432,7 @@ TEST(BrowserAccessibilityManagerTest, TestReuseBrowserAccessibilityObjects2) { std::vector<AccessibilityHostMsg_EventParams> params; params.push_back(AccessibilityHostMsg_EventParams()); AccessibilityHostMsg_EventParams* msg = ¶ms[0]; - msg->event_type = WebKit::WebAXEventChildrenChanged; + msg->event_type = blink::WebAXEventChildrenChanged; msg->nodes.push_back(tree2_container); msg->nodes.push_back(tree2_child0); msg->nodes.push_back(tree2_grandchild0); @@ -494,7 +494,7 @@ TEST(BrowserAccessibilityManagerTest, TestMoveChildUp) { AccessibilityNodeData tree1_1; tree1_1.id = 1; - tree1_1.role = WebKit::WebAXRoleRootWebArea; + tree1_1.role = blink::WebAXRoleRootWebArea; tree1_1.state = 0; tree1_1.child_ids.push_back(2); tree1_1.child_ids.push_back(3); @@ -539,7 +539,7 @@ TEST(BrowserAccessibilityManagerTest, TestMoveChildUp) { std::vector<AccessibilityHostMsg_EventParams> params; params.push_back(AccessibilityHostMsg_EventParams()); AccessibilityHostMsg_EventParams* msg = ¶ms[0]; - msg->event_type = WebKit::WebAXEventChildrenChanged; + msg->event_type = blink::WebAXEventChildrenChanged; msg->nodes.push_back(tree2_1); msg->nodes.push_back(tree2_4); msg->nodes.push_back(tree2_5); @@ -568,7 +568,7 @@ TEST(BrowserAccessibilityManagerTest, TestFatalError) { AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.child_ids.push_back(2); root.child_ids.push_back(2); @@ -586,7 +586,7 @@ TEST(BrowserAccessibilityManagerTest, TestFatalError) { AccessibilityNodeData root2; root2.id = 1; - root2.role = WebKit::WebAXRoleRootWebArea; + root2.role = blink::WebAXRoleRootWebArea; root2.child_ids.push_back(2); root2.child_ids.push_back(3); @@ -614,22 +614,22 @@ TEST(BrowserAccessibilityManagerTest, TestFatalError) { TEST(BrowserAccessibilityManagerTest, BoundsForRange) { AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; AccessibilityNodeData static_text; static_text.id = 2; static_text.SetValue("Hello, world."); - static_text.role = WebKit::WebAXRoleStaticText; + static_text.role = blink::WebAXRoleStaticText; static_text.location = gfx::Rect(100, 100, 29, 18); root.child_ids.push_back(2); AccessibilityNodeData inline_text1; inline_text1.id = 3; inline_text1.SetValue("Hello, "); - inline_text1.role = WebKit::WebAXRoleInlineTextBox; + inline_text1.role = blink::WebAXRoleInlineTextBox; inline_text1.location = gfx::Rect(100, 100, 29, 9); inline_text1.AddIntAttribute(AccessibilityNodeData::ATTR_TEXT_DIRECTION, - WebKit::WebAXTextDirectionLR); + blink::WebAXTextDirectionLR); std::vector<int32> character_offsets1; character_offsets1.push_back(6); // 0 character_offsets1.push_back(11); // 1 @@ -645,10 +645,10 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRange) { AccessibilityNodeData inline_text2; inline_text2.id = 4; inline_text2.SetValue("world."); - inline_text2.role = WebKit::WebAXRoleInlineTextBox; + inline_text2.role = blink::WebAXRoleInlineTextBox; inline_text2.location = gfx::Rect(100, 109, 28, 9); inline_text2.AddIntAttribute(AccessibilityNodeData::ATTR_TEXT_DIRECTION, - WebKit::WebAXTextDirectionLR); + blink::WebAXTextDirectionLR); std::vector<int32> character_offsets2; character_offsets2.push_back(5); character_offsets2.push_back(10); @@ -705,22 +705,22 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRangeBiDi) { AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; AccessibilityNodeData static_text; static_text.id = 2; static_text.SetValue("123abc"); - static_text.role = WebKit::WebAXRoleStaticText; + static_text.role = blink::WebAXRoleStaticText; static_text.location = gfx::Rect(100, 100, 60, 20); root.child_ids.push_back(2); AccessibilityNodeData inline_text1; inline_text1.id = 3; inline_text1.SetValue("123"); - inline_text1.role = WebKit::WebAXRoleInlineTextBox; + inline_text1.role = blink::WebAXRoleInlineTextBox; inline_text1.location = gfx::Rect(100, 100, 30, 20); inline_text1.AddIntAttribute(AccessibilityNodeData::ATTR_TEXT_DIRECTION, - WebKit::WebAXTextDirectionLR); + blink::WebAXTextDirectionLR); std::vector<int32> character_offsets1; character_offsets1.push_back(10); // 0 character_offsets1.push_back(20); // 1 @@ -732,10 +732,10 @@ TEST(BrowserAccessibilityManagerTest, BoundsForRangeBiDi) { AccessibilityNodeData inline_text2; inline_text2.id = 4; inline_text2.SetValue("abc"); - inline_text2.role = WebKit::WebAXRoleInlineTextBox; + inline_text2.role = blink::WebAXRoleInlineTextBox; inline_text2.location = gfx::Rect(130, 100, 30, 20); inline_text2.AddIntAttribute(AccessibilityNodeData::ATTR_TEXT_DIRECTION, - WebKit::WebAXTextDirectionRL); + blink::WebAXTextDirectionRL); std::vector<int32> character_offsets2; character_offsets2.push_back(10); character_offsets2.push_back(20); diff --git a/content/browser/accessibility/browser_accessibility_manager_win.cc b/content/browser/accessibility/browser_accessibility_manager_win.cc index 5fc094a..3eb407c 100644 --- a/content/browser/accessibility/browser_accessibility_manager_win.cc +++ b/content/browser/accessibility/browser_accessibility_manager_win.cc @@ -123,11 +123,11 @@ BrowserAccessibilityManagerWin::~BrowserAccessibilityManagerWin() { AccessibilityNodeData BrowserAccessibilityManagerWin::GetEmptyDocument() { AccessibilityNodeData empty_document; empty_document.id = 0; - empty_document.role = WebKit::WebAXRoleRootWebArea; + empty_document.role = blink::WebAXRoleRootWebArea; empty_document.state = - (1 << WebKit::WebAXStateEnabled) | - (1 << WebKit::WebAXStateReadonly) | - (1 << WebKit::WebAXStateBusy); + (1 << blink::WebAXStateEnabled) | + (1 << blink::WebAXStateReadonly) | + (1 << blink::WebAXStateBusy); return empty_document; } @@ -171,79 +171,79 @@ void BrowserAccessibilityManagerWin::RemoveNode(BrowserAccessibility* node) { } void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, + blink::WebAXEvent event_type, BrowserAccessibility* node) { LONG event_id = EVENT_MIN; switch (event_type) { - case WebKit::WebAXEventActiveDescendantChanged: + case blink::WebAXEventActiveDescendantChanged: event_id = IA2_EVENT_ACTIVE_DESCENDANT_CHANGED; break; - case WebKit::WebAXEventAlert: + case blink::WebAXEventAlert: event_id = EVENT_SYSTEM_ALERT; break; - case WebKit::WebAXEventAriaAttributeChanged: + case blink::WebAXEventAriaAttributeChanged: event_id = IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED; break; - case WebKit::WebAXEventAutocorrectionOccured: + case blink::WebAXEventAutocorrectionOccured: event_id = IA2_EVENT_OBJECT_ATTRIBUTE_CHANGED; break; - case WebKit::WebAXEventBlur: + case blink::WebAXEventBlur: // Equivalent to focus on the root. event_id = EVENT_OBJECT_FOCUS; node = GetRoot(); break; - case WebKit::WebAXEventCheckedStateChanged: + case blink::WebAXEventCheckedStateChanged: event_id = EVENT_OBJECT_STATECHANGE; break; - case WebKit::WebAXEventChildrenChanged: + case blink::WebAXEventChildrenChanged: event_id = EVENT_OBJECT_REORDER; break; - case WebKit::WebAXEventFocus: + case blink::WebAXEventFocus: event_id = EVENT_OBJECT_FOCUS; break; - case WebKit::WebAXEventInvalidStatusChanged: + case blink::WebAXEventInvalidStatusChanged: event_id = EVENT_OBJECT_STATECHANGE; break; - case WebKit::WebAXEventLiveRegionChanged: + case blink::WebAXEventLiveRegionChanged: // TODO: try not firing a native notification at all, since // on Windows, each individual item in a live region that changes // already gets its own notification. event_id = EVENT_OBJECT_REORDER; break; - case WebKit::WebAXEventLoadComplete: + case blink::WebAXEventLoadComplete: event_id = IA2_EVENT_DOCUMENT_LOAD_COMPLETE; break; - case WebKit::WebAXEventMenuListItemSelected: + case blink::WebAXEventMenuListItemSelected: event_id = EVENT_OBJECT_FOCUS; break; - case WebKit::WebAXEventMenuListValueChanged: + case blink::WebAXEventMenuListValueChanged: event_id = EVENT_OBJECT_VALUECHANGE; break; - case WebKit::WebAXEventHide: + case blink::WebAXEventHide: event_id = EVENT_OBJECT_HIDE; break; - case WebKit::WebAXEventShow: + case blink::WebAXEventShow: event_id = EVENT_OBJECT_SHOW; break; - case WebKit::WebAXEventScrolledToAnchor: + case blink::WebAXEventScrolledToAnchor: event_id = EVENT_SYSTEM_SCROLLINGSTART; break; - case WebKit::WebAXEventSelectedChildrenChanged: + case blink::WebAXEventSelectedChildrenChanged: event_id = EVENT_OBJECT_SELECTIONWITHIN; break; - case WebKit::WebAXEventSelectedTextChanged: + case blink::WebAXEventSelectedTextChanged: event_id = IA2_EVENT_TEXT_CARET_MOVED; break; - case WebKit::WebAXEventTextChanged: + case blink::WebAXEventTextChanged: event_id = EVENT_OBJECT_NAMECHANGE; break; - case WebKit::WebAXEventTextInserted: + case blink::WebAXEventTextInserted: event_id = IA2_EVENT_TEXT_INSERTED; break; - case WebKit::WebAXEventTextRemoved: + case blink::WebAXEventTextRemoved: event_id = IA2_EVENT_TEXT_REMOVED; break; - case WebKit::WebAXEventValueChanged: + case blink::WebAXEventValueChanged: event_id = EVENT_OBJECT_VALUECHANGE; break; default: @@ -264,7 +264,7 @@ void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( // If this is a layout complete notification (sent when a container scrolls) // and there is a descendant tracked object, send a notification on it. // TODO(dmazzoni): remove once http://crbug.com/113483 is fixed. - if (event_type == WebKit::WebAXEventLayoutComplete && + if (event_type == blink::WebAXEventLayoutComplete && tracked_scroll_object_ && tracked_scroll_object_->IsDescendantOf(node)) { MaybeCallNotifyWinEvent( diff --git a/content/browser/accessibility/browser_accessibility_manager_win.h b/content/browser/accessibility/browser_accessibility_manager_win.h index 9b37eb3..c1887c4 100644 --- a/content/browser/accessibility/browser_accessibility_manager_win.h +++ b/content/browser/accessibility/browser_accessibility_manager_win.h @@ -47,7 +47,7 @@ class CONTENT_EXPORT BrowserAccessibilityManagerWin virtual void AddNodeToMap(BrowserAccessibility* node); virtual void RemoveNode(BrowserAccessibility* node) OVERRIDE; virtual void NotifyAccessibilityEvent( - WebKit::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; + blink::WebAXEvent event_type, BrowserAccessibility* node) OVERRIDE; // Track this object and post a VISIBLE_DATA_CHANGED notification when // its container scrolls. diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index c6ffa4d..f7a4c95 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc @@ -600,12 +600,12 @@ STDMETHODIMP BrowserAccessibilityWin::get_accSelection(VARIANT* selected) { if (!instance_active_) return E_FAIL; - if (role_ != WebKit::WebAXRoleListBox) + if (role_ != blink::WebAXRoleListBox) return E_NOTIMPL; unsigned long selected_count = 0; for (size_t i = 0; i < children_.size(); ++i) { - if (children_[i]->HasState(WebKit::WebAXStateSelected)) + if (children_[i]->HasState(blink::WebAXStateSelected)) ++selected_count; } @@ -616,7 +616,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accSelection(VARIANT* selected) { if (selected_count == 1) { for (size_t i = 0; i < children_.size(); ++i) { - if (children_[i]->HasState(WebKit::WebAXStateSelected)) { + if (children_[i]->HasState(blink::WebAXStateSelected)) { selected->vt = VT_DISPATCH; selected->pdispVal = children_[i]->ToBrowserAccessibilityWin()->NewReference(); @@ -631,7 +631,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_accSelection(VARIANT* selected) { enum_variant->AddRef(); unsigned long index = 0; for (size_t i = 0; i < children_.size(); ++i) { - if (children_[i]->HasState(WebKit::WebAXStateSelected)) { + if (children_[i]->HasState(blink::WebAXStateSelected)) { enum_variant->ItemAt(index)->vt = VT_DISPATCH; enum_variant->ItemAt(index)->pdispVal = children_[i]->ToBrowserAccessibilityWin()->NewReference(); @@ -872,9 +872,9 @@ STDMETHODIMP BrowserAccessibilityWin::get_groupPosition( if (!group_level || !similar_items_in_group || !position_in_group) return E_INVALIDARG; - if (role_ == WebKit::WebAXRoleListBoxOption && + if (role_ == blink::WebAXRoleListBoxOption && parent_ && - parent_->role() == WebKit::WebAXRoleListBox) { + parent_->role() == blink::WebAXRoleListBox) { *group_level = 0; *similar_items_in_group = parent_->PlatformChildCount(); *position_in_group = index_in_parent_ + 1; @@ -1133,7 +1133,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnDescription(long column, int cell_id = cell_ids[i * columns + column]; BrowserAccessibilityWin* cell = static_cast<BrowserAccessibilityWin*>( manager_->GetFromRendererID(cell_id)); - if (cell && cell->role_ == WebKit::WebAXRoleColumnHeader) { + if (cell && cell->role_ == blink::WebAXRoleColumnHeader) { string16 cell_name = cell->GetString16Attribute( AccessibilityNodeData::ATTR_NAME); if (cell_name.size() > 0) { @@ -1320,7 +1320,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowDescription(long row, int cell_id = cell_ids[row * columns + i]; BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); - if (cell && cell->role_ == WebKit::WebAXRoleRowHeader) { + if (cell && cell->role_ == blink::WebAXRoleRowHeader) { string16 cell_name = cell->GetString16Attribute( AccessibilityNodeData::ATTR_NAME); if (cell_name.size() > 0) { @@ -1643,7 +1643,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnHeaderCells( } BrowserAccessibility* table = parent(); - while (table && table->role() != WebKit::WebAXRoleTable) + while (table && table->role() != blink::WebAXRoleTable) table = table->parent(); if (!table) { NOTREACHED(); @@ -1668,7 +1668,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnHeaderCells( int cell_id = cell_ids[i * columns + column]; BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); - if (cell && cell->role_ == WebKit::WebAXRoleColumnHeader) + if (cell && cell->role_ == blink::WebAXRoleColumnHeader) (*n_column_header_cells)++; } @@ -1679,7 +1679,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_columnHeaderCells( int cell_id = cell_ids[i * columns + column]; BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); - if (cell && cell->role_ == WebKit::WebAXRoleColumnHeader) { + if (cell && cell->role_ == blink::WebAXRoleColumnHeader) { (*cell_accessibles)[index] = static_cast<IAccessible*>(cell->NewReference()); ++index; @@ -1742,7 +1742,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowHeaderCells( } BrowserAccessibility* table = parent(); - while (table && table->role() != WebKit::WebAXRoleTable) + while (table && table->role() != blink::WebAXRoleTable) table = table->parent(); if (!table) { NOTREACHED(); @@ -1767,7 +1767,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowHeaderCells( int cell_id = cell_ids[row * columns + i]; BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); - if (cell && cell->role_ == WebKit::WebAXRoleRowHeader) + if (cell && cell->role_ == blink::WebAXRoleRowHeader) (*n_row_header_cells)++; } @@ -1778,7 +1778,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_rowHeaderCells( int cell_id = cell_ids[row * columns + i]; BrowserAccessibilityWin* cell = manager_->GetFromRendererID(cell_id)->ToBrowserAccessibilityWin(); - if (cell && cell->role_ == WebKit::WebAXRoleRowHeader) { + if (cell && cell->role_ == blink::WebAXRoleRowHeader) { (*cell_accessibles)[index] = static_cast<IAccessible*>(cell->NewReference()); ++index; @@ -1867,7 +1867,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_table(IUnknown** table) { GetIntAttribute(AccessibilityNodeData::ATTR_TABLE_CELL_COLUMN_INDEX, &column); BrowserAccessibility* find_table = parent(); - while (find_table && find_table->role() != WebKit::WebAXRoleTable) + while (find_table && find_table->role() != blink::WebAXRoleTable) find_table = find_table->parent(); if (!find_table) { NOTREACHED(); @@ -1903,8 +1903,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_caretOffset(LONG* offset) { return E_INVALIDARG; *offset = 0; - if (role_ == WebKit::WebAXRoleTextField || - role_ == WebKit::WebAXRoleTextArea) { + if (role_ == blink::WebAXRoleTextField || + role_ == blink::WebAXRoleTextArea) { int sel_start = 0; if (GetIntAttribute(AccessibilityNodeData::ATTR_TEXT_SEL_START, &sel_start)) @@ -1922,8 +1922,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_nSelections(LONG* n_selections) { return E_INVALIDARG; *n_selections = 0; - if (role_ == WebKit::WebAXRoleTextField || - role_ == WebKit::WebAXRoleTextArea) { + if (role_ == blink::WebAXRoleTextField || + role_ == blink::WebAXRoleTextArea) { int sel_start = 0; int sel_end = 0; if (GetIntAttribute(AccessibilityNodeData::ATTR_TEXT_SEL_START, @@ -1947,8 +1947,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_selection(LONG selection_index, *start_offset = 0; *end_offset = 0; - if (role_ == WebKit::WebAXRoleTextField || - role_ == WebKit::WebAXRoleTextArea) { + if (role_ == blink::WebAXRoleTextField || + role_ == blink::WebAXRoleTextArea) { int sel_start = 0; int sel_end = 0; if (GetIntAttribute( @@ -2801,9 +2801,9 @@ void BrowserAccessibilityWin::PreInitialize() { IntAttributeToIA2(AccessibilityNodeData::ATTR_HIERARCHICAL_LEVEL, "level"); // Expose the set size and position in set for listbox options. - if (role_ == WebKit::WebAXRoleListBoxOption && + if (role_ == blink::WebAXRoleListBoxOption && parent_ && - parent_->role() == WebKit::WebAXRoleListBox) { + parent_->role() == blink::WebAXRoleListBox) { ia2_attributes_.push_back( L"setsize:" + base::IntToString16(parent_->PlatformChildCount())); ia2_attributes_.push_back( @@ -2842,7 +2842,7 @@ void BrowserAccessibilityWin::PreInitialize() { // Expose table cell index. if (ia_role_ == ROLE_SYSTEM_CELL) { BrowserAccessibility* table = parent(); - while (table && table->role() != WebKit::WebAXRoleTable) + while (table && table->role() != blink::WebAXRoleTable) table = table->parent(); if (table) { const std::vector<int32>& unique_cell_ids = table->GetIntListAttribute( @@ -2912,8 +2912,8 @@ void BrowserAccessibilityWin::PreInitialize() { // If it's a text field, also consider the placeholder. std::string placeholder; - if (role_ == WebKit::WebAXRoleTextField && - HasState(WebKit::WebAXStateFocusable) && + if (role_ == blink::WebAXRoleTextField && + HasState(blink::WebAXStateFocusable) && GetHtmlAttribute("placeholder", &placeholder)) { if (name_.empty() && !title_elem_id) { name_ = placeholder; @@ -2926,8 +2926,8 @@ void BrowserAccessibilityWin::PreInitialize() { SetStringAttribute(AccessibilityNodeData::ATTR_HELP, help); // On Windows, the value of a document should be its url. - if (role_ == WebKit::WebAXRoleRootWebArea || - role_ == WebKit::WebAXRoleWebArea) { + if (role_ == blink::WebAXRoleRootWebArea || + role_ == blink::WebAXRoleWebArea) { GetStringAttribute(AccessibilityNodeData::ATTR_DOC_URL, &value_); } @@ -2935,9 +2935,9 @@ void BrowserAccessibilityWin::PreInitialize() { // WebKit stores the main accessible text in the "value" - swap it so // that it's the "name". if (name_.empty() && - (role_ == WebKit::WebAXRoleListBoxOption || - role_ == WebKit::WebAXRoleStaticText || - role_ == WebKit::WebAXRoleListMarker)) { + (role_ == blink::WebAXRoleListBoxOption || + role_ == blink::WebAXRoleStaticText || + role_ == blink::WebAXRoleListMarker)) { name_.swap(value_); } @@ -2974,7 +2974,7 @@ void BrowserAccessibilityWin::PostInitialize() { hypertext_.clear(); for (unsigned int i = 0; i < PlatformChildCount(); ++i) { BrowserAccessibility* child = PlatformGetChild(i); - if (child->role() == WebKit::WebAXRoleStaticText) { + if (child->role() == blink::WebAXRoleStaticText) { hypertext_ += UTF8ToUTF16(child->name()); } else { hyperlink_offset_to_index_[hypertext_.size()] = hyperlinks_.size(); @@ -2985,15 +2985,15 @@ void BrowserAccessibilityWin::PostInitialize() { DCHECK_EQ(hyperlink_offset_to_index_.size(), hyperlinks_.size()); // Fire an event when an alert first appears. - if (role_ == WebKit::WebAXRoleAlert && first_time_) - manager_->NotifyAccessibilityEvent(WebKit::WebAXEventAlert, this); + if (role_ == blink::WebAXRoleAlert && first_time_) + manager_->NotifyAccessibilityEvent(blink::WebAXEventAlert, this); // Fire events if text has changed. string16 text = TextForIAccessibleText(); if (previous_text_ != text) { if (!previous_text_.empty() && !text.empty()) { manager_->NotifyAccessibilityEvent( - WebKit::WebAXEventShow, this); + blink::WebAXEventShow, this); } // TODO(dmazzoni): Look into HIDE events, too. @@ -3011,7 +3011,7 @@ void BrowserAccessibilityWin::PostInitialize() { // focus for managed descendants is platform-specific. // Fire a focus event if the focused descendant in a multi-select // list box changes. - if (role_ == WebKit::WebAXRoleListBoxOption && + if (role_ == blink::WebAXRoleListBoxOption && (ia_state_ & STATE_SYSTEM_FOCUSABLE) && (ia_state_ & STATE_SYSTEM_SELECTABLE) && (ia_state_ & STATE_SYSTEM_FOCUSED) && @@ -3132,7 +3132,7 @@ string16 BrowserAccessibilityWin::GetValueText() { string16 BrowserAccessibilityWin::TextForIAccessibleText() { if (IsEditableText()) return UTF8ToUTF16(value_); - return (role_ == WebKit::WebAXRoleStaticText) ? + return (role_ == blink::WebAXRoleStaticText) ? UTF8ToUTF16(name_) : hypertext_; } @@ -3182,59 +3182,59 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia2_state_ = IA2_STATE_OPAQUE; ia2_attributes_.clear(); - if (HasState(WebKit::WebAXStateBusy)) + if (HasState(blink::WebAXStateBusy)) ia_state_ |= STATE_SYSTEM_BUSY; - if (HasState(WebKit::WebAXStateChecked)) + if (HasState(blink::WebAXStateChecked)) ia_state_ |= STATE_SYSTEM_CHECKED; - if (HasState(WebKit::WebAXStateCollapsed)) + if (HasState(blink::WebAXStateCollapsed)) ia_state_ |= STATE_SYSTEM_COLLAPSED; - if (HasState(WebKit::WebAXStateExpanded)) + if (HasState(blink::WebAXStateExpanded)) ia_state_ |= STATE_SYSTEM_EXPANDED; - if (HasState(WebKit::WebAXStateFocusable)) + if (HasState(blink::WebAXStateFocusable)) ia_state_ |= STATE_SYSTEM_FOCUSABLE; - if (HasState(WebKit::WebAXStateHaspopup)) + if (HasState(blink::WebAXStateHaspopup)) ia_state_ |= STATE_SYSTEM_HASPOPUP; - if (HasState(WebKit::WebAXStateHovered)) + if (HasState(blink::WebAXStateHovered)) ia_state_ |= STATE_SYSTEM_HOTTRACKED; - if (HasState(WebKit::WebAXStateIndeterminate)) + if (HasState(blink::WebAXStateIndeterminate)) ia_state_ |= STATE_SYSTEM_INDETERMINATE; - if (HasState(WebKit::WebAXStateInvisible)) + if (HasState(blink::WebAXStateInvisible)) ia_state_ |= STATE_SYSTEM_INVISIBLE; - if (HasState(WebKit::WebAXStateLinked)) + if (HasState(blink::WebAXStateLinked)) ia_state_ |= STATE_SYSTEM_LINKED; - if (HasState(WebKit::WebAXStateMultiselectable)) { + if (HasState(blink::WebAXStateMultiselectable)) { ia_state_ |= STATE_SYSTEM_EXTSELECTABLE; ia_state_ |= STATE_SYSTEM_MULTISELECTABLE; } // TODO(ctguil): Support STATE_SYSTEM_EXTSELECTABLE/accSelect. - if (HasState(WebKit::WebAXStateOffscreen)) + if (HasState(blink::WebAXStateOffscreen)) ia_state_ |= STATE_SYSTEM_OFFSCREEN; - if (HasState(WebKit::WebAXStatePressed)) + if (HasState(blink::WebAXStatePressed)) ia_state_ |= STATE_SYSTEM_PRESSED; - if (HasState(WebKit::WebAXStateProtected)) + if (HasState(blink::WebAXStateProtected)) ia_state_ |= STATE_SYSTEM_PROTECTED; - if (HasState(WebKit::WebAXStateRequired)) + if (HasState(blink::WebAXStateRequired)) ia2_state_ |= IA2_STATE_REQUIRED; - if (HasState(WebKit::WebAXStateSelectable)) + if (HasState(blink::WebAXStateSelectable)) ia_state_ |= STATE_SYSTEM_SELECTABLE; - if (HasState(WebKit::WebAXStateSelected)) + if (HasState(blink::WebAXStateSelected)) ia_state_ |= STATE_SYSTEM_SELECTED; - if (HasState(WebKit::WebAXStateVisited)) + if (HasState(blink::WebAXStateVisited)) ia_state_ |= STATE_SYSTEM_TRAVERSED; - if (!HasState(WebKit::WebAXStateEnabled)) + if (!HasState(blink::WebAXStateEnabled)) ia_state_ |= STATE_SYSTEM_UNAVAILABLE; - if (HasState(WebKit::WebAXStateVertical)) { + if (HasState(blink::WebAXStateVertical)) { ia2_state_ |= IA2_STATE_VERTICAL; } else { ia2_state_ |= IA2_STATE_HORIZONTAL; } - if (HasState(WebKit::WebAXStateVisited)) + if (HasState(blink::WebAXStateVisited)) ia_state_ |= STATE_SYSTEM_TRAVERSED; // WebKit marks everything as readonly unless it's editable text, so if it's // not readonly, mark it as editable now. The final computation of the // READONLY state for MSAA is below, after the switch. - if (!HasState(WebKit::WebAXStateReadonly)) + if (!HasState(blink::WebAXStateReadonly)) ia2_state_ |= IA2_STATE_EDITABLE; string16 invalid; @@ -3252,25 +3252,25 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_role_ = 0; ia2_role_ = 0; switch (role_) { - case WebKit::WebAXRoleAlert: + case blink::WebAXRoleAlert: ia_role_ = ROLE_SYSTEM_ALERT; break; - case WebKit::WebAXRoleAlertDialog: + case blink::WebAXRoleAlertDialog: ia_role_ = ROLE_SYSTEM_DIALOG; break; - case WebKit::WebAXRoleApplication: + case blink::WebAXRoleApplication: ia_role_ = ROLE_SYSTEM_APPLICATION; break; - case WebKit::WebAXRoleArticle: + case blink::WebAXRoleArticle: ia_role_ = ROLE_SYSTEM_GROUPING; ia2_role_ = IA2_ROLE_SECTION; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleBusyIndicator: + case blink::WebAXRoleBusyIndicator: ia_role_ = ROLE_SYSTEM_ANIMATION; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleButton: + case blink::WebAXRoleButton: ia_role_ = ROLE_SYSTEM_PUSHBUTTON; bool is_aria_pressed_defined; bool is_mixed; @@ -3281,7 +3281,7 @@ void BrowserAccessibilityWin::InitRoleAndState() { if (is_mixed) ia_state_ |= STATE_SYSTEM_MIXED; break; - case WebKit::WebAXRoleCanvas: + case blink::WebAXRoleCanvas: if (GetBoolAttribute(AccessibilityNodeData::ATTR_CANVAS_HAS_FALLBACK)) { role_name_ = L"canvas"; ia2_role_ = IA2_ROLE_CANVAS; @@ -3289,78 +3289,78 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_role_ = ROLE_SYSTEM_GRAPHIC; } break; - case WebKit::WebAXRoleCell: + case blink::WebAXRoleCell: ia_role_ = ROLE_SYSTEM_CELL; break; - case WebKit::WebAXRoleCheckBox: + case blink::WebAXRoleCheckBox: ia_role_ = ROLE_SYSTEM_CHECKBUTTON; break; - case WebKit::WebAXRoleColorWell: + case blink::WebAXRoleColorWell: ia_role_ = ROLE_SYSTEM_CLIENT; ia2_role_ = IA2_ROLE_COLOR_CHOOSER; break; - case WebKit::WebAXRoleColumn: + case blink::WebAXRoleColumn: ia_role_ = ROLE_SYSTEM_COLUMN; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleColumnHeader: + case blink::WebAXRoleColumnHeader: ia_role_ = ROLE_SYSTEM_COLUMNHEADER; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleComboBox: + case blink::WebAXRoleComboBox: ia_role_ = ROLE_SYSTEM_COMBOBOX; break; - case WebKit::WebAXRoleDiv: + case blink::WebAXRoleDiv: role_name_ = L"div"; ia2_role_ = IA2_ROLE_SECTION; break; - case WebKit::WebAXRoleDefinition: + case blink::WebAXRoleDefinition: role_name_ = html_tag; ia2_role_ = IA2_ROLE_PARAGRAPH; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleDescriptionListDetail: + case blink::WebAXRoleDescriptionListDetail: role_name_ = html_tag; ia2_role_ = IA2_ROLE_PARAGRAPH; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleDescriptionListTerm: + case blink::WebAXRoleDescriptionListTerm: ia_role_ = ROLE_SYSTEM_LISTITEM; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleDialog: + case blink::WebAXRoleDialog: ia_role_ = ROLE_SYSTEM_DIALOG; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleDisclosureTriangle: + case blink::WebAXRoleDisclosureTriangle: ia_role_ = ROLE_SYSTEM_OUTLINEBUTTON; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleDocument: - case WebKit::WebAXRoleRootWebArea: - case WebKit::WebAXRoleWebArea: + case blink::WebAXRoleDocument: + case blink::WebAXRoleRootWebArea: + case blink::WebAXRoleWebArea: ia_role_ = ROLE_SYSTEM_DOCUMENT; ia_state_ |= STATE_SYSTEM_READONLY; ia_state_ |= STATE_SYSTEM_FOCUSABLE; break; - case WebKit::WebAXRoleEditableText: + case blink::WebAXRoleEditableText: ia_role_ = ROLE_SYSTEM_TEXT; ia2_state_ |= IA2_STATE_SINGLE_LINE; ia2_state_ |= IA2_STATE_EDITABLE; break; - case WebKit::WebAXRoleForm: + case blink::WebAXRoleForm: role_name_ = L"form"; ia2_role_ = IA2_ROLE_FORM; break; - case WebKit::WebAXRoleFooter: + case blink::WebAXRoleFooter: ia_role_ = IA2_ROLE_FOOTER; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleGrid: + case blink::WebAXRoleGrid: ia_role_ = ROLE_SYSTEM_TABLE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleGroup: { + case blink::WebAXRoleGroup: { string16 aria_role = GetString16Attribute( AccessibilityNodeData::ATTR_ROLE); if (aria_role == L"group" || html_tag == L"fieldset") { @@ -3377,188 +3377,188 @@ void BrowserAccessibilityWin::InitRoleAndState() { ia_state_ |= STATE_SYSTEM_READONLY; break; } - case WebKit::WebAXRoleGrowArea: + case blink::WebAXRoleGrowArea: ia_role_ = ROLE_SYSTEM_GRIP; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleHeading: + case blink::WebAXRoleHeading: role_name_ = html_tag; ia2_role_ = IA2_ROLE_HEADING; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleHorizontalRule: + case blink::WebAXRoleHorizontalRule: ia_role_ = ROLE_SYSTEM_SEPARATOR; break; - case WebKit::WebAXRoleImage: + case blink::WebAXRoleImage: ia_role_ = ROLE_SYSTEM_GRAPHIC; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleImageMap: + case blink::WebAXRoleImageMap: role_name_ = html_tag; ia2_role_ = IA2_ROLE_IMAGE_MAP; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleImageMapLink: + case blink::WebAXRoleImageMapLink: ia_role_ = ROLE_SYSTEM_LINK; ia_state_ |= STATE_SYSTEM_LINKED; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleLabel: + case blink::WebAXRoleLabel: ia_role_ = ROLE_SYSTEM_TEXT; ia2_role_ = IA2_ROLE_LABEL; break; - case WebKit::WebAXRoleBanner: - case WebKit::WebAXRoleComplementary: - case WebKit::WebAXRoleContentInfo: - case WebKit::WebAXRoleMain: - case WebKit::WebAXRoleNavigation: - case WebKit::WebAXRoleSearch: + case blink::WebAXRoleBanner: + case blink::WebAXRoleComplementary: + case blink::WebAXRoleContentInfo: + case blink::WebAXRoleMain: + case blink::WebAXRoleNavigation: + case blink::WebAXRoleSearch: ia_role_ = ROLE_SYSTEM_GROUPING; ia2_role_ = IA2_ROLE_SECTION; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleLink: + case blink::WebAXRoleLink: ia_role_ = ROLE_SYSTEM_LINK; ia_state_ |= STATE_SYSTEM_LINKED; break; - case WebKit::WebAXRoleList: + case blink::WebAXRoleList: ia_role_ = ROLE_SYSTEM_LIST; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleListBox: + case blink::WebAXRoleListBox: ia_role_ = ROLE_SYSTEM_LIST; break; - case WebKit::WebAXRoleListBoxOption: + case blink::WebAXRoleListBoxOption: ia_role_ = ROLE_SYSTEM_LISTITEM; if (ia_state_ & STATE_SYSTEM_SELECTABLE) { ia_state_ |= STATE_SYSTEM_FOCUSABLE; - if (HasState(WebKit::WebAXStateFocused)) + if (HasState(blink::WebAXStateFocused)) ia_state_ |= STATE_SYSTEM_FOCUSED; } break; - case WebKit::WebAXRoleListItem: + case blink::WebAXRoleListItem: ia_role_ = ROLE_SYSTEM_LISTITEM; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleListMarker: + case blink::WebAXRoleListMarker: ia_role_ = ROLE_SYSTEM_TEXT; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleMath: + case blink::WebAXRoleMath: ia_role_ = ROLE_SYSTEM_EQUATION; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleMenu: - case WebKit::WebAXRoleMenuButton: + case blink::WebAXRoleMenu: + case blink::WebAXRoleMenuButton: ia_role_ = ROLE_SYSTEM_MENUPOPUP; break; - case WebKit::WebAXRoleMenuBar: + case blink::WebAXRoleMenuBar: ia_role_ = ROLE_SYSTEM_MENUBAR; break; - case WebKit::WebAXRoleMenuItem: + case blink::WebAXRoleMenuItem: ia_role_ = ROLE_SYSTEM_MENUITEM; break; - case WebKit::WebAXRoleMenuListPopup: + case blink::WebAXRoleMenuListPopup: ia_role_ = ROLE_SYSTEM_CLIENT; break; - case WebKit::WebAXRoleMenuListOption: + case blink::WebAXRoleMenuListOption: ia_role_ = ROLE_SYSTEM_LISTITEM; if (ia_state_ & STATE_SYSTEM_SELECTABLE) { ia_state_ |= STATE_SYSTEM_FOCUSABLE; - if (HasState(WebKit::WebAXStateFocused)) + if (HasState(blink::WebAXStateFocused)) ia_state_ |= STATE_SYSTEM_FOCUSED; } break; - case WebKit::WebAXRoleNote: + case blink::WebAXRoleNote: ia_role_ = ROLE_SYSTEM_GROUPING; ia2_role_ = IA2_ROLE_NOTE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleOutline: + case blink::WebAXRoleOutline: ia_role_ = ROLE_SYSTEM_OUTLINE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleParagraph: + case blink::WebAXRoleParagraph: role_name_ = L"P"; ia2_role_ = IA2_ROLE_PARAGRAPH; break; - case WebKit::WebAXRolePopUpButton: + case blink::WebAXRolePopUpButton: if (html_tag == L"select") { ia_role_ = ROLE_SYSTEM_COMBOBOX; } else { ia_role_ = ROLE_SYSTEM_BUTTONMENU; } break; - case WebKit::WebAXRoleProgressIndicator: + case blink::WebAXRoleProgressIndicator: ia_role_ = ROLE_SYSTEM_PROGRESSBAR; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleRadioButton: + case blink::WebAXRoleRadioButton: ia_role_ = ROLE_SYSTEM_RADIOBUTTON; break; - case WebKit::WebAXRoleRadioGroup: + case blink::WebAXRoleRadioGroup: ia_role_ = ROLE_SYSTEM_GROUPING; ia2_role_ = IA2_ROLE_SECTION; break; - case WebKit::WebAXRoleRegion: + case blink::WebAXRoleRegion: ia_role_ = ROLE_SYSTEM_GROUPING; ia2_role_ = IA2_ROLE_SECTION; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleRow: + case blink::WebAXRoleRow: ia_role_ = ROLE_SYSTEM_ROW; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleRowHeader: + case blink::WebAXRoleRowHeader: ia_role_ = ROLE_SYSTEM_ROWHEADER; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleRuler: + case blink::WebAXRoleRuler: ia_role_ = ROLE_SYSTEM_CLIENT; ia2_role_ = IA2_ROLE_RULER; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleScrollArea: + case blink::WebAXRoleScrollArea: ia_role_ = ROLE_SYSTEM_CLIENT; ia2_role_ = IA2_ROLE_SCROLL_PANE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleScrollBar: + case blink::WebAXRoleScrollBar: ia_role_ = ROLE_SYSTEM_SCROLLBAR; break; - case WebKit::WebAXRoleSlider: + case blink::WebAXRoleSlider: ia_role_ = ROLE_SYSTEM_SLIDER; break; - case WebKit::WebAXRoleSpinButton: + case blink::WebAXRoleSpinButton: ia_role_ = ROLE_SYSTEM_SPINBUTTON; break; - case WebKit::WebAXRoleSpinButtonPart: + case blink::WebAXRoleSpinButtonPart: ia_role_ = ROLE_SYSTEM_PUSHBUTTON; break; - case WebKit::WebAXRoleSplitGroup: + case blink::WebAXRoleSplitGroup: ia_role_ = ROLE_SYSTEM_CLIENT; ia2_role_ = IA2_ROLE_SPLIT_PANE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleAnnotation: - case WebKit::WebAXRoleStaticText: + case blink::WebAXRoleAnnotation: + case blink::WebAXRoleStaticText: ia_role_ = ROLE_SYSTEM_TEXT; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleStatus: + case blink::WebAXRoleStatus: ia_role_ = ROLE_SYSTEM_STATUSBAR; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleSplitter: + case blink::WebAXRoleSplitter: ia_role_ = ROLE_SYSTEM_SEPARATOR; break; - case WebKit::WebAXRoleSVGRoot: + case blink::WebAXRoleSVGRoot: ia_role_ = ROLE_SYSTEM_GRAPHIC; break; - case WebKit::WebAXRoleTab: + case blink::WebAXRoleTab: ia_role_ = ROLE_SYSTEM_PAGETAB; break; - case WebKit::WebAXRoleTable: { + case blink::WebAXRoleTable: { string16 aria_role = GetString16Attribute( AccessibilityNodeData::ATTR_ROLE); if (aria_role == L"treegrid") { @@ -3569,77 +3569,77 @@ void BrowserAccessibilityWin::InitRoleAndState() { } break; } - case WebKit::WebAXRoleTableHeaderContainer: + case blink::WebAXRoleTableHeaderContainer: ia_role_ = ROLE_SYSTEM_GROUPING; ia2_role_ = IA2_ROLE_SECTION; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleTabList: + case blink::WebAXRoleTabList: ia_role_ = ROLE_SYSTEM_PAGETABLIST; break; - case WebKit::WebAXRoleTabPanel: + case blink::WebAXRoleTabPanel: ia_role_ = ROLE_SYSTEM_PROPERTYPAGE; break; - case WebKit::WebAXRoleToggleButton: + case blink::WebAXRoleToggleButton: ia_role_ = ROLE_SYSTEM_PUSHBUTTON; ia2_role_ = IA2_ROLE_TOGGLE_BUTTON; break; - case WebKit::WebAXRoleTextArea: + case blink::WebAXRoleTextArea: ia_role_ = ROLE_SYSTEM_TEXT; ia2_state_ |= IA2_STATE_MULTI_LINE; ia2_state_ |= IA2_STATE_EDITABLE; ia2_state_ |= IA2_STATE_SELECTABLE_TEXT; break; - case WebKit::WebAXRoleTextField: + case blink::WebAXRoleTextField: ia_role_ = ROLE_SYSTEM_TEXT; ia2_state_ |= IA2_STATE_SINGLE_LINE; ia2_state_ |= IA2_STATE_EDITABLE; ia2_state_ |= IA2_STATE_SELECTABLE_TEXT; break; - case WebKit::WebAXRoleTimer: + case blink::WebAXRoleTimer: ia_role_ = ROLE_SYSTEM_CLOCK; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleToolbar: + case blink::WebAXRoleToolbar: ia_role_ = ROLE_SYSTEM_TOOLBAR; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleUserInterfaceTooltip: + case blink::WebAXRoleUserInterfaceTooltip: ia_role_ = ROLE_SYSTEM_TOOLTIP; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleTree: + case blink::WebAXRoleTree: ia_role_ = ROLE_SYSTEM_OUTLINE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleTreeGrid: + case blink::WebAXRoleTreeGrid: ia_role_ = ROLE_SYSTEM_OUTLINE; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleTreeItem: + case blink::WebAXRoleTreeItem: ia_role_ = ROLE_SYSTEM_OUTLINEITEM; ia_state_ |= STATE_SYSTEM_READONLY; break; - case WebKit::WebAXRoleWindow: + case blink::WebAXRoleWindow: ia_role_ = ROLE_SYSTEM_WINDOW; break; // TODO(dmazzoni): figure out the proper MSAA role for all of these. - case WebKit::WebAXRoleBrowser: - case WebKit::WebAXRoleDirectory: - case WebKit::WebAXRoleDrawer: - case WebKit::WebAXRoleHelpTag: - case WebKit::WebAXRoleIgnored: - case WebKit::WebAXRoleIncrementor: - case WebKit::WebAXRoleLog: - case WebKit::WebAXRoleMarquee: - case WebKit::WebAXRoleMatte: - case WebKit::WebAXRolePresentational: - case WebKit::WebAXRoleRulerMarker: - case WebKit::WebAXRoleSheet: - case WebKit::WebAXRoleSliderThumb: - case WebKit::WebAXRoleSystemWide: - case WebKit::WebAXRoleValueIndicator: + case blink::WebAXRoleBrowser: + case blink::WebAXRoleDirectory: + case blink::WebAXRoleDrawer: + case blink::WebAXRoleHelpTag: + case blink::WebAXRoleIgnored: + case blink::WebAXRoleIncrementor: + case blink::WebAXRoleLog: + case blink::WebAXRoleMarquee: + case blink::WebAXRoleMatte: + case blink::WebAXRolePresentational: + case blink::WebAXRoleRulerMarker: + case blink::WebAXRoleSheet: + case blink::WebAXRoleSliderThumb: + case blink::WebAXRoleSystemWide: + case blink::WebAXRoleValueIndicator: default: ia_role_ = ROLE_SYSTEM_CLIENT; break; @@ -3651,11 +3651,11 @@ void BrowserAccessibilityWin::InitRoleAndState() { // aria-readonly attribute and for a few roles (in the switch above). // We clear the READONLY state on focusable controls and on a document. // Everything else, the majority of objects, do not have this state set. - if (HasState(WebKit::WebAXStateFocusable) && + if (HasState(blink::WebAXStateFocusable) && ia_role_ != ROLE_SYSTEM_DOCUMENT) { ia_state_ &= ~(STATE_SYSTEM_READONLY); } - if (!HasState(WebKit::WebAXStateReadonly)) + if (!HasState(blink::WebAXStateReadonly)) ia_state_ &= ~(STATE_SYSTEM_READONLY); if (GetBoolAttribute(AccessibilityNodeData::ATTR_ARIA_READONLY)) ia_state_ |= STATE_SYSTEM_READONLY; diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc index 4c1ceeb..edb572f 100644 --- a/content/browser/accessibility/browser_accessibility_win_unittest.cc +++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc @@ -115,19 +115,19 @@ TEST_F(BrowserAccessibilityTest, TestNoLeaks) { AccessibilityNodeData button; button.id = 2; button.SetName("Button"); - button.role = WebKit::WebAXRoleButton; + button.role = blink::WebAXRoleButton; button.state = 0; AccessibilityNodeData checkbox; checkbox.id = 3; checkbox.SetName("Checkbox"); - checkbox.role = WebKit::WebAXRoleCheckBox; + checkbox.role = blink::WebAXRoleCheckBox; checkbox.state = 0; AccessibilityNodeData root; root.id = 1; root.SetName("Document"); - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.state = 0; root.child_ids.push_back(2); root.child_ids.push_back(3); @@ -183,14 +183,14 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) { // BrowserAccessibilityManager. AccessibilityNodeData text; text.id = 2; - text.role = WebKit::WebAXRoleStaticText; + text.role = blink::WebAXRoleStaticText; text.SetName("old text"); text.state = 0; AccessibilityNodeData root; root.id = 1; root.SetName("Document"); - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.state = 0; root.child_ids.push_back(2); @@ -228,11 +228,11 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChange) { // Notify the BrowserAccessibilityManager that the text child has changed. AccessibilityNodeData text2; text2.id = 2; - text2.role = WebKit::WebAXRoleStaticText; + text2.role = blink::WebAXRoleStaticText; text2.SetName("new text"); text2.SetName("old text"); AccessibilityHostMsg_EventParams param; - param.event_type = WebKit::WebAXEventChildrenChanged; + param.event_type = blink::WebAXEventChildrenChanged; param.nodes.push_back(text2); param.id = text2.id; std::vector<AccessibilityHostMsg_EventParams> events; @@ -267,17 +267,17 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChangeNoLeaks) { // BrowserAccessibilityManager. AccessibilityNodeData div; div.id = 2; - div.role = WebKit::WebAXRoleGroup; + div.role = blink::WebAXRoleGroup; div.state = 0; AccessibilityNodeData text3; text3.id = 3; - text3.role = WebKit::WebAXRoleStaticText; + text3.role = blink::WebAXRoleStaticText; text3.state = 0; AccessibilityNodeData text4; text4.id = 4; - text4.role = WebKit::WebAXRoleStaticText; + text4.role = blink::WebAXRoleStaticText; text4.state = 0; div.child_ids.push_back(3); @@ -285,7 +285,7 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChangeNoLeaks) { AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.state = 0; root.child_ids.push_back(2); @@ -304,7 +304,7 @@ TEST_F(BrowserAccessibilityTest, TestChildrenChangeNoLeaks) { // were removed and ensure that only one BrowserAccessibility instance exists. root.child_ids.clear(); AccessibilityHostMsg_EventParams param; - param.event_type = WebKit::WebAXEventChildrenChanged; + param.event_type = blink::WebAXEventChildrenChanged; param.nodes.push_back(root); param.id = root.id; std::vector<AccessibilityHostMsg_EventParams> events; @@ -323,7 +323,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) { AccessibilityNodeData text1; text1.id = 11; - text1.role = WebKit::WebAXRoleTextField; + text1.role = blink::WebAXRoleTextField; text1.state = 0; text1.AddStringAttribute(AccessibilityNodeData::ATTR_VALUE, text1_value); std::vector<int32> line_breaks; @@ -333,7 +333,7 @@ TEST_F(BrowserAccessibilityTest, TestTextBoundaries) { AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.state = 0; root.child_ids.push_back(11); @@ -420,20 +420,20 @@ TEST_F(BrowserAccessibilityTest, TestSimpleHypertext) { AccessibilityNodeData text1; text1.id = 11; - text1.role = WebKit::WebAXRoleStaticText; - text1.state = 1 << WebKit::WebAXStateReadonly; + text1.role = blink::WebAXRoleStaticText; + text1.state = 1 << blink::WebAXStateReadonly; text1.SetName(text1_name); AccessibilityNodeData text2; text2.id = 12; - text2.role = WebKit::WebAXRoleStaticText; - text2.state = 1 << WebKit::WebAXStateReadonly; + text2.role = blink::WebAXRoleStaticText; + text2.state = 1 << blink::WebAXStateReadonly; text2.SetName(text2_name); AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; - root.state = 1 << WebKit::WebAXStateReadonly; + root.role = blink::WebAXRoleRootWebArea; + root.state = 1 << blink::WebAXStateReadonly; root.child_ids.push_back(11); root.child_ids.push_back(12); @@ -488,40 +488,40 @@ TEST_F(BrowserAccessibilityTest, TestComplexHypertext) { AccessibilityNodeData text1; text1.id = 11; - text1.role = WebKit::WebAXRoleStaticText; - text1.state = 1 << WebKit::WebAXStateReadonly; + text1.role = blink::WebAXRoleStaticText; + text1.state = 1 << blink::WebAXStateReadonly; text1.SetName(text1_name); AccessibilityNodeData text2; text2.id = 12; - text2.role = WebKit::WebAXRoleStaticText; - text2.state = 1 << WebKit::WebAXStateReadonly; + text2.role = blink::WebAXRoleStaticText; + text2.state = 1 << blink::WebAXStateReadonly; text2.SetName(text2_name); AccessibilityNodeData button1, button1_text; button1.id = 13; button1_text.id = 15; button1_text.SetName(button1_text_name); - button1.role = WebKit::WebAXRoleButton; - button1_text.role = WebKit::WebAXRoleStaticText; - button1.state = 1 << WebKit::WebAXStateReadonly; - button1_text.state = 1 << WebKit::WebAXStateReadonly; + button1.role = blink::WebAXRoleButton; + button1_text.role = blink::WebAXRoleStaticText; + button1.state = 1 << blink::WebAXStateReadonly; + button1_text.state = 1 << blink::WebAXStateReadonly; button1.child_ids.push_back(15); AccessibilityNodeData link1, link1_text; link1.id = 14; link1_text.id = 16; link1_text.SetName(link1_text_name); - link1.role = WebKit::WebAXRoleLink; - link1_text.role = WebKit::WebAXRoleStaticText; - link1.state = 1 << WebKit::WebAXStateReadonly; - link1_text.state = 1 << WebKit::WebAXStateReadonly; + link1.role = blink::WebAXRoleLink; + link1_text.role = blink::WebAXRoleStaticText; + link1.state = 1 << blink::WebAXStateReadonly; + link1_text.state = 1 << blink::WebAXStateReadonly; link1.child_ids.push_back(16); AccessibilityNodeData root; root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; - root.state = 1 << WebKit::WebAXStateReadonly; + root.role = blink::WebAXRoleRootWebArea; + root.state = 1 << blink::WebAXStateReadonly; root.child_ids.push_back(11); root.child_ids.push_back(13); root.child_ids.push_back(12); @@ -601,9 +601,9 @@ TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) { // Try creating an empty document with busy state. Readonly is // set automatically. CountedBrowserAccessibility::reset(); - const int32 busy_state = 1 << WebKit::WebAXStateBusy; - const int32 readonly_state = 1 << WebKit::WebAXStateReadonly; - const int32 enabled_state = 1 << WebKit::WebAXStateEnabled; + const int32 busy_state = 1 << blink::WebAXStateBusy; + const int32 readonly_state = 1 << blink::WebAXStateReadonly; + const int32 enabled_state = 1 << blink::WebAXStateEnabled; scoped_ptr<BrowserAccessibilityManager> manager( new BrowserAccessibilityManagerWin( GetDesktopWindow(), @@ -615,24 +615,24 @@ TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) { // Verify the root is as we expect by default. BrowserAccessibility* root = manager->GetRoot(); EXPECT_EQ(0, root->renderer_id()); - EXPECT_EQ(WebKit::WebAXRoleRootWebArea, root->role()); + EXPECT_EQ(blink::WebAXRoleRootWebArea, root->role()); EXPECT_EQ(busy_state | readonly_state | enabled_state, root->state()); // Tree with a child textfield. AccessibilityNodeData tree1_1; tree1_1.id = 1; - tree1_1.role = WebKit::WebAXRoleRootWebArea; + tree1_1.role = blink::WebAXRoleRootWebArea; tree1_1.child_ids.push_back(2); AccessibilityNodeData tree1_2; tree1_2.id = 2; - tree1_2.role = WebKit::WebAXRoleTextField; + tree1_2.role = blink::WebAXRoleTextField; // Process a load complete. std::vector<AccessibilityHostMsg_EventParams> params; params.push_back(AccessibilityHostMsg_EventParams()); AccessibilityHostMsg_EventParams* msg = ¶ms[0]; - msg->event_type = WebKit::WebAXEventLoadComplete; + msg->event_type = blink::WebAXEventLoadComplete; msg->nodes.push_back(tree1_1); msg->nodes.push_back(tree1_2); msg->id = tree1_1.id; @@ -645,18 +645,18 @@ TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) { EXPECT_NE(root, manager->GetRoot()); // And the proper child remains. - EXPECT_EQ(WebKit::WebAXRoleTextField, acc1_2->role()); + EXPECT_EQ(blink::WebAXRoleTextField, acc1_2->role()); EXPECT_EQ(2, acc1_2->renderer_id()); // Tree with a child button. AccessibilityNodeData tree2_1; tree2_1.id = 1; - tree2_1.role = WebKit::WebAXRoleRootWebArea; + tree2_1.role = blink::WebAXRoleRootWebArea; tree2_1.child_ids.push_back(3); AccessibilityNodeData tree2_2; tree2_2.id = 3; - tree2_2.role = WebKit::WebAXRoleButton; + tree2_2.role = blink::WebAXRoleButton; msg->nodes.clear(); msg->nodes.push_back(tree2_1); @@ -672,7 +672,7 @@ TEST_F(BrowserAccessibilityTest, TestCreateEmptyDocument) { EXPECT_NE(root, manager->GetRoot()); // And the new child exists. - EXPECT_EQ(WebKit::WebAXRoleButton, acc2_2->role()); + EXPECT_EQ(blink::WebAXRoleButton, acc2_2->role()); EXPECT_EQ(3, acc2_2->renderer_id()); // Ensure we properly cleaned up. diff --git a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc index eb61a1c..f0aa13f 100644 --- a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc +++ b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc @@ -40,7 +40,7 @@ class CrossPlatformAccessibilityBrowserTest : public ContentBrowserTest { const AccessibilityNodeDataTreeNode& GetAccessibilityNodeDataTree( AccessibilityMode accessibility_mode = AccessibilityModeComplete) { AccessibilityNotificationWaiter waiter( - shell(), accessibility_mode, WebKit::WebAXEventLayoutComplete); + shell(), accessibility_mode, blink::WebAXEventLayoutComplete); waiter.WaitForNotification(); return waiter.GetAccessibilityNodeDataTree(); } @@ -152,12 +152,12 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, EXPECT_STREQ( "Accessibility Test", GetAttr(tree, AccessibilityNodeData::ATTR_NAME).c_str()); - EXPECT_EQ(WebKit::WebAXRoleRootWebArea, tree.role); + EXPECT_EQ(blink::WebAXRoleRootWebArea, tree.role); // Check properites of the BODY element. ASSERT_EQ(1U, tree.children.size()); const AccessibilityNodeDataTreeNode& body = tree.children[0]; - EXPECT_EQ(WebKit::WebAXRoleGroup, body.role); + EXPECT_EQ(blink::WebAXRoleGroup, body.role); EXPECT_STREQ("body", GetAttr(body, AccessibilityNodeData::ATTR_HTML_TAG).c_str()); EXPECT_STREQ("block", @@ -167,7 +167,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, ASSERT_EQ(2U, body.children.size()); const AccessibilityNodeDataTreeNode& button = body.children[0]; - EXPECT_EQ(WebKit::WebAXRoleButton, button.role); + EXPECT_EQ(blink::WebAXRoleButton, button.role); EXPECT_STREQ( "input", GetAttr(button, AccessibilityNodeData::ATTR_HTML_TAG).c_str()); EXPECT_STREQ( @@ -183,7 +183,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, EXPECT_STREQ("push", button.html_attributes[1].second.c_str()); const AccessibilityNodeDataTreeNode& checkbox = body.children[1]; - EXPECT_EQ(WebKit::WebAXRoleCheckBox, checkbox.role); + EXPECT_EQ(blink::WebAXRoleCheckBox, checkbox.role); EXPECT_STREQ( "input", GetAttr(checkbox, AccessibilityNodeData::ATTR_HTML_TAG).c_str()); EXPECT_STREQ( @@ -211,7 +211,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, const AccessibilityNodeDataTreeNode& body = tree.children[0]; ASSERT_EQ(1U, body.children.size()); const AccessibilityNodeDataTreeNode& text = body.children[0]; - EXPECT_EQ(WebKit::WebAXRoleTextField, text.role); + EXPECT_EQ(blink::WebAXRoleTextField, text.role); EXPECT_STREQ( "input", GetAttr(text, AccessibilityNodeData::ATTR_HTML_TAG).c_str()); EXPECT_EQ(0, GetIntAttr(text, AccessibilityNodeData::ATTR_TEXT_SEL_START)); @@ -242,7 +242,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, const AccessibilityNodeDataTreeNode& body = tree.children[0]; ASSERT_EQ(1U, body.children.size()); const AccessibilityNodeDataTreeNode& text = body.children[0]; - EXPECT_EQ(WebKit::WebAXRoleTextField, text.role); + EXPECT_EQ(blink::WebAXRoleTextField, text.role); EXPECT_STREQ( "input", GetAttr(text, AccessibilityNodeData::ATTR_HTML_TAG).c_str()); EXPECT_EQ(0, GetIntAttr(text, AccessibilityNodeData::ATTR_TEXT_SEL_START)); @@ -269,15 +269,15 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, const AccessibilityNodeDataTreeNode& tree = GetAccessibilityNodeDataTree(); ASSERT_EQ(1U, tree.children.size()); const AccessibilityNodeDataTreeNode& table = tree.children[0]; - EXPECT_EQ(WebKit::WebAXRoleTable, table.role); + EXPECT_EQ(blink::WebAXRoleTable, table.role); const AccessibilityNodeDataTreeNode& row = table.children[0]; - EXPECT_EQ(WebKit::WebAXRoleRow, row.role); + EXPECT_EQ(blink::WebAXRoleRow, row.role); const AccessibilityNodeDataTreeNode& cell1 = row.children[0]; - EXPECT_EQ(WebKit::WebAXRoleCell, cell1.role); + EXPECT_EQ(blink::WebAXRoleCell, cell1.role); const AccessibilityNodeDataTreeNode& cell2 = row.children[1]; - EXPECT_EQ(WebKit::WebAXRoleCell, cell2.role); + EXPECT_EQ(blink::WebAXRoleCell, cell2.role); const AccessibilityNodeDataTreeNode& column1 = table.children[1]; - EXPECT_EQ(WebKit::WebAXRoleColumn, column1.role); + EXPECT_EQ(blink::WebAXRoleColumn, column1.role); EXPECT_EQ(0U, column1.children.size()); EXPECT_EQ(1U, column1.intlist_attributes.size()); EXPECT_EQ(AccessibilityNodeData::ATTR_INDIRECT_CHILD_IDS, @@ -287,7 +287,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, EXPECT_EQ(1U, column1_indirect_child_ids.size()); EXPECT_EQ(cell1.id, column1_indirect_child_ids[0]); const AccessibilityNodeDataTreeNode& column2 = table.children[2]; - EXPECT_EQ(WebKit::WebAXRoleColumn, column2.role); + EXPECT_EQ(blink::WebAXRoleColumn, column2.role); EXPECT_EQ(0U, column2.children.size()); EXPECT_EQ(AccessibilityNodeData::ATTR_INDIRECT_CHILD_IDS, column2.intlist_attributes[0].first); @@ -340,7 +340,7 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, ASSERT_EQ(3U, body.children.size()); const AccessibilityNodeDataTreeNode& button1 = body.children[0]; - EXPECT_EQ(WebKit::WebAXRoleButton, button1.role); + EXPECT_EQ(blink::WebAXRoleButton, button1.role); EXPECT_STREQ( "Button 1", GetAttr(button1, AccessibilityNodeData::ATTR_NAME).c_str()); @@ -351,23 +351,23 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, ASSERT_EQ(1U, iframe.children.size()); const AccessibilityNodeDataTreeNode& scroll_area = iframe.children[0]; - EXPECT_EQ(WebKit::WebAXRoleScrollArea, scroll_area.role); + EXPECT_EQ(blink::WebAXRoleScrollArea, scroll_area.role); ASSERT_EQ(1U, scroll_area.children.size()); const AccessibilityNodeDataTreeNode& sub_document = scroll_area.children[0]; - EXPECT_EQ(WebKit::WebAXRoleWebArea, sub_document.role); + EXPECT_EQ(blink::WebAXRoleWebArea, sub_document.role); ASSERT_EQ(1U, sub_document.children.size()); const AccessibilityNodeDataTreeNode& sub_body = sub_document.children[0]; ASSERT_EQ(1U, sub_body.children.size()); const AccessibilityNodeDataTreeNode& button2 = sub_body.children[0]; - EXPECT_EQ(WebKit::WebAXRoleButton, button2.role); + EXPECT_EQ(blink::WebAXRoleButton, button2.role); EXPECT_STREQ("Button 2", GetAttr(button2, AccessibilityNodeData::ATTR_NAME).c_str()); const AccessibilityNodeDataTreeNode& button3 = body.children[2]; - EXPECT_EQ(WebKit::WebAXRoleButton, button3.role); + EXPECT_EQ(blink::WebAXRoleButton, button3.role); EXPECT_STREQ("Button 3", GetAttr(button3, AccessibilityNodeData::ATTR_NAME).c_str()); } @@ -413,13 +413,13 @@ IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, const AccessibilityNodeDataTreeNode& tree = GetAccessibilityNodeDataTree(); const AccessibilityNodeDataTreeNode& table = tree.children[0]; - EXPECT_EQ(WebKit::WebAXRoleTable, table.role); + EXPECT_EQ(blink::WebAXRoleTable, table.role); ASSERT_GE(table.children.size(), 5U); - EXPECT_EQ(WebKit::WebAXRoleRow, table.children[0].role); - EXPECT_EQ(WebKit::WebAXRoleRow, table.children[1].role); - EXPECT_EQ(WebKit::WebAXRoleColumn, table.children[2].role); - EXPECT_EQ(WebKit::WebAXRoleColumn, table.children[3].role); - EXPECT_EQ(WebKit::WebAXRoleColumn, table.children[4].role); + EXPECT_EQ(blink::WebAXRoleRow, table.children[0].role); + EXPECT_EQ(blink::WebAXRoleRow, table.children[1].role); + EXPECT_EQ(blink::WebAXRoleColumn, table.children[2].role); + EXPECT_EQ(blink::WebAXRoleColumn, table.children[3].role); + EXPECT_EQ(blink::WebAXRoleColumn, table.children[4].role); EXPECT_EQ(3, GetIntAttr(table, AccessibilityNodeData::ATTR_TABLE_COLUMN_COUNT)); EXPECT_EQ(2, GetIntAttr(table, AccessibilityNodeData::ATTR_TABLE_ROW_COUNT)); diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index cfad08d..d2d1134 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc @@ -166,7 +166,7 @@ void DumpAccessibilityTreeTest::RunTest( html_file.BaseName().MaybeAsASCII().c_str()); AccessibilityNotificationWaiter waiter( shell(), AccessibilityModeComplete, - WebKit::WebAXEventLoadComplete); + blink::WebAXEventLoadComplete); NavigateToURL(shell(), url); waiter.WaitForNotification(); diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc index 0bb07e1..ba493a9 100644 --- a/content/browser/android/content_view_core_impl.cc +++ b/content/browser/android/content_view_core_impl.cc @@ -63,8 +63,8 @@ using base::android::ConvertUTF16ToJavaString; using base::android::ConvertUTF8ToJavaString; using base::android::ScopedJavaGlobalRef; using base::android::ScopedJavaLocalRef; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; // Describes the type and enabled state of a select popup item. // Keep in sync with the value defined in SelectPopupDialog.java @@ -887,8 +887,8 @@ jboolean ContentViewCoreImpl::SendTouchEvent(JNIEnv* env, jobjectArray pts) { RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); if (rwhv) { - using WebKit::WebTouchEvent; - WebKit::WebTouchEvent event; + using blink::WebTouchEvent; + blink::WebTouchEvent event; TouchPoint::BuildWebTouchEvent(env, type, time_ms, GetDpiScale(), pts, event); rwhv->SendTouchEvent(event); @@ -922,9 +922,9 @@ jboolean ContentViewCoreImpl::SendMouseMoveEvent(JNIEnv* env, if (!rwhv) return false; - WebKit::WebMouseEvent event = WebMouseEventBuilder::Build( + blink::WebMouseEvent event = WebMouseEventBuilder::Build( WebInputEvent::MouseMove, - WebKit::WebMouseEvent::ButtonNone, + blink::WebMouseEvent::ButtonNone, time_ms / 1000.0, x / GetDpiScale(), y / GetDpiScale(), 0, 1); rwhv->SendMouseEvent(event); @@ -949,7 +949,7 @@ jboolean ContentViewCoreImpl::SendMouseWheelEvent(JNIEnv* env, } else { return false; } - WebKit::WebMouseWheelEvent event = WebMouseWheelEventBuilder::Build( + blink::WebMouseWheelEvent event = WebMouseWheelEventBuilder::Build( direction, time_ms / 1000.0, x / GetDpiScale(), y / GetDpiScale()); rwhv->SendMouseWheelEvent(event); @@ -963,7 +963,7 @@ WebGestureEvent ContentViewCoreImpl::MakeGestureEvent( } void ContentViewCoreImpl::SendGestureEvent( - const WebKit::WebGestureEvent& event) { + const blink::WebGestureEvent& event) { RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); if (rwhv) rwhv->SendGestureEvent(event); @@ -1251,7 +1251,7 @@ void ContentViewCoreImpl::AddJavascriptInterface( java_bridge->AsWeakPtr()); java_bridge->AddNamedObject(ConvertJavaStringToUTF16(env, name), bound_object); - WebKit::WebBindings::releaseObject(bound_object); + blink::WebBindings::releaseObject(bound_object); } void ContentViewCoreImpl::RemoveJavascriptInterface(JNIEnv* env, diff --git a/content/browser/android/content_view_core_impl.h b/content/browser/android/content_view_core_impl.h index 3c9848f..4d304d1 100644 --- a/content/browser/android/content_view_core_impl.h +++ b/content/browser/android/content_view_core_impl.h @@ -334,8 +334,8 @@ class ContentViewCoreImpl : public ContentViewCore, float GetTouchPaddingDip(); - WebKit::WebGestureEvent MakeGestureEvent( - WebKit::WebInputEvent::Type type, long time_ms, float x, float y) const; + blink::WebGestureEvent MakeGestureEvent( + blink::WebInputEvent::Type type, long time_ms, float x, float y) const; void SendBeginFrame(base::TimeTicks frame_time); @@ -344,7 +344,7 @@ class ContentViewCoreImpl : public ContentViewCore, void DeleteScaledSnapshotTexture(); - void SendGestureEvent(const WebKit::WebGestureEvent& event); + void SendGestureEvent(const blink::WebGestureEvent& event); // Checks if there there is a corresponding renderer process and updates // |tab_crashed_| accordingly. diff --git a/content/browser/android/content_view_statics.cc b/content/browser/android/content_view_statics.cc index 66af865..917da58 100644 --- a/content/browser/android/content_view_statics.cc +++ b/content/browser/android/content_view_statics.cc @@ -24,7 +24,7 @@ namespace { // TODO(pliard): http://crbug.com/235909. Move WebKit shared timer toggling // functionality out of ContentViewStatistics and not be build on top of -// WebKit::Platform::SuspendSharedTimer. +// blink::Platform::SuspendSharedTimer. // TODO(pliard): http://crbug.com/235912. Add unit tests for WebKit shared timer // toggling. diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc index c02aa87..d6c818d 100644 --- a/content/browser/android/in_process/synchronous_compositor_impl.cc +++ b/content/browser/android/in_process/synchronous_compositor_impl.cc @@ -59,7 +59,7 @@ class VideoContextProvider return gl_in_process_context_->GetSurfaceTexture(stream_id); } - virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE { + virtual blink::WebGraphicsContext3D* Context3d() OVERRIDE { return context_provider_->Context3d(); } @@ -109,7 +109,7 @@ class SynchronousCompositorFactoryImpl : public SynchronousCompositorFactory { const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; - WebKit::WebGraphicsContext3D::Attributes attributes; + blink::WebGraphicsContext3D::Attributes attributes; attributes.antialias = false; attributes.shareResources = true; attributes.noAutomaticFlushes = true; @@ -409,7 +409,7 @@ void SynchronousCompositorImpl::SetContinuousInvalidate(bool enable) { } InputEventAckState SynchronousCompositorImpl::HandleInputEvent( - const WebKit::WebInputEvent& input_event) { + const blink::WebInputEvent& input_event) { DCHECK(CalledOnValidThread()); return g_factory.Get().synchronous_input_event_filter()->HandleInputEvent( contents_->GetRoutingID(), input_event); diff --git a/content/browser/android/in_process/synchronous_compositor_impl.h b/content/browser/android/in_process/synchronous_compositor_impl.h index 4d61c37..f23d920 100644 --- a/content/browser/android/in_process/synchronous_compositor_impl.h +++ b/content/browser/android/in_process/synchronous_compositor_impl.h @@ -19,7 +19,7 @@ class InputHandler; struct DidOverscrollParams; } -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -43,7 +43,7 @@ class SynchronousCompositorImpl // is implicitly that of the in-process renderer. static SynchronousCompositorImpl* FromRoutingID(int routing_id); - InputEventAckState HandleInputEvent(const WebKit::WebInputEvent& input_event); + InputEventAckState HandleInputEvent(const blink::WebInputEvent& input_event); // SynchronousCompositor virtual void SetClient(SynchronousCompositorClient* compositor_client) diff --git a/content/browser/android/in_process/synchronous_compositor_output_surface.cc b/content/browser/android/in_process/synchronous_compositor_output_surface.cc index 54ea181..2d37659 100644 --- a/content/browser/android/in_process/synchronous_compositor_output_surface.cc +++ b/content/browser/android/in_process/synchronous_compositor_output_surface.cc @@ -36,7 +36,7 @@ CreateWebGraphicsContext3D(scoped_refptr<gfx::GLSurface> surface) { const gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; - WebKit::WebGraphicsContext3D::Attributes attributes; + blink::WebGraphicsContext3D::Attributes attributes; attributes.antialias = false; attributes.shareResources = true; attributes.noAutomaticFlushes = true; diff --git a/content/browser/android/in_process/synchronous_input_event_filter.cc b/content/browser/android/in_process/synchronous_input_event_filter.cc index 34144da..5b086fb 100644 --- a/content/browser/android/in_process/synchronous_input_event_filter.cc +++ b/content/browser/android/in_process/synchronous_input_event_filter.cc @@ -10,7 +10,7 @@ #include "content/public/browser/browser_thread.h" #include "ui/events/latency_info.h" -using WebKit::WebInputEvent; +using blink::WebInputEvent; namespace content { @@ -22,7 +22,7 @@ SynchronousInputEventFilter::~SynchronousInputEventFilter() { InputEventAckState SynchronousInputEventFilter::HandleInputEvent( int routing_id, - const WebKit::WebInputEvent& input_event) { + const blink::WebInputEvent& input_event) { // The handler will be empty both before renderer initialization and after // renderer destruction. It's possible that this will be reached in such a // state. While not good, it should also not be fatal. diff --git a/content/browser/android/in_process/synchronous_input_event_filter.h b/content/browser/android/in_process/synchronous_input_event_filter.h index 18601c2..7d43bb0 100644 --- a/content/browser/android/in_process/synchronous_input_event_filter.h +++ b/content/browser/android/in_process/synchronous_input_event_filter.h @@ -12,7 +12,7 @@ #include "content/renderer/gpu/input_handler_manager_client.h" #include "ui/gfx/vector2d_f.h" -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -29,7 +29,7 @@ class SynchronousInputEventFilter : public InputHandlerManagerClient { virtual ~SynchronousInputEventFilter(); InputEventAckState HandleInputEvent(int routing_id, - const WebKit::WebInputEvent& input_event); + const blink::WebInputEvent& input_event); // InputHandlerManagerClient implementation. virtual void SetBoundHandler(const Handler& handler) OVERRIDE; diff --git a/content/browser/android/touch_point.cc b/content/browser/android/touch_point.cc index 1a10e6e..6701989 100644 --- a/content/browser/android/touch_point.cc +++ b/content/browser/android/touch_point.cc @@ -10,15 +10,15 @@ #include "jni/TouchPoint_jni.h" -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace { void MaybeAddTouchPoint(JNIEnv* env, jobject pt, float dpi_scale, - WebKit::WebTouchEvent& event) { + blink::WebTouchEvent& event) { WebTouchPoint::State state = static_cast<WebTouchPoint::State>( Java_TouchPoint_getState(env, pt)); if (state == WebTouchPoint::StateUndefined) @@ -32,7 +32,7 @@ void MaybeAddTouchPoint(JNIEnv* env, // Record the current number of points in the WebTouchEvent const int idx = event.touchesLength; - DCHECK_LT(idx, WebKit::WebTouchEvent::touchesLengthCap); + DCHECK_LT(idx, blink::WebTouchEvent::touchesLengthCap); WebTouchPoint wtp; wtp.id = Java_TouchPoint_getId(env, pt); @@ -72,7 +72,7 @@ void TouchPoint::BuildWebTouchEvent(JNIEnv* env, jlong time_ms, float dpi_scale, jobjectArray pts, - WebKit::WebTouchEvent& event) { + blink::WebTouchEvent& event) { event.type = static_cast<WebTouchEvent::Type>(type); event.timeStampSeconds = static_cast<double>(time_ms) / base::Time::kMillisecondsPerSecond; @@ -91,16 +91,16 @@ void TouchPoint::BuildWebTouchEvent(JNIEnv* env, static void RegisterConstants(JNIEnv* env) { Java_TouchPoint_initializeConstants( env, - WebKit::WebTouchEvent::TouchStart, - WebKit::WebTouchEvent::TouchMove, - WebKit::WebTouchEvent::TouchEnd, - WebKit::WebTouchEvent::TouchCancel, - WebKit::WebTouchPoint::StateUndefined, - WebKit::WebTouchPoint::StateReleased, - WebKit::WebTouchPoint::StatePressed, - WebKit::WebTouchPoint::StateMoved, - WebKit::WebTouchPoint::StateStationary, - WebKit::WebTouchPoint::StateCancelled); + blink::WebTouchEvent::TouchStart, + blink::WebTouchEvent::TouchMove, + blink::WebTouchEvent::TouchEnd, + blink::WebTouchEvent::TouchCancel, + blink::WebTouchPoint::StateUndefined, + blink::WebTouchPoint::StateReleased, + blink::WebTouchPoint::StatePressed, + blink::WebTouchPoint::StateMoved, + blink::WebTouchPoint::StateStationary, + blink::WebTouchPoint::StateCancelled); } bool RegisterTouchPoint(JNIEnv* env) { diff --git a/content/browser/android/touch_point.h b/content/browser/android/touch_point.h index 8e9971ba..d7caac0 100644 --- a/content/browser/android/touch_point.h +++ b/content/browser/android/touch_point.h @@ -12,7 +12,7 @@ namespace content { // This class provides a helper method to convert a java object array of touch -// events (in physical pixdels) into a WebKit::WebTouchEvent (in dip). +// events (in physical pixdels) into a blink::WebTouchEvent (in dip). class TouchPoint { public: static void BuildWebTouchEvent(JNIEnv* env, @@ -20,7 +20,7 @@ class TouchPoint { jlong time_ms, float dpi_scale, jobjectArray pts, - WebKit::WebTouchEvent& event); + blink::WebTouchEvent& event); }; bool RegisterTouchPoint(JNIEnv* env); diff --git a/content/browser/android/vibration_message_filter.cc b/content/browser/android/vibration_message_filter.cc index 6792db1..b91e963 100644 --- a/content/browser/android/vibration_message_filter.cc +++ b/content/browser/android/vibration_message_filter.cc @@ -48,7 +48,7 @@ void VibrationMessageFilter::OnVibrate(int64 milliseconds) { // trust any values passed from the renderer. milliseconds = std::max(kMinimumVibrationDurationMs, std::min(milliseconds, - base::checked_numeric_cast<int64>(WebKit::kVibrationDurationMax))); + base::checked_numeric_cast<int64>(blink::kVibrationDurationMax))); if (j_vibration_message_filter_.is_null()) { j_vibration_message_filter_.Reset( diff --git a/content/browser/aura/gpu_process_transport_factory.cc b/content/browser/aura/gpu_process_transport_factory.cc index 1fb8ae6..f958ae9 100644 --- a/content/browser/aura/gpu_process_transport_factory.cc +++ b/content/browser/aura/gpu_process_transport_factory.cc @@ -55,7 +55,7 @@ struct GpuProcessTransportFactory::PerCompositorData { class OwnedTexture : public ui::Texture, ImageTransportFactoryObserver { public: - OwnedTexture(WebKit::WebGraphicsContext3D* host_context, + OwnedTexture(blink::WebGraphicsContext3D* host_context, const gfx::Size& size, float device_scale_factor, unsigned int texture_id) @@ -72,7 +72,7 @@ class OwnedTexture : public ui::Texture, ImageTransportFactoryObserver { return texture_id_; } - virtual WebKit::WebGraphicsContext3D* HostContext3D() OVERRIDE { + virtual blink::WebGraphicsContext3D* HostContext3D() OVERRIDE { return host_context_; } @@ -98,7 +98,7 @@ class OwnedTexture : public ui::Texture, ImageTransportFactoryObserver { // The OnLostResources() callback will happen before this context // pointer is destroyed. - WebKit::WebGraphicsContext3D* host_context_; + blink::WebGraphicsContext3D* host_context_; unsigned texture_id_; DISALLOW_COPY_AND_ASSIGN(OwnedTexture); @@ -107,7 +107,7 @@ class OwnedTexture : public ui::Texture, ImageTransportFactoryObserver { class ImageTransportClientTexture : public OwnedTexture { public: ImageTransportClientTexture( - WebKit::WebGraphicsContext3D* host_context, + blink::WebGraphicsContext3D* host_context, float device_scale_factor) : OwnedTexture(host_context, gfx::Size(0, 0), @@ -497,7 +497,7 @@ GpuProcessTransportFactory::CreateContextCommon( int surface_id) { if (!GpuDataManagerImpl::GetInstance()->CanUseGpuBrowserCompositor()) return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); - WebKit::WebGraphicsContext3D::Attributes attrs; + blink::WebGraphicsContext3D::Attributes attrs; attrs.shareResources = true; attrs.depth = false; attrs.stencil = false; diff --git a/content/browser/aura/image_transport_factory.h b/content/browser/aura/image_transport_factory.h index bfe7057c..fecb442 100644 --- a/content/browser/aura/image_transport_factory.h +++ b/content/browser/aura/image_transport_factory.h @@ -21,7 +21,7 @@ class ContextFactory; class Texture; } -namespace WebKit { +namespace blink { class WebGraphicsContext3D; } diff --git a/content/browser/aura/image_transport_factory_browsertest.cc b/content/browser/aura/image_transport_factory_browsertest.cc index d669462..cb25082 100644 --- a/content/browser/aura/image_transport_factory_browsertest.cc +++ b/content/browser/aura/image_transport_factory_browsertest.cc @@ -47,7 +47,7 @@ IN_PROC_BROWSER_TEST_F(ImageTransportFactoryBrowserTest, TestLostContext) { EXPECT_CALL(observer, OnLostResources()) .WillOnce(testing::InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); - WebKit::WebGraphicsContext3D* context = texture->HostContext3D(); + blink::WebGraphicsContext3D* context = texture->HostContext3D(); context->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); diff --git a/content/browser/aura/no_transport_image_transport_factory.cc b/content/browser/aura/no_transport_image_transport_factory.cc index 5764805..cf7cde5 100644 --- a/content/browser/aura/no_transport_image_transport_factory.cc +++ b/content/browser/aura/no_transport_image_transport_factory.cc @@ -22,7 +22,7 @@ class FakeTexture : public ui::Texture { texture_(context_provider_->Context3d()->createTexture()) {} virtual unsigned int PrepareTexture() OVERRIDE { return texture_; } - virtual WebKit::WebGraphicsContext3D* HostContext3D() OVERRIDE { + virtual blink::WebGraphicsContext3D* HostContext3D() OVERRIDE { return context_provider_->Context3d(); } diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc index 5c175d3..16cef0a 100644 --- a/content/browser/browser_plugin/browser_plugin_embedder.cc +++ b/content/browser/browser_plugin/browser_plugin_embedder.cc @@ -110,7 +110,7 @@ bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) { } void BrowserPluginEmbedder::DragSourceEndedAt(int client_x, int client_y, - int screen_x, int screen_y, WebKit::WebDragOperation operation) { + int screen_x, int screen_y, blink::WebDragOperation operation) { if (guest_started_drag_.get()) { gfx::Point guest_offset = guest_started_drag_->GetScreenCoordinates(gfx::Point()); diff --git a/content/browser/browser_plugin/browser_plugin_embedder.h b/content/browser/browser_plugin/browser_plugin_embedder.h index 5261063..c2c2a50 100644 --- a/content/browser/browser_plugin/browser_plugin_embedder.h +++ b/content/browser/browser_plugin/browser_plugin_embedder.h @@ -72,7 +72,7 @@ class CONTENT_EXPORT BrowserPluginEmbedder : public WebContentsObserver { virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; void DragSourceEndedAt(int client_x, int client_y, int screen_x, - int screen_y, WebKit::WebDragOperation operation); + int screen_y, blink::WebDragOperation operation); void DragSourceMovedTo(int client_x, int client_y, int screen_x, int screen_y); diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc index 9164153..4c01545 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc @@ -942,7 +942,7 @@ void BrowserPluginGuest::SendMessageToEmbedder(IPC::Message* msg) { } void BrowserPluginGuest::DragSourceEndedAt(int client_x, int client_y, - int screen_x, int screen_y, WebKit::WebDragOperation operation) { + int screen_x, int screen_y, blink::WebDragOperation operation) { web_contents()->GetRenderViewHost()->DragSourceEndedAt(client_x, client_y, screen_x, screen_y, operation); } @@ -958,9 +958,9 @@ void BrowserPluginGuest::EndSystemDrag() { GetWebContents()->GetRenderViewHost()); guest_rvh->DragSourceSystemDragEnded(); // Issue a MouseUp event to get out of a selection state. - WebKit::WebMouseEvent mouse_event; - mouse_event.type = WebKit::WebInputEvent::MouseUp; - mouse_event.button = WebKit::WebMouseEvent::ButtonLeft; + blink::WebMouseEvent mouse_event; + mouse_event.type = blink::WebInputEvent::MouseUp; + mouse_event.button = blink::WebMouseEvent::ButtonLeft; guest_rvh->ForwardMouseEvent(mouse_event); } @@ -1220,29 +1220,29 @@ void BrowserPluginGuest::OnCompositorFrameACK( } void BrowserPluginGuest::OnDragStatusUpdate(int instance_id, - WebKit::WebDragStatus drag_status, + blink::WebDragStatus drag_status, const DropData& drop_data, - WebKit::WebDragOperationsMask mask, + blink::WebDragOperationsMask mask, const gfx::Point& location) { RenderViewHost* host = GetWebContents()->GetRenderViewHost(); switch (drag_status) { - case WebKit::WebDragStatusEnter: + case blink::WebDragStatusEnter: embedder_web_contents_->GetBrowserPluginEmbedder()->DragEnteredGuest( this); host->DragTargetDragEnter(drop_data, location, location, mask, 0); break; - case WebKit::WebDragStatusOver: + case blink::WebDragStatusOver: host->DragTargetDragOver(location, location, mask, 0); break; - case WebKit::WebDragStatusLeave: + case blink::WebDragStatusLeave: embedder_web_contents_->GetBrowserPluginEmbedder()->DragLeftGuest(this); host->DragTargetDragLeave(); break; - case WebKit::WebDragStatusDrop: + case blink::WebDragStatusDrop: host->DragTargetDrop(location, location, 0); EndSystemDrag(); break; - case WebKit::WebDragStatusUnknown: + case blink::WebDragStatusUnknown: NOTREACHED(); } } @@ -1255,7 +1255,7 @@ void BrowserPluginGuest::OnExecuteEditCommand(int instance_id, void BrowserPluginGuest::OnHandleInputEvent( int instance_id, const gfx::Rect& guest_window_rect, - const WebKit::WebInputEvent* event) { + const blink::WebInputEvent* event) { guest_window_rect_ = guest_window_rect; // If the embedder's RWHV is destroyed then that means that the embedder's // window has been closed but the embedder's WebContents has not yet been @@ -1270,19 +1270,19 @@ void BrowserPluginGuest::OnHandleInputEvent( RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( GetWebContents()->GetRenderViewHost()); - if (WebKit::WebInputEvent::isMouseEventType(event->type)) { + if (blink::WebInputEvent::isMouseEventType(event->type)) { guest_rvh->ForwardMouseEvent( - *static_cast<const WebKit::WebMouseEvent*>(event)); + *static_cast<const blink::WebMouseEvent*>(event)); return; } - if (event->type == WebKit::WebInputEvent::MouseWheel) { + if (event->type == blink::WebInputEvent::MouseWheel) { guest_rvh->ForwardWheelEvent( - *static_cast<const WebKit::WebMouseWheelEvent*>(event)); + *static_cast<const blink::WebMouseWheelEvent*>(event)); return; } - if (WebKit::WebInputEvent::isKeyboardEventType(event->type)) { + if (blink::WebInputEvent::isKeyboardEventType(event->type)) { RenderViewHostImpl* embedder_rvh = static_cast<RenderViewHostImpl*>( embedder_web_contents_->GetRenderViewHost()); if (!embedder_rvh->GetLastKeyboardEvent()) @@ -1293,16 +1293,16 @@ void BrowserPluginGuest::OnHandleInputEvent( return; } - if (WebKit::WebInputEvent::isTouchEventType(event->type)) { + if (blink::WebInputEvent::isTouchEventType(event->type)) { guest_rvh->ForwardTouchEventWithLatencyInfo( - *static_cast<const WebKit::WebTouchEvent*>(event), + *static_cast<const blink::WebTouchEvent*>(event), ui::LatencyInfo()); return; } - if (WebKit::WebInputEvent::isGestureEventType(event->type)) { + if (blink::WebInputEvent::isGestureEventType(event->type)) { guest_rvh->ForwardGestureEvent( - *static_cast<const WebKit::WebGestureEvent*>(event)); + *static_cast<const blink::WebGestureEvent*>(event)); return; } } diff --git a/content/browser/browser_plugin/browser_plugin_guest.h b/content/browser/browser_plugin/browser_plugin_guest.h index 5b23a54..9ccf861 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.h +++ b/content/browser/browser_plugin/browser_plugin_guest.h @@ -53,7 +53,7 @@ namespace cc { class CompositorFrameAck; } -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -282,7 +282,7 @@ class CONTENT_EXPORT BrowserPluginGuest gfx::Rect ToGuestRect(const gfx::Rect& rect); void DragSourceEndedAt(int client_x, int client_y, int screen_x, - int screen_y, WebKit::WebDragOperation operation); + int screen_y, blink::WebDragOperation operation); void DragSourceMovedTo(int client_x, int client_y, int screen_x, int screen_y); @@ -369,9 +369,9 @@ class CONTENT_EXPORT BrowserPluginGuest // drag-message to the guest. This routes the drag-message to the guest // renderer. void OnDragStatusUpdate(int instance_id, - WebKit::WebDragStatus drag_status, + blink::WebDragStatus drag_status, const DropData& drop_data, - WebKit::WebDragOperationsMask drag_mask, + blink::WebDragOperationsMask drag_mask, const gfx::Point& location); // Instructs the guest to execute an edit command decoded in the embedder. void OnExecuteEditCommand(int instance_id, @@ -379,7 +379,7 @@ class CONTENT_EXPORT BrowserPluginGuest // Overriden in tests. virtual void OnHandleInputEvent(int instance_id, const gfx::Rect& guest_window_rect, - const WebKit::WebInputEvent* event); + const blink::WebInputEvent* event); void OnLockMouse(bool user_gesture, bool last_unlocked_by_target, bool privileged); @@ -439,7 +439,7 @@ class CONTENT_EXPORT BrowserPluginGuest void OnDragStopped(); void OnHandleInputEventAck( - WebKit::WebInputEvent::Type event_type, + blink::WebInputEvent::Type event_type, InputEventAckState ack_result); void OnHasTouchEventHandlers(bool accept); void OnSetCursor(const WebCursor& cursor); diff --git a/content/browser/browser_plugin/browser_plugin_guest_manager.cc b/content/browser/browser_plugin/browser_plugin_guest_manager.cc index 7e2ad44..82d0565 100644 --- a/content/browser/browser_plugin/browser_plugin_guest_manager.cc +++ b/content/browser/browser_plugin/browser_plugin_guest_manager.cc @@ -245,9 +245,9 @@ void BrowserPluginGuestManager::DidSendScreenRects( bool BrowserPluginGuestManager::UnlockMouseIfNecessary( WebContentsImpl* embedder_web_contents, const NativeWebKeyboardEvent& event) { - if ((event.type != WebKit::WebInputEvent::RawKeyDown) || + if ((event.type != blink::WebInputEvent::RawKeyDown) || (event.windowsKeyCode != ui::VKEY_ESCAPE) || - (event.modifiers & WebKit::WebInputEvent::InputModifiers)) { + (event.modifiers & blink::WebInputEvent::InputModifiers)) { return false; } diff --git a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc index 4906415..d4b9a3f 100644 --- a/content/browser/browser_plugin/browser_plugin_host_browsertest.cc +++ b/content/browser/browser_plugin/browser_plugin_host_browsertest.cc @@ -38,8 +38,8 @@ #include "net/test/spawned_test_server/spawned_test_server.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; using content::BrowserPluginEmbedder; using content::BrowserPluginGuest; using content::BrowserPluginHostFactory; @@ -396,7 +396,7 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, AdvanceFocus) { StartBrowserPluginTest(kEmbedderURL, kGuestURL, false, std::string()); SimulateMouseClick(test_embedder()->web_contents(), 0, - WebKit::WebMouseEvent::ButtonLeft); + blink::WebMouseEvent::ButtonLeft); BrowserPluginHostTest::SimulateTabKeyPress(test_embedder()->web_contents()); // Wait until we focus into the guest. test_guest()->WaitForFocus(); @@ -633,9 +633,9 @@ IN_PROC_BROWSER_TEST_F(BrowserPluginHostTest, MAYBE_AcceptDragEvents) { expected_title); rvh->DragTargetDragEnter(drop_data, gfx::Point(start_x, start_y), - gfx::Point(start_x, start_y), WebKit::WebDragOperationEvery, 0); + gfx::Point(start_x, start_y), blink::WebDragOperationEvery, 0); rvh->DragTargetDragOver(gfx::Point(end_x, end_y), gfx::Point(end_x, end_y), - WebKit::WebDragOperationEvery, 0); + blink::WebDragOperationEvery, 0); rvh->DragTargetDrop(gfx::Point(end_x, end_y), gfx::Point(end_x, end_y), 0); string16 actual_title = title_watcher.WaitAndGetTitle(); diff --git a/content/browser/browser_plugin/test_browser_plugin_guest.cc b/content/browser/browser_plugin/test_browser_plugin_guest.cc index 7f10cfd..24a2341 100644 --- a/content/browser/browser_plugin/test_browser_plugin_guest.cc +++ b/content/browser/browser_plugin/test_browser_plugin_guest.cc @@ -92,7 +92,7 @@ void TestBrowserPluginGuest::RenderProcessGone(base::TerminationStatus status) { void TestBrowserPluginGuest::OnHandleInputEvent( int instance_id, const gfx::Rect& guest_window_rect, - const WebKit::WebInputEvent* event) { + const blink::WebInputEvent* event) { BrowserPluginGuest::OnHandleInputEvent(instance_id, guest_window_rect, event); diff --git a/content/browser/browser_plugin/test_browser_plugin_guest.h b/content/browser/browser_plugin/test_browser_plugin_guest.h index dd89528..53f7f8c 100644 --- a/content/browser/browser_plugin/test_browser_plugin_guest.h +++ b/content/browser/browser_plugin/test_browser_plugin_guest.h @@ -31,7 +31,7 @@ class TestBrowserPluginGuest : public BrowserPluginGuest { virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; virtual void OnHandleInputEvent(int instance_id, const gfx::Rect& guest_window_rect, - const WebKit::WebInputEvent* event) OVERRIDE; + const blink::WebInputEvent* event) OVERRIDE; virtual void OnSetFocus(int instance_id, bool focused) OVERRIDE; virtual void OnTakeFocus(bool reverse) OVERRIDE; virtual void SetDamageBuffer( diff --git a/content/browser/devtools/renderer_overrides_handler.cc b/content/browser/devtools/renderer_overrides_handler.cc index 8d0177b..56f9123 100644 --- a/content/browser/devtools/renderer_overrides_handler.cc +++ b/content/browser/devtools/renderer_overrides_handler.cc @@ -45,9 +45,9 @@ #include "url/gurl.h" #include "webkit/browser/quota/quota_manager.h" -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; namespace content { @@ -825,7 +825,7 @@ RendererOverridesHandler::InputDispatchMouseEvent( } RenderViewHost* host = agent_->GetRenderViewHost(); - WebKit::WebMouseEvent mouse_event; + blink::WebMouseEvent mouse_event; ParseGenericInputParams(params, &mouse_event); std::string type; @@ -890,7 +890,7 @@ RendererOverridesHandler::InputDispatchGestureEvent( RenderViewHostImpl* host = static_cast<RenderViewHostImpl*>( agent_->GetRenderViewHost()); - WebKit::WebGestureEvent event; + blink::WebGestureEvent event; ParseGenericInputParams(params, &event); std::string type; diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc index f38f9cd..2fc68df 100644 --- a/content/browser/download/save_package.cc +++ b/content/browser/download/save_package.cc @@ -46,7 +46,7 @@ #include "third_party/WebKit/public/web/WebPageSerializerClient.h" using base::Time; -using WebKit::WebPageSerializerClient; +using blink::WebPageSerializerClient; namespace content { namespace { diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc index 4bcee69..2516621 100644 --- a/content/browser/frame_host/interstitial_page_impl.cc +++ b/content/browser/frame_host/interstitial_page_impl.cc @@ -41,8 +41,8 @@ #include "net/base/escape.h" #include "net/url_request/url_request_context_getter.h" -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; namespace content { namespace { @@ -697,7 +697,7 @@ void InterstitialPageImpl::CreateNewWindow( } void InterstitialPageImpl::CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) { + blink::WebPopupType popup_type) { NOTREACHED() << "InterstitialPage does not support showing drop-downs yet."; } diff --git a/content/browser/frame_host/interstitial_page_impl.h b/content/browser/frame_host/interstitial_page_impl.h index 66c0ca9..347a014 100644 --- a/content/browser/frame_host/interstitial_page_impl.h +++ b/content/browser/frame_host/interstitial_page_impl.h @@ -121,7 +121,7 @@ class CONTENT_EXPORT InterstitialPageImpl const ViewHostMsg_CreateWindow_Params& params, SessionStorageNamespace* session_storage_namespace) OVERRIDE; virtual void CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) OVERRIDE; + blink::WebPopupType popup_type) OVERRIDE; virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; virtual void ShowCreatedWindow(int route_id, WindowOpenDisposition disposition, diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc index 9fa4140..4126c97 100644 --- a/content/browser/frame_host/navigation_controller_impl_unittest.cc +++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc @@ -499,7 +499,7 @@ TEST_F(NavigationControllerTest, LoadURLWithParams) { NavigationController::LoadURLParams load_params(GURL("http://foo")); load_params.referrer = - Referrer(GURL("http://referrer"), WebKit::WebReferrerPolicyDefault); + Referrer(GURL("http://referrer"), blink::WebReferrerPolicyDefault); load_params.transition_type = PAGE_TRANSITION_GENERATED; load_params.extra_headers = "content-type: text/plain"; load_params.load_type = NavigationController::LOAD_TYPE_DEFAULT; diff --git a/content/browser/frame_host/navigation_entry_impl_unittest.cc b/content/browser/frame_host/navigation_entry_impl_unittest.cc index 6486fde..cb742e4 100644 --- a/content/browser/frame_host/navigation_entry_impl_unittest.cc +++ b/content/browser/frame_host/navigation_entry_impl_unittest.cc @@ -27,7 +27,7 @@ class NavigationEntryTest : public testing::Test { entry2_.reset(new NavigationEntryImpl( instance_, 3, GURL("test:url"), - Referrer(GURL("from"), WebKit::WebReferrerPolicyDefault), + Referrer(GURL("from"), blink::WebReferrerPolicyDefault), ASCIIToUTF16("title"), PAGE_TRANSITION_TYPED, false)); @@ -132,7 +132,7 @@ TEST_F(NavigationEntryTest, NavigationEntryAccessors) { EXPECT_EQ(GURL(), entry1_->GetReferrer().url); EXPECT_EQ(GURL("from"), entry2_->GetReferrer().url); entry2_->SetReferrer( - Referrer(GURL("from2"), WebKit::WebReferrerPolicyDefault)); + Referrer(GURL("from2"), blink::WebReferrerPolicyDefault)); EXPECT_EQ(GURL("from2"), entry2_->GetReferrer().url); // Title diff --git a/content/browser/frame_host/render_view_host_manager_unittest.cc b/content/browser/frame_host/render_view_host_manager_unittest.cc index f55de8a..1027a52 100644 --- a/content/browser/frame_host/render_view_host_manager_unittest.cc +++ b/content/browser/frame_host/render_view_host_manager_unittest.cc @@ -260,7 +260,7 @@ TEST_F(RenderViewHostManagerTest, FilterMessagesWhileSwappedOut) { // Send an update title message and make sure it works. const string16 ntp_title = ASCIIToUTF16("NTP Title"); - WebKit::WebTextDirection direction = WebKit::WebTextDirectionLeftToRight; + blink::WebTextDirection direction = blink::WebTextDirectionLeftToRight; EXPECT_TRUE(ntp_rvh->OnMessageReceived( ViewHostMsg_UpdateTitle(rvh()->GetRoutingID(), 0, ntp_title, direction))); EXPECT_EQ(ntp_title, contents()->GetTitle()); @@ -624,7 +624,7 @@ TEST_F(RenderViewHostManagerTest, Navigate) { const GURL kUrl2("http://www.google.com/foo"); NavigationEntryImpl entry2( NULL /* instance */, -1 /* page_id */, kUrl2, - Referrer(kUrl1, WebKit::WebReferrerPolicyDefault), + Referrer(kUrl1, blink::WebReferrerPolicyDefault), string16() /* title */, PAGE_TRANSITION_LINK, true /* is_renderer_init */); host = manager.Navigate(entry2); @@ -644,7 +644,7 @@ TEST_F(RenderViewHostManagerTest, Navigate) { const GURL kUrl3("http://webkit.org/"); NavigationEntryImpl entry3( NULL /* instance */, -1 /* page_id */, kUrl3, - Referrer(kUrl2, WebKit::WebReferrerPolicyDefault), + Referrer(kUrl2, blink::WebReferrerPolicyDefault), string16() /* title */, PAGE_TRANSITION_LINK, false /* is_renderer_init */); host = manager.Navigate(entry3); @@ -1217,7 +1217,7 @@ TEST_F(RenderViewHostManagerTest, NoSwapOnGuestNavigations) { const GURL kUrl2("http://www.chromium.org"); NavigationEntryImpl entry2( NULL /* instance */, -1 /* page_id */, kUrl2, - Referrer(kUrl1, WebKit::WebReferrerPolicyDefault), + Referrer(kUrl1, blink::WebReferrerPolicyDefault), string16() /* title */, PAGE_TRANSITION_LINK, true /* is_renderer_init */); host = manager.Navigate(entry2); diff --git a/content/browser/gamepad/gamepad_data_fetcher.h b/content/browser/gamepad/gamepad_data_fetcher.h index e5e009d..17887d5 100644 --- a/content/browser/gamepad/gamepad_data_fetcher.h +++ b/content/browser/gamepad/gamepad_data_fetcher.h @@ -5,7 +5,7 @@ #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_DATA_FETCHER_H_ #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_DATA_FETCHER_H_ -namespace WebKit { +namespace blink { class WebGamepads; } @@ -16,7 +16,7 @@ namespace content { class GamepadDataFetcher { public: virtual ~GamepadDataFetcher() {} - virtual void GetGamepadData(WebKit::WebGamepads* pads, + virtual void GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) = 0; virtual void PauseHint(bool paused) {} }; diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher.cc b/content/browser/gamepad/gamepad_platform_data_fetcher.cc index b4499d6..d889526 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher.cc +++ b/content/browser/gamepad/gamepad_platform_data_fetcher.cc @@ -11,7 +11,7 @@ namespace content { GamepadDataFetcherEmpty::GamepadDataFetcherEmpty() { } -void GamepadDataFetcherEmpty::GetGamepadData(WebKit::WebGamepads* pads, +void GamepadDataFetcherEmpty::GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) { pads->length = 0; } diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher.h b/content/browser/gamepad/gamepad_platform_data_fetcher.h index f073a53..625e72c 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher.h +++ b/content/browser/gamepad/gamepad_platform_data_fetcher.h @@ -40,7 +40,7 @@ class GamepadDataFetcherEmpty : public GamepadDataFetcher { public: GamepadDataFetcherEmpty(); - virtual void GetGamepadData(WebKit::WebGamepads* pads, + virtual void GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) OVERRIDE; private: diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc index c82997e..ba048ae 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.cc @@ -52,7 +52,7 @@ bool IsGamepad(udev_device* dev, int* index, std::string* path) { if (!base::StringToInt(str, &tmp_idx)) return false; if (tmp_idx < 0 || - tmp_idx >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap)) { + tmp_idx >= static_cast<int>(blink::WebGamepads::itemsLengthCap)) { return false; } *index = tmp_idx; @@ -64,8 +64,8 @@ bool IsGamepad(udev_device* dev, int* index, std::string* path) { namespace content { -using WebKit::WebGamepad; -using WebKit::WebGamepads; +using blink::WebGamepad; +using blink::WebGamepads; GamepadPlatformDataFetcherLinux::GamepadPlatformDataFetcherLinux() { for (size_t i = 0; i < arraysize(device_fds_); ++i) diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h index 916eda3..f95e52f 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_linux.h @@ -28,7 +28,7 @@ class GamepadPlatformDataFetcherLinux : public GamepadDataFetcher { virtual ~GamepadPlatformDataFetcherLinux(); // GamepadDataFetcher implementation. - virtual void GetGamepadData(WebKit::WebGamepads* pads, + virtual void GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) OVERRIDE; private: @@ -37,14 +37,14 @@ class GamepadPlatformDataFetcherLinux : public GamepadDataFetcher { void ReadDeviceData(size_t index); // File descriptors for the /dev/input/js* devices. -1 if not in use. - int device_fds_[WebKit::WebGamepads::itemsLengthCap]; + int device_fds_[blink::WebGamepads::itemsLengthCap]; // Functions to map from device data to standard layout, if available. May // be null if no mapping is available. - GamepadStandardMappingFunction mappers_[WebKit::WebGamepads::itemsLengthCap]; + GamepadStandardMappingFunction mappers_[blink::WebGamepads::itemsLengthCap]; // Data that's returned to the consumer. - WebKit::WebGamepads data_; + blink::WebGamepads data_; scoped_ptr<UdevLinux> udev_; diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h index 3b22b693..54e1944 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.h @@ -32,7 +32,7 @@ class GamepadPlatformDataFetcherMac : public GamepadDataFetcher, public: GamepadPlatformDataFetcherMac(); virtual ~GamepadPlatformDataFetcherMac(); - virtual void GetGamepadData(WebKit::WebGamepads* pads, + virtual void GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) OVERRIDE; virtual void PauseHint(bool paused) OVERRIDE; @@ -73,7 +73,7 @@ class GamepadPlatformDataFetcherMac : public GamepadDataFetcher, scoped_ptr<XboxDataFetcher> xbox_fetcher_; - WebKit::WebGamepads data_; + blink::WebGamepads data_; // Side-band data that's not passed to the consumer, but we need to maintain // to update data_. @@ -82,10 +82,10 @@ class GamepadPlatformDataFetcherMac : public GamepadDataFetcher, union { struct { IOHIDDeviceRef device_ref; - IOHIDElementRef button_elements[WebKit::WebGamepad::buttonsLengthCap]; - IOHIDElementRef axis_elements[WebKit::WebGamepad::buttonsLengthCap]; - CFIndex axis_minimums[WebKit::WebGamepad::axesLengthCap]; - CFIndex axis_maximums[WebKit::WebGamepad::axesLengthCap]; + IOHIDElementRef button_elements[blink::WebGamepad::buttonsLengthCap]; + IOHIDElementRef axis_elements[blink::WebGamepad::buttonsLengthCap]; + CFIndex axis_minimums[blink::WebGamepad::axesLengthCap]; + CFIndex axis_maximums[blink::WebGamepad::axesLengthCap]; // Function to map from device data to standard layout, if available. // May be null if no mapping is available. GamepadStandardMappingFunction mapper; @@ -96,7 +96,7 @@ class GamepadPlatformDataFetcherMac : public GamepadDataFetcher, } xbox; }; }; - AssociatedData associated_[WebKit::WebGamepads::itemsLengthCap]; + AssociatedData associated_[blink::WebGamepads::itemsLengthCap]; DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherMac); }; diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm index 8ed59ac..69d0c63 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_mac.mm @@ -14,8 +14,8 @@ #import <Foundation/Foundation.h> #include <IOKit/hid/IOHIDKeys.h> -using WebKit::WebGamepad; -using WebKit::WebGamepads; +using blink::WebGamepad; +using blink::WebGamepads; namespace content { @@ -266,7 +266,7 @@ void GamepadPlatformDataFetcherMac::DeviceAdd(IOHIDDeviceRef device) { const size_t kOutputLengthBytes = sizeof(data_.items[slot].id); memset(&data_.items[slot].id, 0, kOutputLengthBytes); [as16 getBytes:data_.items[slot].id - length:kOutputLengthBytes - sizeof(WebKit::WebUChar)]; + length:kOutputLengthBytes - sizeof(blink::WebUChar)]; base::ScopedCFTypeRef<CFArrayRef> elements( IOHIDDeviceCopyMatchingElements(device, NULL, kIOHIDOptionsTypeNone)); @@ -359,7 +359,7 @@ void GamepadPlatformDataFetcherMac::XboxDeviceAdd(XboxController* device) { const size_t kOutputLengthBytes = sizeof(data_.items[slot].id); memset(&data_.items[slot].id, 0, kOutputLengthBytes); [as16 getBytes:data_.items[slot].id - length:kOutputLengthBytes - sizeof(WebKit::WebUChar)]; + length:kOutputLengthBytes - sizeof(blink::WebUChar)]; associated_[slot].is_xbox = true; associated_[slot].xbox.device = device; diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc b/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc index 91ebdf5..757355c 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_win.cc @@ -22,7 +22,7 @@ namespace content { -using namespace WebKit; +using namespace blink; namespace { diff --git a/content/browser/gamepad/gamepad_platform_data_fetcher_win.h b/content/browser/gamepad/gamepad_platform_data_fetcher_win.h index 7551ee9..c894143 100644 --- a/content/browser/gamepad/gamepad_platform_data_fetcher_win.h +++ b/content/browser/gamepad/gamepad_platform_data_fetcher_win.h @@ -31,13 +31,13 @@ class GamepadPlatformDataFetcherWin : public GamepadDataFetcher { public: GamepadPlatformDataFetcherWin(); virtual ~GamepadPlatformDataFetcherWin(); - virtual void GetGamepadData(WebKit::WebGamepads* pads, + virtual void GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) OVERRIDE; private: // XInput-specific implementation for GetGamepadData. - bool GetXInputGamepadData(WebKit::WebGamepads* pads, + bool GetXInputGamepadData(blink::WebGamepads* pads, bool devices_changed_hint); - bool GetDirectInputGamepadData(WebKit::WebGamepads* pads, + bool GetDirectInputGamepadData(blink::WebGamepads* pads, bool devices_changed_hint); // The three function types we use from xinput1_3.dll. @@ -54,11 +54,11 @@ class GamepadPlatformDataFetcherWin : public GamepadDataFetcher { bool GetXInputDllFunctions(); // Scan for connected XInput and DirectInput gamepads. - void EnumerateDevices(WebKit::WebGamepads* pads); - bool GetXInputPadConnectivity(int i, WebKit::WebGamepad* pad) const; + void EnumerateDevices(blink::WebGamepads* pads); + bool GetXInputPadConnectivity(int i, blink::WebGamepad* pad) const; - void GetXInputPadData(int i, WebKit::WebGamepad* pad); - void GetDirectInputPadData(int i, WebKit::WebGamepad* pad); + void GetXInputPadData(int i, blink::WebGamepad* pad); + void GetDirectInputPadData(int i, blink::WebGamepad* pad); int FirstAvailableGamepadId() const; bool HasXInputGamepad(int index) const; @@ -90,7 +90,7 @@ class GamepadPlatformDataFetcherWin : public GamepadDataFetcher { IDirectInputDevice8* directinput_gamepad; GamepadStandardMappingFunction mapper; }; - PadState pad_state_[WebKit::WebGamepads::itemsLengthCap]; + PadState pad_state_[blink::WebGamepads::itemsLengthCap]; DISALLOW_COPY_AND_ASSIGN(GamepadPlatformDataFetcherWin); }; diff --git a/content/browser/gamepad/gamepad_provider.cc b/content/browser/gamepad/gamepad_provider.cc index 7e8e6de..55a5f30 100644 --- a/content/browser/gamepad/gamepad_provider.cc +++ b/content/browser/gamepad/gamepad_provider.cc @@ -158,7 +158,7 @@ void GamepadProvider::DoPoll() { ANNOTATE_BENIGN_RACE_SIZED( &hwbuf->buffer, - sizeof(WebKit::WebGamepads), + sizeof(blink::WebGamepads), "Racey reads are discarded"); { diff --git a/content/browser/gamepad/gamepad_provider_unittest.cc b/content/browser/gamepad/gamepad_provider_unittest.cc index 0e5785c..398edca 100644 --- a/content/browser/gamepad/gamepad_provider_unittest.cc +++ b/content/browser/gamepad/gamepad_provider_unittest.cc @@ -15,7 +15,7 @@ namespace content { namespace { -using WebKit::WebGamepads; +using blink::WebGamepads; // Helper class to generate and record user gesture callbacks. class UserGestureListener { diff --git a/content/browser/gamepad/gamepad_standard_mappings.h b/content/browser/gamepad/gamepad_standard_mappings.h index 6f5d72f..6b533ca 100644 --- a/content/browser/gamepad/gamepad_standard_mappings.h +++ b/content/browser/gamepad/gamepad_standard_mappings.h @@ -7,15 +7,15 @@ #include "base/strings/string_piece.h" -namespace WebKit { +namespace blink { class WebGamepad; } namespace content { typedef void (*GamepadStandardMappingFunction)( - const WebKit::WebGamepad& original, - WebKit::WebGamepad* mapped); + const blink::WebGamepad& original, + blink::WebGamepad* mapped); GamepadStandardMappingFunction GetGamepadStandardMappingFunction( const base::StringPiece& vendor_id, diff --git a/content/browser/gamepad/gamepad_standard_mappings_linux.cc b/content/browser/gamepad/gamepad_standard_mappings_linux.cc index e9e7094..712e753 100644 --- a/content/browser/gamepad/gamepad_standard_mappings_linux.cc +++ b/content/browser/gamepad/gamepad_standard_mappings_linux.cc @@ -23,8 +23,8 @@ float AxisPositiveAsButton(float input) { } void MapperXInputStyleGamepad( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonLeftTrigger] = AxisToButton(input.axes[2]); mapped->buttons[kButtonRightTrigger] = AxisToButton(input.axes[5]); @@ -44,8 +44,8 @@ void MapperXInputStyleGamepad( } void MapperLakeviewResearch( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[2]; mapped->buttons[kButtonTertiary] = input.buttons[3]; @@ -65,8 +65,8 @@ void MapperLakeviewResearch( } void MapperPlaystationSixAxis( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[14]; mapped->buttons[kButtonSecondary] = input.buttons[13]; @@ -91,8 +91,8 @@ void MapperPlaystationSixAxis( } void MapperXGEAR( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[2]; mapped->buttons[kButtonSecondary] = input.buttons[1]; @@ -114,8 +114,8 @@ void MapperXGEAR( void MapperDragonRiseGeneric( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonDpadUp] = AxisNegativeAsButton(input.axes[6]); mapped->buttons[kButtonDpadDown] = AxisPositiveAsButton(input.axes[6]); diff --git a/content/browser/gamepad/gamepad_standard_mappings_mac.mm b/content/browser/gamepad/gamepad_standard_mappings_mac.mm index 0ffb35f..2696c53 100644 --- a/content/browser/gamepad/gamepad_standard_mappings_mac.mm +++ b/content/browser/gamepad/gamepad_standard_mappings_mac.mm @@ -14,7 +14,7 @@ float AxisToButton(float input) { return (input + 1.f) / 2.f; } -void DpadFromAxis(WebKit::WebGamepad* mapped, float dir) { +void DpadFromAxis(blink::WebGamepad* mapped, float dir) { // Dpad is mapped as a direction on one axis, where -1 is up and it // increases clockwise to 1, which is up + left. It's set to a large (> 1.f) // number when nothing is depressed, except on start up, sometimes it's 0.0 @@ -34,8 +34,8 @@ void DpadFromAxis(WebKit::WebGamepad* mapped, float dir) { } void MapperXbox360Gamepad( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonLeftTrigger] = AxisToButton(input.axes[2]); mapped->buttons[kButtonRightTrigger] = AxisToButton(input.axes[5]); @@ -55,8 +55,8 @@ void MapperXbox360Gamepad( } void MapperPlaystationSixAxis( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[14]; mapped->buttons[kButtonSecondary] = input.buttons[13]; @@ -82,8 +82,8 @@ void MapperPlaystationSixAxis( } void MapperDirectInputStyle( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[1]; mapped->buttons[kButtonSecondary] = input.buttons[2]; @@ -95,8 +95,8 @@ void MapperDirectInputStyle( } void MapperMacallyIShock( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { enum IShockButtons { kButtonC = kNumButtons, kButtonD, @@ -135,8 +135,8 @@ void MapperMacallyIShock( } void MapperXGEAR( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[2]; mapped->buttons[kButtonTertiary] = input.buttons[3]; @@ -153,8 +153,8 @@ void MapperXGEAR( } void MapperSmartJoyPLUS( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonPrimary] = input.buttons[2]; mapped->buttons[kButtonTertiary] = input.buttons[3]; @@ -172,8 +172,8 @@ void MapperSmartJoyPLUS( } void MapperDragonRiseGeneric( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; DpadFromAxis(mapped, input.axes[9]); mapped->axes[kAxisLeftStickX] = input.axes[0]; diff --git a/content/browser/gamepad/gamepad_standard_mappings_win.cc b/content/browser/gamepad/gamepad_standard_mappings_win.cc index fa57c03..07adb9b 100644 --- a/content/browser/gamepad/gamepad_standard_mappings_win.cc +++ b/content/browser/gamepad/gamepad_standard_mappings_win.cc @@ -24,8 +24,8 @@ float AxisPositiveAsButton(long value) { } void MapperDragonRiseGeneric( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[0] = input.buttons[1]; mapped->buttons[1] = input.buttons[2]; @@ -43,8 +43,8 @@ void MapperDragonRiseGeneric( } void MapperLogitechDualAction( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[0] = input.buttons[1]; mapped->buttons[1] = input.buttons[2]; @@ -62,8 +62,8 @@ void MapperLogitechDualAction( } void MapperLogitechPrecision( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[0] = input.buttons[1]; mapped->buttons[1] = input.buttons[2]; @@ -79,8 +79,8 @@ void MapperLogitechPrecision( } void Mapper2Axes8Keys( - const WebKit::WebGamepad& input, - WebKit::WebGamepad* mapped) { + const blink::WebGamepad& input, + blink::WebGamepad* mapped) { *mapped = input; mapped->buttons[kButtonLeftTrigger] = 0; // Not present mapped->buttons[kButtonRightTrigger] = 0; // Not present diff --git a/content/browser/gamepad/gamepad_test_helpers.cc b/content/browser/gamepad/gamepad_test_helpers.cc index e4db14c..8837c8e 100644 --- a/content/browser/gamepad/gamepad_test_helpers.cc +++ b/content/browser/gamepad/gamepad_test_helpers.cc @@ -9,7 +9,7 @@ namespace content { MockGamepadDataFetcher::MockGamepadDataFetcher( - const WebKit::WebGamepads& test_data) + const blink::WebGamepads& test_data) : test_data_(test_data), read_data_(false, false) { } @@ -17,7 +17,7 @@ MockGamepadDataFetcher::MockGamepadDataFetcher( MockGamepadDataFetcher::~MockGamepadDataFetcher() { } -void MockGamepadDataFetcher::GetGamepadData(WebKit::WebGamepads* pads, +void MockGamepadDataFetcher::GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) { { base::AutoLock lock(lock_); @@ -30,7 +30,7 @@ void MockGamepadDataFetcher::WaitForDataRead() { return read_data_.Wait(); } -void MockGamepadDataFetcher::SetTestData(const WebKit::WebGamepads& new_data) { +void MockGamepadDataFetcher::SetTestData(const blink::WebGamepads& new_data) { base::AutoLock lock(lock_); test_data_ = new_data; } @@ -42,7 +42,7 @@ GamepadTestHelper::~GamepadTestHelper() { } GamepadServiceTestConstructor::GamepadServiceTestConstructor( - const WebKit::WebGamepads& test_data) { + const blink::WebGamepads& test_data) { data_fetcher_ = new MockGamepadDataFetcher(test_data); gamepad_service_ = new GamepadService(scoped_ptr<GamepadDataFetcher>(data_fetcher_)); diff --git a/content/browser/gamepad/gamepad_test_helpers.h b/content/browser/gamepad/gamepad_test_helpers.h index 3b43f77..2aad5753 100644 --- a/content/browser/gamepad/gamepad_test_helpers.h +++ b/content/browser/gamepad/gamepad_test_helpers.h @@ -21,12 +21,12 @@ class MockGamepadDataFetcher : public GamepadDataFetcher { public: // Initializes the fetcher with the given gamepad data, which will be // returned when the provider queries us. - explicit MockGamepadDataFetcher(const WebKit::WebGamepads& test_data); + explicit MockGamepadDataFetcher(const blink::WebGamepads& test_data); virtual ~MockGamepadDataFetcher(); // GamepadDataFetcher. - virtual void GetGamepadData(WebKit::WebGamepads* pads, + virtual void GetGamepadData(blink::WebGamepads* pads, bool devices_changed_hint) OVERRIDE; // Blocks the current thread until the GamepadProvider reads from this @@ -34,11 +34,11 @@ class MockGamepadDataFetcher : public GamepadDataFetcher { void WaitForDataRead(); // Updates the test data. - void SetTestData(const WebKit::WebGamepads& new_data); + void SetTestData(const blink::WebGamepads& new_data); private: base::Lock lock_; - WebKit::WebGamepads test_data_; + blink::WebGamepads test_data_; base::WaitableEvent read_data_; DISALLOW_COPY_AND_ASSIGN(MockGamepadDataFetcher); @@ -63,7 +63,7 @@ class GamepadTestHelper { // global singleton for the gamepad service. class GamepadServiceTestConstructor : public GamepadTestHelper { public: - explicit GamepadServiceTestConstructor(const WebKit::WebGamepads& test_data); + explicit GamepadServiceTestConstructor(const blink::WebGamepads& test_data); virtual ~GamepadServiceTestConstructor(); GamepadService* gamepad_service() { return gamepad_service_; } diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc index f066fe6..a67a9be 100644 --- a/content/browser/gpu/gpu_ipc_browsertests.cc +++ b/content/browser/gpu/gpu_ipc_browsertests.cc @@ -35,7 +35,7 @@ class ContextTestBase : public content::ContentBrowserTest { context_.reset( WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( gpu_channel_host.get(), - WebKit::WebGraphicsContext3D::Attributes(), + blink::WebGraphicsContext3D::Attributes(), GURL())); CHECK(context_.get()); context_->makeContextCurrent(); @@ -120,7 +120,7 @@ class BrowserGpuChannelHostFactoryTest : public ContextTestBase { return make_scoped_ptr( WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( GetGpuChannel(), - WebKit::WebGraphicsContext3D::Attributes(), + blink::WebGraphicsContext3D::Attributes(), GURL())); } }; diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc index e67319d..7f5c58b 100644 --- a/content/browser/indexed_db/indexed_db_backing_store.cc +++ b/content/browser/indexed_db/indexed_db_backing_store.cc @@ -223,7 +223,7 @@ WARN_UNUSED_RESULT static bool IsSchemaKnown(LevelDBDatabase* db, bool* known) { } const uint32 latest_known_data_version = - WebKit::kSerializedScriptValueVersion; + blink::kSerializedScriptValueVersion; int64 db_data_version = 0; ok = GetInt(db, DataVersionKey::Encode(), &db_data_version, &found); if (!ok) @@ -246,7 +246,7 @@ WARN_UNUSED_RESULT static bool SetUpMetadata( LevelDBDatabase* db, const std::string& origin_identifier) { const uint32 latest_known_data_version = - WebKit::kSerializedScriptValueVersion; + blink::kSerializedScriptValueVersion; const std::string schema_version_key = SchemaVersionKey::Encode(); const std::string data_version_key = DataVersionKey::Encode(); @@ -302,7 +302,7 @@ WARN_UNUSED_RESULT static bool SetUpMetadata( if (db_schema_version < 2) { db_schema_version = 2; PutInt(transaction.get(), schema_version_key, db_schema_version); - db_data_version = WebKit::kSerializedScriptValueVersion; + db_data_version = blink::kSerializedScriptValueVersion; PutInt(transaction.get(), data_version_key, db_data_version); } } @@ -424,10 +424,10 @@ enum IndexedDBBackingStoreOpenResult { scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Open( const GURL& origin_url, const base::FilePath& path_base, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_message, bool* disk_full) { - *data_loss = WebKit::WebIDBCallbacks::DataLossNone; + *data_loss = blink::WebIDBCallbacks::DataLossNone; DefaultLevelDBFactory leveldb_factory; return IndexedDBBackingStore::Open(origin_url, path_base, @@ -477,13 +477,13 @@ static bool IsPathTooLong(const base::FilePath& leveldb_dir) { scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Open( const GURL& origin_url, const base::FilePath& path_base, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_message, bool* is_disk_full, LevelDBFactory* leveldb_factory) { IDB_TRACE("IndexedDBBackingStore::Open"); DCHECK(!path_base.empty()); - *data_loss = WebKit::WebIDBCallbacks::DataLossNone; + *data_loss = blink::WebIDBCallbacks::DataLossNone; *data_loss_message = ""; *is_disk_full = false; @@ -516,7 +516,7 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Open( if (leveldb_env::IndicatesDiskFull(status)) { *is_disk_full = true; } else if (leveldb_env::IsCorruption(status)) { - *data_loss = WebKit::WebIDBCallbacks::DataLossTotal; + *data_loss = blink::WebIDBCallbacks::DataLossTotal; *data_loss_message = leveldb_env::GetCorruptionMessage(status); } } @@ -530,14 +530,14 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Open( HistogramOpenStatus( INDEXED_DB_BACKING_STORE_OPEN_FAILED_IO_ERROR_CHECKING_SCHEMA); db.reset(); - *data_loss = WebKit::WebIDBCallbacks::DataLossTotal; + *data_loss = blink::WebIDBCallbacks::DataLossTotal; *data_loss_message = "I/O error checking schema"; } else if (!is_schema_known) { LOG(ERROR) << "IndexedDB backing store had unknown schema, treating it " "as failure to open"; HistogramOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_FAILED_UNKNOWN_SCHEMA); db.reset(); - *data_loss = WebKit::WebIDBCallbacks::DataLossTotal; + *data_loss = blink::WebIDBCallbacks::DataLossTotal; *data_loss_message = "Unknown schema"; } } @@ -965,7 +965,7 @@ bool IndexedDBBackingStore::GetObjectStores( // (2) Later, null vs. string vs. array was stored in the key_path itself. // So this check is only relevant for string-type key_paths. if (!has_key_path && - (key_path.type() == WebKit::WebIDBKeyPathTypeString && + (key_path.type() == blink::WebIDBKeyPathTypeString && !key_path.string().empty())) { INTERNAL_CONSISTENCY_ERROR(GET_OBJECT_STORES); break; @@ -1324,7 +1324,7 @@ bool IndexedDBBackingStore::GetKeyGeneratorCurrentNumber( return false; } scoped_ptr<IndexedDBKey> user_key = data_key.user_key(); - if (user_key->type() == WebKit::WebIDBKeyTypeNumber) { + if (user_key->type() == blink::WebIDBKeyTypeNumber) { int64 n = static_cast<int64>(user_key->number()); if (n > max_numeric_key) max_numeric_key = n; diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h index 4665480..738a046 100644 --- a/content/browser/indexed_db/indexed_db_backing_store.h +++ b/content/browser/indexed_db/indexed_db_backing_store.h @@ -53,14 +53,14 @@ class CONTENT_EXPORT IndexedDBBackingStore static scoped_refptr<IndexedDBBackingStore> Open( const GURL& origin_url, const base::FilePath& path_base, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_message, bool* disk_full); static scoped_refptr<IndexedDBBackingStore> Open( const GURL& origin_url, const base::FilePath& path_base, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_message, bool* disk_full, LevelDBFactory* factory); diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc index 7b5fc62..396189e 100644 --- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc +++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc @@ -26,7 +26,7 @@ class IndexedDBBackingStoreTest : public testing::Test { m_value1 = "value1"; m_value2 = "value2"; m_value3 = "value3"; - m_key1 = IndexedDBKey(99, WebKit::WebIDBKeyTypeNumber); + m_key1 = IndexedDBKey(99, blink::WebIDBKeyTypeNumber); m_key2 = IndexedDBKey(ASCIIToUTF16("key2")); m_key3 = IndexedDBKey(ASCIIToUTF16("key3")); } diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc index ccfef79..90ef3dc 100644 --- a/content/browser/indexed_db/indexed_db_callbacks.cc +++ b/content/browser/indexed_db/indexed_db_callbacks.cc @@ -14,7 +14,7 @@ #include "content/common/indexed_db/indexed_db_messages.h" #include "webkit/browser/quota/quota_manager.h" -using WebKit::WebIDBCallbacks; +using blink::WebIDBCallbacks; namespace content { diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h index 23a6b58..6ff6756 100644 --- a/content/browser/indexed_db/indexed_db_callbacks.h +++ b/content/browser/indexed_db/indexed_db_callbacks.h @@ -62,7 +62,7 @@ class CONTENT_EXPORT IndexedDBCallbacks int64 old_version, scoped_ptr<IndexedDBConnection> connection, const content::IndexedDBDatabaseMetadata& metadata, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message); virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection, const content::IndexedDBDatabaseMetadata& metadata); diff --git a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc index 11e4491..c697145 100644 --- a/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc +++ b/content/browser/indexed_db/indexed_db_cleanup_on_io_error_unittest.cc @@ -66,8 +66,8 @@ TEST(IndexedDBIOErrorTest, CleanUpTest) { ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); const base::FilePath path = temp_directory.path(); MockLevelDBFactory mock_leveldb_factory; - WebKit::WebIDBCallbacks::DataLoss data_loss = - WebKit::WebIDBCallbacks::DataLossNone; + blink::WebIDBCallbacks::DataLoss data_loss = + blink::WebIDBCallbacks::DataLossNone; std::string data_loss_message; bool disk_full = false; scoped_refptr<IndexedDBBackingStore> backing_store = @@ -116,8 +116,8 @@ TEST(IndexedDBNonRecoverableIOErrorTest, NuancedCleanupTest) { base::ScopedTempDir temp_directory; ASSERT_TRUE(temp_directory.CreateUniqueTempDir()); const base::FilePath path = temp_directory.path(); - WebKit::WebIDBCallbacks::DataLoss data_loss = - WebKit::WebIDBCallbacks::DataLossNone; + blink::WebIDBCallbacks::DataLoss data_loss = + blink::WebIDBCallbacks::DataLossNone; std::string data_loss_reason; bool disk_full = false; diff --git a/content/browser/indexed_db/indexed_db_connection.cc b/content/browser/indexed_db/indexed_db_connection.cc index 51a6f1f..811398953 100644 --- a/content/browser/indexed_db/indexed_db_connection.cc +++ b/content/browser/indexed_db/indexed_db_connection.cc @@ -34,4 +34,4 @@ bool IndexedDBConnection::IsConnected() { return database_.get() != NULL; } -} // namespace WebKit +} // namespace blink diff --git a/content/browser/indexed_db/indexed_db_database.cc b/content/browser/indexed_db/indexed_db_database.cc index 8183f3a..dfc0d2c 100644 --- a/content/browser/indexed_db/indexed_db_database.cc +++ b/content/browser/indexed_db/indexed_db_database.cc @@ -24,7 +24,7 @@ #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h" using base::Int64ToString16; -using WebKit::WebIDBKeyTypeNumber; +using blink::WebIDBKeyTypeNumber; namespace content { @@ -323,7 +323,7 @@ void IndexedDBDatabase::CreateObjectStoreOperation( object_store_metadata.key_path, object_store_metadata.auto_increment)) { transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, ASCIIToUTF16("Internal error creating object store '") + object_store_metadata.name + ASCIIToUTF16("'."))); return; @@ -401,7 +401,7 @@ void IndexedDBDatabase::CreateIndexOperation( string16 error_string = ASCIIToUTF16("Internal error creating index '") + index_metadata.name + ASCIIToUTF16("'."); transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, error_string)); + blink::WebIDBDatabaseExceptionUnknownError, error_string)); return; } } @@ -455,7 +455,7 @@ void IndexedDBDatabase::DeleteIndexOperation( string16 error_string = ASCIIToUTF16("Internal error deleting index '") + index_metadata.name + ASCIIToUTF16("'."); transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, error_string)); + blink::WebIDBDatabaseExceptionUnknownError, error_string)); } } @@ -588,7 +588,7 @@ void IndexedDBDatabase::GetOperation( &value); if (!ok) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error in GetRecord.")); return; } @@ -618,7 +618,7 @@ void IndexedDBDatabase::GetOperation( &primary_key); if (!ok) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error in GetPrimaryKeyViaIndex.")); return; } @@ -641,7 +641,7 @@ void IndexedDBDatabase::GetOperation( &value); if (!ok) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error in GetRecord.")); return; } @@ -761,7 +761,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params, key_was_generated = true; if (!auto_inc_key->IsValid()) { params->callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionConstraintError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionConstraintError, "Maximum key generator value reached.")); return; } @@ -784,13 +784,13 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params, &found); if (!ok) { params->callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error checking key existence.")); return; } if (found) { params->callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionConstraintError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionConstraintError, "Key already exists in the object store.")); return; } @@ -812,13 +812,13 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params, &obeys_constraints); if (!backing_store_success) { params->callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, "Internal error: backing store error updating index keys.")); return; } if (!obeys_constraints) { params->callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionConstraintError, error_message)); + blink::WebIDBDatabaseExceptionConstraintError, error_message)); return; } @@ -833,7 +833,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params, &record_identifier); if (!backing_store_success) { params->callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, "Internal error: backing store error performing put/add.")); return; } @@ -858,7 +858,7 @@ void IndexedDBDatabase::PutOperation(scoped_ptr<PutOperationParams> params, !key_was_generated); if (!ok) { params->callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error updating key generator.")); return; } @@ -891,13 +891,13 @@ void IndexedDBDatabase::SetIndexKeys(int64 transaction_id, &found); if (!ok) { transaction->Abort( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error setting index keys.")); return; } if (!found) { transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, "Internal error setting index keys for object store.")); return; } @@ -922,13 +922,13 @@ void IndexedDBDatabase::SetIndexKeys(int64 transaction_id, &obeys_constraints); if (!backing_store_success) { transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, "Internal error: backing store error updating index keys.")); return; } if (!obeys_constraints) { transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionConstraintError, error_message)); + blink::WebIDBDatabaseExceptionConstraintError, error_message)); return; } @@ -1175,7 +1175,7 @@ void IndexedDBDatabase::DeleteRangeOperation( object_store_id, backing_store_cursor->record_identifier())) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error deleting data in range")); return; } @@ -1209,7 +1209,7 @@ void IndexedDBDatabase::ClearOperation( if (!backing_store_->ClearObjectStore( transaction->BackingStoreTransaction(), id(), object_store_id)) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error clearing object store")); return; } @@ -1229,7 +1229,7 @@ void IndexedDBDatabase::DeleteObjectStoreOperation( ASCIIToUTF16("Internal error deleting object store '") + object_store_metadata.name + ASCIIToUTF16("'."); transaction->Abort(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, error_string)); + blink::WebIDBDatabaseExceptionUnknownError, error_string)); } } @@ -1237,7 +1237,7 @@ void IndexedDBDatabase::VersionChangeOperation( int64 version, scoped_refptr<IndexedDBCallbacks> callbacks, scoped_ptr<IndexedDBConnection> connection, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message, IndexedDBTransaction* transaction) { IDB_TRACE("IndexedDBDatabase::VersionChangeOperation"); @@ -1249,7 +1249,7 @@ void IndexedDBDatabase::VersionChangeOperation( id(), metadata_.int_version)) { IndexedDBDatabaseError error( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, ASCIIToUTF16( "Internal error writing data to stable storage when " "updating version.")); @@ -1288,7 +1288,7 @@ void IndexedDBDatabase::TransactionFinishedAndAbortFired( if (transaction->mode() == indexed_db::TRANSACTION_VERSION_CHANGE) { if (pending_second_half_open_) { pending_second_half_open_->Callbacks()->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionAbortError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionAbortError, "Version change transaction was aborted in " "upgradeneeded event handler.")); pending_second_half_open_.reset(); @@ -1421,8 +1421,8 @@ void IndexedDBDatabase::OpenConnection( scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, int64 transaction_id, int64 version) { - const WebKit::WebIDBCallbacks::DataLoss kDataLoss = - WebKit::WebIDBCallbacks::DataLossNone; + const blink::WebIDBCallbacks::DataLoss kDataLoss = + blink::WebIDBCallbacks::DataLossNone; OpenConnection( callbacks, database_callbacks, transaction_id, version, kDataLoss, ""); } @@ -1432,7 +1432,7 @@ void IndexedDBDatabase::OpenConnection( scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, int64 transaction_id, int64 version, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message) { DCHECK(backing_store_); @@ -1442,7 +1442,7 @@ void IndexedDBDatabase::OpenConnection( // The backing store only detects data loss when it is first opened. The // presence of existing connections means we didn't even check for data loss // so there'd better not be any. - DCHECK_NE(WebKit::WebIDBCallbacks::DataLossTotal, data_loss); + DCHECK_NE(blink::WebIDBCallbacks::DataLossTotal, data_loss); pending_open_calls_.push_back(new PendingOpenCall( callbacks, database_callbacks, transaction_id, version)); return; @@ -1464,7 +1464,7 @@ void IndexedDBDatabase::OpenConnection( ASCIIToUTF16("Internal error opening database with version ") + Int64ToString16(version); callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, message)); + blink::WebIDBDatabaseExceptionUnknownError, message)); return; } } @@ -1511,7 +1511,7 @@ void IndexedDBDatabase::OpenConnection( } if (version < metadata_.int_version) { callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionVersionError, + blink::WebIDBDatabaseExceptionVersionError, ASCIIToUTF16("The requested version (") + Int64ToString16(version) + ASCIIToUTF16(") is less than the existing version (") + Int64ToString16(metadata_.int_version) + ASCIIToUTF16(")."))); @@ -1527,13 +1527,13 @@ void IndexedDBDatabase::RunVersionChangeTransaction( scoped_ptr<IndexedDBConnection> connection, int64 transaction_id, int64 requested_version, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message) { DCHECK(callbacks); DCHECK(connections_.count(connection.get())); if (ConnectionCount() > 1) { - DCHECK_NE(WebKit::WebIDBCallbacks::DataLossTotal, data_loss); + DCHECK_NE(blink::WebIDBCallbacks::DataLossTotal, data_loss); // Front end ensures the event is not fired at connections that have // close_pending set. for (ConnectionSet::const_iterator it = connections_.begin(); @@ -1567,8 +1567,8 @@ void IndexedDBDatabase::RunVersionChangeTransactionFinal( scoped_ptr<IndexedDBConnection> connection, int64 transaction_id, int64 requested_version) { - const WebKit::WebIDBCallbacks::DataLoss kDataLoss = - WebKit::WebIDBCallbacks::DataLossNone; + const blink::WebIDBCallbacks::DataLoss kDataLoss = + blink::WebIDBCallbacks::DataLossNone; RunVersionChangeTransactionFinal(callbacks, connection.Pass(), transaction_id, @@ -1582,7 +1582,7 @@ void IndexedDBDatabase::RunVersionChangeTransactionFinal( scoped_ptr<IndexedDBConnection> connection, int64 transaction_id, int64 requested_version, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message) { std::vector<int64> object_store_ids; @@ -1641,7 +1641,7 @@ void IndexedDBDatabase::DeleteDatabaseFinal( DCHECK(backing_store_); if (!backing_store_->DeleteDatabase(metadata_.name)) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error deleting database.")); return; } @@ -1669,7 +1669,7 @@ void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) { ++it) { if (it->second->connection() == connection->callbacks()) it->second->Abort( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Connection is closing.")); } } @@ -1678,7 +1678,7 @@ void IndexedDBDatabase::Close(IndexedDBConnection* connection, bool forced) { if (pending_second_half_open_ && pending_second_half_open_->Connection() == connection) { pending_second_half_open_->Callbacks()->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionAbortError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionAbortError, "The connection was closed.")); pending_second_half_open_.reset(); } diff --git a/content/browser/indexed_db/indexed_db_database.h b/content/browser/indexed_db/indexed_db_database.h index a87531c..6d18766 100644 --- a/content/browser/indexed_db/indexed_db_database.h +++ b/content/browser/indexed_db/indexed_db_database.h @@ -81,7 +81,7 @@ class CONTENT_EXPORT IndexedDBDatabase scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks, int64 transaction_id, int64 version, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message); void DeleteDatabase(scoped_refptr<IndexedDBCallbacks> callbacks); const IndexedDBDatabaseMetadata& metadata() const { return metadata_; } @@ -195,7 +195,7 @@ class CONTENT_EXPORT IndexedDBDatabase void VersionChangeOperation(int64 version, scoped_refptr<IndexedDBCallbacks> callbacks, scoped_ptr<IndexedDBConnection> connection, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message, IndexedDBTransaction* transaction); void VersionChangeAbortOperation(const string16& previous_version, @@ -255,7 +255,7 @@ class CONTENT_EXPORT IndexedDBDatabase scoped_ptr<IndexedDBConnection> connection, int64 transaction_id, int64 requested_version, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message); void RunVersionChangeTransactionFinal( scoped_refptr<IndexedDBCallbacks> callbacks, @@ -267,7 +267,7 @@ class CONTENT_EXPORT IndexedDBDatabase scoped_ptr<IndexedDBConnection> connection, int64 transaction_id, int64 requested_version, - WebKit::WebIDBCallbacks::DataLoss data_loss, + blink::WebIDBCallbacks::DataLoss data_loss, std::string data_loss_message); void ProcessPendingCalls(); diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host.cc b/content/browser/indexed_db/indexed_db_dispatcher_host.cc index 1f8f895..5613a7c 100644 --- a/content/browser/indexed_db/indexed_db_dispatcher_host.cc +++ b/content/browser/indexed_db/indexed_db_dispatcher_host.cc @@ -27,7 +27,7 @@ #include "webkit/common/database/database_identifier.h" using webkit_database::DatabaseUtil; -using WebKit::WebIDBKey; +using blink::WebIDBKey; namespace content { @@ -366,7 +366,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::CloseAll() { if (connection && connection->IsConnected()) { connection->database()->Abort( transaction_id, - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError)); + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError)); } } DCHECK(transaction_database_map_.empty()); @@ -440,7 +440,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateObjectStore( database_url_map_[params.ipc_database_id])) { connection->database()->Abort( host_transaction_id, - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionQuotaError)); + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionQuotaError)); } } @@ -570,7 +570,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnSetIndexKeys( connection->database()->Abort( host_transaction_id, IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, "Malformed IPC message: index_ids.size() != index_keys.size()")); return; } @@ -708,7 +708,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCommit( transaction_url_map_[host_transaction_id], transaction_size)) { connection->database()->Abort( host_transaction_id, - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionQuotaError)); + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionQuotaError)); return; } @@ -736,7 +736,7 @@ void IndexedDBDispatcherHost::DatabaseDispatcherHost::OnCreateIndex( database_url_map_[params.ipc_database_id])) { connection->database()->Abort( host_transaction_id, - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionQuotaError)); + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionQuotaError)); } } diff --git a/content/browser/indexed_db/indexed_db_factory.cc b/content/browser/indexed_db/indexed_db_factory.cc index 4143a8a..0fbce75 100644 --- a/content/browser/indexed_db/indexed_db_factory.cc +++ b/content/browser/indexed_db/indexed_db_factory.cc @@ -109,7 +109,7 @@ void IndexedDBFactory::GetDatabaseNames( const base::FilePath& data_directory) { IDB_TRACE("IndexedDBFactory::GetDatabaseNames"); // TODO(dgrogan): Plumb data_loss back to script eventually? - WebKit::WebIDBCallbacks::DataLoss data_loss; + blink::WebIDBCallbacks::DataLoss data_loss; std::string data_loss_message; bool disk_full; scoped_refptr<IndexedDBBackingStore> backing_store = @@ -120,7 +120,7 @@ void IndexedDBFactory::GetDatabaseNames( &disk_full); if (!backing_store) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error opening backing store for " "indexedDB.webkitGetDatabaseNames.")); return; @@ -145,7 +145,7 @@ void IndexedDBFactory::DeleteDatabase( } // TODO(dgrogan): Plumb data_loss back to script eventually? - WebKit::WebIDBCallbacks::DataLoss data_loss; + blink::WebIDBCallbacks::DataLoss data_loss; std::string data_loss_message; bool disk_full = false; scoped_refptr<IndexedDBBackingStore> backing_store = @@ -156,7 +156,7 @@ void IndexedDBFactory::DeleteDatabase( &disk_full); if (!backing_store) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, ASCIIToUTF16( "Internal error opening backing store " "for indexedDB.deleteDatabase."))); @@ -167,7 +167,7 @@ void IndexedDBFactory::DeleteDatabase( IndexedDBDatabase::Create(name, backing_store, this, unique_identifier); if (!database) { callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, ASCIIToUTF16( "Internal error creating database backend for " "indexedDB.deleteDatabase."))); @@ -194,7 +194,7 @@ bool IndexedDBFactory::IsBackingStoreOpenForTesting(const GURL& origin_url) scoped_refptr<IndexedDBBackingStore> IndexedDBFactory::OpenBackingStore( const GURL& origin_url, const base::FilePath& data_directory, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_message, bool* disk_full) { const bool open_in_memory = data_directory.empty(); @@ -244,8 +244,8 @@ void IndexedDBFactory::Open( scoped_refptr<IndexedDBDatabase> database; IndexedDBDatabase::Identifier unique_identifier(origin_url, name); IndexedDBDatabaseMap::iterator it = database_map_.find(unique_identifier); - WebKit::WebIDBCallbacks::DataLoss data_loss = - WebKit::WebIDBCallbacks::DataLossNone; + blink::WebIDBCallbacks::DataLoss data_loss = + blink::WebIDBCallbacks::DataLossNone; std::string data_loss_message; bool disk_full = false; if (it == database_map_.end()) { @@ -258,14 +258,14 @@ void IndexedDBFactory::Open( if (!backing_store) { if (disk_full) { callbacks->OnError( - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionQuotaError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionQuotaError, ASCIIToUTF16( "Encountered full disk while opening " "backing store for indexedDB.open."))); return; } callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, ASCIIToUTF16( "Internal error opening backing store for indexedDB.open."))); return; @@ -275,7 +275,7 @@ void IndexedDBFactory::Open( IndexedDBDatabase::Create(name, backing_store, this, unique_identifier); if (!database) { callbacks->OnError(IndexedDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, ASCIIToUTF16( "Internal error creating database backend for indexedDB.open."))); return; diff --git a/content/browser/indexed_db/indexed_db_factory.h b/content/browser/indexed_db/indexed_db_factory.h index c10b251..5e4a7e7 100644 --- a/content/browser/indexed_db/indexed_db_factory.h +++ b/content/browser/indexed_db/indexed_db_factory.h @@ -68,7 +68,7 @@ class CONTENT_EXPORT IndexedDBFactory virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStore( const GURL& origin_url, const base::FilePath& data_directory, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_reason, bool* disk_full); diff --git a/content/browser/indexed_db/indexed_db_factory_unittest.cc b/content/browser/indexed_db/indexed_db_factory_unittest.cc index f04906e..d8cf6fe 100644 --- a/content/browser/indexed_db/indexed_db_factory_unittest.cc +++ b/content/browser/indexed_db/indexed_db_factory_unittest.cc @@ -40,8 +40,8 @@ class MockIDBFactory : public IndexedDBFactory { scoped_refptr<IndexedDBBackingStore> TestOpenBackingStore( const GURL& origin, const base::FilePath& data_directory) { - WebKit::WebIDBCallbacks::DataLoss data_loss = - WebKit::WebIDBCallbacks::DataLossNone; + blink::WebIDBCallbacks::DataLoss data_loss = + blink::WebIDBCallbacks::DataLossNone; std::string data_loss_message; bool disk_full; scoped_refptr<IndexedDBBackingStore> backing_store = @@ -50,7 +50,7 @@ class MockIDBFactory : public IndexedDBFactory { &data_loss, &data_loss_message, &disk_full); - EXPECT_EQ(WebKit::WebIDBCallbacks::DataLossNone, data_loss); + EXPECT_EQ(blink::WebIDBCallbacks::DataLossNone, data_loss); return backing_store; } @@ -187,7 +187,7 @@ class DiskFullFactory : public IndexedDBFactory { virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStore( const GURL& origin_url, const base::FilePath& data_directory, - WebKit::WebIDBCallbacks::DataLoss* data_loss, + blink::WebIDBCallbacks::DataLoss* data_loss, std::string* data_loss_message, bool* disk_full) OVERRIDE { *disk_full = true; @@ -201,7 +201,7 @@ class LookingForQuotaErrorMockCallbacks : public IndexedDBCallbacks { : IndexedDBCallbacks(NULL, 0, 0), error_called_(false) {} virtual void OnError(const IndexedDBDatabaseError& error) OVERRIDE { error_called_ = true; - EXPECT_EQ(WebKit::WebIDBDatabaseExceptionQuotaError, error.code()); + EXPECT_EQ(blink::WebIDBDatabaseExceptionQuotaError, error.code()); } private: diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc index 230b788..b5e888f 100644 --- a/content/browser/indexed_db/indexed_db_internals_ui.cc +++ b/content/browser/indexed_db/indexed_db_internals_ui.cc @@ -280,7 +280,7 @@ void IndexedDBInternalsUI::OnDownloadDataReady( const GURL referrer(web_ui()->GetWebContents()->GetLastCommittedURL()); dl_params->set_referrer( - content::Referrer(referrer, WebKit::WebReferrerPolicyDefault)); + content::Referrer(referrer, blink::WebReferrerPolicyDefault)); // This is how to watch for the download to finish: first wait for it // to start, then attach a DownloadItem::Observer to observe the diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc index 38799fc..b9ce26c 100644 --- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc +++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc @@ -147,18 +147,18 @@ using base::StringPiece; -using WebKit::WebIDBKeyType; -using WebKit::WebIDBKeyTypeArray; -using WebKit::WebIDBKeyTypeDate; -using WebKit::WebIDBKeyTypeInvalid; -using WebKit::WebIDBKeyTypeMin; -using WebKit::WebIDBKeyTypeNull; -using WebKit::WebIDBKeyTypeNumber; -using WebKit::WebIDBKeyTypeString; -using WebKit::WebIDBKeyPathType; -using WebKit::WebIDBKeyPathTypeArray; -using WebKit::WebIDBKeyPathTypeNull; -using WebKit::WebIDBKeyPathTypeString; +using blink::WebIDBKeyType; +using blink::WebIDBKeyTypeArray; +using blink::WebIDBKeyTypeDate; +using blink::WebIDBKeyTypeInvalid; +using blink::WebIDBKeyTypeMin; +using blink::WebIDBKeyTypeNull; +using blink::WebIDBKeyTypeNumber; +using blink::WebIDBKeyTypeString; +using blink::WebIDBKeyPathType; +using blink::WebIDBKeyPathTypeArray; +using blink::WebIDBKeyPathTypeNull; +using blink::WebIDBKeyPathTypeString; namespace content { diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc index 01f1260..e5e4927 100644 --- a/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc +++ b/content/browser/indexed_db/indexed_db_leveldb_coding_unittest.cc @@ -16,8 +16,8 @@ #include "testing/gtest/include/gtest/gtest.h" using base::StringPiece; -using WebKit::WebIDBKeyTypeDate; -using WebKit::WebIDBKeyTypeNumber; +using blink::WebIDBKeyTypeDate; +using blink::WebIDBKeyTypeNumber; namespace content { diff --git a/content/browser/indexed_db/indexed_db_transaction.cc b/content/browser/indexed_db/indexed_db_transaction.cc index 276b1a9..8566a38 100644 --- a/content/browser/indexed_db/indexed_db_transaction.cc +++ b/content/browser/indexed_db/indexed_db_transaction.cc @@ -114,7 +114,7 @@ void IndexedDBTransaction::EnsureTasksRunning() { } void IndexedDBTransaction::Abort() { - Abort(IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + Abort(IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error (unknown cause)")); } @@ -253,7 +253,7 @@ void IndexedDBTransaction::Commit() { } else { callbacks_->OnAbort( id_, - IndexedDBDatabaseError(WebKit::WebIDBDatabaseExceptionUnknownError, + IndexedDBDatabaseError(blink::WebIDBDatabaseExceptionUnknownError, "Internal error committing transaction.")); database_->TransactionFinishedAndAbortFired(this); database_->TransactionCommitFailed(); diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc index 2a40e11..ecd4237 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc @@ -158,13 +158,13 @@ void SetReferrerForRequest(net::URLRequest* request, const Referrer& referrer) { net::URLRequest::ReferrerPolicy net_referrer_policy = net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE; switch (referrer.policy) { - case WebKit::WebReferrerPolicyDefault: + case blink::WebReferrerPolicyDefault: net_referrer_policy = net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE; break; - case WebKit::WebReferrerPolicyAlways: - case WebKit::WebReferrerPolicyNever: - case WebKit::WebReferrerPolicyOrigin: + case blink::WebReferrerPolicyAlways: + case blink::WebReferrerPolicyNever: + case blink::WebReferrerPolicyOrigin: net_referrer_policy = net::URLRequest::NEVER_CLEAR_REFERRER; break; } @@ -1225,7 +1225,7 @@ ResourceRequestInfoImpl* ResourceDispatcherHostImpl::CreateRequestInfo( false, // is_stream download, // allow_download false, // has_user_gesture - WebKit::WebReferrerPolicyDefault, + blink::WebReferrerPolicyDefault, context, base::WeakPtr<ResourceMessageFilter>(), // filter true); // is_async diff --git a/content/browser/loader/resource_dispatcher_host_unittest.cc b/content/browser/loader/resource_dispatcher_host_unittest.cc index a2a34d8..07062ef 100644 --- a/content/browser/loader/resource_dispatcher_host_unittest.cc +++ b/content/browser/loader/resource_dispatcher_host_unittest.cc @@ -99,7 +99,7 @@ static ResourceHostMsg_Request CreateResourceRequest( request.method = std::string(method); request.url = url; request.first_party_for_cookies = url; // bypass third-party cookie blocking - request.referrer_policy = WebKit::WebReferrerPolicyDefault; + request.referrer_policy = blink::WebReferrerPolicyDefault; request.load_flags = 0; request.origin_pid = 0; request.resource_type = type; diff --git a/content/browser/loader/resource_request_info_impl.cc b/content/browser/loader/resource_request_info_impl.cc index 5af13db..29a80e6 100644 --- a/content/browser/loader/resource_request_info_impl.cc +++ b/content/browser/loader/resource_request_info_impl.cc @@ -47,7 +47,7 @@ void ResourceRequestInfo::AllocateForTesting( false, // is_stream true, // allow_download false, // has_user_gesture - WebKit::WebReferrerPolicyDefault, // referrer_policy + blink::WebReferrerPolicyDefault, // referrer_policy context, // context base::WeakPtr<ResourceMessageFilter>(), // filter is_async); // is_async @@ -99,7 +99,7 @@ ResourceRequestInfoImpl::ResourceRequestInfoImpl( bool is_stream, bool allow_download, bool has_user_gesture, - WebKit::WebReferrerPolicy referrer_policy, + blink::WebReferrerPolicy referrer_policy, ResourceContext* context, base::WeakPtr<ResourceMessageFilter> filter, bool is_async) @@ -170,7 +170,7 @@ ResourceType::Type ResourceRequestInfoImpl::GetResourceType() const { return resource_type_; } -WebKit::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { +blink::WebReferrerPolicy ResourceRequestInfoImpl::GetReferrerPolicy() const { return referrer_policy_; } diff --git a/content/browser/loader/resource_request_info_impl.h b/content/browser/loader/resource_request_info_impl.h index 6947315a..3da351a 100644 --- a/content/browser/loader/resource_request_info_impl.h +++ b/content/browser/loader/resource_request_info_impl.h @@ -53,7 +53,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, bool is_stream, bool allow_download, bool has_user_gesture, - WebKit::WebReferrerPolicy referrer_policy, + blink::WebReferrerPolicy referrer_policy, ResourceContext* context, base::WeakPtr<ResourceMessageFilter> filter, bool is_async); @@ -70,7 +70,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, virtual bool ParentIsMainFrame() const OVERRIDE; virtual int64 GetParentFrameID() const OVERRIDE; virtual ResourceType::Type GetResourceType() const OVERRIDE; - virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; + virtual blink::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; virtual PageTransition GetPageTransition() const OVERRIDE; virtual bool HasUserGesture() const OVERRIDE; virtual bool WasIgnoredByHandler() const OVERRIDE; @@ -153,7 +153,7 @@ class ResourceRequestInfoImpl : public ResourceRequestInfo, ResourceType::Type resource_type_; PageTransition transition_type_; int memory_cost_; - WebKit::WebReferrerPolicy referrer_policy_; + blink::WebReferrerPolicy referrer_policy_; ResourceContext* context_; // The filter might be deleted without deleting this object if the process // exits during a transfer. diff --git a/content/browser/loader/resource_scheduler_unittest.cc b/content/browser/loader/resource_scheduler_unittest.cc index 079a031..9474778 100644 --- a/content/browser/loader/resource_scheduler_unittest.cc +++ b/content/browser/loader/resource_scheduler_unittest.cc @@ -157,7 +157,7 @@ class ResourceSchedulerTest : public testing::Test { false, // is_stream true, // allow_download false, // has_user_gesture - WebKit::WebReferrerPolicyDefault, // referrer_policy + blink::WebReferrerPolicyDefault, // referrer_policy NULL, // context base::WeakPtr<ResourceMessageFilter>(), // filter true); // is_async diff --git a/content/browser/plugin_browsertest.cc b/content/browser/plugin_browsertest.cc index 11c3fae..6174acf0 100644 --- a/content/browser/plugin_browsertest.cc +++ b/content/browser/plugin_browsertest.cc @@ -168,7 +168,7 @@ IN_PROC_BROWSER_TEST_F(PluginTest, TitleWatcher title_watcher(shell()->web_contents(), expected_title); title_watcher.AlsoWaitForTitle(ASCIIToUTF16("FAIL")); SimulateMouseClick(shell()->web_contents(), 0, - WebKit::WebMouseEvent::ButtonLeft); + blink::WebMouseEvent::ButtonLeft); EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); } #endif diff --git a/content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.cc b/content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.cc index e456337..f43e077 100644 --- a/content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.cc +++ b/content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture.cc @@ -31,8 +31,8 @@ bool BasicMouseWheelSmoothScrollGesture::ForwardInputEvents( RenderWidgetHostImpl::From(host)->GetSyntheticGestureMessageInterval()); - WebKit::WebMouseWheelEvent event; - event.type = WebKit::WebInputEvent::MouseWheel; + blink::WebMouseWheelEvent event; + event.type = blink::WebInputEvent::MouseWheel; event.hasPreciseScrollingDeltas = 0; event.deltaY = scroll_down_ ? -position_delta : position_delta; // TODO(vollick): find a proper way to access diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc index 3687a41..3189e9f 100644 --- a/content/browser/renderer_host/compositor_impl_android.cc +++ b/content/browser/renderer_host/compositor_impl_android.cc @@ -272,15 +272,15 @@ void CompositorImpl::DeleteUIResource(cc::UIResourceId resource_id) { ui_resource_map_.erase(it); } -WebKit::WebGLId CompositorImpl::GenerateTexture(gfx::JavaBitmap& bitmap) { +blink::WebGLId CompositorImpl::GenerateTexture(gfx::JavaBitmap& bitmap) { unsigned int texture_id = BuildBasicTexture(); - WebKit::WebGraphicsContext3D* context = + blink::WebGraphicsContext3D* context = ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); if (texture_id == 0 || context->isContextLost() || !context->makeContextCurrent()) return 0; - WebKit::WebGLId format = GetGLFormatForBitmap(bitmap); - WebKit::WebGLId type = GetGLTypeForBitmap(bitmap); + blink::WebGLId format = GetGLFormatForBitmap(bitmap); + blink::WebGLId type = GetGLTypeForBitmap(bitmap); context->texImage2D(GL_TEXTURE_2D, 0, @@ -295,11 +295,11 @@ WebKit::WebGLId CompositorImpl::GenerateTexture(gfx::JavaBitmap& bitmap) { return texture_id; } -WebKit::WebGLId CompositorImpl::GenerateCompressedTexture(gfx::Size& size, +blink::WebGLId CompositorImpl::GenerateCompressedTexture(gfx::Size& size, int data_size, void* data) { unsigned int texture_id = BuildBasicTexture(); - WebKit::WebGraphicsContext3D* context = + blink::WebGraphicsContext3D* context = ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); if (texture_id == 0 || context->isContextLost() || !context->makeContextCurrent()) @@ -316,8 +316,8 @@ WebKit::WebGLId CompositorImpl::GenerateCompressedTexture(gfx::Size& size, return texture_id; } -void CompositorImpl::DeleteTexture(WebKit::WebGLId texture_id) { - WebKit::WebGraphicsContext3D* context = +void CompositorImpl::DeleteTexture(blink::WebGLId texture_id) { + blink::WebGraphicsContext3D* context = ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); if (context->isContextLost() || !context->makeContextCurrent()) return; @@ -325,12 +325,12 @@ void CompositorImpl::DeleteTexture(WebKit::WebGLId texture_id) { context->shallowFlushCHROMIUM(); } -bool CompositorImpl::CopyTextureToBitmap(WebKit::WebGLId texture_id, +bool CompositorImpl::CopyTextureToBitmap(blink::WebGLId texture_id, gfx::JavaBitmap& bitmap) { return CopyTextureToBitmap(texture_id, gfx::Rect(bitmap.size()), bitmap); } -bool CompositorImpl::CopyTextureToBitmap(WebKit::WebGLId texture_id, +bool CompositorImpl::CopyTextureToBitmap(blink::WebGLId texture_id, const gfx::Rect& sub_rect, gfx::JavaBitmap& bitmap) { // The sub_rect should match the bitmap size. @@ -346,7 +346,7 @@ bool CompositorImpl::CopyTextureToBitmap(WebKit::WebGLId texture_id, static scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGpuProcessViewContext( - const WebKit::WebGraphicsContext3D::Attributes attributes, + const blink::WebGraphicsContext3D::Attributes attributes, int surface_id, base::WeakPtr<CompositorImpl> compositor_impl) { BrowserGpuChannelHostFactory* factory = @@ -384,7 +384,7 @@ CreateGpuProcessViewContext( scoped_ptr<cc::OutputSurface> CompositorImpl::CreateOutputSurface( bool fallback) { - WebKit::WebGraphicsContext3D::Attributes attrs; + blink::WebGraphicsContext3D::Attributes attrs; attrs.shareResources = true; attrs.noAutomaticFlushes = true; @@ -439,12 +439,12 @@ void CompositorImpl::OnViewContextSwapBuffersAborted() { client_->OnSwapBuffersCompleted(); } -WebKit::WebGLId CompositorImpl::BuildBasicTexture() { - WebKit::WebGraphicsContext3D* context = +blink::WebGLId CompositorImpl::BuildBasicTexture() { + blink::WebGraphicsContext3D* context = ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); if (context->isContextLost() || !context->makeContextCurrent()) return 0; - WebKit::WebGLId texture_id = context->createTexture(); + blink::WebGLId texture_id = context->createTexture(); context->bindTexture(GL_TEXTURE_2D, texture_id); context->texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); context->texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -453,7 +453,7 @@ WebKit::WebGLId CompositorImpl::BuildBasicTexture() { return texture_id; } -WebKit::WGC3Denum CompositorImpl::GetGLFormatForBitmap( +blink::WGC3Denum CompositorImpl::GetGLFormatForBitmap( gfx::JavaBitmap& bitmap) { switch (bitmap.format()) { case ANDROID_BITMAP_FORMAT_A_8: @@ -471,7 +471,7 @@ WebKit::WGC3Denum CompositorImpl::GetGLFormatForBitmap( } } -WebKit::WGC3Denum CompositorImpl::GetGLTypeForBitmap(gfx::JavaBitmap& bitmap) { +blink::WGC3Denum CompositorImpl::GetGLTypeForBitmap(gfx::JavaBitmap& bitmap) { switch (bitmap.format()) { case ANDROID_BITMAP_FORMAT_A_8: return GL_UNSIGNED_BYTE; diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h index ece532d..95546000 100644 --- a/content/browser/renderer_host/compositor_impl_android.h +++ b/content/browser/renderer_host/compositor_impl_android.h @@ -62,13 +62,13 @@ class CONTENT_EXPORT CompositorImpl virtual cc::UIResourceId GenerateUIResource( const cc::UIResourceBitmap& bitmap) OVERRIDE; virtual void DeleteUIResource(cc::UIResourceId resource_id) OVERRIDE; - virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; - virtual WebKit::WebGLId GenerateCompressedTexture( + virtual blink::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; + virtual blink::WebGLId GenerateCompressedTexture( gfx::Size& size, int data_size, void* data) OVERRIDE; - virtual void DeleteTexture(WebKit::WebGLId texture_id) OVERRIDE; - virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, + virtual void DeleteTexture(blink::WebGLId texture_id) OVERRIDE; + virtual bool CopyTextureToBitmap(blink::WebGLId texture_id, gfx::JavaBitmap& bitmap) OVERRIDE; - virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, + virtual bool CopyTextureToBitmap(blink::WebGLId texture_id, const gfx::Rect& sub_rect, gfx::JavaBitmap& bitmap) OVERRIDE; @@ -103,9 +103,9 @@ class CONTENT_EXPORT CompositorImpl virtual void OnLostResources() OVERRIDE; private: - WebKit::WebGLId BuildBasicTexture(); - WebKit::WGC3Denum GetGLFormatForBitmap(gfx::JavaBitmap& bitmap); - WebKit::WGC3Denum GetGLTypeForBitmap(gfx::JavaBitmap& bitmap); + blink::WebGLId BuildBasicTexture(); + blink::WGC3Denum GetGLFormatForBitmap(gfx::JavaBitmap& bitmap); + blink::WGC3Denum GetGLTypeForBitmap(gfx::JavaBitmap& bitmap); scoped_refptr<cc::Layer> root_layer_; scoped_ptr<cc::LayerTreeHost> host_; diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.cc b/content/browser/renderer_host/gtk_im_context_wrapper.cc index e79faba..7ce6558 100644 --- a/content/browser/renderer_host/gtk_im_context_wrapper.cc +++ b/content/browser/renderer_host/gtk_im_context_wrapper.cc @@ -41,11 +41,11 @@ const int kCompositionEventKeyCode = 229; } // namespace // ui::CompositionUnderline should be identical to -// WebKit::WebCompositionUnderline, so that we can do reinterpret_cast safely. +// blink::WebCompositionUnderline, so that we can do reinterpret_cast safely. // TODO(suzhe): remove it after migrating all code in chrome to use // ui::CompositionUnderline. COMPILE_ASSERT(sizeof(ui::CompositionUnderline) == - sizeof(WebKit::WebCompositionUnderline), + sizeof(blink::WebCompositionUnderline), ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff); GtkIMContextWrapper::GtkIMContextWrapper(RenderWidgetHostViewGtk* host_view) @@ -402,7 +402,7 @@ void GtkIMContextWrapper::ProcessUnfilteredKeyPressEvent( // isSystemKey will be set to true if this key event has Alt modifier, // see WebInputEventFactory::keyboardEvent() for details. if (wke->text[0]) { - wke->type = WebKit::WebInputEvent::Char; + wke->type = blink::WebInputEvent::Char; wke->skip_in_browser = true; host_view_->ForwardKeyboardEvent(*wke); } @@ -455,8 +455,8 @@ void GtkIMContextWrapper::ProcessInputMethodResult(const GdkEventKey* event, is_composing_text_ = true; // TODO(suzhe): convert both renderer_host and renderer to use // ui::CompositionText. - const std::vector<WebKit::WebCompositionUnderline>& underlines = - reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( + const std::vector<blink::WebCompositionUnderline>& underlines = + reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>( composition_.underlines); host->ImeSetComposition(composition_.text, underlines, composition_.selection.start(), @@ -500,11 +500,11 @@ void GtkIMContextWrapper::HandleCommit(const string16& text) { // In this case, the text must be committed directly. if (!is_in_key_event_handler_ && host_view_->GetRenderWidgetHost()) { // Workaround http://crbug.com/45478 by sending fake key down/up events. - SendFakeCompositionKeyEvent(WebKit::WebInputEvent::RawKeyDown); + SendFakeCompositionKeyEvent(blink::WebInputEvent::RawKeyDown); RenderWidgetHostImpl::From( host_view_->GetRenderWidgetHost())->ImeConfirmComposition( text, gfx::Range::InvalidRange(), false); - SendFakeCompositionKeyEvent(WebKit::WebInputEvent::KeyUp); + SendFakeCompositionKeyEvent(blink::WebInputEvent::KeyUp); } } @@ -545,17 +545,17 @@ void GtkIMContextWrapper::HandlePreeditChanged(const gchar* text, if (!is_in_key_event_handler_ && is_composing_text_ && host_view_->GetRenderWidgetHost()) { // Workaround http://crbug.com/45478 by sending fake key down/up events. - SendFakeCompositionKeyEvent(WebKit::WebInputEvent::RawKeyDown); + SendFakeCompositionKeyEvent(blink::WebInputEvent::RawKeyDown); // TODO(suzhe): convert both renderer_host and renderer to use // ui::CompositionText. - const std::vector<WebKit::WebCompositionUnderline>& underlines = - reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( + const std::vector<blink::WebCompositionUnderline>& underlines = + reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>( composition_.underlines); RenderWidgetHostImpl::From( host_view_->GetRenderWidgetHost())->ImeSetComposition( composition_.text, underlines, composition_.selection.start(), composition_.selection.end()); - SendFakeCompositionKeyEvent(WebKit::WebInputEvent::KeyUp); + SendFakeCompositionKeyEvent(blink::WebInputEvent::KeyUp); } } @@ -613,7 +613,7 @@ void GtkIMContextWrapper::HandleHostViewUnrealize() { } void GtkIMContextWrapper::SendFakeCompositionKeyEvent( - WebKit::WebInputEvent::Type type) { + blink::WebInputEvent::Type type) { NativeWebKeyboardEvent fake_event; fake_event.windowsKeyCode = kCompositionEventKeyCode; fake_event.skip_in_browser = true; diff --git a/content/browser/renderer_host/gtk_im_context_wrapper.h b/content/browser/renderer_host/gtk_im_context_wrapper.h index 9f13551..1647df1 100644 --- a/content/browser/renderer_host/gtk_im_context_wrapper.h +++ b/content/browser/renderer_host/gtk_im_context_wrapper.h @@ -101,7 +101,7 @@ class GtkIMContextWrapper { // Sends a fake composition key event with specified event type. A composition // key event is a key event with special key code 229. - void SendFakeCompositionKeyEvent(WebKit::WebInputEvent::Type type); + void SendFakeCompositionKeyEvent(blink::WebInputEvent::Type type); // Signal handlers of GtkIMContext object. static void HandleCommitThunk(GtkIMContext* context, gchar* text, diff --git a/content/browser/renderer_host/gtk_key_bindings_handler.cc b/content/browser/renderer_host/gtk_key_bindings_handler.cc index 5a05eeb..3830364 100644 --- a/content/browser/renderer_host/gtk_key_bindings_handler.cc +++ b/content/browser/renderer_host/gtk_key_bindings_handler.cc @@ -29,7 +29,7 @@ GtkKeyBindingsHandler::~GtkKeyBindingsHandler() { bool GtkKeyBindingsHandler::Match(const NativeWebKeyboardEvent& wke, EditCommands* edit_commands) { - if (wke.type == WebKit::WebInputEvent::Char || !wke.os_event) + if (wke.type == blink::WebInputEvent::Char || !wke.os_event) return false; edit_commands_.clear(); diff --git a/content/browser/renderer_host/gtk_window_utils.cc b/content/browser/renderer_host/gtk_window_utils.cc index f05cdca..b176323 100644 --- a/content/browser/renderer_host/gtk_window_utils.cc +++ b/content/browser/renderer_host/gtk_window_utils.cc @@ -45,7 +45,7 @@ gfx::Rect GetWorkArea(Window window) { property[start_index + 2], property[start_index + 3]); } -WebKit::WebScreenInfo GetScreenInfo(XDisplay* display, int screenNumber) { +blink::WebScreenInfo GetScreenInfo(XDisplay* display, int screenNumber) { // XDisplayWidth() and XDisplayHeight() return cached values. To ensure that // we return the correct dimensions after the screen is resized, query the // root window's geometry each time. @@ -56,11 +56,11 @@ WebKit::WebScreenInfo GetScreenInfo(XDisplay* display, int screenNumber) { XGetGeometry( display, root, &root_ret, &x, &y, &width, &height, &border, &depth); - WebKit::WebScreenInfo results; + blink::WebScreenInfo results; results.depthPerComponent = 8; // Assume 8bpp, which is usually right. results.depth = depth; results.isMonochrome = depth == 1; - results.rect = WebKit::WebRect(x, y, width, height); + results.rect = blink::WebRect(x, y, width, height); results.availableRect = results.rect; return results; } @@ -68,7 +68,7 @@ WebKit::WebScreenInfo GetScreenInfo(XDisplay* display, int screenNumber) { } // namespace void GetScreenInfoFromNativeWindow( - GdkWindow* gdk_window, WebKit::WebScreenInfo* results) { + GdkWindow* gdk_window, blink::WebScreenInfo* results) { GdkScreen* screen = gdk_window_get_screen(gdk_window); *results = GetScreenInfo(gdk_x11_drawable_get_xdisplay(gdk_window), gdk_x11_screen_get_screen_number(screen)); @@ -76,7 +76,7 @@ void GetScreenInfoFromNativeWindow( int monitor_number = gdk_screen_get_monitor_at_window(screen, gdk_window); GdkRectangle monitor_rect; gdk_screen_get_monitor_geometry(screen, monitor_number, &monitor_rect); - results->rect = WebKit::WebRect(monitor_rect.x, monitor_rect.y, + results->rect = blink::WebRect(monitor_rect.x, monitor_rect.y, monitor_rect.width, monitor_rect.height); gfx::Rect available_rect = results->rect; diff --git a/content/browser/renderer_host/gtk_window_utils.h b/content/browser/renderer_host/gtk_window_utils.h index ed0cfe1..93f1d68 100644 --- a/content/browser/renderer_host/gtk_window_utils.h +++ b/content/browser/renderer_host/gtk_window_utils.h @@ -9,14 +9,14 @@ typedef struct _GdkDrawable GdkWindow; -namespace WebKit { +namespace blink { struct WebScreenInfo; } namespace content { CONTENT_EXPORT void GetScreenInfoFromNativeWindow( - GdkWindow* gdk_window, WebKit::WebScreenInfo* results); + GdkWindow* gdk_window, blink::WebScreenInfo* results); } // namespace content diff --git a/content/browser/renderer_host/image_transport_factory_android.cc b/content/browser/renderer_host/image_transport_factory_android.cc index 1c5d891..380cc7a 100644 --- a/content/browser/renderer_host/image_transport_factory_android.cc +++ b/content/browser/renderer_host/image_transport_factory_android.cc @@ -20,7 +20,7 @@ base::LazyInstance<ObserverList<ImageTransportFactoryAndroidObserver> >::Leaky g_factory_observers = LAZY_INSTANCE_INITIALIZER; class GLContextLostListener - : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { + : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback { public: // WebGraphicsContextLostCallback implementation. virtual void onContextLost() OVERRIDE; @@ -43,7 +43,7 @@ class CmdBufferImageTransportFactory : public ImageTransportFactoryAndroid { virtual void DeleteTexture(uint32_t id) OVERRIDE; virtual void AcquireTexture( uint32 texture_id, const signed char* mailbox_name) OVERRIDE; - virtual WebKit::WebGraphicsContext3D* GetContext3D() OVERRIDE { + virtual blink::WebGraphicsContext3D* GetContext3D() OVERRIDE { return context_.get(); } virtual GLHelper* GetGLHelper() OVERRIDE; @@ -62,7 +62,7 @@ CmdBufferImageTransportFactory::CmdBufferImageTransportFactory() { CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)); DCHECK(gpu_channel_host); - WebKit::WebGraphicsContext3D::Attributes attrs; + blink::WebGraphicsContext3D::Attributes attrs; attrs.shareResources = true; GURL url("chrome://gpu/ImageTransportFactoryAndroid"); base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> swap_client; diff --git a/content/browser/renderer_host/image_transport_factory_android.h b/content/browser/renderer_host/image_transport_factory_android.h index 22dc09e..e6d5f9b 100644 --- a/content/browser/renderer_host/image_transport_factory_android.h +++ b/content/browser/renderer_host/image_transport_factory_android.h @@ -12,7 +12,7 @@ namespace gfx { class GLShareGroup; } -namespace WebKit { +namespace blink { class WebGraphicsContext3D; } @@ -39,7 +39,7 @@ class ImageTransportFactoryAndroid { virtual void AcquireTexture( uint32 texture_id, const signed char* mailbox_name) = 0; - virtual WebKit::WebGraphicsContext3D* GetContext3D() = 0; + virtual blink::WebGraphicsContext3D* GetContext3D() = 0; virtual GLHelper* GetGLHelper() = 0; static void AddObserver(ImageTransportFactoryAndroidObserver* observer); diff --git a/content/browser/renderer_host/ime_adapter_android.cc b/content/browser/renderer_host/ime_adapter_android.cc index abda01f..9e7fe47 100644 --- a/content/browser/renderer_host/ime_adapter_android.cc +++ b/content/browser/renderer_host/ime_adapter_android.cc @@ -40,11 +40,11 @@ NativeWebKeyboardEvent NativeWebKeyboardEventFromKeyEvent( int key_code, bool is_system_key, int unicode_char) { - WebKit::WebInputEvent::Type type = WebKit::WebInputEvent::Undefined; + blink::WebInputEvent::Type type = blink::WebInputEvent::Undefined; if (action == AKEY_EVENT_ACTION_DOWN) - type = WebKit::WebInputEvent::RawKeyDown; + type = blink::WebInputEvent::RawKeyDown; else if (action == AKEY_EVENT_ACTION_UP) - type = WebKit::WebInputEvent::KeyUp; + type = blink::WebInputEvent::KeyUp; return NativeWebKeyboardEvent(java_key_event, type, modifiers, time_ms, key_code, unicode_char, is_system_key); } @@ -56,14 +56,14 @@ bool RegisterImeAdapter(JNIEnv* env) { return false; Java_ImeAdapter_initializeWebInputEvents(env, - WebKit::WebInputEvent::RawKeyDown, - WebKit::WebInputEvent::KeyUp, - WebKit::WebInputEvent::Char, - WebKit::WebInputEvent::ShiftKey, - WebKit::WebInputEvent::AltKey, - WebKit::WebInputEvent::ControlKey, - WebKit::WebInputEvent::CapsLockOn, - WebKit::WebInputEvent::NumLockOn); + blink::WebInputEvent::RawKeyDown, + blink::WebInputEvent::KeyUp, + blink::WebInputEvent::Char, + blink::WebInputEvent::ShiftKey, + blink::WebInputEvent::AltKey, + blink::WebInputEvent::ControlKey, + blink::WebInputEvent::CapsLockOn, + blink::WebInputEvent::NumLockOn); Java_ImeAdapter_initializeTextInputTypes( env, ui::TEXT_INPUT_TYPE_NONE, @@ -96,7 +96,7 @@ bool ImeAdapterAndroid::SendSyntheticKeyEvent(JNIEnv*, long time_ms, int key_code, int text) { - NativeWebKeyboardEvent event(static_cast<WebKit::WebInputEvent::Type>(type), + NativeWebKeyboardEvent event(static_cast<blink::WebInputEvent::Type>(type), 0 /* modifiers */, time_ms / 1000.0, key_code, text, false /* is_system_key */); rwhva_->SendKeyEvent(event); @@ -112,7 +112,7 @@ bool ImeAdapterAndroid::SendKeyEvent(JNIEnv* env, jobject, env, original_key_event, action, modifiers, time_ms, key_code, is_system_key, unicode_char); bool key_down_text_insertion = - event.type == WebKit::WebInputEvent::RawKeyDown && event.text[0]; + event.type == blink::WebInputEvent::RawKeyDown && event.text[0]; // If we are going to follow up with a synthetic Char event, then that's the // one we expect to test if it's handled or unhandled, so skip handling the // "real" event in the browser. @@ -121,7 +121,7 @@ bool ImeAdapterAndroid::SendKeyEvent(JNIEnv* env, jobject, if (key_down_text_insertion) { // Send a Char event, but without an os_event since we don't want to // roundtrip back to java such synthetic event. - NativeWebKeyboardEvent char_event(WebKit::WebInputEvent::Char, modifiers, + NativeWebKeyboardEvent char_event(blink::WebInputEvent::Char, modifiers, time_ms, key_code, unicode_char, is_system_key); char_event.skip_in_browser = key_down_text_insertion; @@ -137,9 +137,9 @@ void ImeAdapterAndroid::SetComposingText(JNIEnv* env, jobject, jstring text, return; string16 text16 = ConvertJavaStringToUTF16(env, text); - std::vector<WebKit::WebCompositionUnderline> underlines; + std::vector<blink::WebCompositionUnderline> underlines; underlines.push_back( - WebKit::WebCompositionUnderline(0, text16.length(), SK_ColorBLACK, + blink::WebCompositionUnderline(0, text16.length(), SK_ColorBLACK, false)); // new_cursor_position is as described in the Android API for // InputConnection#setComposingText, whereas the parameters for @@ -194,9 +194,9 @@ void ImeAdapterAndroid::SetComposingRegion(JNIEnv*, jobject, if (!rwhi) return; - std::vector<WebKit::WebCompositionUnderline> underlines; + std::vector<blink::WebCompositionUnderline> underlines; underlines.push_back( - WebKit::WebCompositionUnderline(0, end - start, SK_ColorBLACK, false)); + blink::WebCompositionUnderline(0, end - start, SK_ColorBLACK, false)); rwhi->Send(new ViewMsg_SetCompositionFromExistingText( rwhi->GetRoutingID(), start, end, underlines)); diff --git a/content/browser/renderer_host/ime_adapter_android.h b/content/browser/renderer_host/ime_adapter_android.h index a3e273e..ce3c335 100644 --- a/content/browser/renderer_host/ime_adapter_android.h +++ b/content/browser/renderer_host/ime_adapter_android.h @@ -27,7 +27,7 @@ class ImeAdapterAndroid { // Called from java -> native // The java side is responsible to translate android KeyEvent various enums - // and values into the corresponding WebKit::WebInputEvent. + // and values into the corresponding blink::WebInputEvent. bool SendKeyEvent(JNIEnv* env, jobject, jobject original_key_event, int action, int meta_state, diff --git a/content/browser/renderer_host/input/gesture_event_filter.cc b/content/browser/renderer_host/input/gesture_event_filter.cc index 4ab6f77..cb8f4a3 100644 --- a/content/browser/renderer_host/input/gesture_event_filter.cc +++ b/content/browser/renderer_host/input/gesture_event_filter.cc @@ -11,8 +11,8 @@ #include "content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h" #include "content/public/common/content_switches.h" -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; namespace content { namespace { diff --git a/content/browser/renderer_host/input/gesture_event_filter.h b/content/browser/renderer_host/input/gesture_event_filter.h index 61cb7f7..7ed57de 100644 --- a/content/browser/renderer_host/input/gesture_event_filter.h +++ b/content/browser/renderer_host/input/gesture_event_filter.h @@ -74,7 +74,7 @@ class CONTENT_EXPORT GestureEventFilter { // with state |ack_result| and event |type|. May send events if the queue is // not empty. void ProcessGestureAck(InputEventAckState ack_result, - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, const ui::LatencyInfo& latency); // Sets the state of the |fling_in_progress_| field to indicate that a fling @@ -93,7 +93,7 @@ class CONTENT_EXPORT GestureEventFilter { friend class MockRenderWidgetHost; friend class GestureEventFilterTest; - static bool ShouldIgnoreAckForGestureType(WebKit::WebInputEvent::Type type); + static bool ShouldIgnoreAckForGestureType(blink::WebInputEvent::Type type); // TODO(mohsen): There are a bunch of ShouldForward.../ShouldDiscard... // methods that are getting confusing. This should be somehow fixed. Maybe diff --git a/content/browser/renderer_host/input/gesture_event_filter_unittest.cc b/content/browser/renderer_host/input/gesture_event_filter_unittest.cc index c852ef4..4dfda33 100644 --- a/content/browser/renderer_host/input/gesture_event_filter_unittest.cc +++ b/content/browser/renderer_host/input/gesture_event_filter_unittest.cc @@ -17,8 +17,8 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" using base::TimeDelta; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; namespace content { diff --git a/content/browser/renderer_host/input/immediate_input_router.cc b/content/browser/renderer_host/input/immediate_input_router.cc index 444678f..06bbc95 100644 --- a/content/browser/renderer_host/input/immediate_input_router.cc +++ b/content/browser/renderer_host/input/immediate_input_router.cc @@ -30,11 +30,11 @@ using base::Time; using base::TimeDelta; using base::TimeTicks; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; namespace content { namespace { @@ -355,8 +355,8 @@ bool ImmediateInputRouter::OfferToOverscrollController( if (disposition == OverscrollController::SHOULD_FORWARD_TO_GESTURE_FILTER) { DCHECK(WebInputEvent::isGestureEventType(input_event.type)); - const WebKit::WebGestureEvent& gesture_event = - static_cast<const WebKit::WebGestureEvent&>(input_event); + const blink::WebGestureEvent& gesture_event = + static_cast<const blink::WebGestureEvent&>(input_event); // An ACK is expected for the event, so mark it as consumed. consumed = !gesture_event_filter_->ShouldForward( GestureEventWithLatencyInfo(gesture_event, latency_info)); @@ -497,7 +497,7 @@ void ImmediateInputRouter::ProcessInputEventAck( } void ImmediateInputRouter::ProcessKeyboardAck( - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, InputEventAckState ack_result) { if (key_queue_.empty()) { ack_handler_->OnUnexpectedEventAck(InputAckHandler::UNEXPECTED_ACK); @@ -518,7 +518,7 @@ void ImmediateInputRouter::ProcessKeyboardAck( } } -void ImmediateInputRouter::ProcessMouseAck(WebKit::WebInputEvent::Type type, +void ImmediateInputRouter::ProcessMouseAck(blink::WebInputEvent::Type type, InputEventAckState ack_result) { if (type != WebInputEvent::MouseMove) return; diff --git a/content/browser/renderer_host/input/immediate_input_router.h b/content/browser/renderer_host/input/immediate_input_router.h index cc760bd..0c6a71a 100644 --- a/content/browser/renderer_host/input/immediate_input_router.h +++ b/content/browser/renderer_host/input/immediate_input_router.h @@ -91,33 +91,33 @@ private: bool Send(IPC::Message* message); // Filters and forwards |input_event| to the appropriate handler. - void FilterAndSendWebInputEvent(const WebKit::WebInputEvent& input_event, + void FilterAndSendWebInputEvent(const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut); // Utility routine for filtering and forwarding |input_event| to the // appropriate handler. |input_event| will be offered to the overscroll // controller, client and renderer, in that order. - void OfferToHandlers(const WebKit::WebInputEvent& input_event, + void OfferToHandlers(const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut); // Returns true if |input_event| was consumed by the overscroll controller. - bool OfferToOverscrollController(const WebKit::WebInputEvent& input_event, + bool OfferToOverscrollController(const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info); // Returns true if |input_event| was consumed by the client. - bool OfferToClient(const WebKit::WebInputEvent& input_event, + bool OfferToClient(const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info); // Returns true if |input_event| was successfully sent to the renderer // as an async IPC Message. - bool OfferToRenderer(const WebKit::WebInputEvent& input_event, + bool OfferToRenderer(const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut); // IPC message handlers - void OnInputEventAck(WebKit::WebInputEvent::Type event_type, + void OnInputEventAck(blink::WebInputEvent::Type event_type, InputEventAckState ack_result, const ui::LatencyInfo& latency_info); void OnMsgMoveCaretAck(); @@ -134,17 +134,17 @@ private: }; // Note: This function may result in |this| being deleted, and as such // should be the last method called in any internal chain of event handling. - void ProcessInputEventAck(WebKit::WebInputEvent::Type event_type, + void ProcessInputEventAck(blink::WebInputEvent::Type event_type, InputEventAckState ack_result, const ui::LatencyInfo& latency_info, AckSource ack_source); // Dispatches the ack'ed event to |ack_handler_|. - void ProcessKeyboardAck(WebKit::WebInputEvent::Type type, + void ProcessKeyboardAck(blink::WebInputEvent::Type type, InputEventAckState ack_result); // Forwards a valid |next_mouse_move_| if |type| is MouseMove. - void ProcessMouseAck(WebKit::WebInputEvent::Type type, + void ProcessMouseAck(blink::WebInputEvent::Type type, InputEventAckState ack_result); // Dispatches the ack'ed event to |ack_handler_|, forwarding queued events @@ -154,7 +154,7 @@ private: // Forwards the event ack to |gesture_event_filter|, potentially triggering // dispatch of queued gesture events. - void ProcessGestureAck(WebKit::WebInputEvent::Type type, + void ProcessGestureAck(blink::WebInputEvent::Type type, InputEventAckState ack_result, const ui::LatencyInfo& latency); @@ -164,7 +164,7 @@ private: const ui::LatencyInfo& latency); // Forwards |ack_result| to the client's OverscrollController, if necessary. - void ProcessAckForOverscroll(const WebKit::WebInputEvent& event, + void ProcessAckForOverscroll(const blink::WebInputEvent& event, InputEventAckState ack_result); void HandleGestureScroll(const GestureEventWithLatencyInfo& gesture_event); diff --git a/content/browser/renderer_host/input/immediate_input_router_unittest.cc b/content/browser/renderer_host/input/immediate_input_router_unittest.cc index 63ef7d2..5162555 100644 --- a/content/browser/renderer_host/input/immediate_input_router_unittest.cc +++ b/content/browser/renderer_host/input/immediate_input_router_unittest.cc @@ -25,12 +25,12 @@ #endif using base::TimeDelta; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace content { @@ -117,7 +117,7 @@ class ImmediateInputRouterTest : public InputRouterTest { new ImmediateInputRouter(process, client, handler, routing_id)); } - void SendInputEventACK(WebKit::WebInputEvent::Type type, + void SendInputEventACK(blink::WebInputEvent::Type type, InputEventAckState ack_result) { scoped_ptr<IPC::Message> response( new InputHostMsg_HandleInputEvent_ACK(0, type, ack_result, diff --git a/content/browser/renderer_host/input/input_router_client.h b/content/browser/renderer_host/input/input_router_client.h index ebe04c6..fefcb10 100644 --- a/content/browser/renderer_host/input/input_router_client.h +++ b/content/browser/renderer_host/input/input_router_client.h @@ -30,7 +30,7 @@ class CONTENT_EXPORT InputRouterClient { // * |CONSUMED| or |NO_CONSUMER_EXISTS| will trigger the appropriate ack. // * |UNKNOWN| will result in |input_event| being dropped. virtual InputEventAckState FilterInputEvent( - const WebKit::WebInputEvent& input_event, + const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info) = 0; // Called each time a WebInputEvent IPC is sent. diff --git a/content/browser/renderer_host/input/input_router_unittest.cc b/content/browser/renderer_host/input/input_router_unittest.cc index 48ec3bf..55ee320 100644 --- a/content/browser/renderer_host/input/input_router_unittest.cc +++ b/content/browser/renderer_host/input/input_router_unittest.cc @@ -7,12 +7,12 @@ #include "content/browser/renderer_host/input/input_router.h" #include "content/common/input_messages.h" -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace content { diff --git a/content/browser/renderer_host/input/input_router_unittest.h b/content/browser/renderer_host/input/input_router_unittest.h index bd1e6f4..50c8184 100644 --- a/content/browser/renderer_host/input/input_router_unittest.h +++ b/content/browser/renderer_host/input/input_router_unittest.h @@ -36,16 +36,16 @@ class InputRouterTest : public testing::Test { virtual void SetUp() OVERRIDE; virtual void TearDown() OVERRIDE; - void SendInputEventACK(WebKit::WebInputEvent::Type type, + void SendInputEventACK(blink::WebInputEvent::Type type, InputEventAckState ack_result); - void SimulateKeyboardEvent(WebKit::WebInputEvent::Type type, + void SimulateKeyboardEvent(blink::WebInputEvent::Type type, bool is_shortcut); void SimulateWheelEvent(float dX, float dY, int modifiers, bool precise); void SimulateMouseMove(int x, int y, int modifiers); - void SimulateWheelEventWithPhase(WebKit::WebMouseWheelEvent::Phase phase); - void SimulateGestureEvent(const WebKit::WebGestureEvent& event); - void SimulateGestureEvent(WebKit::WebInputEvent::Type type, - WebKit::WebGestureEvent::SourceDevice sourceDevice); + void SimulateWheelEventWithPhase(blink::WebMouseWheelEvent::Phase phase); + void SimulateGestureEvent(const blink::WebGestureEvent& event); + void SimulateGestureEvent(blink::WebInputEvent::Type type, + blink::WebGestureEvent::SourceDevice sourceDevice); void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers); void SimulateGesturePinchUpdateEvent(float scale, float anchorX, @@ -54,7 +54,7 @@ class InputRouterTest : public testing::Test { void SimulateGestureFlingStartEvent( float velocityX, float velocityY, - WebKit::WebGestureEvent::SourceDevice sourceDevice); + blink::WebGestureEvent::SourceDevice sourceDevice); void SimulateTouchEvent(int x, int y); void SetTouchTimestamp(base::TimeDelta timestamp); diff --git a/content/browser/renderer_host/input/mock_input_ack_handler.cc b/content/browser/renderer_host/input/mock_input_ack_handler.cc index 04f1cf8..0ab903f 100644 --- a/content/browser/renderer_host/input/mock_input_ack_handler.cc +++ b/content/browser/renderer_host/input/mock_input_ack_handler.cc @@ -8,12 +8,12 @@ #include "testing/gtest/include/gtest/gtest.h" using base::TimeDelta; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace content { diff --git a/content/browser/renderer_host/input/mock_input_ack_handler.h b/content/browser/renderer_host/input/mock_input_ack_handler.h index 27b8229..88ca9e1 100644 --- a/content/browser/renderer_host/input/mock_input_ack_handler.h +++ b/content/browser/renderer_host/input/mock_input_ack_handler.h @@ -50,13 +50,13 @@ class MockInputAckHandler : public InputAckHandler { const NativeWebKeyboardEvent& acked_keyboard_event() const { return acked_key_event_; } - const WebKit::WebMouseWheelEvent& acked_wheel_event() const { + const blink::WebMouseWheelEvent& acked_wheel_event() const { return acked_wheel_event_; } const TouchEventWithLatencyInfo& acked_touch_event() const { return acked_touch_event_; } - const WebKit::WebGestureEvent& acked_gesture_event() const { + const blink::WebGestureEvent& acked_gesture_event() const { return acked_gesture_event_; } @@ -69,9 +69,9 @@ class MockInputAckHandler : public InputAckHandler { bool unexpected_event_ack_called_; InputEventAckState ack_state_; NativeWebKeyboardEvent acked_key_event_; - WebKit::WebMouseWheelEvent acked_wheel_event_; + blink::WebMouseWheelEvent acked_wheel_event_; TouchEventWithLatencyInfo acked_touch_event_; - WebKit::WebGestureEvent acked_gesture_event_; + blink::WebGestureEvent acked_gesture_event_; scoped_ptr<GestureEventWithLatencyInfo> gesture_followup_event_; scoped_ptr<TouchEventWithLatencyInfo> touch_followup_event_; diff --git a/content/browser/renderer_host/input/mock_input_router_client.cc b/content/browser/renderer_host/input/mock_input_router_client.cc index 1484d22..436f0b0 100644 --- a/content/browser/renderer_host/input/mock_input_router_client.cc +++ b/content/browser/renderer_host/input/mock_input_router_client.cc @@ -9,12 +9,12 @@ #include "testing/gtest/include/gtest/gtest.h" using base::TimeDelta; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace content { diff --git a/content/browser/renderer_host/input/mock_input_router_client.h b/content/browser/renderer_host/input/mock_input_router_client.h index 05513728..d2ea81d 100644 --- a/content/browser/renderer_host/input/mock_input_router_client.h +++ b/content/browser/renderer_host/input/mock_input_router_client.h @@ -20,7 +20,7 @@ class MockInputRouterClient : public InputRouterClient { // InputRouterClient virtual InputEventAckState FilterInputEvent( - const WebKit::WebInputEvent& input_event, + const blink::WebInputEvent& input_event, const ui::LatencyInfo& latency_info) OVERRIDE; virtual void IncrementInFlightEventCount() OVERRIDE; virtual void DecrementInFlightEventCount() OVERRIDE; diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller_new_unittest.cc b/content/browser/renderer_host/input/synthetic_gesture_controller_new_unittest.cc index 5d00354..0740440 100644 --- a/content/browser/renderer_host/input/synthetic_gesture_controller_new_unittest.cc +++ b/content/browser/renderer_host/input/synthetic_gesture_controller_new_unittest.cc @@ -99,10 +99,10 @@ class MockSyntheticSmoothScrollMouseTarget : public MockSyntheticGestureTarget { virtual ~MockSyntheticSmoothScrollMouseTarget() {} virtual void QueueInputEventToPlatform(const InputEvent& event) OVERRIDE { - const WebKit::WebInputEvent* web_event = event.web_event.get(); - DCHECK_EQ(web_event->type, WebKit::WebInputEvent::MouseWheel); - const WebKit::WebMouseWheelEvent* mouse_wheel_event = - static_cast<const WebKit::WebMouseWheelEvent*>(web_event); + const blink::WebInputEvent* web_event = event.web_event.get(); + DCHECK_EQ(web_event->type, blink::WebInputEvent::MouseWheel); + const blink::WebMouseWheelEvent* mouse_wheel_event = + static_cast<const blink::WebMouseWheelEvent*>(web_event); DCHECK_EQ(mouse_wheel_event->deltaX, 0); scroll_distance_ += mouse_wheel_event->deltaY; } @@ -120,23 +120,23 @@ class MockSyntheticSmoothScrollTouchTarget : public MockSyntheticGestureTarget { virtual ~MockSyntheticSmoothScrollTouchTarget() {} virtual void QueueInputEventToPlatform(const InputEvent& event) OVERRIDE { - const WebKit::WebInputEvent* web_event = event.web_event.get(); - DCHECK(WebKit::WebInputEvent::isTouchEventType(web_event->type)); - const WebKit::WebTouchEvent* touch_event = - static_cast<const WebKit::WebTouchEvent*>(web_event); + const blink::WebInputEvent* web_event = event.web_event.get(); + DCHECK(blink::WebInputEvent::isTouchEventType(web_event->type)); + const blink::WebTouchEvent* touch_event = + static_cast<const blink::WebTouchEvent*>(web_event); DCHECK_EQ(touch_event->touchesLength, (unsigned int)1); if (!started_) { - DCHECK_EQ(touch_event->type, WebKit::WebInputEvent::TouchStart); + DCHECK_EQ(touch_event->type, blink::WebInputEvent::TouchStart); anchor_y_ = touch_event->touches[0].position.y; started_ = true; } else { - DCHECK_NE(touch_event->type, WebKit::WebInputEvent::TouchStart); - DCHECK_NE(touch_event->type, WebKit::WebInputEvent::TouchCancel); + DCHECK_NE(touch_event->type, blink::WebInputEvent::TouchStart); + DCHECK_NE(touch_event->type, blink::WebInputEvent::TouchCancel); // Ignore move events. - if (touch_event->type == WebKit::WebInputEvent::TouchEnd) + if (touch_event->type == blink::WebInputEvent::TouchEnd) scroll_distance_ = touch_event->touches[0].position.y - anchor_y_; } } diff --git a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture_new.cc b/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture_new.cc index a508070..06d4ff3 100644 --- a/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture_new.cc +++ b/content/browser/renderer_host/input/synthetic_smooth_scroll_gesture_new.cc @@ -97,7 +97,7 @@ void SyntheticSmoothScrollGestureNew::ForwardTouchEvent( void SyntheticSmoothScrollGestureNew::ForwardMouseWheelEvent( SyntheticGestureTarget* target, float delta) { - WebKit::WebMouseWheelEvent mouse_wheel_event = + blink::WebMouseWheelEvent mouse_wheel_event = SyntheticWebMouseWheelEventBuilder::Build(0, delta, 0, false); target->QueueInputEventToPlatform( diff --git a/content/browser/renderer_host/input/synthetic_web_input_event_builders.cc b/content/browser/renderer_host/input/synthetic_web_input_event_builders.cc index 634299d..d6f782d 100644 --- a/content/browser/renderer_host/input/synthetic_web_input_event_builders.cc +++ b/content/browser/renderer_host/input/synthetic_web_input_event_builders.cc @@ -10,23 +10,23 @@ namespace content { -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebGestureEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebGestureEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; WebMouseEvent SyntheticWebMouseEventBuilder::Build( - WebKit::WebInputEvent::Type type) { + blink::WebInputEvent::Type type) { WebMouseEvent result; result.type = type; return result; } WebMouseEvent SyntheticWebMouseEventBuilder::Build( - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, int window_x, int window_y, int modifiers) { diff --git a/content/browser/renderer_host/input/synthetic_web_input_event_builders.h b/content/browser/renderer_host/input/synthetic_web_input_event_builders.h index 3b0d7a3..0139686 100644 --- a/content/browser/renderer_host/input/synthetic_web_input_event_builders.h +++ b/content/browser/renderer_host/input/synthetic_web_input_event_builders.h @@ -16,8 +16,8 @@ namespace content { class CONTENT_EXPORT SyntheticWebMouseEventBuilder { public: - static WebKit::WebMouseEvent Build(WebKit::WebInputEvent::Type type); - static WebKit::WebMouseEvent Build(WebKit::WebInputEvent::Type type, + static blink::WebMouseEvent Build(blink::WebInputEvent::Type type); + static blink::WebMouseEvent Build(blink::WebInputEvent::Type type, int window_x, int window_y, int modifiers); @@ -25,9 +25,9 @@ class CONTENT_EXPORT SyntheticWebMouseEventBuilder { class CONTENT_EXPORT SyntheticWebMouseWheelEventBuilder { public: - static WebKit::WebMouseWheelEvent Build( - WebKit::WebMouseWheelEvent::Phase phase); - static WebKit::WebMouseWheelEvent Build(float dx, + static blink::WebMouseWheelEvent Build( + blink::WebMouseWheelEvent::Phase phase); + static blink::WebMouseWheelEvent Build(float dx, float dy, int modifiers, bool precise); @@ -35,29 +35,29 @@ class CONTENT_EXPORT SyntheticWebMouseWheelEventBuilder { class CONTENT_EXPORT SyntheticWebKeyboardEventBuilder { public: - static NativeWebKeyboardEvent Build(WebKit::WebInputEvent::Type type); + static NativeWebKeyboardEvent Build(blink::WebInputEvent::Type type); }; class CONTENT_EXPORT SyntheticWebGestureEventBuilder { public: - static WebKit::WebGestureEvent Build( - WebKit::WebInputEvent::Type type, - WebKit::WebGestureEvent::SourceDevice sourceDevice); - static WebKit::WebGestureEvent BuildScrollUpdate(float dx, + static blink::WebGestureEvent Build( + blink::WebInputEvent::Type type, + blink::WebGestureEvent::SourceDevice sourceDevice); + static blink::WebGestureEvent BuildScrollUpdate(float dx, float dY, int modifiers); - static WebKit::WebGestureEvent BuildPinchUpdate(float scale, + static blink::WebGestureEvent BuildPinchUpdate(float scale, float anchor_x, float anchor_y, int modifiers); - static WebKit::WebGestureEvent BuildFling( + static blink::WebGestureEvent BuildFling( float velocity_x, float velocity_y, - WebKit::WebGestureEvent::SourceDevice source_device); + blink::WebGestureEvent::SourceDevice source_device); }; class CONTENT_EXPORT SyntheticWebTouchEvent - : public NON_EXPORTED_BASE(WebKit::WebTouchEvent) { + : public NON_EXPORTED_BASE(blink::WebTouchEvent) { public: SyntheticWebTouchEvent(); @@ -74,7 +74,7 @@ class CONTENT_EXPORT SyntheticWebTouchEvent class CONTENT_EXPORT SyntheticWebTouchEventBuilder { public: - static SyntheticWebTouchEvent Build(WebKit::WebInputEvent::Type type); + static SyntheticWebTouchEvent Build(blink::WebInputEvent::Type type); }; } // namespace content diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc index 3371790..ecc12056 100644 --- a/content/browser/renderer_host/input/touch_event_queue.cc +++ b/content/browser/renderer_host/input/touch_event_queue.cc @@ -120,21 +120,21 @@ void TouchEventQueue::ProcessTouchAck(InputEventAckState ack_result, return; // Update the ACK status for each touch point in the ACKed event. - const WebKit::WebTouchEvent& event = + const blink::WebTouchEvent& event = touch_queue_.front()->coalesced_event().event; - if (event.type == WebKit::WebInputEvent::TouchEnd || - event.type == WebKit::WebInputEvent::TouchCancel) { + if (event.type == blink::WebInputEvent::TouchEnd || + event.type == blink::WebInputEvent::TouchCancel) { // The points have been released. Erase the ACK states. for (unsigned i = 0; i < event.touchesLength; ++i) { - const WebKit::WebTouchPoint& point = event.touches[i]; - if (point.state == WebKit::WebTouchPoint::StateReleased || - point.state == WebKit::WebTouchPoint::StateCancelled) + const blink::WebTouchPoint& point = event.touches[i]; + if (point.state == blink::WebTouchPoint::StateReleased || + point.state == blink::WebTouchPoint::StateCancelled) touch_ack_states_.erase(point.id); } - } else if (event.type == WebKit::WebInputEvent::TouchStart) { + } else if (event.type == blink::WebInputEvent::TouchStart) { for (unsigned i = 0; i < event.touchesLength; ++i) { - const WebKit::WebTouchPoint& point = event.touches[i]; - if (point.state == WebKit::WebTouchPoint::StatePressed) + const blink::WebTouchPoint& point = event.touches[i]; + if (point.state == blink::WebTouchPoint::StatePressed) touch_ack_states_[point.id] = ack_result; } } @@ -161,8 +161,8 @@ void TouchEventQueue::TryForwardNextEventToRenderer() { void TouchEventQueue::OnGestureScrollEvent( const GestureEventWithLatencyInfo& gesture_event) { - WebKit::WebInputEvent::Type type = gesture_event.event.type; - if (type == WebKit::WebInputEvent::GestureScrollBegin) { + blink::WebInputEvent::Type type = gesture_event.event.type; + if (type == blink::WebInputEvent::GestureScrollBegin) { // We assume the scroll event are generated synchronously from // dispatching a touch event ack, so that we can fake a cancel // event that has the correct touch ids as the touch event that @@ -174,10 +174,10 @@ void TouchEventQueue::OnGestureScrollEvent( // that is currently being acked. TouchEventWithLatencyInfo cancel_event = dispatching_touch_ack_->coalesced_event(); - cancel_event.event.type = WebKit::WebInputEvent::TouchCancel; + cancel_event.event.type = blink::WebInputEvent::TouchCancel; for (size_t i = 0; i < cancel_event.event.touchesLength; i++) cancel_event.event.touches[i].state = - WebKit::WebTouchPoint::StateCancelled; + blink::WebTouchPoint::StateCancelled; CoalescedWebTouchEvent* coalesced_cancel_event = new CoalescedWebTouchEvent(cancel_event); // Ignore the ack of the touch cancel so when it is acked, it won't get @@ -188,8 +188,8 @@ void TouchEventQueue::OnGestureScrollEvent( // in the queue is waiting for ack from renderer. So we can just insert // the touch cancel at the beginning of the queue. touch_queue_.push_front(coalesced_cancel_event); - } else if (type == WebKit::WebInputEvent::GestureScrollEnd || - type == WebKit::WebInputEvent::GestureFlingStart) { + } else if (type == blink::WebInputEvent::GestureScrollEnd || + type == blink::WebInputEvent::GestureFlingStart) { no_touch_to_renderer_ = false; } } @@ -234,19 +234,19 @@ void TouchEventQueue::PopTouchEventToClient( } bool TouchEventQueue::ShouldForwardToRenderer( - const WebKit::WebTouchEvent& event) const { + const blink::WebTouchEvent& event) const { if (no_touch_to_renderer_ && - event.type != WebKit::WebInputEvent::TouchCancel) + event.type != blink::WebInputEvent::TouchCancel) return false; // Touch press events should always be forwarded to the renderer. - if (event.type == WebKit::WebInputEvent::TouchStart) + if (event.type == blink::WebInputEvent::TouchStart) return true; for (unsigned int i = 0; i < event.touchesLength; ++i) { - const WebKit::WebTouchPoint& point = event.touches[i]; + const blink::WebTouchPoint& point = event.touches[i]; // If a point has been stationary, then don't take it into account. - if (point.state == WebKit::WebTouchPoint::StateStationary) + if (point.state == blink::WebTouchPoint::StateStationary) continue; if (touch_ack_states_.count(point.id) > 0) { diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h index 0382288..a3053c4 100644 --- a/content/browser/renderer_host/input/touch_event_queue.h +++ b/content/browser/renderer_host/input/touch_event_queue.h @@ -87,7 +87,7 @@ class CONTENT_EXPORT TouchEventQueue { void PopTouchEventToClient(InputEventAckState ack_result, const ui::LatencyInfo& renderer_latency_info); - bool ShouldForwardToRenderer(const WebKit::WebTouchEvent& event) const; + bool ShouldForwardToRenderer(const blink::WebTouchEvent& event) const; // Handles touch event forwarding and ack'ed event dispatch. TouchEventQueueClient* client_; diff --git a/content/browser/renderer_host/input/touch_event_queue_unittest.cc b/content/browser/renderer_host/input/touch_event_queue_unittest.cc index 61f51fe..c57cbbe 100644 --- a/content/browser/renderer_host/input/touch_event_queue_unittest.cc +++ b/content/browser/renderer_host/input/touch_event_queue_unittest.cc @@ -10,10 +10,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace content { @@ -757,7 +757,7 @@ TEST_F(TouchEventQueueTest, NoTouchOnScroll) { EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); // GestureScrollEnd will resume the sending of TouchEvents to renderer. - SendGestureEvent(WebKit::WebInputEvent::GestureScrollEnd); + SendGestureEvent(blink::WebInputEvent::GestureScrollEnd); EXPECT_FALSE(no_touch_to_renderer()); // Now TouchEvents should be forwarded normally. diff --git a/content/browser/renderer_host/input/web_input_event_builders_android.cc b/content/browser/renderer_host/input/web_input_event_builders_android.cc index b5c96c6..43e9bb8 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_android.cc +++ b/content/browser/renderer_host/input/web_input_event_builders_android.cc @@ -12,11 +12,11 @@ namespace content { -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebGestureEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebGestureEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; WebKeyboardEvent WebKeyboardEventBuilder::Build(WebInputEvent::Type type, int modifiers, @@ -48,7 +48,7 @@ WebKeyboardEvent WebKeyboardEventBuilder::Build(WebInputEvent::Type type, return result; } -WebMouseEvent WebMouseEventBuilder::Build(WebKit::WebInputEvent::Type type, +WebMouseEvent WebMouseEventBuilder::Build(blink::WebInputEvent::Type type, WebMouseEvent::Button button, double time_sec, int window_x, diff --git a/content/browser/renderer_host/input/web_input_event_builders_android.h b/content/browser/renderer_host/input/web_input_event_builders_android.h index 4488375..1059572 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_android.h +++ b/content/browser/renderer_host/input/web_input_event_builders_android.h @@ -11,8 +11,8 @@ namespace content { class WebMouseEventBuilder { public: - static WebKit::WebMouseEvent Build(WebKit::WebInputEvent::Type type, - WebKit::WebMouseEvent::Button button, + static blink::WebMouseEvent Build(blink::WebInputEvent::Type type, + blink::WebMouseEvent::Button button, double time_sec, int window_x, int window_y, @@ -29,7 +29,7 @@ class WebMouseWheelEventBuilder { DIRECTION_RIGHT, }; - static WebKit::WebMouseWheelEvent Build(Direction direction, + static blink::WebMouseWheelEvent Build(Direction direction, double time_sec, int window_x, int window_y); @@ -37,7 +37,7 @@ class WebMouseWheelEventBuilder { class WebKeyboardEventBuilder { public: - static WebKit::WebKeyboardEvent Build(WebKit::WebInputEvent::Type type, + static blink::WebKeyboardEvent Build(blink::WebInputEvent::Type type, int modifiers, double time_sec, int keycode, @@ -47,7 +47,7 @@ class WebKeyboardEventBuilder { class WebGestureEventBuilder { public: - static WebKit::WebGestureEvent Build(WebKit::WebInputEvent::Type type, + static blink::WebGestureEvent Build(blink::WebInputEvent::Type type, double time_sec, int x, int y); diff --git a/content/browser/renderer_host/input/web_input_event_builders_gtk.cc b/content/browser/renderer_host/input/web_input_event_builders_gtk.cc index c101595..d5c2bde 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_gtk.cc +++ b/content/browser/renderer_host/input/web_input_event_builders_gtk.cc @@ -13,10 +13,10 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/events/keycodes/keyboard_code_conversion_gtk.h" -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebKeyboardEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebKeyboardEvent; namespace { @@ -53,7 +53,7 @@ void ResetClickCountState() { last_click_time = 0; last_click_x = 0; last_click_y = 0; - last_click_button = WebKit::WebMouseEvent::ButtonNone; + last_click_button = blink::WebMouseEvent::ButtonNone; } bool IsKeyPadKeyval(guint keyval) { @@ -395,7 +395,7 @@ WebKeyboardEvent WebKeyboardEventBuilder::Build(wchar_t character, // function creates a WebInputEvent::Char event without using a // GdkEventKey object. WebKeyboardEvent result; - result.type = WebKit::WebInputEvent::Char; + result.type = blink::WebInputEvent::Char; result.timeStampSeconds = timeStampSeconds; result.modifiers = GdkStateToWebEventModifiers(state); result.windowsKeyCode = character; diff --git a/content/browser/renderer_host/input/web_input_event_builders_gtk.h b/content/browser/renderer_host/input/web_input_event_builders_gtk.h index 6fe1642..0d0250b 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_gtk.h +++ b/content/browser/renderer_host/input/web_input_event_builders_gtk.h @@ -19,23 +19,23 @@ namespace content { class CONTENT_EXPORT WebKeyboardEventBuilder { public: - static WebKit::WebKeyboardEvent Build(const GdkEventKey* event); - static WebKit::WebKeyboardEvent Build(wchar_t character, + static blink::WebKeyboardEvent Build(const GdkEventKey* event); + static blink::WebKeyboardEvent Build(wchar_t character, int state, double time_secs); }; class CONTENT_EXPORT WebMouseEventBuilder { public: - static WebKit::WebMouseEvent Build(const GdkEventButton* event); - static WebKit::WebMouseEvent Build(const GdkEventMotion* event); - static WebKit::WebMouseEvent Build(const GdkEventCrossing* event); + static blink::WebMouseEvent Build(const GdkEventButton* event); + static blink::WebMouseEvent Build(const GdkEventMotion* event); + static blink::WebMouseEvent Build(const GdkEventCrossing* event); }; class CONTENT_EXPORT WebMouseWheelEventBuilder { public: static float ScrollbarPixelsPerTick(); - static WebKit::WebMouseWheelEvent Build( + static blink::WebMouseWheelEvent Build( const GdkEventScroll* event); }; diff --git a/content/browser/renderer_host/input/web_input_event_builders_gtk_unittest.cc b/content/browser/renderer_host/input/web_input_event_builders_gtk_unittest.cc index 9498c9e..b5e2d42 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_gtk_unittest.cc +++ b/content/browser/renderer_host/input/web_input_event_builders_gtk_unittest.cc @@ -11,9 +11,9 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/events/keycodes/keyboard_code_conversion_gtk.h" -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; using content::WebMouseEventBuilder; using content::WebKeyboardEventBuilder; diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.cc b/content/browser/renderer_host/input/web_input_event_builders_win.cc index ba081fd..8c63e44 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_win.cc +++ b/content/browser/renderer_host/input/web_input_event_builders_win.cc @@ -7,10 +7,10 @@ #include "base/logging.h" #include "content/browser/renderer_host/input/web_input_event_util.h" -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; namespace content { diff --git a/content/browser/renderer_host/input/web_input_event_builders_win.h b/content/browser/renderer_host/input/web_input_event_builders_win.h index f01cd29..d3ec4a7 100644 --- a/content/browser/renderer_host/input/web_input_event_builders_win.h +++ b/content/browser/renderer_host/input/web_input_event_builders_win.h @@ -13,19 +13,19 @@ namespace content { class WebKeyboardEventBuilder { public: - static WebKit::WebKeyboardEvent Build(HWND hwnd, UINT message, + static blink::WebKeyboardEvent Build(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); }; class WebMouseEventBuilder { public: - static WebKit::WebMouseEvent Build(HWND hwnd, UINT message, + static blink::WebMouseEvent Build(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); }; class WebMouseWheelEventBuilder { public: - static WebKit::WebMouseWheelEvent Build(HWND hwnd, UINT message, + static blink::WebMouseWheelEvent Build(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); }; diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc index e3c2899..804c0b1 100644 --- a/content/browser/renderer_host/input/web_input_event_util.cc +++ b/content/browser/renderer_host/input/web_input_event_util.cc @@ -129,7 +129,7 @@ const char* GetKeyIdentifier(ui::KeyboardCode key_code) { namespace content { -void UpdateWindowsKeyCodeAndKeyIdentifier(WebKit::WebKeyboardEvent* event, +void UpdateWindowsKeyCodeAndKeyIdentifier(blink::WebKeyboardEvent* event, ui::KeyboardCode windows_key_code) { event->windowsKeyCode = windows_key_code; diff --git a/content/browser/renderer_host/input/web_input_event_util.h b/content/browser/renderer_host/input/web_input_event_util.h index 1abaf8c..f0680f2 100644 --- a/content/browser/renderer_host/input/web_input_event_util.h +++ b/content/browser/renderer_host/input/web_input_event_util.h @@ -8,7 +8,7 @@ #include "content/common/content_export.h" #include "ui/events/keycodes/keyboard_codes.h" -namespace WebKit { +namespace blink { class WebKeyboardEvent; } @@ -17,7 +17,7 @@ namespace content { // Update |event|'s windowsKeyCode and keyIdentifer properties using the // provided |windows_key_code|. CONTENT_EXPORT void UpdateWindowsKeyCodeAndKeyIdentifier( - WebKit::WebKeyboardEvent* event, + blink::WebKeyboardEvent* event, ui::KeyboardCode windows_key_code); } diff --git a/content/browser/renderer_host/input/web_input_event_util_posix.cc b/content/browser/renderer_host/input/web_input_event_util_posix.cc index 72786c8..7ae2242 100644 --- a/content/browser/renderer_host/input/web_input_event_util_posix.cc +++ b/content/browser/renderer_host/input/web_input_event_util_posix.cc @@ -22,21 +22,21 @@ ui::KeyboardCode GetWindowsKeyCodeWithoutLocation(ui::KeyboardCode key_code) { } } -WebKit::WebInputEvent::Modifiers GetLocationModifiersFromWindowsKeyCode( +blink::WebInputEvent::Modifiers GetLocationModifiersFromWindowsKeyCode( ui::KeyboardCode key_code) { switch (key_code) { case ui::VKEY_LCONTROL: case ui::VKEY_LSHIFT: case ui::VKEY_LMENU: case ui::VKEY_LWIN: - return WebKit::WebKeyboardEvent::IsLeft; + return blink::WebKeyboardEvent::IsLeft; case ui::VKEY_RCONTROL: case ui::VKEY_RSHIFT: case ui::VKEY_RMENU: case ui::VKEY_RWIN: - return WebKit::WebKeyboardEvent::IsRight; + return blink::WebKeyboardEvent::IsRight; default: - return static_cast<WebKit::WebInputEvent::Modifiers>(0); + return static_cast<blink::WebInputEvent::Modifiers>(0); } } diff --git a/content/browser/renderer_host/input/web_input_event_util_posix.h b/content/browser/renderer_host/input/web_input_event_util_posix.h index e7dc154..9f2f4c0 100644 --- a/content/browser/renderer_host/input/web_input_event_util_posix.h +++ b/content/browser/renderer_host/input/web_input_event_util_posix.h @@ -11,7 +11,7 @@ namespace content { ui::KeyboardCode GetWindowsKeyCodeWithoutLocation(ui::KeyboardCode key_code); -WebKit::WebInputEvent::Modifiers GetLocationModifiersFromWindowsKeyCode( +blink::WebInputEvent::Modifiers GetLocationModifiersFromWindowsKeyCode( ui::KeyboardCode key_code); } // namespace content diff --git a/content/browser/renderer_host/java/java_bound_object.cc b/content/browser/renderer_host/java/java_bound_object.cc index 27b9f42..e2ad87a 100644 --- a/content/browser/renderer_host/java/java_bound_object.cc +++ b/content/browser/renderer_host/java/java_bound_object.cc @@ -22,7 +22,7 @@ using base::android::GetClass; using base::android::JavaRef; using base::android::ScopedJavaGlobalRef; using base::android::ScopedJavaLocalRef; -using WebKit::WebBindings; +using blink::WebBindings; // The conversion between JavaScript and Java types is based on the Live // Connect 2 spec. See diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc b/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc index ece3056..6d792e7 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host.cc @@ -128,7 +128,7 @@ void JavaBridgeDispatcherHost::CreateNPVariantParam(NPObject* object, int route_id = JavaBridgeChannelHost::ThreadsafeGenerateRouteID(); param->npobject_routing_id = route_id; - WebKit::WebBindings::retainObject(object); + blink::WebBindings::retainObject(object); g_background_thread.Get().message_loop()->PostTask( FROM_HERE, base::Bind(&JavaBridgeDispatcherHost::CreateObjectStub, this, object, @@ -161,7 +161,7 @@ void JavaBridgeDispatcherHost::CreateObjectStub(NPObject* object, // The NPObjectStub takes a reference to the NPObject. Release the ref added // in CreateNPVariantParam(). - WebKit::WebBindings::releaseObject(object); + blink::WebBindings::releaseObject(object); } } // namespace content diff --git a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc index a3822a0..f06d9fe 100644 --- a/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc +++ b/content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.cc @@ -26,7 +26,7 @@ JavaBridgeDispatcherHostManager::JavaBridgeDispatcherHostManager( JavaBridgeDispatcherHostManager::~JavaBridgeDispatcherHostManager() { for (ObjectMap::iterator iter = objects_.begin(); iter != objects_.end(); ++iter) { - WebKit::WebBindings::releaseObject(iter->second); + blink::WebBindings::releaseObject(iter->second); } DCHECK_EQ(0U, instances_.size()); } @@ -37,7 +37,7 @@ void JavaBridgeDispatcherHostManager::AddNamedObject(const string16& name, // created later. The JavaBridgeDispatcherHost instances will take a // reference to the object, but we take one too, because this method can be // called before there are any such instances. - WebKit::WebBindings::retainObject(object); + blink::WebBindings::retainObject(object); objects_[name] = object; for (InstanceMap::iterator iter = instances_.begin(); @@ -73,7 +73,7 @@ void JavaBridgeDispatcherHostManager::RemoveNamedObject(const string16& name) { return; } - WebKit::WebBindings::releaseObject(iter->second); + blink::WebBindings::releaseObject(iter->second); objects_.erase(iter); for (InstanceMap::iterator iter = instances_.begin(); diff --git a/content/browser/renderer_host/native_web_keyboard_event_android.cc b/content/browser/renderer_host/native_web_keyboard_event_android.cc index ad5f1f1..d202918 100644 --- a/content/browser/renderer_host/native_web_keyboard_event_android.cc +++ b/content/browser/renderer_host/native_web_keyboard_event_android.cc @@ -30,7 +30,7 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent() } NativeWebKeyboardEvent::NativeWebKeyboardEvent( - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, int modifiers, double time_secs, int keycode, int unicode_character, bool is_system_key) : WebKeyboardEvent(WebKeyboardEventBuilder::Build( @@ -41,7 +41,7 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent( } NativeWebKeyboardEvent::NativeWebKeyboardEvent( - jobject android_key_event, WebKit::WebInputEvent::Type type, + jobject android_key_event, blink::WebInputEvent::Type type, int modifiers, double time_secs, int keycode, int unicode_character, bool is_system_key) : WebKeyboardEvent(WebKeyboardEventBuilder::Build( diff --git a/content/browser/renderer_host/native_web_keyboard_event_aura.cc b/content/browser/renderer_host/native_web_keyboard_event_aura.cc index ad3aae3..1587bba 100644 --- a/content/browser/renderer_host/native_web_keyboard_event_aura.cc +++ b/content/browser/renderer_host/native_web_keyboard_event_aura.cc @@ -20,15 +20,15 @@ ui::Event* CopyEvent(ui::Event* event) { int EventFlagsToWebInputEventModifiers(int flags) { return - (flags & ui::EF_SHIFT_DOWN ? WebKit::WebInputEvent::ShiftKey : 0) | - (flags & ui::EF_CONTROL_DOWN ? WebKit::WebInputEvent::ControlKey : 0) | - (flags & ui::EF_CAPS_LOCK_DOWN ? WebKit::WebInputEvent::CapsLockOn : 0) | - (flags & ui::EF_ALT_DOWN ? WebKit::WebInputEvent::AltKey : 0); + (flags & ui::EF_SHIFT_DOWN ? blink::WebInputEvent::ShiftKey : 0) | + (flags & ui::EF_CONTROL_DOWN ? blink::WebInputEvent::ControlKey : 0) | + (flags & ui::EF_CAPS_LOCK_DOWN ? blink::WebInputEvent::CapsLockOn : 0) | + (flags & ui::EF_ALT_DOWN ? blink::WebInputEvent::AltKey : 0); } } // namespace -using WebKit::WebKeyboardEvent; +using blink::WebKeyboardEvent; namespace content { @@ -61,11 +61,11 @@ NativeWebKeyboardEvent::NativeWebKeyboardEvent( skip_in_browser(false) { switch (key_event_type) { case ui::ET_KEY_PRESSED: - type = is_char ? WebKit::WebInputEvent::Char : - WebKit::WebInputEvent::RawKeyDown; + type = is_char ? blink::WebInputEvent::Char : + blink::WebInputEvent::RawKeyDown; break; case ui::ET_KEY_RELEASED: - type = WebKit::WebInputEvent::KeyUp; + type = blink::WebInputEvent::KeyUp; break; default: NOTREACHED(); diff --git a/content/browser/renderer_host/native_web_keyboard_event_mac.mm b/content/browser/renderer_host/native_web_keyboard_event_mac.mm index 5b4f38c..fea2939 100644 --- a/content/browser/renderer_host/native_web_keyboard_event_mac.mm +++ b/content/browser/renderer_host/native_web_keyboard_event_mac.mm @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/web/mac/WebInputEventFactory.h" -using WebKit::WebInputEventFactory; +using blink::WebInputEventFactory; namespace content { diff --git a/content/browser/renderer_host/native_web_keyboard_event_win.cc b/content/browser/renderer_host/native_web_keyboard_event_win.cc index 42d3cce..0f54a89 100644 --- a/content/browser/renderer_host/native_web_keyboard_event_win.cc +++ b/content/browser/renderer_host/native_web_keyboard_event_win.cc @@ -6,7 +6,7 @@ #include "content/browser/renderer_host/input/web_input_event_builders_win.h" -using WebKit::WebKeyboardEvent; +using blink::WebKeyboardEvent; namespace content { diff --git a/content/browser/renderer_host/overscroll_controller.cc b/content/browser/renderer_host/overscroll_controller.cc index 052eedb..4c33aa8 100644 --- a/content/browser/renderer_host/overscroll_controller.cc +++ b/content/browser/renderer_host/overscroll_controller.cc @@ -10,7 +10,7 @@ #include "content/public/browser/overscroll_configuration.h" #include "content/public/common/content_switches.h" -using WebKit::WebInputEvent; +using blink::WebInputEvent; namespace { @@ -35,29 +35,29 @@ OverscrollController::~OverscrollController() { } OverscrollController::Disposition OverscrollController::DispatchEvent( - const WebKit::WebInputEvent& event, + const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info) { if (scroll_state_ != STATE_UNKNOWN) { switch (event.type) { - case WebKit::WebInputEvent::GestureScrollEnd: - case WebKit::WebInputEvent::GestureFlingStart: + case blink::WebInputEvent::GestureScrollEnd: + case blink::WebInputEvent::GestureFlingStart: scroll_state_ = STATE_UNKNOWN; break; - case WebKit::WebInputEvent::MouseWheel: { - const WebKit::WebMouseWheelEvent& wheel = - static_cast<const WebKit::WebMouseWheelEvent&>(event); + case blink::WebInputEvent::MouseWheel: { + const blink::WebMouseWheelEvent& wheel = + static_cast<const blink::WebMouseWheelEvent&>(event); if (!wheel.hasPreciseScrollingDeltas || - wheel.phase == WebKit::WebMouseWheelEvent::PhaseEnded || - wheel.phase == WebKit::WebMouseWheelEvent::PhaseCancelled) { + wheel.phase == blink::WebMouseWheelEvent::PhaseEnded || + wheel.phase == blink::WebMouseWheelEvent::PhaseCancelled) { scroll_state_ = STATE_UNKNOWN; } break; } default: - if (WebKit::WebInputEvent::isMouseEventType(event.type) || - WebKit::WebInputEvent::isKeyboardEventType(event.type)) { + if (blink::WebInputEvent::isMouseEventType(event.type) || + blink::WebInputEvent::isKeyboardEventType(event.type)) { scroll_state_ = STATE_UNKNOWN; } break; @@ -72,7 +72,7 @@ OverscrollController::Disposition OverscrollController::DispatchEvent( // touch-scrolls maintain state in the renderer side (in the compositor, for // example), and the event that completes this action needs to be sent to // the renderer so that those states can be updated/reset appropriately. - if (WebKit::WebInputEvent::isGestureEventType(event.type)) { + if (blink::WebInputEvent::isGestureEventType(event.type)) { // A gesture-event isn't sent to the GestureEventFilter when overscroll is // in progress. So dispatch the event through the RenderWidgetHost so that // it can reach the GestureEventFilter. @@ -84,7 +84,7 @@ OverscrollController::Disposition OverscrollController::DispatchEvent( if (overscroll_mode_ != OVERSCROLL_NONE && DispatchEventResetsState(event)) { SetOverscrollMode(OVERSCROLL_NONE); - if (WebKit::WebInputEvent::isGestureEventType(event.type)) { + if (blink::WebInputEvent::isGestureEventType(event.type)) { // A gesture-event isn't sent to the GestureEventFilter when overscroll is // in progress. So dispatch the event through the RenderWidgetHost so that // it can reach the GestureEventFilter. @@ -104,15 +104,15 @@ OverscrollController::Disposition OverscrollController::DispatchEvent( return SHOULD_FORWARD_TO_RENDERER; } -void OverscrollController::ReceivedEventACK(const WebKit::WebInputEvent& event, +void OverscrollController::ReceivedEventACK(const blink::WebInputEvent& event, bool processed) { if (processed) { // If a scroll event is consumed by the page, i.e. some content on the page // has been scrolled, then there is not going to be an overscroll gesture, // until the current scroll ends, and a new scroll gesture starts. if (scroll_state_ == STATE_UNKNOWN && - (event.type == WebKit::WebInputEvent::MouseWheel || - event.type == WebKit::WebInputEvent::GestureScrollUpdate)) { + (event.type == blink::WebInputEvent::MouseWheel || + event.type == blink::WebInputEvent::GestureScrollUpdate)) { scroll_state_ = STATE_CONTENT_SCROLLING; } return; @@ -121,10 +121,10 @@ void OverscrollController::ReceivedEventACK(const WebKit::WebInputEvent& event, } void OverscrollController::DiscardingGestureEvent( - const WebKit::WebGestureEvent& gesture) { + const blink::WebGestureEvent& gesture) { if (scroll_state_ != STATE_UNKNOWN && - (gesture.type == WebKit::WebInputEvent::GestureScrollEnd || - gesture.type == WebKit::WebInputEvent::GestureFlingStart)) { + (gesture.type == blink::WebInputEvent::GestureScrollEnd || + gesture.type == blink::WebInputEvent::GestureFlingStart)) { scroll_state_ = STATE_UNKNOWN; } } @@ -142,15 +142,15 @@ void OverscrollController::Cancel() { } bool OverscrollController::DispatchEventCompletesAction ( - const WebKit::WebInputEvent& event) const { + const blink::WebInputEvent& event) const { if (overscroll_mode_ == OVERSCROLL_NONE) return false; // Complete the overscroll gesture if there was a mouse move or a scroll-end // after the threshold. - if (event.type != WebKit::WebInputEvent::MouseMove && - event.type != WebKit::WebInputEvent::GestureScrollEnd && - event.type != WebKit::WebInputEvent::GestureFlingStart) + if (event.type != blink::WebInputEvent::MouseMove && + event.type != blink::WebInputEvent::GestureScrollEnd && + event.type != blink::WebInputEvent::GestureFlingStart) return false; if (!delegate_) @@ -160,10 +160,10 @@ bool OverscrollController::DispatchEventCompletesAction ( if (bounds.IsEmpty()) return false; - if (event.type == WebKit::WebInputEvent::GestureFlingStart) { + if (event.type == blink::WebInputEvent::GestureFlingStart) { // Check to see if the fling is in the same direction of the overscroll. - const WebKit::WebGestureEvent gesture = - static_cast<const WebKit::WebGestureEvent&>(event); + const blink::WebGestureEvent gesture = + static_cast<const blink::WebGestureEvent&>(event); switch (overscroll_mode_) { case OVERSCROLL_EAST: if (gesture.data.flingStart.velocityX < 0) @@ -201,34 +201,34 @@ bool OverscrollController::DispatchEventCompletesAction ( } bool OverscrollController::DispatchEventResetsState( - const WebKit::WebInputEvent& event) const { + const blink::WebInputEvent& event) const { switch (event.type) { - case WebKit::WebInputEvent::MouseWheel: { + case blink::WebInputEvent::MouseWheel: { // Only wheel events with precise deltas (i.e. from trackpad) contribute // to the overscroll gesture. - const WebKit::WebMouseWheelEvent& wheel = - static_cast<const WebKit::WebMouseWheelEvent&>(event); + const blink::WebMouseWheelEvent& wheel = + static_cast<const blink::WebMouseWheelEvent&>(event); return !wheel.hasPreciseScrollingDeltas; } - case WebKit::WebInputEvent::GestureScrollUpdate: - case WebKit::WebInputEvent::GestureFlingCancel: + case blink::WebInputEvent::GestureScrollUpdate: + case blink::WebInputEvent::GestureFlingCancel: return false; default: // Touch events can arrive during an overscroll gesture initiated by // touch-scrolling. These events should not reset the overscroll state. - return !WebKit::WebInputEvent::isTouchEventType(event.type); + return !blink::WebInputEvent::isTouchEventType(event.type); } } bool OverscrollController::ProcessEventForOverscroll( - const WebKit::WebInputEvent& event) { + const blink::WebInputEvent& event) { bool event_processed = false; switch (event.type) { - case WebKit::WebInputEvent::MouseWheel: { - const WebKit::WebMouseWheelEvent& wheel = - static_cast<const WebKit::WebMouseWheelEvent&>(event); + case blink::WebInputEvent::MouseWheel: { + const blink::WebMouseWheelEvent& wheel = + static_cast<const blink::WebMouseWheelEvent&>(event); if (!wheel.hasPreciseScrollingDeltas) break; @@ -238,19 +238,19 @@ bool OverscrollController::ProcessEventForOverscroll( event_processed = true; break; } - case WebKit::WebInputEvent::GestureScrollUpdate: { - const WebKit::WebGestureEvent& gesture = - static_cast<const WebKit::WebGestureEvent&>(event); + case blink::WebInputEvent::GestureScrollUpdate: { + const blink::WebGestureEvent& gesture = + static_cast<const blink::WebGestureEvent&>(event); ProcessOverscroll(gesture.data.scrollUpdate.deltaX, gesture.data.scrollUpdate.deltaY, gesture.type); event_processed = true; break; } - case WebKit::WebInputEvent::GestureFlingStart: { + case blink::WebInputEvent::GestureFlingStart: { const float kFlingVelocityThreshold = 1100.f; - const WebKit::WebGestureEvent& gesture = - static_cast<const WebKit::WebGestureEvent&>(event); + const blink::WebGestureEvent& gesture = + static_cast<const blink::WebGestureEvent&>(event); float velocity_x = gesture.data.flingStart.velocityX; float velocity_y = gesture.data.flingStart.velocityY; if (fabs(velocity_x) > kFlingVelocityThreshold) { @@ -275,8 +275,8 @@ bool OverscrollController::ProcessEventForOverscroll( } default: - DCHECK(WebKit::WebInputEvent::isGestureEventType(event.type) || - WebKit::WebInputEvent::isTouchEventType(event.type)) + DCHECK(blink::WebInputEvent::isGestureEventType(event.type) || + blink::WebInputEvent::isTouchEventType(event.type)) << "Received unexpected event: " << event.type; } return event_processed; @@ -284,7 +284,7 @@ bool OverscrollController::ProcessEventForOverscroll( void OverscrollController::ProcessOverscroll(float delta_x, float delta_y, - WebKit::WebInputEvent::Type type) { + blink::WebInputEvent::Type type) { if (scroll_state_ != STATE_CONTENT_SCROLLING) overscroll_delta_x_ += delta_x; overscroll_delta_y_ += delta_y; diff --git a/content/browser/renderer_host/overscroll_controller.h b/content/browser/renderer_host/overscroll_controller.h index 8586c8a..c68eb9b 100644 --- a/content/browser/renderer_host/overscroll_controller.h +++ b/content/browser/renderer_host/overscroll_controller.h @@ -48,16 +48,16 @@ class OverscrollController { // This must be called when dispatching any event from the // RenderWidgetHostView so that the state of the overscroll gesture can be // updated properly. - Disposition DispatchEvent(const WebKit::WebInputEvent& event, + Disposition DispatchEvent(const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info); // This must be called when the ACK for any event comes in. This updates the // overscroll gesture status as appropriate. - void ReceivedEventACK(const WebKit::WebInputEvent& event, bool processed); + void ReceivedEventACK(const blink::WebInputEvent& event, bool processed); // This must be called when a gesture event is filtered out and not sent to // the renderer. - void DiscardingGestureEvent(const WebKit::WebGestureEvent& event); + void DiscardingGestureEvent(const blink::WebGestureEvent& event); OverscrollMode overscroll_mode() const { return overscroll_mode_; } @@ -86,22 +86,22 @@ class OverscrollController { // Returns true if the event indicates that the in-progress overscroll gesture // can now be completed. bool DispatchEventCompletesAction( - const WebKit::WebInputEvent& event) const; + const blink::WebInputEvent& event) const; // Returns true to indicate that dispatching the event should reset the // overscroll gesture status. - bool DispatchEventResetsState(const WebKit::WebInputEvent& event) const; + bool DispatchEventResetsState(const blink::WebInputEvent& event) const; // Processes an event to update the internal state for overscroll. Returns // true if the state is updated, false otherwise. - bool ProcessEventForOverscroll(const WebKit::WebInputEvent& event); + bool ProcessEventForOverscroll(const blink::WebInputEvent& event); // Processes horizontal overscroll. This can update both the overscroll mode // and the over scroll amount (i.e. |overscroll_mode_|, |overscroll_delta_x_| // and |overscroll_delta_y_|). void ProcessOverscroll(float delta_x, float delta_y, - WebKit::WebInputEvent::Type event_type); + blink::WebInputEvent::Type event_type); // Completes the desired action from the current gesture. void CompleteAction(); diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc index 3dfbe2b..43ff117 100644 --- a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc +++ b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc @@ -31,7 +31,7 @@ class PepperGamepadHostTest virtual ~PepperGamepadHostTest() { } - void ConstructService(const WebKit::WebGamepads& test_data) { + void ConstructService(const blink::WebGamepads& test_data) { service_.reset(new GamepadServiceTestConstructor(test_data)); } @@ -68,15 +68,15 @@ TEST_F(PepperGamepadHostTest, ValidateHardwareBuffersMatch) { TEST_F(PepperGamepadHostTest, ValidateGamepadsMatch) { // Gamepads. COMPILE_ASSERT(sizeof(ppapi::WebKitGamepads) == - sizeof(WebKit::WebGamepads), + sizeof(blink::WebGamepads), gamepads_data_must_match); ppapi::WebKitGamepads ppapi_gamepads; - WebKit::WebGamepads web_gamepads; + blink::WebGamepads web_gamepads; EXPECT_EQ(AddressDiff(&web_gamepads.length, &web_gamepads), AddressDiff(&ppapi_gamepads.length, &ppapi_gamepads)); // See comment below on storage & the EXPECT macro. - size_t webkit_items_length_cap = WebKit::WebGamepads::itemsLengthCap; + size_t webkit_items_length_cap = blink::WebGamepads::itemsLengthCap; size_t ppapi_items_length_cap = ppapi::WebKitGamepads::kItemsLengthCap; EXPECT_EQ(webkit_items_length_cap, ppapi_items_length_cap); @@ -89,23 +89,23 @@ TEST_F(PepperGamepadHostTest, ValidateGamepadsMatch) { TEST_F(PepperGamepadHostTest, ValidateGamepadMatch) { // Gamepad. COMPILE_ASSERT(sizeof(ppapi::WebKitGamepad) == - sizeof(WebKit::WebGamepad), + sizeof(blink::WebGamepad), gamepad_data_must_match); ppapi::WebKitGamepad ppapi_gamepad; - WebKit::WebGamepad web_gamepad; + blink::WebGamepad web_gamepad; // Using EXPECT seems to force storage for the parameter, which the constants // in the WebKit/PPAPI headers don't have. So we have to use temporaries // before comparing them. - size_t webkit_id_length_cap = WebKit::WebGamepad::idLengthCap; + size_t webkit_id_length_cap = blink::WebGamepad::idLengthCap; size_t ppapi_id_length_cap = ppapi::WebKitGamepad::kIdLengthCap; EXPECT_EQ(webkit_id_length_cap, ppapi_id_length_cap); - size_t webkit_axes_length_cap = WebKit::WebGamepad::axesLengthCap; + size_t webkit_axes_length_cap = blink::WebGamepad::axesLengthCap; size_t ppapi_axes_length_cap = ppapi::WebKitGamepad::kAxesLengthCap; EXPECT_EQ(webkit_axes_length_cap, ppapi_axes_length_cap); - size_t webkit_buttons_length_cap = WebKit::WebGamepad::buttonsLengthCap; + size_t webkit_buttons_length_cap = blink::WebGamepad::buttonsLengthCap; size_t ppapi_buttons_length_cap = ppapi::WebKitGamepad::kButtonsLengthCap; EXPECT_EQ(webkit_buttons_length_cap, ppapi_buttons_length_cap); @@ -126,8 +126,8 @@ TEST_F(PepperGamepadHostTest, ValidateGamepadMatch) { } TEST_F(PepperGamepadHostTest, WaitForReply) { - WebKit::WebGamepads default_data; - memset(&default_data, 0, sizeof(WebKit::WebGamepads)); + blink::WebGamepads default_data; + memset(&default_data, 0, sizeof(blink::WebGamepads)); default_data.length = 1; default_data.items[0].connected = true; default_data.items[0].buttonsLength = 1; @@ -163,7 +163,7 @@ TEST_F(PepperGamepadHostTest, WaitForReply) { // will issue the callback on our thread. Waiting for it to read twice // ensures that it was able to issue callbacks for the first read (if it // issued one) before we try to check for it. - WebKit::WebGamepads button_down_data = default_data; + blink::WebGamepads button_down_data = default_data; button_down_data.items[0].buttons[0] = 1.f; fetcher->SetTestData(button_down_data); fetcher->WaitForDataRead(); diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index f926ff6..03d8798 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -497,7 +497,7 @@ void RenderMessageFilter::OnCreateWindow( } void RenderMessageFilter::OnCreateWidget(int opener_id, - WebKit::WebPopupType popup_type, + blink::WebPopupType popup_type, int* route_id, int* surface_id) { render_widget_helper_->CreateNewWidget( @@ -857,7 +857,7 @@ void RenderMessageFilter::OnCheckNotificationPermission( CheckDesktopNotificationPermission(source_origin, resource_context_, render_process_id_); #else - *result = WebKit::WebNotificationPresenter::PermissionAllowed; + *result = blink::WebNotificationPresenter::PermissionAllowed; #endif } diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index d0a4386..9d95459 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -40,7 +40,7 @@ struct FontDescriptor; struct ViewHostMsg_CreateWindow_Params; -namespace WebKit { +namespace blink { struct WebScreenInfo; } @@ -126,7 +126,7 @@ class RenderMessageFilter : public BrowserMessageFilter { int* surface_id, int64* cloned_session_storage_namespace_id); void OnCreateWidget(int opener_id, - WebKit::WebPopupType popup_type, + blink::WebPopupType popup_type, int* route_id, int* surface_id); void OnCreateFullscreenWidget(int opener_id, diff --git a/content/browser/renderer_host/render_sandbox_host_linux.cc b/content/browser/renderer_host/render_sandbox_host_linux.cc index 8153718..986bff9 100644 --- a/content/browser/renderer_host/render_sandbox_host_linux.cc +++ b/content/browser/renderer_host/render_sandbox_host_linux.cc @@ -39,10 +39,10 @@ #include "third_party/skia/include/ports/SkFontConfigInterface.h" #include "ui/gfx/font_render_params_linux.h" -using WebKit::WebCString; -using WebKit::WebFontInfo; -using WebKit::WebUChar; -using WebKit::WebUChar32; +using blink::WebCString; +using blink::WebFontInfo; +using blink::WebUChar; +using blink::WebUChar32; namespace content { @@ -260,7 +260,7 @@ class SandboxIPCProcess { if (!pickle.ReadString(&iter, &preferred_locale)) return; - WebKit::WebFontFamily family; + blink::WebFontFamily family; WebFontInfo::familyForChar(c, preferred_locale.c_str(), &family); Pickle reply; @@ -286,7 +286,7 @@ class SandboxIPCProcess { } EnsureWebKitInitialized(); - WebKit::WebFontRenderStyle style; + blink::WebFontRenderStyle style; WebFontInfo::renderStyleForStrike(family.c_str(), sizeAndStyle, &style); Pickle reply; @@ -654,14 +654,14 @@ class SandboxIPCProcess { SandboxIPCProcess::~SandboxIPCProcess() { paths_.deleteAll(); if (webkit_platform_support_) - WebKit::shutdownWithoutV8(); + blink::shutdownWithoutV8(); } void SandboxIPCProcess::EnsureWebKitInitialized() { if (webkit_platform_support_) return; webkit_platform_support_.reset(new WebKitPlatformSupportImpl); - WebKit::initializeWithoutV8(webkit_platform_support_.get()); + blink::initializeWithoutV8(webkit_platform_support_.get()); } // ----------------------------------------------------------------------------- diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h index f3f31e4..dfefdec 100644 --- a/content/browser/renderer_host/render_view_host_delegate.h +++ b/content/browser/renderer_host/render_view_host_delegate.h @@ -404,7 +404,7 @@ class CONTENT_EXPORT RenderViewHostDelegate { // |popup_type| indicates if the widget is a popup and what kind of popup it // is (select, autofill...). virtual void CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) {} + blink::WebPopupType popup_type) {} // Creates a full screen RenderWidget. Similar to above. virtual void CreateNewFullscreenWidget(int route_id) {} diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index 44b4d8c..8d36fd2 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc @@ -86,13 +86,13 @@ #endif using base::TimeDelta; -using WebKit::WebConsoleMessage; -using WebKit::WebDragOperation; -using WebKit::WebDragOperationNone; -using WebKit::WebDragOperationsMask; -using WebKit::WebInputEvent; -using WebKit::WebMediaPlayerAction; -using WebKit::WebPluginAction; +using blink::WebConsoleMessage; +using blink::WebDragOperation; +using blink::WebDragOperationNone; +using blink::WebDragOperationsMask; +using blink::WebInputEvent; +using blink::WebMediaPlayerAction; +using blink::WebPluginAction; namespace content { namespace { @@ -103,11 +103,11 @@ const int kUnloadTimeoutMS = 1000; // Translate a WebKit text direction into a base::i18n one. base::i18n::TextDirection WebTextDirectionToChromeTextDirection( - WebKit::WebTextDirection dir) { + blink::WebTextDirection dir) { switch (dir) { - case WebKit::WebTextDirectionLeftToRight: + case blink::WebTextDirectionLeftToRight: return base::i18n::LEFT_TO_RIGHT; - case WebKit::WebTextDirectionRightToLeft: + case blink::WebTextDirectionRightToLeft: return base::i18n::RIGHT_TO_LEFT; default: NOTREACHED(); @@ -1308,7 +1308,7 @@ void RenderViewHostImpl::CreateNewWindow( } void RenderViewHostImpl::CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) { + blink::WebPopupType popup_type) { delegate_->CreateNewWidget(route_id, popup_type); } @@ -1515,7 +1515,7 @@ void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) { void RenderViewHostImpl::OnUpdateTitle( int32 page_id, const string16& title, - WebKit::WebTextDirection title_direction) { + blink::WebTextDirection title_direction) { if (title.length() > kMaxTitleChars) { NOTREACHED() << "Renderer sent too many characters in title."; return; @@ -1870,11 +1870,11 @@ gfx::Rect RenderViewHostImpl::GetRootWindowResizerRect() const { } void RenderViewHostImpl::ForwardMouseEvent( - const WebKit::WebMouseEvent& mouse_event) { + const blink::WebMouseEvent& mouse_event) { // We make a copy of the mouse event because // RenderWidgetHost::ForwardMouseEvent will delete |mouse_event|. - WebKit::WebMouseEvent event_copy(mouse_event); + blink::WebMouseEvent event_copy(mouse_event); RenderWidgetHostImpl::ForwardMouseEvent(event_copy); switch (event_copy.type) { @@ -2019,7 +2019,7 @@ void RenderViewHostImpl::DisownOpener() { } void RenderViewHostImpl::SetAccessibilityCallbackForTesting( - const base::Callback<void(WebKit::WebAXEvent)>& callback) { + const base::Callback<void(blink::WebAXEvent)>& callback) { accessibility_testing_callback_ = callback; } @@ -2056,7 +2056,7 @@ void RenderViewHostImpl::ReloadFrame() { void RenderViewHostImpl::Find(int request_id, const string16& search_text, - const WebKit::WebFindOptions& options) { + const blink::WebFindOptions& options) { Send(new ViewMsg_Find(GetRoutingID(), request_id, search_text, options)); } @@ -2099,12 +2099,12 @@ void RenderViewHostImpl::CopyImageAt(int x, int y) { } void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation( - const gfx::Point& location, const WebKit::WebMediaPlayerAction& action) { + const gfx::Point& location, const blink::WebMediaPlayerAction& action) { Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action)); } void RenderViewHostImpl::ExecutePluginActionAtLocation( - const gfx::Point& location, const WebKit::WebPluginAction& action) { + const gfx::Point& location, const blink::WebPluginAction& action) { Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); } @@ -2131,9 +2131,9 @@ void RenderViewHostImpl::OnAccessibilityEvents( for (unsigned i = 0; i < params.size(); i++) { const AccessibilityHostMsg_EventParams& param = params[i]; - WebKit::WebAXEvent src_type = param.event_type; - if (src_type == WebKit::WebAXEventLayoutComplete || - src_type == WebKit::WebAXEventLoadComplete) { + blink::WebAXEvent src_type = param.event_type; + if (src_type == blink::WebAXEventLayoutComplete || + src_type == blink::WebAXEventLoadComplete) { MakeAccessibilityNodeDataTree(param.nodes, &accessibility_tree_); } accessibility_testing_callback_.Run(src_type); diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h index ed963cd..c6d6016 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -144,7 +144,7 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void DisableScrollbarsForThreshold(const gfx::Size& size) OVERRIDE; virtual void DragSourceEndedAt( int client_x, int client_y, int screen_x, int screen_y, - WebKit::WebDragOperation operation) OVERRIDE; + blink::WebDragOperation operation) OVERRIDE; virtual void DragSourceMovedTo( int client_x, int client_y, int screen_x, int screen_y) OVERRIDE; virtual void DragSourceSystemDragEnded() OVERRIDE; @@ -152,12 +152,12 @@ class CONTENT_EXPORT RenderViewHostImpl const DropData& drop_data, const gfx::Point& client_pt, const gfx::Point& screen_pt, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, int key_modifiers) OVERRIDE; virtual void DragTargetDragOver( const gfx::Point& client_pt, const gfx::Point& screen_pt, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, int key_modifiers) OVERRIDE; virtual void DragTargetDragLeave() OVERRIDE; virtual void DragTargetDrop(const gfx::Point& client_pt, @@ -171,7 +171,7 @@ class CONTENT_EXPORT RenderViewHostImpl int action, const CustomContextMenuContext& context) OVERRIDE; virtual void ExecuteMediaPlayerActionAtLocation( const gfx::Point& location, - const WebKit::WebMediaPlayerAction& action) OVERRIDE; + const blink::WebMediaPlayerAction& action) OVERRIDE; virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, const string16& jscript) OVERRIDE; virtual void ExecuteJavascriptInWebFrameCallbackResult( @@ -180,10 +180,10 @@ class CONTENT_EXPORT RenderViewHostImpl const JavascriptResultCallback& callback) OVERRIDE; virtual void ExecutePluginActionAtLocation( const gfx::Point& location, - const WebKit::WebPluginAction& action) OVERRIDE; + const blink::WebPluginAction& action) OVERRIDE; virtual void ExitFullscreen() OVERRIDE; virtual void Find(int request_id, const string16& search_text, - const WebKit::WebFindOptions& options) OVERRIDE; + const blink::WebFindOptions& options) OVERRIDE; virtual void StopFinding(StopFindAction action) OVERRIDE; virtual void FirePageBeforeUnload(bool for_cross_site_transition) OVERRIDE; virtual void FilesSelectedInChooser( @@ -384,7 +384,7 @@ class CONTENT_EXPORT RenderViewHostImpl virtual void LostCapture() OVERRIDE; virtual void LostMouseLock() OVERRIDE; virtual void ForwardMouseEvent( - const WebKit::WebMouseEvent& mouse_event) OVERRIDE; + const blink::WebMouseEvent& mouse_event) OVERRIDE; virtual void OnPointerEventActivate() OVERRIDE; virtual void ForwardKeyboardEvent( const NativeWebKeyboardEvent& key_event) OVERRIDE; @@ -399,7 +399,7 @@ class CONTENT_EXPORT RenderViewHostImpl // Creates a new RenderWidget with the given route id. |popup_type| indicates // if this widget is a popup and what kind of popup it is (select, autofill). - void CreateNewWidget(int route_id, WebKit::WebPopupType popup_type); + void CreateNewWidget(int route_id, blink::WebPopupType popup_type); // Creates a full screen RenderWidget. void CreateNewFullscreenWidget(int route_id); @@ -440,7 +440,7 @@ class CONTENT_EXPORT RenderViewHostImpl // renderer process, and the accessibility tree it sent can be // retrieved using accessibility_tree_for_testing(). void SetAccessibilityCallbackForTesting( - const base::Callback<void(WebKit::WebAXEvent)>& callback); + const base::Callback<void(blink::WebAXEvent)>& callback); // Only valid if SetAccessibilityCallbackForTesting was called and // the callback was run at least once. Returns a snapshot of the @@ -532,7 +532,7 @@ class CONTENT_EXPORT RenderViewHostImpl void OnUpdateState(int32 page_id, const PageState& state); void OnUpdateTitle(int32 page_id, const string16& title, - WebKit::WebTextDirection title_direction); + blink::WebTextDirection title_direction); void OnUpdateEncoding(const std::string& encoding); void OnUpdateTargetURL(int32 page_id, const GURL& url); void OnClose(); @@ -571,11 +571,11 @@ class CONTENT_EXPORT RenderViewHostImpl bool is_reload, IPC::Message* reply_msg); void OnStartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, const SkBitmap& bitmap, const gfx::Vector2d& bitmap_offset_in_dip, const DragEventSourceInfo& event_info); - void OnUpdateDragCursor(WebKit::WebDragOperation drag_operation); + void OnUpdateDragCursor(blink::WebDragOperation drag_operation); void OnTargetDropACK(); void OnTakeFocus(bool reverse); void OnFocusedNodeChanged(bool is_editable_node); @@ -717,7 +717,7 @@ class CONTENT_EXPORT RenderViewHostImpl std::map<int, JavascriptResultCallback> javascript_callbacks_; // Accessibility callback for testing. - base::Callback<void(WebKit::WebAXEvent)> accessibility_testing_callback_; + base::Callback<void(blink::WebAXEvent)> accessibility_testing_callback_; // The most recently received accessibility tree - for testing only. AccessibilityNodeDataTreeNode accessibility_tree_; diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc index 3d13b5e..67e08d2 100644 --- a/content/browser/renderer_host/render_view_host_unittest.cc +++ b/content/browser/renderer_host/render_view_host_unittest.cc @@ -125,14 +125,14 @@ class MockDraggingRenderViewHostDelegateView bool right_aligned, bool allow_multiple_selection) OVERRIDE {} virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE { drag_url_ = drop_data.url; html_base_url_ = drop_data.html_base_url; } - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE {} + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE {} virtual void GotFocus() OVERRIDE {} virtual void TakeFocus(bool reverse) OVERRIDE {} virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} @@ -202,7 +202,7 @@ TEST_F(RenderViewHostTest, DragEnteredFileURLsStillBlocked) { UTF8ToUTF16(dragged_file_path.AsUTF8Unsafe()), string16())); rvh()->DragTargetDragEnter(dropped_data, client_point, screen_point, - WebKit::WebDragOperationNone, 0); + blink::WebDragOperationNone, 0); int id = process()->GetID(); ChildProcessSecurityPolicyImpl* policy = diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc index e7e2595..7f772e3 100644 --- a/content/browser/renderer_host/render_widget_helper.cc +++ b/content/browser/renderer_host/render_widget_helper.cc @@ -300,7 +300,7 @@ void RenderWidgetHelper::OnResumeRequestsForView(int route_id) { } void RenderWidgetHelper::CreateNewWidget(int opener_id, - WebKit::WebPopupType popup_type, + blink::WebPopupType popup_type, int* route_id, int* surface_id) { *route_id = GetNextRoutingID(); @@ -327,7 +327,7 @@ void RenderWidgetHelper::CreateNewFullscreenWidget(int opener_id, } void RenderWidgetHelper::OnCreateWidgetOnUI( - int opener_id, int route_id, WebKit::WebPopupType popup_type) { + int opener_id, int route_id, blink::WebPopupType popup_type) { RenderViewHostImpl* host = RenderViewHostImpl::FromID( render_process_id_, opener_id); if (host) diff --git a/content/browser/renderer_host/render_widget_helper.h b/content/browser/renderer_host/render_widget_helper.h index c5e80a1..a81b1de 100644 --- a/content/browser/renderer_host/render_widget_helper.h +++ b/content/browser/renderer_host/render_widget_helper.h @@ -153,7 +153,7 @@ class RenderWidgetHelper int* surface_id, SessionStorageNamespace* session_storage_namespace); void CreateNewWidget(int opener_id, - WebKit::WebPopupType popup_type, + blink::WebPopupType popup_type, int* route_id, int* surface_id); void CreateNewFullscreenWidget(int opener_id, int* route_id, int* surface_id); @@ -207,7 +207,7 @@ class RenderWidgetHelper // Called on the UI thread to finish creating a widget. void OnCreateWidgetOnUI(int opener_id, int route_id, - WebKit::WebPopupType popup_type); + blink::WebPopupType popup_type); // Called on the UI thread to create a fullscreen widget. void OnCreateFullscreenWidgetOnUI(int opener_id, int route_id); diff --git a/content/browser/renderer_host/render_widget_host_delegate.cc b/content/browser/renderer_host/render_widget_host_delegate.cc index 73f5325..efc1915 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.cc +++ b/content/browser/renderer_host/render_widget_host_delegate.cc @@ -13,7 +13,7 @@ bool RenderWidgetHostDelegate::PreHandleKeyboardEvent( } bool RenderWidgetHostDelegate::PreHandleWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { return false; } diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h index 9e8d36e..22f5a19 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h @@ -9,7 +9,7 @@ #include "content/common/content_export.h" #include "ui/gfx/native_widget_types.h" -namespace WebKit { +namespace blink { class WebMouseWheelEvent; } @@ -44,7 +44,7 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Callback to give the browser a chance to handle the specified mouse wheel // event before sending it to the renderer. // Returns true if the |event| was handled. - virtual bool PreHandleWheelEvent(const WebKit::WebMouseWheelEvent& event); + virtual bool PreHandleWheelEvent(const blink::WebMouseWheelEvent& event); // Notifies that screen rects were sent to renderer process. virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) {} diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index c1917a1..fb3adb3 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -73,12 +73,12 @@ using base::Time; using base::TimeDelta; using base::TimeTicks; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTextDirection; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTextDirection; namespace content { namespace { @@ -182,7 +182,7 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, ignore_input_events_(false), input_method_active_(false), text_direction_updated_(false), - text_direction_(WebKit::WebTextDirectionLeftToRight), + text_direction_(blink::WebTextDirectionLeftToRight), text_direction_canceled_(false), suppress_next_char_events_(false), pending_mouse_lock_request_(false), @@ -631,7 +631,7 @@ void RenderWidgetHostImpl::WasResized() { return; if (!screen_info_) { - screen_info_.reset(new WebKit::WebScreenInfo); + screen_info_.reset(new blink::WebScreenInfo); GetWebScreenInfo(screen_info_.get()); } @@ -1009,12 +1009,12 @@ void RenderWidgetHostImpl::ForwardWheelEventWithLatencyInfo( } void RenderWidgetHostImpl::ForwardGestureEvent( - const WebKit::WebGestureEvent& gesture_event) { + const blink::WebGestureEvent& gesture_event) { ForwardGestureEventWithLatencyInfo(gesture_event, ui::LatencyInfo()); } void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo( - const WebKit::WebGestureEvent& gesture_event, + const blink::WebGestureEvent& gesture_event, const ui::LatencyInfo& ui_latency) { TRACE_EVENT0("input", "RenderWidgetHostImpl::ForwardGestureEvent"); // Early out if necessary, prior to performing latency logic. @@ -1023,7 +1023,7 @@ void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo( ui::LatencyInfo latency_info = CreateRWHLatencyInfoIfNotExist(&ui_latency); - if (gesture_event.type == WebKit::WebInputEvent::GestureScrollUpdate) { + if (gesture_event.type == blink::WebInputEvent::GestureScrollUpdate) { latency_info.AddLatencyNumber( ui::INPUT_EVENT_LATENCY_SCROLL_UPDATE_RWH_COMPONENT, GetLatencyComponentId(), @@ -1051,7 +1051,7 @@ void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo( } void RenderWidgetHostImpl::ForwardTouchEventWithLatencyInfo( - const WebKit::WebTouchEvent& touch_event, + const blink::WebTouchEvent& touch_event, const ui::LatencyInfo& ui_latency) { TRACE_EVENT0("input", "RenderWidgetHostImpl::ForwardTouchEvent"); @@ -1191,7 +1191,7 @@ void RenderWidgetHostImpl::RemoveMouseEventCallback( } } -void RenderWidgetHostImpl::GetWebScreenInfo(WebKit::WebScreenInfo* result) { +void RenderWidgetHostImpl::GetWebScreenInfo(blink::WebScreenInfo* result) { TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::GetWebScreenInfo"); if (GetView()) static_cast<RenderWidgetHostViewPort*>(GetView())->GetScreenInfo(result); @@ -1324,7 +1324,7 @@ void RenderWidgetHostImpl::SetInputMethodActive(bool activate) { void RenderWidgetHostImpl::ImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { Send(new ViewMsg_ImeSetComposition( @@ -1341,7 +1341,7 @@ void RenderWidgetHostImpl::ImeConfirmComposition( void RenderWidgetHostImpl::ImeCancelComposition() { Send(new ViewMsg_ImeSetComposition(GetRoutingID(), string16(), - std::vector<WebKit::WebCompositionUnderline>(), 0, 0)); + std::vector<blink::WebCompositionUnderline>(), 0, 0)); } void RenderWidgetHostImpl::ExtendSelectionAndDelete( @@ -1461,11 +1461,11 @@ void RenderWidgetHostImpl::OnSetTooltipText( // but we use the current approach to match Fx & IE's behavior. string16 wrapped_tooltip_text = tooltip_text; if (!tooltip_text.empty()) { - if (text_direction_hint == WebKit::WebTextDirectionLeftToRight) { + if (text_direction_hint == blink::WebTextDirectionLeftToRight) { // Force the tooltip to have LTR directionality. wrapped_tooltip_text = base::i18n::GetDisplayStringInLTRDirectionality(wrapped_tooltip_text); - } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && + } else if (text_direction_hint == blink::WebTextDirectionRightToLeft && !base::i18n::IsRTL()) { // Force the tooltip to have RTL directionality. base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); @@ -1971,7 +1971,7 @@ bool RenderWidgetHostImpl::KeyPressListenersHandleEvent( } InputEventAckState RenderWidgetHostImpl::FilterInputEvent( - const WebKit::WebInputEvent& event, const ui::LatencyInfo& latency_info) { + const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info) { // Don't ignore touch cancel events, since they may be sent while input // events are being ignored in order to keep the renderer from getting // confused about how many touches are active. diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index 143362b..2bda1f2 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -62,7 +62,7 @@ namespace ui { class KeyEvent; } -namespace WebKit { +namespace blink { class WebInputEvent; class WebMouseEvent; struct WebCompositionUnderline; @@ -70,7 +70,7 @@ struct WebScreenInfo; } #if defined(OS_ANDROID) -namespace WebKit { +namespace blink { class WebLayer; } #endif @@ -130,7 +130,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, virtual void Delete() OVERRIDE; virtual void SelectAll() OVERRIDE; virtual void Unselect() OVERRIDE; - virtual void UpdateTextDirection(WebKit::WebTextDirection direction) OVERRIDE; + virtual void UpdateTextDirection(blink::WebTextDirection direction) OVERRIDE; virtual void NotifyTextDirection() OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; @@ -149,9 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, #endif virtual void EnableFullAccessibilityMode() OVERRIDE; virtual void ForwardMouseEvent( - const WebKit::WebMouseEvent& mouse_event) OVERRIDE; + const blink::WebMouseEvent& mouse_event) OVERRIDE; virtual void ForwardWheelEvent( - const WebKit::WebMouseWheelEvent& wheel_event) OVERRIDE; + const blink::WebMouseWheelEvent& wheel_event) OVERRIDE; virtual void ForwardKeyboardEvent( const NativeWebKeyboardEvent& key_event) OVERRIDE; virtual const gfx::Vector2d& GetLastScrollOffset() const OVERRIDE; @@ -179,7 +179,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, const MouseEventCallback& callback) OVERRIDE; virtual void RemoveMouseEventCallback( const MouseEventCallback& callback) OVERRIDE; - virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) OVERRIDE; + virtual void GetWebScreenInfo(blink::WebScreenInfo* result) OVERRIDE; virtual void GetSnapshotFromRenderer( const gfx::Rect& src_subrect, const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE; @@ -287,12 +287,12 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // Forwards the given message to the renderer. These are called by the view // when it has received a message. - void ForwardGestureEvent(const WebKit::WebGestureEvent& gesture_event); + void ForwardGestureEvent(const blink::WebGestureEvent& gesture_event); void ForwardGestureEventWithLatencyInfo( - const WebKit::WebGestureEvent& gesture_event, + const blink::WebGestureEvent& gesture_event, const ui::LatencyInfo& ui_latency); void ForwardTouchEventWithLatencyInfo( - const WebKit::WebTouchEvent& touch_event, + const blink::WebTouchEvent& touch_event, const ui::LatencyInfo& ui_latency); void ForwardMouseEventWithLatencyInfo( const MouseEventWithLatencyInfo& mouse_event); @@ -329,7 +329,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // * when markedText of NSTextInput is called (on Mac). void ImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); @@ -567,7 +567,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // its delegate. // Called when a mousewheel event was not processed by the renderer. - virtual void UnhandledWheelEvent(const WebKit::WebMouseWheelEvent& event) {} + virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event) {} // Notification that the user has made some kind of input that could // perform an action. The gestures that count are 1) any mouse down @@ -646,7 +646,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, void OnUpdateScreenRectsAck(); void OnRequestMove(const gfx::Rect& pos); void OnSetTooltipText(const string16& tooltip_text, - WebKit::WebTextDirection text_direction_hint); + blink::WebTextDirection text_direction_hint); void OnPaintAtSizeAck(int tag, const gfx::Size& size); #if defined(OS_MACOSX) void OnCompositorSurfaceBuffersSwapped( @@ -719,7 +719,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // InputRouterClient virtual InputEventAckState FilterInputEvent( - const WebKit::WebInputEvent& event, + const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info) OVERRIDE; virtual void IncrementInFlightEventCount() OVERRIDE; virtual void DecrementInFlightEventCount() OVERRIDE; @@ -783,7 +783,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // Cached copy of the screen info so that it doesn't need to be updated every // time the window is resized. - scoped_ptr<WebKit::WebScreenInfo> screen_info_; + scoped_ptr<blink::WebScreenInfo> screen_info_; // Set if screen_info_ may have changed and should be recomputed and force a // resize message. @@ -866,7 +866,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, // Set when we update the text direction of the selected input element. bool text_direction_updated_; - WebKit::WebTextDirection text_direction_; + blink::WebTextDirection text_direction_; // Set when we cancel updating the text direction. // This flag also ignores succeeding update requests until we call diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index ec77564..49b631c 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc @@ -46,11 +46,11 @@ #endif using base::TimeDelta; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; +using blink::WebTouchPoint; namespace content { @@ -439,7 +439,7 @@ class TestView : public TestRenderWidgetHostView { const WebTouchEvent& acked_event() const { return acked_event_; } int acked_event_count() const { return acked_event_count_; } void ClearAckedEvent() { - acked_event_.type = WebKit::WebInputEvent::Undefined; + acked_event_.type = blink::WebInputEvent::Undefined; acked_event_count_ = 0; } @@ -601,7 +601,7 @@ class RenderWidgetHostTest : public testing::Test { bool KeyPressEventCallback(const NativeWebKeyboardEvent& /* event */) { return handle_key_press_event_; } - bool MouseEventCallback(const WebKit::WebMouseEvent& /* event */) { + bool MouseEventCallback(const blink::WebMouseEvent& /* event */) { return handle_mouse_event_; } @@ -1943,7 +1943,7 @@ TEST_F(RenderWidgetHostTest, OverscrollWithTouchEvents) { EXPECT_EQ(0U, process_->sink().message_count()); EXPECT_TRUE(host_->TouchEventQueueEmpty()); - SimulateGestureEvent(WebKit::WebInputEvent::GestureScrollEnd, + SimulateGestureEvent(blink::WebInputEvent::GestureScrollEnd, WebGestureEvent::Touchscreen); base::MessageLoop::current()->PostDelayedTask( FROM_HERE, @@ -2001,7 +2001,7 @@ TEST_F(RenderWidgetHostTest, TouchGestureEndDispatchedAfterOverscrollComplete) { EXPECT_EQ(-5.f, host_->overscroll_delegate()->delta_y()); // Send end event. - SimulateGestureEvent(WebKit::WebInputEvent::GestureScrollEnd, + SimulateGestureEvent(blink::WebInputEvent::GestureScrollEnd, WebGestureEvent::Touchscreen); EXPECT_EQ(0U, process_->sink().message_count()); EXPECT_EQ(OVERSCROLL_NONE, host_->overscroll_mode()); @@ -2019,7 +2019,7 @@ TEST_F(RenderWidgetHostTest, TouchGestureEndDispatchedAfterOverscrollComplete) { EXPECT_EQ(1U, host_->GestureEventLastQueueEventSize()); EXPECT_EQ(0U, host_->GestureEventDebouncingQueueSize()); - SendInputEventACK(WebKit::WebInputEvent::GestureScrollEnd, + SendInputEventACK(blink::WebInputEvent::GestureScrollEnd, INPUT_EVENT_ACK_STATE_NOT_CONSUMED); EXPECT_EQ(0U, process_->sink().message_count()); EXPECT_EQ(0U, host_->GestureEventLastQueueEventSize()); @@ -2059,7 +2059,7 @@ TEST_F(RenderWidgetHostTest, TouchGestureEndDispatchedAfterOverscrollComplete) { EXPECT_EQ(-5.f, host_->overscroll_delegate()->delta_y()); // Send end event. - SimulateGestureEvent(WebKit::WebInputEvent::GestureScrollEnd, + SimulateGestureEvent(blink::WebInputEvent::GestureScrollEnd, WebGestureEvent::Touchscreen); EXPECT_EQ(0U, process_->sink().message_count()); EXPECT_EQ(OVERSCROLL_NONE, host_->overscroll_mode()); @@ -2078,7 +2078,7 @@ TEST_F(RenderWidgetHostTest, TouchGestureEndDispatchedAfterOverscrollComplete) { EXPECT_EQ(1U, host_->GestureEventLastQueueEventSize()); EXPECT_EQ(0U, host_->GestureEventDebouncingQueueSize()); - SendInputEventACK(WebKit::WebInputEvent::GestureScrollEnd, + SendInputEventACK(blink::WebInputEvent::GestureScrollEnd, INPUT_EVENT_ACK_STATE_NOT_CONSUMED); EXPECT_EQ(0U, process_->sink().message_count()); EXPECT_EQ(0U, host_->GestureEventLastQueueEventSize()); diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 2b7b6f0..b5491f2 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc @@ -214,7 +214,7 @@ void RenderWidgetHostViewAndroid::SetBounds(const gfx::Rect& rect) { SetSize(rect.size()); } -WebKit::WebGLId RenderWidgetHostViewAndroid::GetScaledContentTexture( +blink::WebGLId RenderWidgetHostViewAndroid::GetScaledContentTexture( float scale, gfx::Size* out_size) { gfx::Size size(gfx::ToCeiledSize( @@ -254,7 +254,7 @@ bool RenderWidgetHostViewAndroid::PopulateBitmapWithContents(jobject jbitmap) { GLHelper* helper = ImageTransportFactoryAndroid::GetInstance()->GetGLHelper(); - WebKit::WebGLId texture = helper->CopyAndScaleTexture( + blink::WebGLId texture = helper->CopyAndScaleTexture( texture_id_in_layer_, texture_size_in_layer_, bitmap.size(), @@ -267,7 +267,7 @@ bool RenderWidgetHostViewAndroid::PopulateBitmapWithContents(jobject jbitmap) { gfx::Rect(bitmap.size()), static_cast<unsigned char*> (bitmap.pixels())); - WebKit::WebGraphicsContext3D* context = + blink::WebGraphicsContext3D* context = ImageTransportFactoryAndroid::GetInstance()->GetContext3D(); context->deleteTexture(texture); @@ -948,7 +948,7 @@ bool RenderWidgetHostViewAndroid::HasAcceleratedSurface( return false; } -void RenderWidgetHostViewAndroid::GetScreenInfo(WebKit::WebScreenInfo* result) { +void RenderWidgetHostViewAndroid::GetScreenInfo(blink::WebScreenInfo* result) { // ScreenInfo isn't tied to the widget on Android. Always return the default. RenderWidgetHostViewBase::GetDefaultScreenInfo(result); } @@ -980,25 +980,25 @@ void RenderWidgetHostViewAndroid::SetScrollOffsetPinning( } void RenderWidgetHostViewAndroid::UnhandledWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { // intentionally empty, like RenderWidgetHostViewViews } void RenderWidgetHostViewAndroid::GestureEventAck( int gesture_event_type, InputEventAckState ack_result) { - if (gesture_event_type == WebKit::WebInputEvent::GestureScrollUpdate && + if (gesture_event_type == blink::WebInputEvent::GestureScrollUpdate && ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) { content_view_core_->OnScrollUpdateGestureConsumed(); } - if (gesture_event_type == WebKit::WebInputEvent::GestureFlingStart && + if (gesture_event_type == blink::WebInputEvent::GestureFlingStart && ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS) { content_view_core_->UnhandledFlingStartEvent(); } } InputEventAckState RenderWidgetHostViewAndroid::FilterInputEvent( - const WebKit::WebInputEvent& input_event) { + const blink::WebInputEvent& input_event) { if (host_) { SynchronousCompositorImpl* compositor = SynchronousCompositorImpl::FromID(host_->GetProcess()->GetID(), @@ -1103,26 +1103,26 @@ void RenderWidgetHostViewAndroid::SendKeyEvent( } void RenderWidgetHostViewAndroid::SendTouchEvent( - const WebKit::WebTouchEvent& event) { + const blink::WebTouchEvent& event) { if (host_) host_->ForwardTouchEventWithLatencyInfo(event, ui::LatencyInfo()); } void RenderWidgetHostViewAndroid::SendMouseEvent( - const WebKit::WebMouseEvent& event) { + const blink::WebMouseEvent& event) { if (host_) host_->ForwardMouseEvent(event); } void RenderWidgetHostViewAndroid::SendMouseWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { if (host_) host_->ForwardWheelEvent(event); } void RenderWidgetHostViewAndroid::SendGestureEvent( - const WebKit::WebGestureEvent& event) { + const blink::WebGestureEvent& event) { // Sending a gesture that may trigger overscroll should resume the effect. if (overscroll_effect_) overscroll_effect_->SetEnabled(true); @@ -1340,7 +1340,7 @@ void RenderWidgetHostViewAndroid::PrepareBitmapCopyOutputResult( // static void RenderWidgetHostViewPort::GetDefaultScreenInfo( - WebKit::WebScreenInfo* results) { + blink::WebScreenInfo* results) { const gfx::Display& display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); results->rect = display.bounds(); diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index f68de7e..2257301 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h @@ -42,7 +42,7 @@ class SingleReleaseCallback; class TextureLayer; } -namespace WebKit { +namespace blink { class WebExternalTextureLayer; class WebTouchEvent; class WebMouseEvent; @@ -140,7 +140,7 @@ class RenderWidgetHostViewAndroid const scoped_refptr<media::VideoFrame>& target, const base::Callback<void(bool)>& callback) OVERRIDE; virtual bool CanCopyToVideoFrame() const OVERRIDE; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, @@ -150,9 +150,9 @@ class RenderWidgetHostViewAndroid virtual void SetScrollOffsetPinning( bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; virtual void UnhandledWheelEvent( - const WebKit::WebMouseWheelEvent& event) OVERRIDE; + const blink::WebMouseWheelEvent& event) OVERRIDE; virtual InputEventAckState FilterInputEvent( - const WebKit::WebInputEvent& input_event) OVERRIDE; + const blink::WebInputEvent& input_event) OVERRIDE; virtual void OnSetNeedsFlushInput() OVERRIDE; virtual void GestureEventAck(int gesture_event_type, InputEventAckState ack_result) OVERRIDE; @@ -208,10 +208,10 @@ class RenderWidgetHostViewAndroid void SetContentViewCore(ContentViewCoreImpl* content_view_core); SkColor GetCachedBackgroundColor() const; void SendKeyEvent(const NativeWebKeyboardEvent& event); - void SendTouchEvent(const WebKit::WebTouchEvent& event); - void SendMouseEvent(const WebKit::WebMouseEvent& event); - void SendMouseWheelEvent(const WebKit::WebMouseWheelEvent& event); - void SendGestureEvent(const WebKit::WebGestureEvent& event); + void SendTouchEvent(const blink::WebTouchEvent& event); + void SendMouseEvent(const blink::WebMouseEvent& event); + void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event); + void SendGestureEvent(const blink::WebGestureEvent& event); void SendBeginFrame(const cc::BeginFrameArgs& args); void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params); @@ -223,7 +223,7 @@ class RenderWidgetHostViewAndroid void WasResized(); - WebKit::WebGLId GetScaledContentTexture(float scale, gfx::Size* out_size); + blink::WebGLId GetScaledContentTexture(float scale, gfx::Size* out_size); bool PopulateBitmapWithContents(jobject jbitmap); bool HasValidFrame() const; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 59e7508..2f80cf1 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -88,8 +88,8 @@ using gfx::RectToSkIRect; using gfx::SkIRectToRect; -using WebKit::WebScreenInfo; -using WebKit::WebTouchEvent; +using blink::WebScreenInfo; +using blink::WebTouchEvent; namespace content { @@ -220,10 +220,10 @@ BOOL CALLBACK DismissOwnedPopups(HWND window, LPARAM arg) { } #endif -void UpdateWebTouchEventAfterDispatch(WebKit::WebTouchEvent* event, - WebKit::WebTouchPoint* point) { - if (point->state != WebKit::WebTouchPoint::StateReleased && - point->state != WebKit::WebTouchPoint::StateCancelled) +void UpdateWebTouchEventAfterDispatch(blink::WebTouchEvent* event, + blink::WebTouchPoint* point) { + if (point->state != blink::WebTouchPoint::StateReleased && + point->state != blink::WebTouchPoint::StateCancelled) return; --event->touchesLength; for (unsigned i = point - event->touches; @@ -2109,15 +2109,15 @@ void RenderWidgetHostViewAura::SetCompositionText( return; // ui::CompositionUnderline should be identical to - // WebKit::WebCompositionUnderline, so that we can do reinterpret_cast safely. + // blink::WebCompositionUnderline, so that we can do reinterpret_cast safely. COMPILE_ASSERT(sizeof(ui::CompositionUnderline) == - sizeof(WebKit::WebCompositionUnderline), + sizeof(blink::WebCompositionUnderline), ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff); // TODO(suzhe): convert both renderer_host and renderer to use // ui::CompositionText. - const std::vector<WebKit::WebCompositionUnderline>& underlines = - reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( + const std::vector<blink::WebCompositionUnderline>& underlines = + reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>( composition.underlines); // TODO(suzhe): due to a bug of webkit, we can't use selection range with @@ -2156,7 +2156,7 @@ void RenderWidgetHostViewAura::InsertChar(char16 ch, int flags) { if (host_) { double now = ui::EventTimeForNow().InSecondsF(); - // Send a WebKit::WebInputEvent::Char event to |host_|. + // Send a blink::WebInputEvent::Char event to |host_|. NativeWebKeyboardEvent webkit_event(ui::ET_KEY_PRESSED, true /* is_char */, ch, @@ -2311,8 +2311,8 @@ bool RenderWidgetHostViewAura::ChangeTextDirectionAndLayoutAlignment( return false; host_->UpdateTextDirection( direction == base::i18n::RIGHT_TO_LEFT ? - WebKit::WebTextDirectionRightToLeft : - WebKit::WebTextDirectionLeftToRight); + blink::WebTextDirectionRightToLeft : + blink::WebTextDirectionLeftToRight); host_->NotifyTextDirection(); return true; } @@ -2393,7 +2393,7 @@ bool RenderWidgetHostViewAura::ShouldDescendIntoChildForEventHandling( } bool RenderWidgetHostViewAura::CanFocus() { - return popup_type_ == WebKit::WebPopupTypeNone; + return popup_type_ == blink::WebPopupTypeNone; } void RenderWidgetHostViewAura::OnCaptureLost() { @@ -2497,7 +2497,7 @@ void RenderWidgetHostViewAura::DidRecreateLayer(ui::Layer *old_layer, scoped_refptr<ui::Texture> new_texture; if (host_->is_accelerated_compositing_active() && gl_helper && current_surface_.get()) { - WebKit::WebGLId texture_id = + blink::WebGLId texture_id = gl_helper->CopyTexture(current_surface_->PrepareTexture(), current_surface_->size()); if (texture_id) { @@ -2603,7 +2603,7 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { DCHECK(!cursor_client || !cursor_client->IsCursorVisible()); if (event->type() == ui::ET_MOUSEWHEEL) { - WebKit::WebMouseWheelEvent mouse_wheel_event = + blink::WebMouseWheelEvent mouse_wheel_event = MakeWebMouseWheelEvent(static_cast<ui::MouseWheelEvent*>(event)); if (mouse_wheel_event.deltaX != 0 || mouse_wheel_event.deltaY != 0) host_->ForwardWheelEvent(mouse_wheel_event); @@ -2621,7 +2621,7 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { return; } - WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event); + blink::WebMouseEvent mouse_event = MakeWebMouseEvent(event); bool is_move_to_center_event = (event->type() == ui::ET_MOUSE_MOVED || event->type() == ui::ET_MOUSE_DRAGGED) && @@ -2676,13 +2676,13 @@ void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { reinterpret_cast<LPARAM>(toplevel_hwnd)); } #endif - WebKit::WebMouseWheelEvent mouse_wheel_event = + blink::WebMouseWheelEvent mouse_wheel_event = MakeWebMouseWheelEvent(static_cast<ui::MouseWheelEvent*>(event)); if (mouse_wheel_event.deltaX != 0 || mouse_wheel_event.deltaY != 0) host_->ForwardWheelEvent(mouse_wheel_event); } else if (CanRendererHandleEvent(event) && !(event->flags() & ui::EF_FROM_TOUCH)) { - WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event); + blink::WebMouseEvent mouse_event = MakeWebMouseEvent(event); ModifyEventMovementAndCoords(&mouse_event); host_->ForwardMouseEvent(mouse_event); } @@ -2722,16 +2722,16 @@ void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) { if (event->type() == ui::ET_SCROLL) { if (event->finger_count() != 2) return; - WebKit::WebGestureEvent gesture_event = + blink::WebGestureEvent gesture_event = MakeWebGestureEventFlingCancel(); host_->ForwardGestureEvent(gesture_event); - WebKit::WebMouseWheelEvent mouse_wheel_event = + blink::WebMouseWheelEvent mouse_wheel_event = MakeWebMouseWheelEvent(event); host_->ForwardWheelEvent(mouse_wheel_event); RecordAction(UserMetricsAction("TrackpadScroll")); } else if (event->type() == ui::ET_SCROLL_FLING_START || event->type() == ui::ET_SCROLL_FLING_CANCEL) { - WebKit::WebGestureEvent gesture_event = + blink::WebGestureEvent gesture_event = MakeWebGestureEvent(event); host_->ForwardGestureEvent(gesture_event); if (event->type() == ui::ET_SCROLL_FLING_START) @@ -2747,7 +2747,7 @@ void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) { return; // Update the touch event first. - WebKit::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(*event, + blink::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(*event, &touch_event_); // Forward the touch event only if a touch point was updated, and there's a @@ -2780,7 +2780,7 @@ void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) { return; RenderViewHostDelegate* delegate = NULL; - if (popup_type_ == WebKit::WebPopupTypeNone && !is_fullscreen_) + if (popup_type_ == blink::WebPopupTypeNone && !is_fullscreen_) delegate = RenderViewHost::From(host_)->GetDelegate(); if (delegate && event->type() == ui::ET_GESTURE_BEGIN && @@ -2788,17 +2788,17 @@ void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) { delegate->HandleGestureBegin(); } - WebKit::WebGestureEvent gesture = MakeWebGestureEvent(event); + blink::WebGestureEvent gesture = MakeWebGestureEvent(event); if (event->type() == ui::ET_GESTURE_TAP_DOWN) { // Webkit does not stop a fling-scroll on tap-down. So explicitly send an // event to stop any in-progress flings. - WebKit::WebGestureEvent fling_cancel = gesture; - fling_cancel.type = WebKit::WebInputEvent::GestureFlingCancel; - fling_cancel.sourceDevice = WebKit::WebGestureEvent::Touchscreen; + blink::WebGestureEvent fling_cancel = gesture; + fling_cancel.type = blink::WebInputEvent::GestureFlingCancel; + fling_cancel.sourceDevice = blink::WebGestureEvent::Touchscreen; host_->ForwardGestureEvent(fling_cancel); } - if (gesture.type != WebKit::WebInputEvent::Undefined) { + if (gesture.type != blink::WebInputEvent::Undefined) { host_->ForwardGestureEventWithLatencyInfo(gesture, *event->latency()); if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN || @@ -3153,7 +3153,7 @@ ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { } bool RenderWidgetHostViewAura::NeedsInputGrab() { - return popup_type_ == WebKit::WebPopupTypeSelect; + return popup_type_ == blink::WebPopupTypeSelect; } void RenderWidgetHostViewAura::FinishImeCompositionSession() { @@ -3165,11 +3165,11 @@ void RenderWidgetHostViewAura::FinishImeCompositionSession() { } void RenderWidgetHostViewAura::ModifyEventMovementAndCoords( - WebKit::WebMouseEvent* event) { + blink::WebMouseEvent* event) { // If the mouse has just entered, we must report zero movementX/Y. Hence we // reset any global_mouse_position set previously. - if (event->type == WebKit::WebInputEvent::MouseEnter || - event->type == WebKit::WebInputEvent::MouseLeave) + if (event->type == blink::WebInputEvent::MouseEnter || + event->type == blink::WebInputEvent::MouseLeave) global_mouse_position_.SetPoint(event->globalX, event->globalY); // Movement is computed by taking the difference of the new cursor position @@ -3258,7 +3258,7 @@ void RenderWidgetHostViewAura::AddedToRootWindow() { window_->GetDispatcher()->AddRootWindowObserver(this); host_->ParentChanged(GetNativeViewId()); UpdateScreenInfo(window_); - if (popup_type_ != WebKit::WebPopupTypeNone) + if (popup_type_ != blink::WebPopupTypeNone) event_filter_for_popup_exit_.reset(new EventFilterForPopupExit(this)); aura::client::CursorClient* cursor_client = diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index ddf3f9c..206087a 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -223,7 +223,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura virtual void AcceleratedSurfaceSuspend() OVERRIDE; virtual void AcceleratedSurfaceRelease() OVERRIDE; virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual void GestureEventAck(int gesture_event_type, InputEventAckState ack_result) OVERRIDE; @@ -438,7 +438,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura // This method computes movementX/Y and keeps track of mouse location for // mouse lock on all mouse move events. - void ModifyEventMovementAndCoords(WebKit::WebMouseEvent* event); + void ModifyEventMovementAndCoords(blink::WebMouseEvent* event); // Sends an IPC to the renderer process to communicate whether or not // the mouse cursor is visible anywhere on the screen. @@ -591,7 +591,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura // The touch-event. Its touch-points are updated as necessary. A new // touch-point is added from an ET_TOUCH_PRESSED event, and a touch-point is // removed from the list on an ET_TOUCH_RELEASED event. - WebKit::WebTouchEvent touch_event_; + blink::WebTouchEvent touch_event_; // The current text input type. ui::TextInputType text_input_type_; diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc index 88669e0..2c27071 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc @@ -416,21 +416,21 @@ TEST_F(RenderWidgetHostViewAuraTest, TouchEventState) { view_->OnTouchEvent(&press); EXPECT_FALSE(press.handled()); - EXPECT_EQ(WebKit::WebInputEvent::TouchStart, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchStart, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StatePressed, + EXPECT_EQ(blink::WebTouchPoint::StatePressed, view_->touch_event_.touches[0].state); view_->OnTouchEvent(&move); EXPECT_FALSE(move.handled()); - EXPECT_EQ(WebKit::WebInputEvent::TouchMove, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchMove, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, + EXPECT_EQ(blink::WebTouchPoint::StateMoved, view_->touch_event_.touches[0].state); view_->OnTouchEvent(&release); EXPECT_FALSE(release.handled()); - EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchEnd, view_->touch_event_.type); EXPECT_EQ(0U, view_->touch_event_.touchesLength); // Now install some touch-event handlers and do the same steps. The touch @@ -441,29 +441,29 @@ TEST_F(RenderWidgetHostViewAuraTest, TouchEventState) { view_->OnTouchEvent(&press); EXPECT_TRUE(press.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchStart, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchStart, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StatePressed, + EXPECT_EQ(blink::WebTouchPoint::StatePressed, view_->touch_event_.touches[0].state); view_->OnTouchEvent(&move); EXPECT_TRUE(move.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchMove, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchMove, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, + EXPECT_EQ(blink::WebTouchPoint::StateMoved, view_->touch_event_.touches[0].state); view_->OnTouchEvent(&release); EXPECT_TRUE(release.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchEnd, view_->touch_event_.type); EXPECT_EQ(0U, view_->touch_event_.touchesLength); // Now start a touch event, and remove the event-handlers before the release. view_->OnTouchEvent(&press); EXPECT_TRUE(press.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchStart, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchStart, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StatePressed, + EXPECT_EQ(blink::WebTouchPoint::StatePressed, view_->touch_event_.touches[0].state); widget_host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, false)); @@ -473,16 +473,16 @@ TEST_F(RenderWidgetHostViewAuraTest, TouchEventState) { base::Time::NowFromSystemTime() - base::Time()); view_->OnTouchEvent(&move2); EXPECT_FALSE(move2.handled()); - EXPECT_EQ(WebKit::WebInputEvent::TouchMove, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchMove, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, + EXPECT_EQ(blink::WebTouchPoint::StateMoved, view_->touch_event_.touches[0].state); ui::TouchEvent release2(ui::ET_TOUCH_RELEASED, gfx::Point(20, 20), 0, base::Time::NowFromSystemTime() - base::Time()); view_->OnTouchEvent(&release2); EXPECT_FALSE(release2.handled()); - EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchEnd, view_->touch_event_.type); EXPECT_EQ(0U, view_->touch_event_.touchesLength); } @@ -510,30 +510,30 @@ TEST_F(RenderWidgetHostViewAuraTest, TouchEventSyncAsync) { view_->OnTouchEvent(&press); EXPECT_TRUE(press.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchStart, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchStart, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StatePressed, + EXPECT_EQ(blink::WebTouchPoint::StatePressed, view_->touch_event_.touches[0].state); view_->OnTouchEvent(&move); EXPECT_TRUE(move.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchMove, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchMove, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, + EXPECT_EQ(blink::WebTouchPoint::StateMoved, view_->touch_event_.touches[0].state); // Send the same move event. Since the point hasn't moved, it won't affect the // queue. However, the view should consume the event. view_->OnTouchEvent(&move); EXPECT_TRUE(move.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchMove, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchMove, view_->touch_event_.type); EXPECT_EQ(1U, view_->touch_event_.touchesLength); - EXPECT_EQ(WebKit::WebTouchPoint::StateMoved, + EXPECT_EQ(blink::WebTouchPoint::StateMoved, view_->touch_event_.touches[0].state); view_->OnTouchEvent(&release); EXPECT_TRUE(release.stopped_propagation()); - EXPECT_EQ(WebKit::WebInputEvent::TouchEnd, view_->touch_event_.type); + EXPECT_EQ(blink::WebInputEvent::TouchEnd, view_->touch_event_.type); EXPECT_EQ(0U, view_->touch_event_.touchesLength); } diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc index 320e3e1..5ca099c 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -378,7 +378,7 @@ void RenderWidgetHostViewBase::DetachPluginsHelper(HWND parent) { #endif // OS_WIN RenderWidgetHostViewBase::RenderWidgetHostViewBase() - : popup_type_(WebKit::WebPopupTypeNone), + : popup_type_(blink::WebPopupTypeNone), mouse_locked_(false), showing_context_menu_(false), selection_text_offset_(0), @@ -446,12 +446,12 @@ bool RenderWidgetHostViewBase::IsMouseLocked() { } void RenderWidgetHostViewBase::UnhandledWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { // Most implementations don't need to do anything here. } InputEventAckState RenderWidgetHostViewBase::FilterInputEvent( - const WebKit::WebInputEvent& input_event) { + const blink::WebInputEvent& input_event) { // By default, input events are simply forwarded to the renderer. return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; } @@ -467,11 +467,11 @@ void RenderWidgetHostViewBase::OnSetNeedsFlushInput() { void RenderWidgetHostViewBase::GestureEventAck(int gesture_event_type, InputEventAckState ack_result) {} -void RenderWidgetHostViewBase::SetPopupType(WebKit::WebPopupType popup_type) { +void RenderWidgetHostViewBase::SetPopupType(blink::WebPopupType popup_type) { popup_type_ = popup_type; } -WebKit::WebPopupType RenderWidgetHostViewBase::GetPopupType() { +blink::WebPopupType RenderWidgetHostViewBase::GetPopupType() { return popup_type_; } diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index 459afee..abe318f 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -58,15 +58,15 @@ class CONTENT_EXPORT RenderWidgetHostViewBase virtual string16 GetSelectedText() const OVERRIDE; virtual bool IsMouseLocked() OVERRIDE; virtual void UnhandledWheelEvent( - const WebKit::WebMouseWheelEvent& event) OVERRIDE; + const blink::WebMouseWheelEvent& event) OVERRIDE; virtual InputEventAckState FilterInputEvent( - const WebKit::WebInputEvent& input_event) OVERRIDE; + const blink::WebInputEvent& input_event) OVERRIDE; virtual void OnSetNeedsFlushInput() OVERRIDE; virtual void OnDidFlushInput() OVERRIDE; virtual void GestureEventAck(int gesture_event_type, InputEventAckState ack_result) OVERRIDE; - virtual void SetPopupType(WebKit::WebPopupType popup_type) OVERRIDE; - virtual WebKit::WebPopupType GetPopupType() OVERRIDE; + virtual void SetPopupType(blink::WebPopupType popup_type) OVERRIDE; + virtual blink::WebPopupType GetPopupType() OVERRIDE; virtual BrowserAccessibilityManager* GetBrowserAccessibilityManager() const OVERRIDE; virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, @@ -126,7 +126,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // Whether this view is a popup and what kind of popup it is (select, // autofill...). - WebKit::WebPopupType popup_type_; + blink::WebPopupType popup_type_; // A custom background to paint behind the web content. This will be tiled // horizontally. Can be null, in which case we fall back to painting white. diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc index 5e182a8..320b96f 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc @@ -50,8 +50,8 @@ #include "ui/gfx/text_elider.h" #include "webkit/common/cursors/webcursor_gtk_data.h" -using WebKit::WebMouseWheelEvent; -using WebKit::WebScreenInfo; +using blink::WebMouseWheelEvent; +using blink::WebScreenInfo; namespace content { namespace { @@ -94,7 +94,7 @@ GdkCursor* GetMozSpinningCursor() { return moz_spinning_cursor; } -bool MovedToPoint(const WebKit::WebMouseEvent& mouse_event, +bool MovedToPoint(const blink::WebMouseEvent& mouse_event, const gfx::Point& center) { return mouse_event.globalX == center.x() && mouse_event.globalY == center.y(); @@ -385,7 +385,7 @@ class RenderWidgetHostViewGtkWidget { host_view->ModifyEventForEdgeDragging(widget, event); - WebKit::WebMouseEvent mouse_event = WebMouseEventBuilder::Build(event); + blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build(event); if (host_view->mouse_locked_) { gfx::Point center = host_view->GetWidgetCenter(); @@ -435,7 +435,7 @@ class RenderWidgetHostViewGtkWidget { // additionally send this crossing event with the state indicating the // button is down, it causes problems with drag and drop in WebKit.) if (!(event->state & any_button_mask)) { - WebKit::WebMouseEvent mouse_event = WebMouseEventBuilder::Build(event); + blink::WebMouseEvent mouse_event = WebMouseEventBuilder::Build(event); host_view->ModifyEventMovementAndCoords(&mouse_event); // When crossing out and back into a render view the movement values // must represent the instantaneous movement of the mouse, not the jump @@ -993,11 +993,11 @@ void RenderWidgetHostViewGtk::OnDestroy(GtkWidget* widget) { } bool RenderWidgetHostViewGtk::NeedsInputGrab() { - return popup_type_ == WebKit::WebPopupTypeSelect; + return popup_type_ == blink::WebPopupTypeSelect; } bool RenderWidgetHostViewGtk::IsPopup() const { - return popup_type_ != WebKit::WebPopupTypeNone; + return popup_type_ != blink::WebPopupTypeNone; } void RenderWidgetHostViewGtk::DoSharedInit() { @@ -1450,7 +1450,7 @@ gfx::Point RenderWidgetHostViewGtk::GetWidgetCenter() { } void RenderWidgetHostViewGtk::ModifyEventMovementAndCoords( - WebKit::WebMouseEvent* event) { + blink::WebMouseEvent* event) { // Movement is computed by taking the difference of the new cursor position // and the previous. Under mouse lock the cursor will be warped back to the // center so that we are not limited by clipping boundaries. diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h index 1f70b04..f256df7 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.h +++ b/content/browser/renderer_host/render_widget_host_view_gtk.h @@ -124,7 +124,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk bool has_horizontal_scrollbar) OVERRIDE; virtual void SetScrollOffsetPinning( bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; virtual void ResizeCompositingSurface(const gfx::Size&) OVERRIDE; @@ -149,7 +149,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk // Mouse events always provide a movementX/Y which needs to be computed. // Also, mouse lock requires knowledge of last unlocked cursor coordinates. // State is stored on the host view to do this, and the mouse event modified. - void ModifyEventMovementAndCoords(WebKit::WebMouseEvent* event); + void ModifyEventMovementAndCoords(blink::WebMouseEvent* event); void Paint(const gfx::Rect&); diff --git a/content/browser/renderer_host/render_widget_host_view_guest.cc b/content/browser/renderer_host/render_widget_host_view_guest.cc index 87765b5..49c55fe 100644 --- a/content/browser/renderer_host/render_widget_host_view_guest.cc +++ b/content/browser/renderer_host/render_widget_host_view_guest.cc @@ -35,11 +35,11 @@ bool ShouldSendPinchGesture() { return pinch_allowed; } -WebKit::WebGestureEvent CreateFlingCancelEvent(double time_stamp) { - WebKit::WebGestureEvent gesture_event; +blink::WebGestureEvent CreateFlingCancelEvent(double time_stamp) { + blink::WebGestureEvent gesture_event; gesture_event.timeStampSeconds = time_stamp; - gesture_event.type = WebKit::WebGestureEvent::GestureFlingCancel; - gesture_event.sourceDevice = WebKit::WebGestureEvent::Touchscreen; + gesture_event.type = blink::WebGestureEvent::GestureFlingCancel; + gesture_event.sourceDevice = blink::WebGestureEvent::Touchscreen; return gesture_event; } @@ -398,7 +398,7 @@ void RenderWidgetHostViewGuest::UnlockMouse() { return platform_view_->UnlockMouse(); } -void RenderWidgetHostViewGuest::GetScreenInfo(WebKit::WebScreenInfo* results) { +void RenderWidgetHostViewGuest::GetScreenInfo(blink::WebScreenInfo* results) { RenderWidgetHostViewPort* embedder_view = RenderWidgetHostViewPort::FromRWHV( guest_->GetEmbedderRenderWidgetHostView()); @@ -525,8 +525,8 @@ void RenderWidgetHostViewGuest::DispatchCancelTouchEvent( if (!host_) return; - WebKit::WebTouchEvent cancel_event; - cancel_event.type = WebKit::WebInputEvent::TouchCancel; + blink::WebTouchEvent cancel_event; + cancel_event.type = blink::WebInputEvent::TouchCancel; cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency()); } @@ -546,7 +546,7 @@ bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer( return true; } - WebKit::WebGestureEvent web_gesture = + blink::WebGestureEvent web_gesture = MakeWebGestureEventFromUIEvent(*gesture); const gfx::Point& client_point = gesture->location(); const gfx::Point& screen_point = gesture->location(); @@ -556,9 +556,9 @@ bool RenderWidgetHostViewGuest::ForwardGestureEventToRenderer( web_gesture.globalX = screen_point.x(); web_gesture.globalY = screen_point.y(); - if (web_gesture.type == WebKit::WebGestureEvent::Undefined) + if (web_gesture.type == blink::WebGestureEvent::Undefined) return false; - if (web_gesture.type == WebKit::WebGestureEvent::GestureTapDown) { + if (web_gesture.type == blink::WebGestureEvent::GestureTapDown) { host_->ForwardGestureEvent( CreateFlingCancelEvent(gesture->time_stamp().InSecondsF())); } diff --git a/content/browser/renderer_host/render_widget_host_view_guest.h b/content/browser/renderer_host/render_widget_host_view_guest.h index c050aaa..4832eae 100644 --- a/content/browser/renderer_host/render_widget_host_view_guest.h +++ b/content/browser/renderer_host/render_widget_host_view_guest.h @@ -141,7 +141,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest #endif // defined(OS_WIN) || defined(USE_AURA) virtual bool LockMouse() OVERRIDE; virtual void UnlockMouse() OVERRIDE; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual void OnAccessibilityEvents( const std::vector<AccessibilityHostMsg_EventParams>& params) OVERRIDE; diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h index da16bc2..93c0143 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -114,7 +114,7 @@ class RenderWidgetHostViewMacEditCommandHelper; string16 markedText_; // Underline information of the |markedText_|. - std::vector<WebKit::WebCompositionUnderline> underlines_; + std::vector<blink::WebCompositionUnderline> underlines_; // Indicates if doCommandBySelector method receives any edit command when // handling a key down event. @@ -304,7 +304,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, virtual void AcceleratedSurfaceRelease() OVERRIDE; virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE; virtual void AboutToWaitForBackingStoreMsg() OVERRIDE; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; @@ -315,7 +315,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, virtual bool LockMouse() OVERRIDE; virtual void UnlockMouse() OVERRIDE; virtual void UnhandledWheelEvent( - const WebKit::WebMouseWheelEvent& event) OVERRIDE; + const blink::WebMouseWheelEvent& event) OVERRIDE; // IPC::Sender implementation. virtual bool Send(IPC::Message* message) OVERRIDE; @@ -326,7 +326,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, virtual void ReleaseReferencesToSoftwareFrame() OVERRIDE; // Forwards the mouse event to the renderer. - void ForwardMouseEvent(const WebKit::WebMouseEvent& event); + void ForwardMouseEvent(const blink::WebMouseEvent& event); void KillSelf(); diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index 71dfb16..9082dd1 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -76,10 +76,10 @@ using content::RenderWidgetHostImpl; using content::RenderWidgetHostViewMac; using content::RenderWidgetHostViewMacEditCommandHelper; using content::TextInputClientMac; -using WebKit::WebInputEvent; -using WebKit::WebInputEventFactory; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; +using blink::WebInputEvent; +using blink::WebInputEventFactory; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; enum CoreAnimationStatus { CORE_ANIMATION_DISABLED, @@ -287,7 +287,7 @@ namespace { const size_t kMaxTooltipLength = 1024; // 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]; @@ -302,7 +302,7 @@ WebKit::WebColor WebColorFromNSColor(NSColor *color) { // third_party/WebKit/Source/WebKit/mac/WebView/WebHTMLView.mm void ExtractUnderlines( NSAttributedString* string, - std::vector<WebKit::WebCompositionUnderline>* underlines) { + std::vector<blink::WebCompositionUnderline>* underlines) { int length = [[string string] length]; int i = 0; while (i < length) { @@ -311,13 +311,13 @@ void ExtractUnderlines( longestEffectiveRange:&range inRange:NSMakeRange(i, length - i)]; if (NSNumber *style = [attrs objectForKey:NSUnderlineStyleAttributeName]) { - 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; @@ -374,13 +374,13 @@ NSWindow* ApparentWindowForView(NSView* view) { return enclosing_window; } -WebKit::WebScreenInfo GetWebScreenInfo(NSView* view) { +blink::WebScreenInfo GetWebScreenInfo(NSView* view) { gfx::Display display = gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(view); NSScreen* screen = [NSScreen deepestScreen]; - WebKit::WebScreenInfo results; + blink::WebScreenInfo results; results.deviceScaleFactor = static_cast<int>(display.device_scale_factor()); results.depth = NSBitsPerPixelFromDepth([screen depth]); @@ -407,7 +407,7 @@ RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( // static void RenderWidgetHostViewPort::GetDefaultScreenInfo( - WebKit::WebScreenInfo* results) { + blink::WebScreenInfo* results) { *results = GetWebScreenInfo(NULL); } @@ -626,7 +626,7 @@ void RenderWidgetHostViewMac::InitAsChild( void RenderWidgetHostViewMac::InitAsPopup( RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { - bool activatable = popup_type_ == WebKit::WebPopupTypeNone; + bool activatable = popup_type_ == blink::WebPopupTypeNone; [cocoa_view_ setCloseOnDeactivate:YES]; [cocoa_view_ setCanBeKeyView:activatable ? YES : NO]; @@ -1139,7 +1139,7 @@ void RenderWidgetHostViewMac::SetShowingContextMenu(bool showing) { } bool RenderWidgetHostViewMac::IsPopup() const { - return popup_type_ != WebKit::WebPopupTypeNone; + return popup_type_ != blink::WebPopupTypeNone; } BackingStore* RenderWidgetHostViewMac::AllocBackingStore( @@ -1703,7 +1703,7 @@ void RenderWidgetHostViewMac::OnSwapCompositorFrame( void RenderWidgetHostViewMac::OnAcceleratedCompositingStateChange() { } -void RenderWidgetHostViewMac::GetScreenInfo(WebKit::WebScreenInfo* results) { +void RenderWidgetHostViewMac::GetScreenInfo(blink::WebScreenInfo* results) { *results = GetWebScreenInfo(GetNativeView()); } @@ -1766,7 +1766,7 @@ void RenderWidgetHostViewMac::UnlockMouse() { } void RenderWidgetHostViewMac::UnhandledWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { // Only record a wheel event as unhandled if JavaScript handlers got a chance // to see it (no-op wheel events are ignored by the event dispatcher) if (event.deltaX || event.deltaY) @@ -2413,7 +2413,7 @@ void RenderWidgetHostViewMac::FrameSwapped() { // So before sending the real key down event, we need to send a fake key up // event to balance it. NativeWebKeyboardEvent fakeEvent = event; - fakeEvent.type = WebKit::WebInputEvent::KeyUp; + fakeEvent.type = blink::WebInputEvent::KeyUp; fakeEvent.skip_in_browser = true; widgetHost->ForwardKeyboardEvent(fakeEvent); // Not checking |renderWidgetHostView_->render_widget_host_| here because @@ -2439,7 +2439,7 @@ void RenderWidgetHostViewMac::FrameSwapped() { if (!textInserted && textToBeInserted_.length() == 1) { // If a single character was inserted, then we just send it as a keypress // event. - event.type = WebKit::WebInputEvent::Char; + event.type = blink::WebInputEvent::Char; event.text[0] = textToBeInserted_[0]; event.text[1] = 0; event.skip_in_browser = true; @@ -2451,7 +2451,7 @@ void RenderWidgetHostViewMac::FrameSwapped() { // We don't get insertText: calls if ctrl or cmd is down, or the key event // generates an insert command. So synthesize a keypress event for these // cases, unless the key event generated any other command. - event.type = WebKit::WebInputEvent::Char; + event.type = blink::WebInputEvent::Char; event.skip_in_browser = true; widgetHost->ForwardKeyboardEvent(event); } @@ -3538,7 +3538,7 @@ extern NSString *NSTextInputReplacementRangeAttributeName; } else { // Use a thin black underline by default. underlines_.push_back( - WebKit::WebCompositionUnderline(0, length, SK_ColorBLACK, false)); + blink::WebCompositionUnderline(0, length, SK_ColorBLACK, false)); } // If we are handling a key down event, then SetComposition() will be diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm index 7a152d1..ad37bfd 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm @@ -329,7 +329,7 @@ TEST_F(RenderWidgetHostViewMacTest, GetFirstRectForCharacterRangeCaretCase) { NSRange actual_range; rwhv_mac_->SelectionChanged(kDummyString, kDummyOffset, caret_range); params.anchor_rect = params.focus_rect = caret_rect; - params.anchor_dir = params.focus_dir = WebKit::WebTextDirectionLeftToRight; + params.anchor_dir = params.focus_dir = blink::WebTextDirectionLeftToRight; rwhv_mac_->SelectionBoundsChanged(params); EXPECT_TRUE(rwhv_mac_->GetCachedFirstRectForCharacterRange( caret_range.ToNSRange(), @@ -711,7 +711,7 @@ TEST_F(RenderWidgetHostViewMacTest, ScrollWheelEndEventDelivery) { // Send an ACK for the first wheel event, so that the queue will be flushed. scoped_ptr<IPC::Message> response(new InputHostMsg_HandleInputEvent_ACK( - 0, WebKit::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_CONSUMED, + 0, blink::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_CONSUMED, ui::LatencyInfo())); host->OnMessageReceived(*response); @@ -756,7 +756,7 @@ TEST_F(RenderWidgetHostViewMacTest, IgnoreEmptyUnhandledWheelEvent) { // Indicate that the wheel event was unhandled. scoped_ptr<IPC::Message> response1(new InputHostMsg_HandleInputEvent_ACK(0, - WebKit::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_NOT_CONSUMED, + blink::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_NOT_CONSUMED, ui::LatencyInfo())); host->OnMessageReceived(*response1); @@ -771,7 +771,7 @@ TEST_F(RenderWidgetHostViewMacTest, IgnoreEmptyUnhandledWheelEvent) { // Indicate that the wheel event was also unhandled. scoped_ptr<IPC::Message> response2(new InputHostMsg_HandleInputEvent_ACK(0, - WebKit::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_NOT_CONSUMED, + blink::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_NOT_CONSUMED, ui::LatencyInfo())); host->OnMessageReceived(*response2); diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index 97ec948..f0b25b3 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -83,9 +83,9 @@ using base::TimeDelta; using base::TimeTicks; using ui::ViewProp; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebTextDirection; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebTextDirection; namespace content { namespace { @@ -202,10 +202,10 @@ bool DecodeScrollGesture(const GESTUREINFO& gi, return true; } -WebKit::WebMouseWheelEvent MakeFakeScrollWheelEvent(HWND hwnd, +blink::WebMouseWheelEvent MakeFakeScrollWheelEvent(HWND hwnd, POINT start, POINT delta) { - WebKit::WebMouseWheelEvent result; + blink::WebMouseWheelEvent result; result.type = WebInputEvent::MouseWheel; result.timeStampSeconds = ::GetMessageTime() / 1000.0; result.button = WebMouseEvent::ButtonNone; @@ -236,17 +236,17 @@ inline void SetTouchType(TOUCHINPUT* point, int type) { point->dwFlags = (point->dwFlags & kTouchMask) | type; } -ui::EventType ConvertToUIEvent(WebKit::WebTouchPoint::State t) { +ui::EventType ConvertToUIEvent(blink::WebTouchPoint::State t) { switch (t) { - case WebKit::WebTouchPoint::StatePressed: + case blink::WebTouchPoint::StatePressed: return ui::ET_TOUCH_PRESSED; - case WebKit::WebTouchPoint::StateMoved: + case blink::WebTouchPoint::StateMoved: return ui::ET_TOUCH_MOVED; - case WebKit::WebTouchPoint::StateStationary: + case blink::WebTouchPoint::StateStationary: return ui::ET_TOUCH_STATIONARY; - case WebKit::WebTouchPoint::StateReleased: + case blink::WebTouchPoint::StateReleased: return ui::ET_TOUCH_RELEASED; - case WebKit::WebTouchPoint::StateCancelled: + case blink::WebTouchPoint::StateCancelled: return ui::ET_TOUCH_CANCELLED; default: DCHECK(false) << "Unexpected ui type. " << t; @@ -255,9 +255,9 @@ ui::EventType ConvertToUIEvent(WebKit::WebTouchPoint::State t) { } // Creates a WebGestureEvent corresponding to the given |gesture| -WebKit::WebGestureEvent CreateWebGestureEvent(HWND hwnd, +blink::WebGestureEvent CreateWebGestureEvent(HWND hwnd, const ui::GestureEvent& gesture) { - WebKit::WebGestureEvent gesture_event = + blink::WebGestureEvent gesture_event = MakeWebGestureEventFromUIEvent(gesture); POINT client_point = gesture.location().ToPOINT(); @@ -272,17 +272,17 @@ WebKit::WebGestureEvent CreateWebGestureEvent(HWND hwnd, return gesture_event; } -WebKit::WebGestureEvent CreateFlingCancelEvent(double time_stamp) { - WebKit::WebGestureEvent gesture_event; +blink::WebGestureEvent CreateFlingCancelEvent(double time_stamp) { + blink::WebGestureEvent gesture_event; gesture_event.timeStampSeconds = time_stamp; - gesture_event.type = WebKit::WebGestureEvent::GestureFlingCancel; - gesture_event.sourceDevice = WebKit::WebGestureEvent::Touchscreen; + gesture_event.type = blink::WebGestureEvent::GestureFlingCancel; + gesture_event.sourceDevice = blink::WebGestureEvent::Touchscreen; return gesture_event; } class TouchEventFromWebTouchPoint : public ui::TouchEvent { public: - TouchEventFromWebTouchPoint(const WebKit::WebTouchPoint& touch_point, + TouchEventFromWebTouchPoint(const blink::WebTouchPoint& touch_point, base::TimeDelta& timestamp) : ui::TouchEvent(ConvertToUIEvent(touch_point.state), touch_point.position, @@ -307,7 +307,7 @@ bool ShouldSendPinchGesture() { } void GetScreenInfoForWindow(gfx::NativeViewId id, - WebKit::WebScreenInfo* results) { + blink::WebScreenInfo* results) { HWND window = gfx::NativeViewFromId(id); HMONITOR monitor = MonitorFromWindow(window, MONITOR_DEFAULTTOPRIMARY); @@ -322,7 +322,7 @@ void GetScreenInfoForWindow(gfx::NativeViewId id, dev_mode.dmDriverExtra = 0; EnumDisplaySettings(monitor_info.szDevice, ENUM_CURRENT_SETTINGS, &dev_mode); - WebKit::WebScreenInfo screen_info; + blink::WebScreenInfo screen_info; screen_info.depth = dev_mode.dmBitsPerPel; screen_info.depthPerComponent = 8; screen_info.deviceScaleFactor = gfx::win::GetDeviceScaleFactor(); @@ -351,18 +351,18 @@ class WebTouchState { bool ReleaseTouchPoints(); // The contained WebTouchEvent. - const WebKit::WebTouchEvent& touch_event() { return touch_event_; } + const blink::WebTouchEvent& touch_event() { return touch_event_; } // Returns if any touches are modified in the event. bool is_changed() { return touch_event_.changedTouchesLength != 0; } private: // Adds a touch point or returns NULL if there's not enough space. - WebKit::WebTouchPoint* AddTouchPoint(TOUCHINPUT* touch_input); + blink::WebTouchPoint* AddTouchPoint(TOUCHINPUT* touch_input); // Copy details from a TOUCHINPUT to an existing WebTouchPoint, returning // true if the resulting point is a stationary move. - bool UpdateTouchPoint(WebKit::WebTouchPoint* touch_point, + bool UpdateTouchPoint(blink::WebTouchPoint* touch_point, TOUCHINPUT* touch_input); // Find (or create) a mapping for _os_touch_id_. @@ -371,7 +371,7 @@ class WebTouchState { // Remove any mappings that are no longer in use. void RemoveExpiredMappings(); - WebKit::WebTouchEvent touch_event_; + blink::WebTouchEvent touch_event_; const RenderWidgetHostViewWin* const window_; ui::SequentialIDGenerator id_generator_; @@ -595,7 +595,7 @@ void RenderWidgetHostViewWin::CleanupCompositorWindow() { bool RenderWidgetHostViewWin::IsActivatable() const { // Popups should not be activated. - return popup_type_ == WebKit::WebPopupTypeNone; + return popup_type_ == blink::WebPopupTypeNone; } void RenderWidgetHostViewWin::Focus() { @@ -962,9 +962,9 @@ void RenderWidgetHostViewWin::DispatchCancelTouchEvent( !render_widget_host_->ShouldForwardTouchEvent()) { return; } - DCHECK(event->type() == WebKit::WebInputEvent::TouchCancel); - WebKit::WebTouchEvent cancel_event; - cancel_event.type = WebKit::WebInputEvent::TouchCancel; + DCHECK(event->type() == blink::WebInputEvent::TouchCancel); + blink::WebTouchEvent cancel_event; + cancel_event.type = blink::WebInputEvent::TouchCancel; cancel_event.timeStampSeconds = event->time_stamp().InSecondsF(); render_widget_host_->ForwardTouchEventWithLatencyInfo( cancel_event, *event->latency()); @@ -987,12 +987,12 @@ void RenderWidgetHostViewWin::SetCompositionText( if (!render_widget_host_) return; // ui::CompositionUnderline should be identical to - // WebKit::WebCompositionUnderline, so that we can do reinterpret_cast safely. + // blink::WebCompositionUnderline, so that we can do reinterpret_cast safely. COMPILE_ASSERT(sizeof(ui::CompositionUnderline) == - sizeof(WebKit::WebCompositionUnderline), + sizeof(blink::WebCompositionUnderline), ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff); - const std::vector<WebKit::WebCompositionUnderline>& underlines = - reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( + const std::vector<blink::WebCompositionUnderline>& underlines = + reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>( composition.underlines); render_widget_host_->ImeSetComposition(composition.text, underlines, composition.selection.end(), @@ -1664,9 +1664,9 @@ LRESULT RenderWidgetHostViewWin::OnImeComposition( imm32_manager_->UpdateImeWindow(m_hWnd); // ui::CompositionUnderline should be identical to - // WebKit::WebCompositionUnderline, so that we can do reinterpret_cast safely. + // blink::WebCompositionUnderline, so that we can do reinterpret_cast safely. COMPILE_ASSERT(sizeof(ui::CompositionUnderline) == - sizeof(WebKit::WebCompositionUnderline), + sizeof(blink::WebCompositionUnderline), ui_CompositionUnderline__WebKit_WebCompositionUnderline_diff); // Retrieve the result string and its attributes of the ongoing composition @@ -1690,8 +1690,8 @@ LRESULT RenderWidgetHostViewWin::OnImeComposition( // TODO(suzhe): convert both renderer_host and renderer to use // ui::CompositionText. - const std::vector<WebKit::WebCompositionUnderline>& underlines = - reinterpret_cast<const std::vector<WebKit::WebCompositionUnderline>&>( + const std::vector<blink::WebCompositionUnderline>& underlines = + reinterpret_cast<const std::vector<blink::WebCompositionUnderline>&>( composition.underlines); render_widget_host_->ImeSetComposition( composition.text, underlines, @@ -1928,8 +1928,8 @@ LRESULT RenderWidgetHostViewWin::OnKeyEvent(UINT message, WPARAM wparam, if (ui::IMM32Manager::IsCtrlShiftPressed(&dir)) { render_widget_host_->UpdateTextDirection( dir == base::i18n::RIGHT_TO_LEFT ? - WebKit::WebTextDirectionRightToLeft : - WebKit::WebTextDirectionLeftToRight); + blink::WebTextDirectionRightToLeft : + blink::WebTextDirectionLeftToRight); } } else if (wparam != VK_CONTROL) { // Bug 9762: http://crbug.com/9762 A user pressed a key except shift @@ -2006,7 +2006,7 @@ LRESULT RenderWidgetHostViewWin::OnWheelEvent(UINT message, WPARAM wparam, } if (render_widget_host_) { - WebKit::WebMouseWheelEvent wheel_event = + blink::WebMouseWheelEvent wheel_event = WebMouseWheelEventBuilder::Build(m_hWnd, message, wparam, lparam); float scale = gfx::win::GetDeviceScaleFactor(); wheel_event.x /= scale; @@ -2032,14 +2032,14 @@ size_t WebTouchState::UpdateTouchPoints( // and alter/add any touchpoints (from the touch input buffer) that we can // coalesce into a single message. The return value is the number of consumed // input message. - WebKit::WebTouchPoint* point = touch_event_.touches; - WebKit::WebTouchPoint* end = point + touch_event_.touchesLength; + blink::WebTouchPoint* point = touch_event_.touches; + blink::WebTouchPoint* end = point + touch_event_.touchesLength; while (point < end) { - if (point->state == WebKit::WebTouchPoint::StateReleased) { + if (point->state == blink::WebTouchPoint::StateReleased) { *point = *(--end); --touch_event_.touchesLength; } else { - point->state = WebKit::WebTouchPoint::StateStationary; + point->state = blink::WebTouchPoint::StateStationary; point++; } } @@ -2052,7 +2052,7 @@ size_t WebTouchState::UpdateTouchPoints( for (size_t i = 0; i < count; ++i) { unsigned int mapped_id = GetMappedTouch(points[i].dwID); - WebKit::WebTouchPoint* point = NULL; + blink::WebTouchPoint* point = NULL; for (unsigned j = 0; j < touch_event_.touchesLength; ++j) { if (static_cast<DWORD>(touch_event_.touches[j].id) == mapped_id) { point = &touch_event_.touches[j]; @@ -2076,26 +2076,26 @@ size_t WebTouchState::UpdateTouchPoints( case TOUCHEVENTF_DOWN: { if (!(point = AddTouchPoint(&points[i]))) continue; - touch_event_.type = WebKit::WebInputEvent::TouchStart; + touch_event_.type = blink::WebInputEvent::TouchStart; break; } case TOUCHEVENTF_UP: { if (!point) // Just throw away a stray up. continue; - point->state = WebKit::WebTouchPoint::StateReleased; + point->state = blink::WebTouchPoint::StateReleased; UpdateTouchPoint(point, &points[i]); - touch_event_.type = WebKit::WebInputEvent::TouchEnd; + touch_event_.type = blink::WebInputEvent::TouchEnd; break; } case TOUCHEVENTF_MOVE: { if (point) { - point->state = WebKit::WebTouchPoint::StateMoved; + point->state = blink::WebTouchPoint::StateMoved; // Don't update the message if the point didn't really move. if (UpdateTouchPoint(point, &points[i])) continue; - touch_event_.type = WebKit::WebInputEvent::TouchMove; + touch_event_.type = blink::WebInputEvent::TouchMove; } else if (touch_event_.changedTouchesLength) { RemoveExpiredMappings(); // Can't add a point if we're already handling move events. @@ -2106,7 +2106,7 @@ size_t WebTouchState::UpdateTouchPoints( continue; last_type = TOUCHEVENTF_DOWN; SetTouchType(&points[i], TOUCHEVENTF_DOWN); - touch_event_.type = WebKit::WebInputEvent::TouchStart; + touch_event_.type = blink::WebInputEvent::TouchStart; } break; } @@ -2123,10 +2123,10 @@ size_t WebTouchState::UpdateTouchPoints( } void WebTouchState::RemoveExpiredMappings() { - WebKit::WebTouchPoint* point = touch_event_.touches; - WebKit::WebTouchPoint* end = point + touch_event_.touchesLength; + blink::WebTouchPoint* point = touch_event_.touches; + blink::WebTouchPoint* end = point + touch_event_.touchesLength; for (; point < end; ++point) { - if (point->state == WebKit::WebTouchPoint::StateReleased) + if (point->state == blink::WebTouchPoint::StateReleased) id_generator_.ReleaseGeneratedID(point->id); } } @@ -2136,34 +2136,34 @@ bool WebTouchState::ReleaseTouchPoints() { if (touch_event_.touchesLength == 0) return false; // Mark every active touchpoint as released. - touch_event_.type = WebKit::WebInputEvent::TouchEnd; + touch_event_.type = blink::WebInputEvent::TouchEnd; touch_event_.changedTouchesLength = touch_event_.touchesLength; for (unsigned int i = 0; i < touch_event_.touchesLength; ++i) { - touch_event_.touches[i].state = WebKit::WebTouchPoint::StateReleased; + touch_event_.touches[i].state = blink::WebTouchPoint::StateReleased; touch_event_.changedTouches[i].state = - WebKit::WebTouchPoint::StateReleased; + blink::WebTouchPoint::StateReleased; } return true; } -WebKit::WebTouchPoint* WebTouchState::AddTouchPoint( +blink::WebTouchPoint* WebTouchState::AddTouchPoint( TOUCHINPUT* touch_input) { DCHECK(touch_event_.touchesLength < - WebKit::WebTouchEvent::touchesLengthCap); + blink::WebTouchEvent::touchesLengthCap); if (touch_event_.touchesLength >= - WebKit::WebTouchEvent::touchesLengthCap) + blink::WebTouchEvent::touchesLengthCap) return NULL; - WebKit::WebTouchPoint* point = + blink::WebTouchPoint* point = &touch_event_.touches[touch_event_.touchesLength++]; - point->state = WebKit::WebTouchPoint::StatePressed; + point->state = blink::WebTouchPoint::StatePressed; point->id = GetMappedTouch(touch_input->dwID); UpdateTouchPoint(point, touch_input); return point; } bool WebTouchState::UpdateTouchPoint( - WebKit::WebTouchPoint* touch_point, + blink::WebTouchPoint* touch_point, TOUCHINPUT* touch_input) { CPoint coordinates( TOUCH_COORD_TO_PIXEL(touch_input->x) / @@ -2188,7 +2188,7 @@ bool WebTouchState::UpdateTouchPoint( touch_point->screenPosition.y == coordinates.y && touch_point->radiusX == radius_x && touch_point->radiusY == radius_y) { - touch_point->state = WebKit::WebTouchPoint::StateStationary; + touch_point->state = blink::WebTouchPoint::StateStationary; return true; } @@ -2223,8 +2223,8 @@ LRESULT RenderWidgetHostViewWin::OnTouchEvent(UINT message, WPARAM wparam, // TODO(jschuh): Add support for an arbitrary number of touchpoints. size_t total = std::min(static_cast<int>(LOWORD(wparam)), - static_cast<int>(WebKit::WebTouchEvent::touchesLengthCap)); - TOUCHINPUT points[WebKit::WebTouchEvent::touchesLengthCap]; + static_cast<int>(blink::WebTouchEvent::touchesLengthCap)); + TOUCHINPUT points[blink::WebTouchEvent::touchesLengthCap]; if (!total || !ui::GetTouchInputInfoWrapper((HTOUCHINPUT)lparam, total, points, sizeof(TOUCHINPUT))) { @@ -2252,7 +2252,7 @@ LRESULT RenderWidgetHostViewWin::OnTouchEvent(UINT message, WPARAM wparam, render_widget_host_->ForwardTouchEventWithLatencyInfo( touch_state_->touch_event(), ui::LatencyInfo()); } else { - const WebKit::WebTouchEvent& touch_event = touch_state_->touch_event(); + const blink::WebTouchEvent& touch_event = touch_state_->touch_event(); base::TimeDelta timestamp = base::TimeDelta::FromMilliseconds( touch_event.timeStampSeconds * 1000); for (size_t i = 0; i < touch_event.touchesLength; ++i) { @@ -2483,7 +2483,7 @@ void RenderWidgetHostViewWin::AcceleratedPaint(HDC dc) { accelerated_surface_->Present(dc); } -void RenderWidgetHostViewWin::GetScreenInfo(WebKit::WebScreenInfo* results) { +void RenderWidgetHostViewWin::GetScreenInfo(blink::WebScreenInfo* results) { GetScreenInfoForWindow(GetNativeViewId(), results); } @@ -2875,10 +2875,10 @@ bool RenderWidgetHostViewWin::ForwardGestureEventToRenderer( return true; } - WebKit::WebGestureEvent web_gesture = CreateWebGestureEvent(m_hWnd, *gesture); - if (web_gesture.type == WebKit::WebGestureEvent::Undefined) + blink::WebGestureEvent web_gesture = CreateWebGestureEvent(m_hWnd, *gesture); + if (web_gesture.type == blink::WebGestureEvent::Undefined) return false; - if (web_gesture.type == WebKit::WebGestureEvent::GestureTapDown) { + if (web_gesture.type == blink::WebGestureEvent::GestureTapDown) { render_widget_host_->ForwardGestureEvent( CreateFlingCancelEvent(gesture->time_stamp().InSecondsF())); } @@ -3204,7 +3204,7 @@ RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( // static void RenderWidgetHostViewPort::GetDefaultScreenInfo( - WebKit::WebScreenInfo* results) { + blink::WebScreenInfo* results) { GetScreenInfoForWindow(0, results); } diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h index fc48414..d6540b3 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.h +++ b/content/browser/renderer_host/render_widget_host_view_win.h @@ -49,7 +49,7 @@ class IMM32Manager; class ViewProp; } -namespace WebKit { +namespace blink { struct WebScreenInfo; } @@ -221,7 +221,7 @@ class RenderWidgetHostViewWin bool has_horizontal_scrollbar) OVERRIDE; virtual void SetScrollOffsetPinning( bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; + virtual void GetScreenInfo(blink::WebScreenInfo* results) OVERRIDE; virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE; virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE; virtual void ResizeCompositingSurface(const gfx::Size&) OVERRIDE; diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc index d89f353..3100326 100644 --- a/content/browser/renderer_host/test_render_view_host.cc +++ b/content/browser/renderer_host/test_render_view_host.cc @@ -370,7 +370,7 @@ void TestRenderViewHost::SimulateWasShown() { void TestRenderViewHost::TestOnStartDragging( const DropData& drop_data) { - WebKit::WebDragOperationsMask drag_operation = WebKit::WebDragOperationEvery; + blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery; DragEventSourceInfo event_info; OnStartDragging(drop_data, drag_operation, SkBitmap(), gfx::Vector2d(), event_info); diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index 5abed25..71cb18d 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -153,7 +153,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { #elif 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 SetHasHorizontalScrollbar( bool has_horizontal_scrollbar) OVERRIDE { } diff --git a/content/browser/renderer_host/ui_events_helper.cc b/content/browser/renderer_host/ui_events_helper.cc index d1fbcfa..1dc312d 100644 --- a/content/browser/renderer_host/ui_events_helper.cc +++ b/content/browser/renderer_host/ui_events_helper.cc @@ -13,39 +13,39 @@ namespace { int WebModifiersToUIFlags(int modifiers) { int flags = ui::EF_NONE; - if (modifiers & WebKit::WebInputEvent::ShiftKey) + if (modifiers & blink::WebInputEvent::ShiftKey) flags |= ui::EF_SHIFT_DOWN; - if (modifiers & WebKit::WebInputEvent::ControlKey) + if (modifiers & blink::WebInputEvent::ControlKey) flags |= ui::EF_CONTROL_DOWN; - if (modifiers & WebKit::WebInputEvent::AltKey) + if (modifiers & blink::WebInputEvent::AltKey) flags |= ui::EF_ALT_DOWN; - if (modifiers & WebKit::WebInputEvent::LeftButtonDown) + if (modifiers & blink::WebInputEvent::LeftButtonDown) flags |= ui::EF_LEFT_MOUSE_BUTTON; - if (modifiers & WebKit::WebInputEvent::RightButtonDown) + if (modifiers & blink::WebInputEvent::RightButtonDown) flags |= ui::EF_RIGHT_MOUSE_BUTTON; - if (modifiers & WebKit::WebInputEvent::MiddleButtonDown) + if (modifiers & blink::WebInputEvent::MiddleButtonDown) flags |= ui::EF_MIDDLE_MOUSE_BUTTON; - if (modifiers & WebKit::WebInputEvent::CapsLockOn) + if (modifiers & blink::WebInputEvent::CapsLockOn) flags |= ui::EF_CAPS_LOCK_DOWN; return flags; } ui::EventType WebTouchPointStateToEventType( - WebKit::WebTouchPoint::State state) { + blink::WebTouchPoint::State state) { switch (state) { - case WebKit::WebTouchPoint::StateReleased: + case blink::WebTouchPoint::StateReleased: return ui::ET_TOUCH_RELEASED; - case WebKit::WebTouchPoint::StatePressed: + case blink::WebTouchPoint::StatePressed: return ui::ET_TOUCH_PRESSED; - case WebKit::WebTouchPoint::StateMoved: + case blink::WebTouchPoint::StateMoved: return ui::ET_TOUCH_MOVED; - case WebKit::WebTouchPoint::StateCancelled: + case blink::WebTouchPoint::StateCancelled: return ui::ET_TOUCH_CANCELLED; default: @@ -53,35 +53,35 @@ ui::EventType WebTouchPointStateToEventType( } } -WebKit::WebTouchPoint::State TouchPointStateFromEvent( +blink::WebTouchPoint::State TouchPointStateFromEvent( const ui::TouchEvent& event) { switch (event.type()) { case ui::ET_TOUCH_PRESSED: - return WebKit::WebTouchPoint::StatePressed; + return blink::WebTouchPoint::StatePressed; case ui::ET_TOUCH_RELEASED: - return WebKit::WebTouchPoint::StateReleased; + return blink::WebTouchPoint::StateReleased; case ui::ET_TOUCH_MOVED: - return WebKit::WebTouchPoint::StateMoved; + return blink::WebTouchPoint::StateMoved; case ui::ET_TOUCH_CANCELLED: - return WebKit::WebTouchPoint::StateCancelled; + return blink::WebTouchPoint::StateCancelled; default: - return WebKit::WebTouchPoint::StateUndefined; + return blink::WebTouchPoint::StateUndefined; } } -WebKit::WebInputEvent::Type TouchEventTypeFromEvent( +blink::WebInputEvent::Type TouchEventTypeFromEvent( const ui::TouchEvent& event) { switch (event.type()) { case ui::ET_TOUCH_PRESSED: - return WebKit::WebInputEvent::TouchStart; + return blink::WebInputEvent::TouchStart; case ui::ET_TOUCH_RELEASED: - return WebKit::WebInputEvent::TouchEnd; + return blink::WebInputEvent::TouchEnd; case ui::ET_TOUCH_MOVED: - return WebKit::WebInputEvent::TouchMove; + return blink::WebInputEvent::TouchMove; case ui::ET_TOUCH_CANCELLED: - return WebKit::WebInputEvent::TouchCancel; + return blink::WebInputEvent::TouchCancel; default: - return WebKit::WebInputEvent::Undefined; + return blink::WebInputEvent::Undefined; } } @@ -93,19 +93,19 @@ bool MakeUITouchEventsFromWebTouchEvents( const TouchEventWithLatencyInfo& touch_with_latency, ScopedVector<ui::TouchEvent>* list, TouchEventCoordinateSystem coordinate_system) { - const WebKit::WebTouchEvent& touch = touch_with_latency.event; + const blink::WebTouchEvent& touch = touch_with_latency.event; ui::EventType type = ui::ET_UNKNOWN; switch (touch.type) { - case WebKit::WebInputEvent::TouchStart: + case blink::WebInputEvent::TouchStart: type = ui::ET_TOUCH_PRESSED; break; - case WebKit::WebInputEvent::TouchEnd: + case blink::WebInputEvent::TouchEnd: type = ui::ET_TOUCH_RELEASED; break; - case WebKit::WebInputEvent::TouchMove: + case blink::WebInputEvent::TouchMove: type = ui::ET_TOUCH_MOVED; break; - case WebKit::WebInputEvent::TouchCancel: + case blink::WebInputEvent::TouchCancel: type = ui::ET_TOUCH_CANCELLED; break; default: @@ -117,7 +117,7 @@ bool MakeUITouchEventsFromWebTouchEvents( base::TimeDelta timestamp = base::TimeDelta::FromMicroseconds( static_cast<int64>(touch.timeStampSeconds * 1000000)); for (unsigned i = 0; i < touch.touchesLength; ++i) { - const WebKit::WebTouchPoint& point = touch.touches[i]; + const blink::WebTouchPoint& point = touch.touches[i]; if (WebTouchPointStateToEventType(point.state) != type) continue; // In aura, the touch-event needs to be in the screen coordinate, since the @@ -148,79 +148,79 @@ bool MakeUITouchEventsFromWebTouchEvents( return true; } -WebKit::WebGestureEvent MakeWebGestureEventFromUIEvent( +blink::WebGestureEvent MakeWebGestureEventFromUIEvent( const ui::GestureEvent& event) { - WebKit::WebGestureEvent gesture_event; + blink::WebGestureEvent gesture_event; switch (event.type()) { case ui::ET_GESTURE_TAP: - gesture_event.type = WebKit::WebInputEvent::GestureTap; + gesture_event.type = blink::WebInputEvent::GestureTap; gesture_event.data.tap.tapCount = event.details().tap_count(); gesture_event.data.tap.width = event.details().bounding_box().width(); gesture_event.data.tap.height = event.details().bounding_box().height(); break; case ui::ET_GESTURE_TAP_DOWN: - gesture_event.type = WebKit::WebInputEvent::GestureTapDown; + gesture_event.type = blink::WebInputEvent::GestureTapDown; gesture_event.data.tapDown.width = event.details().bounding_box().width(); gesture_event.data.tapDown.height = event.details().bounding_box().height(); break; case ui::ET_GESTURE_SHOW_PRESS: - gesture_event.type = WebKit::WebInputEvent::GestureShowPress; + gesture_event.type = blink::WebInputEvent::GestureShowPress; gesture_event.data.showPress.width = event.details().bounding_box().width(); gesture_event.data.showPress.height = event.details().bounding_box().height(); break; case ui::ET_GESTURE_TAP_CANCEL: - gesture_event.type = WebKit::WebInputEvent::GestureTapCancel; + gesture_event.type = blink::WebInputEvent::GestureTapCancel; break; case ui::ET_GESTURE_SCROLL_BEGIN: - gesture_event.type = WebKit::WebInputEvent::GestureScrollBegin; + gesture_event.type = blink::WebInputEvent::GestureScrollBegin; break; case ui::ET_GESTURE_SCROLL_UPDATE: - gesture_event.type = WebKit::WebInputEvent::GestureScrollUpdate; + gesture_event.type = blink::WebInputEvent::GestureScrollUpdate; gesture_event.data.scrollUpdate.deltaX = event.details().scroll_x(); gesture_event.data.scrollUpdate.deltaY = event.details().scroll_y(); break; case ui::ET_GESTURE_SCROLL_END: - gesture_event.type = WebKit::WebInputEvent::GestureScrollEnd; + gesture_event.type = blink::WebInputEvent::GestureScrollEnd; break; case ui::ET_GESTURE_PINCH_BEGIN: - gesture_event.type = WebKit::WebInputEvent::GesturePinchBegin; + gesture_event.type = blink::WebInputEvent::GesturePinchBegin; break; case ui::ET_GESTURE_PINCH_UPDATE: - gesture_event.type = WebKit::WebInputEvent::GesturePinchUpdate; + gesture_event.type = blink::WebInputEvent::GesturePinchUpdate; gesture_event.data.pinchUpdate.scale = event.details().scale(); break; case ui::ET_GESTURE_PINCH_END: - gesture_event.type = WebKit::WebInputEvent::GesturePinchEnd; + gesture_event.type = blink::WebInputEvent::GesturePinchEnd; break; case ui::ET_SCROLL_FLING_START: - gesture_event.type = WebKit::WebInputEvent::GestureFlingStart; + gesture_event.type = blink::WebInputEvent::GestureFlingStart; gesture_event.data.flingStart.velocityX = event.details().velocity_x(); gesture_event.data.flingStart.velocityY = event.details().velocity_y(); break; case ui::ET_SCROLL_FLING_CANCEL: - gesture_event.type = WebKit::WebInputEvent::GestureFlingCancel; + gesture_event.type = blink::WebInputEvent::GestureFlingCancel; break; case ui::ET_GESTURE_LONG_PRESS: - gesture_event.type = WebKit::WebInputEvent::GestureLongPress; + gesture_event.type = blink::WebInputEvent::GestureLongPress; gesture_event.data.longPress.width = event.details().bounding_box().width(); gesture_event.data.longPress.height = event.details().bounding_box().height(); break; case ui::ET_GESTURE_LONG_TAP: - gesture_event.type = WebKit::WebInputEvent::GestureLongTap; + gesture_event.type = blink::WebInputEvent::GestureLongTap; gesture_event.data.longPress.width = event.details().bounding_box().width(); gesture_event.data.longPress.height = event.details().bounding_box().height(); break; case ui::ET_GESTURE_TWO_FINGER_TAP: - gesture_event.type = WebKit::WebInputEvent::GestureTwoFingerTap; + gesture_event.type = blink::WebInputEvent::GestureTwoFingerTap; gesture_event.data.twoFingerTap.firstFingerWidth = event.details().first_finger_width(); gesture_event.data.twoFingerTap.firstFingerHeight = @@ -229,13 +229,13 @@ WebKit::WebGestureEvent MakeWebGestureEventFromUIEvent( case ui::ET_GESTURE_BEGIN: case ui::ET_GESTURE_END: case ui::ET_GESTURE_MULTIFINGER_SWIPE: - gesture_event.type = WebKit::WebInputEvent::Undefined; + gesture_event.type = blink::WebInputEvent::Undefined; break; default: NOTREACHED() << "Unknown gesture type: " << event.type(); } - gesture_event.sourceDevice = WebKit::WebGestureEvent::Touchscreen; + gesture_event.sourceDevice = blink::WebGestureEvent::Touchscreen; gesture_event.modifiers = EventFlagsToWebEventModifiers(event.flags()); gesture_event.timeStampSeconds = event.time_stamp().InSecondsF(); @@ -246,31 +246,31 @@ int EventFlagsToWebEventModifiers(int flags) { int modifiers = 0; if (flags & ui::EF_SHIFT_DOWN) - modifiers |= WebKit::WebInputEvent::ShiftKey; + modifiers |= blink::WebInputEvent::ShiftKey; if (flags & ui::EF_CONTROL_DOWN) - modifiers |= WebKit::WebInputEvent::ControlKey; + modifiers |= blink::WebInputEvent::ControlKey; if (flags & ui::EF_ALT_DOWN) - modifiers |= WebKit::WebInputEvent::AltKey; + modifiers |= blink::WebInputEvent::AltKey; // TODO(beng): MetaKey/META_MASK if (flags & ui::EF_LEFT_MOUSE_BUTTON) - modifiers |= WebKit::WebInputEvent::LeftButtonDown; + modifiers |= blink::WebInputEvent::LeftButtonDown; if (flags & ui::EF_MIDDLE_MOUSE_BUTTON) - modifiers |= WebKit::WebInputEvent::MiddleButtonDown; + modifiers |= blink::WebInputEvent::MiddleButtonDown; if (flags & ui::EF_RIGHT_MOUSE_BUTTON) - modifiers |= WebKit::WebInputEvent::RightButtonDown; + modifiers |= blink::WebInputEvent::RightButtonDown; if (flags & ui::EF_CAPS_LOCK_DOWN) - modifiers |= WebKit::WebInputEvent::CapsLockOn; + modifiers |= blink::WebInputEvent::CapsLockOn; return modifiers; } -WebKit::WebTouchPoint* UpdateWebTouchEventFromUIEvent( +blink::WebTouchPoint* UpdateWebTouchEventFromUIEvent( const ui::TouchEvent& event, - WebKit::WebTouchEvent* web_event) { - WebKit::WebTouchPoint* point = NULL; + blink::WebTouchEvent* web_event) { + blink::WebTouchPoint* point = NULL; switch (event.type()) { case ui::ET_TOUCH_PRESSED: // Add a new touch point. - if (web_event->touchesLength < WebKit::WebTouchEvent::touchesLengthCap) { + if (web_event->touchesLength < blink::WebTouchEvent::touchesLengthCap) { point = &web_event->touches[web_event->touchesLength++]; point->id = event.touch_id(); } @@ -306,7 +306,7 @@ WebKit::WebTouchPoint* UpdateWebTouchEventFromUIEvent( // Update the location and state of the point. point->state = TouchPointStateFromEvent(event); - if (point->state == WebKit::WebTouchPoint::StateMoved) { + if (point->state == blink::WebTouchPoint::StateMoved) { // It is possible for badly written touch drivers to emit Move events even // when the touch location hasn't changed. In such cases, consume the event // and pretend nothing happened. @@ -322,9 +322,9 @@ WebKit::WebTouchPoint* UpdateWebTouchEventFromUIEvent( // Mark the rest of the points as stationary. for (unsigned i = 0; i < web_event->touchesLength; ++i) { - WebKit::WebTouchPoint* iter = web_event->touches + i; + blink::WebTouchPoint* iter = web_event->touches + i; if (iter != point) - iter->state = WebKit::WebTouchPoint::StateStationary; + iter->state = blink::WebTouchPoint::StateStationary; } // Update the type of the touch event. diff --git a/content/browser/renderer_host/ui_events_helper.h b/content/browser/renderer_host/ui_events_helper.h index 734a314..51fd46f 100644 --- a/content/browser/renderer_host/ui_events_helper.h +++ b/content/browser/renderer_host/ui_events_helper.h @@ -9,7 +9,7 @@ #include "content/common/content_export.h" #include "content/port/browser/event_with_latency_info.h" -namespace WebKit { +namespace blink { class WebGestureEvent; class WebTouchEvent; class WebTouchPoint; @@ -41,7 +41,7 @@ CONTENT_EXPORT bool MakeUITouchEventsFromWebTouchEvents( // Creates a WebGestureEvent from a ui::GestureEvent. Note that it does not // populate the event coordinates (i.e. |x|, |y|, |globalX|, and |globalY|). So // the caller must populate these fields. -WebKit::WebGestureEvent MakeWebGestureEventFromUIEvent( +blink::WebGestureEvent MakeWebGestureEventFromUIEvent( const ui::GestureEvent& event); int EventFlagsToWebEventModifiers(int flags); @@ -49,9 +49,9 @@ int EventFlagsToWebEventModifiers(int flags); // Updates the WebTouchEvent based on the TouchEvent. It returns the updated // WebTouchPoint contained in the WebTouchEvent, or NULL if no point was // updated. -WebKit::WebTouchPoint* UpdateWebTouchEventFromUIEvent( +blink::WebTouchPoint* UpdateWebTouchEventFromUIEvent( const ui::TouchEvent& event, - WebKit::WebTouchEvent* web_event); + blink::WebTouchEvent* web_event); } #endif // CONTENT_BROWSER_RENDERER_HOST_UI_EVENTS_HELPER_H_ diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc index 6bb5e58..5127c07 100644 --- a/content/browser/renderer_host/web_input_event_aura.cc +++ b/content/browser/renderer_host/web_input_event_aura.cc @@ -13,7 +13,7 @@ namespace content { #if defined(USE_X11) || defined(USE_OZONE) // From third_party/WebKit/Source/web/gtk/WebInputEventFactory.cpp: -WebKit::WebUChar GetControlCharacter(int windows_key_code, bool shift) { +blink::WebUChar GetControlCharacter(int windows_key_code, bool shift) { if (windows_key_code >= ui::VKEY_A && windows_key_code <= ui::VKEY_Z) { // ctrl-A ~ ctrl-Z map to \x01 ~ \x1A @@ -58,40 +58,40 @@ WebKit::WebUChar GetControlCharacter(int windows_key_code, bool shift) { } #endif #if defined(OS_WIN) -WebKit::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( +blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( base::NativeEvent native_event); -WebKit::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( +blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( base::NativeEvent native_event); -WebKit::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( +blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( base::NativeEvent native_event); -WebKit::WebGestureEvent MakeWebGestureEventFromNativeEvent( +blink::WebGestureEvent MakeWebGestureEventFromNativeEvent( base::NativeEvent native_event); #elif defined(USE_X11) -WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( +blink::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( ui::KeyEvent* event); #elif defined(USE_OZONE) -WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( +blink::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( ui::KeyEvent* event) { base::NativeEvent native_event = event->native_event(); ui::EventType type = ui::EventTypeFromNative(native_event); - WebKit::WebKeyboardEvent webkit_event; + blink::WebKeyboardEvent webkit_event; webkit_event.timeStampSeconds = event->time_stamp().InSecondsF(); webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); switch (type) { case ui::ET_KEY_PRESSED: - webkit_event.type = event->is_char() ? WebKit::WebInputEvent::Char : - WebKit::WebInputEvent::RawKeyDown; + webkit_event.type = event->is_char() ? blink::WebInputEvent::Char : + blink::WebInputEvent::RawKeyDown; break; case ui::ET_KEY_RELEASED: - webkit_event.type = WebKit::WebInputEvent::KeyUp; + webkit_event.type = blink::WebInputEvent::KeyUp; break; default: NOTREACHED(); } - if (webkit_event.modifiers & WebKit::WebInputEvent::AltKey) + if (webkit_event.modifiers & blink::WebInputEvent::AltKey) webkit_event.isSystemKey = true; wchar_t character = ui::KeyboardCodeFromNative(native_event); @@ -103,11 +103,11 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( else webkit_event.unmodifiedText[0] = character; - if (webkit_event.modifiers & WebKit::WebInputEvent::ControlKey) { + if (webkit_event.modifiers & blink::WebInputEvent::ControlKey) { webkit_event.text[0] = GetControlCharacter( webkit_event.windowsKeyCode, - webkit_event.modifiers & WebKit::WebInputEvent::ShiftKey); + webkit_event.modifiers & blink::WebInputEvent::ShiftKey); } else { webkit_event.text[0] = webkit_event.unmodifiedText[0]; } @@ -118,12 +118,12 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( } #endif #if defined(USE_X11) || defined(USE_OZONE) -WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( +blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( ui::ScrollEvent* event) { - WebKit::WebMouseWheelEvent webkit_event; + blink::WebMouseWheelEvent webkit_event; - webkit_event.type = WebKit::WebInputEvent::MouseWheel; - webkit_event.button = WebKit::WebMouseEvent::ButtonNone; + webkit_event.type = blink::WebInputEvent::MouseWheel; + webkit_event.button = blink::WebMouseEvent::ButtonNone; webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); webkit_event.timeStampSeconds = event->time_stamp().InSecondsF(); webkit_event.hasPreciseScrollingDeltas = true; @@ -142,18 +142,18 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( return webkit_event; } -WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( +blink::WebGestureEvent MakeWebGestureEventFromAuraEvent( ui::ScrollEvent* event) { - WebKit::WebGestureEvent webkit_event; + blink::WebGestureEvent webkit_event; switch (event->type()) { case ui::ET_SCROLL_FLING_START: - webkit_event.type = WebKit::WebInputEvent::GestureFlingStart; + webkit_event.type = blink::WebInputEvent::GestureFlingStart; webkit_event.data.flingStart.velocityX = event->x_offset(); webkit_event.data.flingStart.velocityY = event->y_offset(); break; case ui::ET_SCROLL_FLING_CANCEL: - webkit_event.type = WebKit::WebInputEvent::GestureFlingCancel; + webkit_event.type = blink::WebInputEvent::GestureFlingCancel; break; case ui::ET_SCROLL: NOTREACHED() << "Invalid gesture type: " << event->type(); @@ -162,7 +162,7 @@ WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( NOTREACHED() << "Unknown gesture type: " << event->type(); } - webkit_event.sourceDevice = WebKit::WebGestureEvent::Touchpad; + webkit_event.sourceDevice = blink::WebGestureEvent::Touchpad; webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); webkit_event.timeStampSeconds = event->time_stamp().InSecondsF(); return webkit_event; @@ -170,9 +170,9 @@ WebKit::WebGestureEvent MakeWebGestureEventFromAuraEvent( #endif -WebKit::WebMouseEvent MakeWebMouseEventFromAuraEvent( +blink::WebMouseEvent MakeWebMouseEventFromAuraEvent( ui::MouseEvent* event); -WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( +blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( ui::MouseWheelEvent* event); // General approach: @@ -187,7 +187,7 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( // provide coordinates relative to the aura::Window that is hosting the // renderer, not the top level platform window. // -// The approach is to fully construct a WebKit::WebInputEvent from the +// The approach is to fully construct a blink::WebInputEvent from the // ui::Event's base::NativeEvent, and then replace the coordinate fields with // the translated values from the ui::Event. // @@ -198,9 +198,9 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( // ui::MouseEvent. This will not be necessary once only XInput2 is supported. // -WebKit::WebMouseEvent MakeWebMouseEvent(ui::MouseEvent* event) { +blink::WebMouseEvent MakeWebMouseEvent(ui::MouseEvent* event) { // Construct an untranslated event from the platform event data. - WebKit::WebMouseEvent webkit_event = + blink::WebMouseEvent webkit_event = #if defined(OS_WIN) // On Windows we have WM_ events comming from desktop and pure aura // events comming from metro mode. @@ -226,14 +226,14 @@ WebKit::WebMouseEvent MakeWebMouseEvent(ui::MouseEvent* event) { return webkit_event; } -WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::MouseWheelEvent* event) { +blink::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::MouseWheelEvent* event) { #if defined(OS_WIN) // Construct an untranslated event from the platform event data. - WebKit::WebMouseWheelEvent webkit_event = event->native_event().message ? + blink::WebMouseWheelEvent webkit_event = event->native_event().message ? MakeUntranslatedWebMouseWheelEventFromNativeEvent(event->native_event()) : MakeWebMouseWheelEventFromAuraEvent(event); #else - WebKit::WebMouseWheelEvent webkit_event = + blink::WebMouseWheelEvent webkit_event = MakeWebMouseWheelEventFromAuraEvent(event); #endif @@ -249,13 +249,13 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::MouseWheelEvent* event) { return webkit_event; } -WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::ScrollEvent* event) { +blink::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::ScrollEvent* event) { #if defined(OS_WIN) // Construct an untranslated event from the platform event data. - WebKit::WebMouseWheelEvent webkit_event = + blink::WebMouseWheelEvent webkit_event = MakeUntranslatedWebMouseWheelEventFromNativeEvent(event->native_event()); #else - WebKit::WebMouseWheelEvent webkit_event = + blink::WebMouseWheelEvent webkit_event = MakeWebMouseWheelEventFromAuraEvent(event); #endif @@ -271,7 +271,7 @@ WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent(ui::ScrollEvent* event) { return webkit_event; } -WebKit::WebKeyboardEvent MakeWebKeyboardEvent(ui::KeyEvent* event) { +blink::WebKeyboardEvent MakeWebKeyboardEvent(ui::KeyEvent* event) { // Windows can figure out whether or not to construct a RawKeyDown or a Char // WebInputEvent based on the type of message carried in // event->native_event(). X11 is not so fortunate, there is no separate @@ -286,8 +286,8 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEvent(ui::KeyEvent* event) { #endif } -WebKit::WebGestureEvent MakeWebGestureEvent(ui::GestureEvent* event) { - WebKit::WebGestureEvent gesture_event; +blink::WebGestureEvent MakeWebGestureEvent(ui::GestureEvent* event) { + blink::WebGestureEvent gesture_event; #if defined(OS_WIN) if (event->HasNativeEvent()) gesture_event = MakeWebGestureEventFromNativeEvent(event->native_event()); @@ -307,8 +307,8 @@ WebKit::WebGestureEvent MakeWebGestureEvent(ui::GestureEvent* event) { return gesture_event; } -WebKit::WebGestureEvent MakeWebGestureEvent(ui::ScrollEvent* event) { - WebKit::WebGestureEvent gesture_event; +blink::WebGestureEvent MakeWebGestureEvent(ui::ScrollEvent* event) { + blink::WebGestureEvent gesture_event; #if defined(OS_WIN) gesture_event = MakeWebGestureEventFromNativeEvent(event->native_event()); @@ -326,43 +326,43 @@ WebKit::WebGestureEvent MakeWebGestureEvent(ui::ScrollEvent* event) { return gesture_event; } -WebKit::WebGestureEvent MakeWebGestureEventFlingCancel() { - WebKit::WebGestureEvent gesture_event; +blink::WebGestureEvent MakeWebGestureEventFlingCancel() { + blink::WebGestureEvent gesture_event; // All other fields are ignored on a GestureFlingCancel event. - gesture_event.type = WebKit::WebInputEvent::GestureFlingCancel; - gesture_event.sourceDevice = WebKit::WebGestureEvent::Touchpad; + gesture_event.type = blink::WebInputEvent::GestureFlingCancel; + gesture_event.sourceDevice = blink::WebGestureEvent::Touchpad; return gesture_event; } -WebKit::WebMouseEvent MakeWebMouseEventFromAuraEvent(ui::MouseEvent* event) { - WebKit::WebMouseEvent webkit_event; +blink::WebMouseEvent MakeWebMouseEventFromAuraEvent(ui::MouseEvent* event) { + blink::WebMouseEvent webkit_event; webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); webkit_event.timeStampSeconds = event->time_stamp().InSecondsF(); - webkit_event.button = WebKit::WebMouseEvent::ButtonNone; + webkit_event.button = blink::WebMouseEvent::ButtonNone; if (event->flags() & ui::EF_LEFT_MOUSE_BUTTON) - webkit_event.button = WebKit::WebMouseEvent::ButtonLeft; + webkit_event.button = blink::WebMouseEvent::ButtonLeft; if (event->flags() & ui::EF_MIDDLE_MOUSE_BUTTON) - webkit_event.button = WebKit::WebMouseEvent::ButtonMiddle; + webkit_event.button = blink::WebMouseEvent::ButtonMiddle; if (event->flags() & ui::EF_RIGHT_MOUSE_BUTTON) - webkit_event.button = WebKit::WebMouseEvent::ButtonRight; + webkit_event.button = blink::WebMouseEvent::ButtonRight; switch (event->type()) { case ui::ET_MOUSE_PRESSED: - webkit_event.type = WebKit::WebInputEvent::MouseDown; + webkit_event.type = blink::WebInputEvent::MouseDown; webkit_event.clickCount = event->GetClickCount(); break; case ui::ET_MOUSE_RELEASED: - webkit_event.type = WebKit::WebInputEvent::MouseUp; + webkit_event.type = blink::WebInputEvent::MouseUp; webkit_event.clickCount = event->GetClickCount(); break; case ui::ET_MOUSE_ENTERED: case ui::ET_MOUSE_EXITED: case ui::ET_MOUSE_MOVED: case ui::ET_MOUSE_DRAGGED: - webkit_event.type = WebKit::WebInputEvent::MouseMove; + webkit_event.type = blink::WebInputEvent::MouseMove; break; default: NOTIMPLEMENTED() << "Received unexpected event: " << event->type(); @@ -372,12 +372,12 @@ WebKit::WebMouseEvent MakeWebMouseEventFromAuraEvent(ui::MouseEvent* event) { return webkit_event; } -WebKit::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( +blink::WebMouseWheelEvent MakeWebMouseWheelEventFromAuraEvent( ui::MouseWheelEvent* event) { - WebKit::WebMouseWheelEvent webkit_event; + blink::WebMouseWheelEvent webkit_event; - webkit_event.type = WebKit::WebInputEvent::MouseWheel; - webkit_event.button = WebKit::WebMouseEvent::ButtonNone; + webkit_event.type = blink::WebInputEvent::MouseWheel; + webkit_event.button = blink::WebMouseEvent::ButtonNone; webkit_event.modifiers = EventFlagsToWebEventModifiers(event->flags()); webkit_event.timeStampSeconds = event->time_stamp().InSecondsF(); webkit_event.deltaX = event->x_offset(); diff --git a/content/browser/renderer_host/web_input_event_aura.h b/content/browser/renderer_host/web_input_event_aura.h index 3c4c894..eeff886 100644 --- a/content/browser/renderer_host/web_input_event_aura.h +++ b/content/browser/renderer_host/web_input_event_aura.h @@ -23,22 +23,22 @@ namespace content { const int kPixelsPerTick = 53; #if defined(USE_X11) || defined(USE_OZONE) -CONTENT_EXPORT WebKit::WebUChar GetControlCharacter( +CONTENT_EXPORT blink::WebUChar GetControlCharacter( int windows_key_code, bool shift); #endif -CONTENT_EXPORT WebKit::WebMouseEvent MakeWebMouseEvent( +CONTENT_EXPORT blink::WebMouseEvent MakeWebMouseEvent( ui::MouseEvent* event); -CONTENT_EXPORT WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent( +CONTENT_EXPORT blink::WebMouseWheelEvent MakeWebMouseWheelEvent( ui::MouseWheelEvent* event); -CONTENT_EXPORT WebKit::WebMouseWheelEvent MakeWebMouseWheelEvent( +CONTENT_EXPORT blink::WebMouseWheelEvent MakeWebMouseWheelEvent( ui::ScrollEvent* event); -CONTENT_EXPORT WebKit::WebKeyboardEvent MakeWebKeyboardEvent( +CONTENT_EXPORT blink::WebKeyboardEvent MakeWebKeyboardEvent( ui::KeyEvent* event); -CONTENT_EXPORT WebKit::WebGestureEvent MakeWebGestureEvent( +CONTENT_EXPORT blink::WebGestureEvent MakeWebGestureEvent( ui::GestureEvent* event); -CONTENT_EXPORT WebKit::WebGestureEvent MakeWebGestureEvent( +CONTENT_EXPORT blink::WebGestureEvent MakeWebGestureEvent( ui::ScrollEvent* event); -CONTENT_EXPORT WebKit::WebGestureEvent MakeWebGestureEventFlingCancel(); +CONTENT_EXPORT blink::WebGestureEvent MakeWebGestureEventFlingCancel(); } // namespace content diff --git a/content/browser/renderer_host/web_input_event_aura_unittest.cc b/content/browser/renderer_host/web_input_event_aura_unittest.cc index 059ebb2..dd82378 100644 --- a/content/browser/renderer_host/web_input_event_aura_unittest.cc +++ b/content/browser/renderer_host/web_input_event_aura_unittest.cc @@ -29,9 +29,9 @@ TEST(WebInputEventAuraTest, TestMakeWebKeyboardEvent) { 0, // X does not set ControlMask for KeyPress. &xev); ui::KeyEvent event(&xev, false /* is_char */); - WebKit::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); + blink::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); // However, modifier bit for Control in |webkit_event| should be set. - EXPECT_EQ(webkit_event.modifiers, WebKit::WebInputEvent::ControlKey); + EXPECT_EQ(webkit_event.modifiers, blink::WebInputEvent::ControlKey); } { // Release Ctrl. @@ -40,7 +40,7 @@ TEST(WebInputEventAuraTest, TestMakeWebKeyboardEvent) { ControlMask, // X sets the mask for KeyRelease. &xev); ui::KeyEvent event(&xev, false /* is_char */); - WebKit::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); + blink::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); // However, modifier bit for Control in |webkit_event| shouldn't be set. EXPECT_EQ(webkit_event.modifiers, 0); } @@ -59,7 +59,7 @@ TEST(WebInputEventAuraTest, TestMakeWebKeyboardEventWindowsKeyCode) { &xev); xev.xkey.keycode = XKeysymToKeycode(gfx::GetXDisplay(), XK_Control_L); ui::KeyEvent event(&xev, false /* is_char */); - WebKit::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); + blink::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); // ui::VKEY_LCONTROL, instead of ui::VKEY_CONTROL, should be filled. EXPECT_EQ(ui::VKEY_LCONTROL, webkit_event.windowsKeyCode); } @@ -71,7 +71,7 @@ TEST(WebInputEventAuraTest, TestMakeWebKeyboardEventWindowsKeyCode) { &xev); xev.xkey.keycode = XKeysymToKeycode(gfx::GetXDisplay(), XK_Control_R); ui::KeyEvent event(&xev, false /* is_char */); - WebKit::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); + blink::WebKeyboardEvent webkit_event = MakeWebKeyboardEvent(&event); // ui::VKEY_RCONTROL, instead of ui::VKEY_CONTROL, should be filled. EXPECT_EQ(ui::VKEY_RCONTROL, webkit_event.windowsKeyCode); } diff --git a/content/browser/renderer_host/web_input_event_aurawin.cc b/content/browser/renderer_host/web_input_event_aurawin.cc index 771b792..06e2dbf 100644 --- a/content/browser/renderer_host/web_input_event_aurawin.cc +++ b/content/browser/renderer_host/web_input_event_aurawin.cc @@ -13,7 +13,7 @@ namespace content { // On Windows, we can just use the builtin WebKit factory methods to fully // construct our pre-translated events. -WebKit::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( +blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( base::NativeEvent native_event) { return WebMouseEventBuilder::Build(native_event.hwnd, native_event.message, @@ -21,7 +21,7 @@ WebKit::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent( native_event.lParam); } -WebKit::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( +blink::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( base::NativeEvent native_event) { return WebMouseWheelEventBuilder::Build(native_event.hwnd, native_event.message, @@ -29,7 +29,7 @@ WebKit::WebMouseWheelEvent MakeUntranslatedWebMouseWheelEventFromNativeEvent( native_event.lParam); } -WebKit::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( +blink::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( base::NativeEvent native_event) { return WebKeyboardEventBuilder::Build(native_event.hwnd, native_event.message, @@ -37,11 +37,11 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEventFromNativeEvent( native_event.lParam); } -WebKit::WebGestureEvent MakeWebGestureEventFromNativeEvent( +blink::WebGestureEvent MakeWebGestureEventFromNativeEvent( base::NativeEvent native_event) { // TODO: Create gestures from native event. NOTIMPLEMENTED(); - return WebKit::WebGestureEvent(); + return blink::WebGestureEvent(); } } // namespace content diff --git a/content/browser/renderer_host/web_input_event_aurax11.cc b/content/browser/renderer_host/web_input_event_aurax11.cc index 76ae55f..6bec493 100644 --- a/content/browser/renderer_host/web_input_event_aurax11.cc +++ b/content/browser/renderer_host/web_input_event_aurax11.cc @@ -89,10 +89,10 @@ int XKeyEventToWindowsKeyCode(XKeyEvent* event) { } // namespace -WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( +blink::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( ui::KeyEvent* event) { base::NativeEvent native_event = event->native_event(); - WebKit::WebKeyboardEvent webkit_event; + blink::WebKeyboardEvent webkit_event; XKeyEvent* native_key_event = &native_event->xkey; webkit_event.timeStampSeconds = event->time_stamp().InSecondsF(); @@ -100,17 +100,17 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( switch (native_event->type) { case KeyPress: - webkit_event.type = event->is_char() ? WebKit::WebInputEvent::Char : - WebKit::WebInputEvent::RawKeyDown; + webkit_event.type = event->is_char() ? blink::WebInputEvent::Char : + blink::WebInputEvent::RawKeyDown; break; case KeyRelease: - webkit_event.type = WebKit::WebInputEvent::KeyUp; + webkit_event.type = blink::WebInputEvent::KeyUp; break; default: NOTREACHED(); } - if (webkit_event.modifiers & WebKit::WebInputEvent::AltKey) + if (webkit_event.modifiers & blink::WebInputEvent::AltKey) webkit_event.isSystemKey = true; webkit_event.windowsKeyCode = XKeyEventToWindowsKeyCode(native_key_event); @@ -121,11 +121,11 @@ WebKit::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent( else webkit_event.unmodifiedText[0] = ui::GetCharacterFromXEvent(native_event); - if (webkit_event.modifiers & WebKit::WebInputEvent::ControlKey) { + if (webkit_event.modifiers & blink::WebInputEvent::ControlKey) { webkit_event.text[0] = GetControlCharacter( webkit_event.windowsKeyCode, - webkit_event.modifiers & WebKit::WebInputEvent::ShiftKey); + webkit_event.modifiers & blink::WebInputEvent::ShiftKey); } else { webkit_event.text[0] = webkit_event.unmodifiedText[0]; } diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc index b93f8a9..98e4d7a 100644 --- a/content/browser/service_worker/service_worker_dispatcher_host.cc +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc @@ -11,7 +11,7 @@ #include "third_party/WebKit/public/platform/WebServiceWorkerError.h" #include "url/gurl.h" -using WebKit::WebServiceWorkerError; +using blink::WebServiceWorkerError; namespace content { @@ -60,7 +60,7 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker( Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( thread_id, request_id, - WebKit::WebServiceWorkerError::DisabledError, + blink::WebServiceWorkerError::DisabledError, ASCIIToUTF16("ServiceWorker is disabled"))); return; } @@ -72,7 +72,7 @@ void ServiceWorkerDispatcherHost::OnRegisterServiceWorker( Send(new ServiceWorkerMsg_ServiceWorkerRegistrationError( thread_id, request_id, - WebKit::WebServiceWorkerError::SecurityError, + blink::WebServiceWorkerError::SecurityError, ASCIIToUTF16(kDomainMismatchErrorMessage))); return; } diff --git a/content/browser/speech/input_tag_speech_browsertest.cc b/content/browser/speech/input_tag_speech_browsertest.cc index 425a0cf..10c1878 100644 --- a/content/browser/speech/input_tag_speech_browsertest.cc +++ b/content/browser/speech/input_tag_speech_browsertest.cc @@ -40,9 +40,9 @@ class InputTagSpeechBrowserTest : public ContentBrowserTest { GURL test_url = GetTestUrl("speech", filename); NavigateToURL(shell(), test_url); - WebKit::WebMouseEvent mouse_event; - mouse_event.type = WebKit::WebInputEvent::MouseDown; - mouse_event.button = WebKit::WebMouseEvent::ButtonLeft; + blink::WebMouseEvent mouse_event; + mouse_event.type = blink::WebInputEvent::MouseDown; + mouse_event.button = blink::WebMouseEvent::ButtonLeft; mouse_event.x = 0; mouse_event.y = 0; mouse_event.clickCount = 1; @@ -52,7 +52,7 @@ class InputTagSpeechBrowserTest : public ContentBrowserTest { NOTIFICATION_LOAD_STOP, Source<NavigationController>(&web_contents->GetController())); web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event); - mouse_event.type = WebKit::WebInputEvent::MouseUp; + mouse_event.type = blink::WebInputEvent::MouseUp; web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event); fake_speech_recognition_manager_.WaitForRecognitionStarted(); diff --git a/content/browser/web_contents/drag_utils_gtk.cc b/content/browser/web_contents/drag_utils_gtk.cc index 8164c53..279ae9d 100644 --- a/content/browser/web_contents/drag_utils_gtk.cc +++ b/content/browser/web_contents/drag_utils_gtk.cc @@ -4,12 +4,12 @@ #include "content/browser/web_contents/drag_utils_gtk.h" -using WebKit::WebDragOperationsMask; -using WebKit::WebDragOperation; -using WebKit::WebDragOperationNone; -using WebKit::WebDragOperationCopy; -using WebKit::WebDragOperationLink; -using WebKit::WebDragOperationMove; +using blink::WebDragOperationsMask; +using blink::WebDragOperation; +using blink::WebDragOperationNone; +using blink::WebDragOperationCopy; +using blink::WebDragOperationLink; +using blink::WebDragOperationMove; namespace content { diff --git a/content/browser/web_contents/drag_utils_gtk.h b/content/browser/web_contents/drag_utils_gtk.h index 7232df1..f6d8839 100644 --- a/content/browser/web_contents/drag_utils_gtk.h +++ b/content/browser/web_contents/drag_utils_gtk.h @@ -15,8 +15,8 @@ namespace content { // Convenience methods for converting between web drag operations and the GDK // equivalent. CONTENT_EXPORT GdkDragAction WebDragOpToGdkDragAction( - WebKit::WebDragOperationsMask op); -CONTENT_EXPORT WebKit::WebDragOperationsMask GdkDragActionToWebDragOp( + blink::WebDragOperationsMask op); +CONTENT_EXPORT blink::WebDragOperationsMask GdkDragActionToWebDragOp( GdkDragAction action); } // namespace content diff --git a/content/browser/web_contents/touch_editable_impl_aura.cc b/content/browser/web_contents/touch_editable_impl_aura.cc index 6ca8e04..50c89fa 100644 --- a/content/browser/web_contents/touch_editable_impl_aura.cc +++ b/content/browser/web_contents/touch_editable_impl_aura.cc @@ -195,7 +195,7 @@ bool TouchEditableImplAura::HandleInputEvent(const ui::Event* event) { void TouchEditableImplAura::GestureEventAck(int gesture_event_type) { DCHECK(rwhva_); - if (gesture_event_type == WebKit::WebInputEvent::GestureTap && + if (gesture_event_type == blink::WebInputEvent::GestureTap && text_input_type_ != ui::TEXT_INPUT_TYPE_NONE && is_tap_on_focused_textfield_) { StartTouchEditing(); @@ -203,9 +203,9 @@ void TouchEditableImplAura::GestureEventAck(int gesture_event_type) { touch_selection_controller_->SelectionChanged(); } - if (gesture_event_type == WebKit::WebInputEvent::GestureLongPress) + if (gesture_event_type == blink::WebInputEvent::GestureLongPress) selection_gesture_in_process_ = false; - if (gesture_event_type == WebKit::WebInputEvent::GestureTap) { + if (gesture_event_type == blink::WebInputEvent::GestureTap) { if (tap_gesture_tap_count_queue_.front() > 1) selection_gesture_in_process_ = false; tap_gesture_tap_count_queue_.pop(); diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc index cb24210..72c1758 100644 --- a/content/browser/web_contents/web_contents_drag_win.cc +++ b/content/browser/web_contents/web_contents_drag_win.cc @@ -38,10 +38,10 @@ #include "ui/gfx/screen.h" #include "ui/gfx/size.h" -using WebKit::WebDragOperationsMask; -using WebKit::WebDragOperationCopy; -using WebKit::WebDragOperationLink; -using WebKit::WebDragOperationMove; +using blink::WebDragOperationsMask; +using blink::WebDragOperationCopy; +using blink::WebDragOperationLink; +using blink::WebDragOperationMove; namespace content { namespace { diff --git a/content/browser/web_contents/web_contents_drag_win.h b/content/browser/web_contents/web_contents_drag_win.h index b6a9805..943cc7d 100644 --- a/content/browser/web_contents/web_contents_drag_win.h +++ b/content/browser/web_contents/web_contents_drag_win.h @@ -46,7 +46,7 @@ class CONTENT_EXPORT WebContentsDragWin // Called on UI thread. void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask ops, + blink::WebDragOperationsMask ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset); void CancelDrag(); @@ -74,7 +74,7 @@ class CONTENT_EXPORT WebContentsDragWin // progress. No further processing should be done beyond this return point // because the instance has been destroyed. bool DoDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask ops, + blink::WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, const gfx::ImageSkia& image, @@ -82,7 +82,7 @@ class CONTENT_EXPORT WebContentsDragWin // Called on drag-and-drop thread. void StartBackgroundDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask ops, + blink::WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, const gfx::ImageSkia& image, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index feab408..c7d716a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -1157,7 +1157,7 @@ void WebContentsImpl::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { } bool WebContentsImpl::PreHandleWheelEvent( - const WebKit::WebMouseWheelEvent& event) { + const blink::WebMouseWheelEvent& event) { #if !defined(OS_MACOSX) // On platforms other than Mac, control+mousewheel changes zoom. On Mac, this // isn't done for two reasons: @@ -1167,7 +1167,7 @@ bool WebContentsImpl::PreHandleWheelEvent( // with control key set which isn't what the user wants if (delegate_ && event.wheelTicksY && - (event.modifiers & WebKit::WebInputEvent::ControlKey)) { + (event.modifiers & blink::WebInputEvent::ControlKey)) { delegate_->ContentsZoomChange(event.wheelTicksY > 0); return true; } @@ -1356,17 +1356,17 @@ void WebContentsImpl::CreateNewWindow( } void WebContentsImpl::CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) { + blink::WebPopupType popup_type) { CreateNewWidget(route_id, false, popup_type); } void WebContentsImpl::CreateNewFullscreenWidget(int route_id) { - CreateNewWidget(route_id, true, WebKit::WebPopupTypeNone); + CreateNewWidget(route_id, true, blink::WebPopupTypeNone); } void WebContentsImpl::CreateNewWidget(int route_id, bool is_fullscreen, - WebKit::WebPopupType popup_type) { + blink::WebPopupType popup_type) { RenderProcessHost* process = GetRenderProcessHost(); RenderWidgetHostImpl* widget_host = new RenderWidgetHostImpl(this, process, route_id, IsHidden()); @@ -1811,7 +1811,7 @@ void WebContentsImpl::Close() { } void WebContentsImpl::DragSourceEndedAt(int client_x, int client_y, - int screen_x, int screen_y, WebKit::WebDragOperation operation) { + int screen_x, int screen_y, blink::WebDragOperation operation) { if (browser_plugin_embedder_.get()) browser_plugin_embedder_->DragSourceEndedAt(client_x, client_y, screen_x, screen_y, operation); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 1f5bc60..d0ac6b3 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -154,7 +154,7 @@ class CONTENT_EXPORT WebContentsImpl // Informs the render view host and the BrowserPluginEmbedder, if present, of // a Drag Source End. void DragSourceEndedAt(int client_x, int client_y, int screen_x, - int screen_y, WebKit::WebDragOperation operation); + int screen_y, blink::WebDragOperation operation); // Informs the render view host and the BrowserPluginEmbedder, if present, of // a Drag Source Move. @@ -407,7 +407,7 @@ class CONTENT_EXPORT WebContentsImpl const ViewHostMsg_CreateWindow_Params& params, SessionStorageNamespace* session_storage_namespace) OVERRIDE; virtual void CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) OVERRIDE; + blink::WebPopupType popup_type) OVERRIDE; virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; virtual void ShowCreatedWindow(int route_id, WindowOpenDisposition disposition, @@ -434,7 +434,7 @@ class CONTENT_EXPORT WebContentsImpl virtual void HandleKeyboardEvent( const NativeWebKeyboardEvent& event) OVERRIDE; virtual bool PreHandleWheelEvent( - const WebKit::WebMouseWheelEvent& event) OVERRIDE; + const blink::WebMouseWheelEvent& event) OVERRIDE; virtual void DidSendScreenRects(RenderWidgetHostImpl* rwh) OVERRIDE; #if defined(OS_WIN) && defined(USE_AURA) virtual gfx::NativeViewAccessible GetParentNativeViewAccessible() OVERRIDE; @@ -724,7 +724,7 @@ class CONTENT_EXPORT WebContentsImpl // Helper for CreateNewWidget/CreateNewFullscreenWidget. void CreateNewWidget(int route_id, bool is_fullscreen, - WebKit::WebPopupType popup_type); + blink::WebPopupType popup_type); // Helper for ShowCreatedWidget/ShowCreatedFullscreenWidget. void ShowCreatedWidget(int route_id, diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc index 4aa02cb..fc27ace 100644 --- a/content/browser/web_contents/web_contents_view_android.cc +++ b/content/browser/web_contents/web_contents_view_android.cc @@ -199,14 +199,14 @@ void WebContentsViewAndroid::ShowPopupMenu( void WebContentsViewAndroid::StartDragging( const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) { NOTIMPLEMENTED(); } -void WebContentsViewAndroid::UpdateDragCursor(WebKit::WebDragOperation op) { +void WebContentsViewAndroid::UpdateDragCursor(blink::WebDragOperation op) { NOTIMPLEMENTED(); } diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_android.h index 594bc5c..bcfc0cf 100644 --- a/content/browser/web_contents/web_contents_view_android.h +++ b/content/browser/web_contents/web_contents_view_android.h @@ -72,11 +72,11 @@ class WebContentsViewAndroid : public WebContentsViewPort, bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index c25ca7e..67ff98b 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -334,40 +334,40 @@ void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { pickle.data(), pickle.size(), &drop_data->custom_data); } -// Utilities to convert between WebKit::WebDragOperationsMask and +// Utilities to convert between blink::WebDragOperationsMask and // ui::DragDropTypes. -int ConvertFromWeb(WebKit::WebDragOperationsMask ops) { +int ConvertFromWeb(blink::WebDragOperationsMask ops) { int drag_op = ui::DragDropTypes::DRAG_NONE; - if (ops & WebKit::WebDragOperationCopy) + if (ops & blink::WebDragOperationCopy) drag_op |= ui::DragDropTypes::DRAG_COPY; - if (ops & WebKit::WebDragOperationMove) + if (ops & blink::WebDragOperationMove) drag_op |= ui::DragDropTypes::DRAG_MOVE; - if (ops & WebKit::WebDragOperationLink) + if (ops & blink::WebDragOperationLink) drag_op |= ui::DragDropTypes::DRAG_LINK; return drag_op; } -WebKit::WebDragOperationsMask ConvertToWeb(int drag_op) { - int web_drag_op = WebKit::WebDragOperationNone; +blink::WebDragOperationsMask ConvertToWeb(int drag_op) { + int web_drag_op = blink::WebDragOperationNone; if (drag_op & ui::DragDropTypes::DRAG_COPY) - web_drag_op |= WebKit::WebDragOperationCopy; + web_drag_op |= blink::WebDragOperationCopy; if (drag_op & ui::DragDropTypes::DRAG_MOVE) - web_drag_op |= WebKit::WebDragOperationMove; + web_drag_op |= blink::WebDragOperationMove; if (drag_op & ui::DragDropTypes::DRAG_LINK) - web_drag_op |= WebKit::WebDragOperationLink; - return (WebKit::WebDragOperationsMask) web_drag_op; + web_drag_op |= blink::WebDragOperationLink; + return (blink::WebDragOperationsMask) web_drag_op; } int ConvertAuraEventFlagsToWebInputEventModifiers(int aura_event_flags) { int web_input_event_modifiers = 0; if (aura_event_flags & ui::EF_SHIFT_DOWN) - web_input_event_modifiers |= WebKit::WebInputEvent::ShiftKey; + web_input_event_modifiers |= blink::WebInputEvent::ShiftKey; if (aura_event_flags & ui::EF_CONTROL_DOWN) - web_input_event_modifiers |= WebKit::WebInputEvent::ControlKey; + web_input_event_modifiers |= blink::WebInputEvent::ControlKey; if (aura_event_flags & ui::EF_ALT_DOWN) - web_input_event_modifiers |= WebKit::WebInputEvent::AltKey; + web_input_event_modifiers |= blink::WebInputEvent::AltKey; if (aura_event_flags & ui::EF_COMMAND_DOWN) - web_input_event_modifiers |= WebKit::WebInputEvent::MetaKey; + web_input_event_modifiers |= blink::WebInputEvent::MetaKey; return web_input_event_modifiers; } @@ -807,7 +807,7 @@ WebContentsViewAura::WebContentsViewAura( WebContentsViewDelegate* delegate) : web_contents_(web_contents), delegate_(delegate), - current_drag_op_(WebKit::WebDragOperationNone), + current_drag_op_(blink::WebDragOperationNone), drag_dest_delegate_(NULL), current_rvh_for_drag_(NULL), overscroll_change_brightness_(false), @@ -850,7 +850,7 @@ void WebContentsViewAura::SizeChangedCommon(const gfx::Size& size) { rwhv->SetSize(size); } -void WebContentsViewAura::EndDrag(WebKit::WebDragOperationsMask ops) { +void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) { aura::Window* root_window = GetNativeView()->GetRootWindow(); gfx::Point screen_loc = gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(); @@ -1265,7 +1265,7 @@ void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, void WebContentsViewAura::StartDragging( const DropData& drop_data, - WebKit::WebDragOperationsMask operations, + blink::WebDragOperationsMask operations, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) { @@ -1321,7 +1321,7 @@ void WebContentsViewAura::StartDragging( web_contents_->SystemDragEnded(); } -void WebContentsViewAura::UpdateDragCursor(WebKit::WebDragOperation operation) { +void WebContentsViewAura::UpdateDragCursor(blink::WebDragOperation operation) { current_drag_op_ = operation; } @@ -1579,7 +1579,7 @@ void WebContentsViewAura::OnDragEntered(const ui::DropTargetEvent& event) { current_drop_data_.reset(new DropData()); PrepareDropData(current_drop_data_.get(), event.data()); - WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations()); + blink::WebDragOperationsMask op = ConvertToWeb(event.source_operations()); gfx::Point screen_pt = gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(); @@ -1599,7 +1599,7 @@ int WebContentsViewAura::OnDragUpdated(const ui::DropTargetEvent& event) { if (current_rvh_for_drag_ != web_contents_->GetRenderViewHost()) OnDragEntered(event); - WebKit::WebDragOperationsMask op = ConvertToWeb(event.source_operations()); + blink::WebDragOperationsMask op = ConvertToWeb(event.source_operations()); gfx::Point screen_pt = gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(); web_contents_->GetRenderViewHost()->DragTargetDragOver( diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h index e7e59fd..7d377b0 100644 --- a/content/browser/web_contents/web_contents_view_aura.h +++ b/content/browser/web_contents/web_contents_view_aura.h @@ -55,7 +55,7 @@ class CONTENT_EXPORT WebContentsViewAura void SizeChangedCommon(const gfx::Size& size); - void EndDrag(WebKit::WebDragOperationsMask ops); + void EndDrag(blink::WebDragOperationsMask ops); // Creates and sets up the overlay window that will be displayed during the // overscroll gesture. @@ -133,11 +133,11 @@ class CONTENT_EXPORT WebContentsViewAura bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask operations, + blink::WebDragOperationsMask operations, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; @@ -196,7 +196,7 @@ class CONTENT_EXPORT WebContentsViewAura scoped_ptr<WebContentsViewDelegate> delegate_; - WebKit::WebDragOperationsMask current_drag_op_; + blink::WebDragOperationsMask current_drag_op_; scoped_ptr<DropData> current_drop_data_; diff --git a/content/browser/web_contents/web_contents_view_gtk.cc b/content/browser/web_contents/web_contents_view_gtk.cc index a3cbb0e..4e3874f 100644 --- a/content/browser/web_contents/web_contents_view_gtk.cc +++ b/content/browser/web_contents/web_contents_view_gtk.cc @@ -29,8 +29,8 @@ #include "ui/gfx/rect.h" #include "ui/gfx/size.h" -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; namespace content { namespace { diff --git a/content/browser/web_contents/web_contents_view_gtk.h b/content/browser/web_contents/web_contents_view_gtk.h index 4a456fc..41f84ab 100644 --- a/content/browser/web_contents/web_contents_view_gtk.h +++ b/content/browser/web_contents/web_contents_view_gtk.h @@ -81,11 +81,11 @@ class CONTENT_EXPORT WebContentsViewGtk bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc index 8d70a56..ac236da 100644 --- a/content/browser/web_contents/web_contents_view_guest.cc +++ b/content/browser/web_contents/web_contents_view_guest.cc @@ -25,8 +25,8 @@ #include "ui/aura/window.h" #endif -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; namespace content { diff --git a/content/browser/web_contents/web_contents_view_guest.h b/content/browser/web_contents/web_contents_view_guest.h index 81bf8d9..1e1d812 100644 --- a/content/browser/web_contents/web_contents_view_guest.h +++ b/content/browser/web_contents/web_contents_view_guest.h @@ -84,11 +84,11 @@ class CONTENT_EXPORT WebContentsViewGuest bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_mac.h b/content/browser/web_contents/web_contents_view_mac.h index a8e7bb3..3d0b94f 100644 --- a/content/browser/web_contents/web_contents_view_mac.h +++ b/content/browser/web_contents/web_contents_view_mac.h @@ -105,11 +105,11 @@ class WebContentsViewMac : public WebContentsViewPort, bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_operations, + blink::WebDragOperationsMask allowed_operations, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm index d1ab628..4283ca9 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm @@ -28,8 +28,8 @@ #include "ui/base/dragdrop/cocoa_dnd_util.h" #include "ui/gfx/image/image_skia_util_mac.h" -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; using content::DropData; using content::PopupMenuHelper; using content::RenderViewHostFactory; @@ -39,10 +39,10 @@ using content::WebContents; using content::WebContentsImpl; using content::WebContentsViewMac; -// Ensure that the WebKit::WebDragOperation enum values stay in sync with +// Ensure that the blink::WebDragOperation enum values stay in sync with // NSDragOperation constants, since the code below static_casts between 'em. #define COMPILE_ASSERT_MATCHING_ENUM(name) \ - COMPILE_ASSERT(int(NS##name) == int(WebKit::Web##name), enum_mismatch_##name) + COMPILE_ASSERT(int(NS##name) == int(blink::Web##name), enum_mismatch_##name) COMPILE_ASSERT_MATCHING_ENUM(DragOperationNone); COMPILE_ASSERT_MATCHING_ENUM(DragOperationCopy); COMPILE_ASSERT_MATCHING_ENUM(DragOperationLink); diff --git a/content/browser/web_contents/web_contents_view_win.cc b/content/browser/web_contents/web_contents_view_win.cc index 5c64162..92548d2 100644 --- a/content/browser/web_contents/web_contents_view_win.cc +++ b/content/browser/web_contents/web_contents_view_win.cc @@ -261,7 +261,7 @@ void WebContentsViewWin::ShowPopupMenu(const gfx::Rect& bounds, } void WebContentsViewWin::StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask operations, + blink::WebDragOperationsMask operations, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) { @@ -273,7 +273,7 @@ void WebContentsViewWin::StartDragging(const DropData& drop_data, drag_handler_->StartDragging(drop_data, operations, image, image_offset); } -void WebContentsViewWin::UpdateDragCursor(WebKit::WebDragOperation operation) { +void WebContentsViewWin::UpdateDragCursor(blink::WebDragOperation operation) { drag_dest_->set_drag_cursor(operation); } diff --git a/content/browser/web_contents/web_contents_view_win.h b/content/browser/web_contents/web_contents_view_win.h index adfe675..505addd 100644 --- a/content/browser/web_contents/web_contents_view_win.h +++ b/content/browser/web_contents/web_contents_view_win.h @@ -88,11 +88,11 @@ class CONTENT_EXPORT WebContentsViewWin bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask operations, + blink::WebDragOperationsMask operations, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; diff --git a/content/browser/web_contents/web_drag_dest_gtk.cc b/content/browser/web_contents/web_drag_dest_gtk.cc index 55f0d9c..bb9a4d4 100644 --- a/content/browser/web_contents/web_drag_dest_gtk.cc +++ b/content/browser/web_contents/web_drag_dest_gtk.cc @@ -22,8 +22,8 @@ #include "ui/base/dragdrop/gtk_dnd_util.h" #include "ui/base/gtk/gtk_screen_util.h" -using WebKit::WebDragOperation; -using WebKit::WebDragOperationNone; +using blink::WebDragOperation; +using blink::WebDragOperationNone; namespace content { @@ -36,13 +36,13 @@ int GetModifierFlags(GtkWidget* widget) { gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, &state); if (state & GDK_SHIFT_MASK) - modifier_state |= WebKit::WebInputEvent::ShiftKey; + modifier_state |= blink::WebInputEvent::ShiftKey; if (state & GDK_CONTROL_MASK) - modifier_state |= WebKit::WebInputEvent::ControlKey; + modifier_state |= blink::WebInputEvent::ControlKey; if (state & GDK_MOD1_MASK) - modifier_state |= WebKit::WebInputEvent::AltKey; + modifier_state |= blink::WebInputEvent::AltKey; if (state & GDK_META_MASK) - modifier_state |= WebKit::WebInputEvent::MetaKey; + modifier_state |= blink::WebInputEvent::MetaKey; return modifier_state; } diff --git a/content/browser/web_contents/web_drag_dest_gtk.h b/content/browser/web_contents/web_drag_dest_gtk.h index b912afa..7258e1b 100644 --- a/content/browser/web_contents/web_drag_dest_gtk.h +++ b/content/browser/web_contents/web_drag_dest_gtk.h @@ -32,7 +32,7 @@ class CONTENT_EXPORT WebDragDestGtk { // This is called when the renderer responds to a drag motion event. We must // update the system drag cursor. - void UpdateDragStatus(WebKit::WebDragOperation operation); + void UpdateDragStatus(blink::WebDragOperation operation); // Informs the renderer when a system drag has left the render view. // See OnDragLeave(). diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm index 8a529e8..b3fefca 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -18,7 +18,7 @@ #import "ui/base/dragdrop/cocoa_dnd_util.h" #include "ui/base/window_open_disposition.h" -using WebKit::WebDragOperationsMask; +using blink::WebDragOperationsMask; using content::DropData; using content::OpenURLParams; using content::Referrer; @@ -28,13 +28,13 @@ int GetModifierFlags() { int modifier_state = 0; UInt32 currentModifiers = GetCurrentKeyModifiers(); if (currentModifiers & ::shiftKey) - modifier_state |= WebKit::WebInputEvent::ShiftKey; + modifier_state |= blink::WebInputEvent::ShiftKey; if (currentModifiers & ::controlKey) - modifier_state |= WebKit::WebInputEvent::ControlKey; + modifier_state |= blink::WebInputEvent::ControlKey; if (currentModifiers & ::optionKey) - modifier_state |= WebKit::WebInputEvent::AltKey; + modifier_state |= blink::WebInputEvent::AltKey; if (currentModifiers & ::cmdKey) - modifier_state |= WebKit::WebInputEvent::MetaKey; + modifier_state |= blink::WebInputEvent::MetaKey; return modifier_state; } diff --git a/content/browser/web_contents/web_drag_dest_win.cc b/content/browser/web_contents/web_drag_dest_win.cc index 60f0c05..e497f86 100644 --- a/content/browser/web_contents/web_drag_dest_win.cc +++ b/content/browser/web_contents/web_drag_dest_win.cc @@ -23,11 +23,11 @@ #include "ui/gfx/point.h" #include "url/gurl.h" -using WebKit::WebDragOperationNone; -using WebKit::WebDragOperationCopy; -using WebKit::WebDragOperationLink; -using WebKit::WebDragOperationMove; -using WebKit::WebDragOperationGeneric; +using blink::WebDragOperationNone; +using blink::WebDragOperationCopy; +using blink::WebDragOperationLink; +using blink::WebDragOperationMove; +using blink::WebDragOperationGeneric; namespace content { namespace { @@ -48,15 +48,15 @@ DWORD GetPreferredDropEffect(DWORD effect) { int GetModifierFlags() { int modifier_state = 0; if (base::win::IsShiftPressed()) - modifier_state |= WebKit::WebInputEvent::ShiftKey; + modifier_state |= blink::WebInputEvent::ShiftKey; if (base::win::IsCtrlPressed()) - modifier_state |= WebKit::WebInputEvent::ControlKey; + modifier_state |= blink::WebInputEvent::ControlKey; if (base::win::IsAltPressed()) - modifier_state |= WebKit::WebInputEvent::AltKey; + modifier_state |= blink::WebInputEvent::AltKey; if (::GetKeyState(VK_LWIN) & kHighBitMaskShort) - modifier_state |= WebKit::WebInputEvent::MetaKey; + modifier_state |= blink::WebInputEvent::MetaKey; if (::GetKeyState(VK_RWIN) & kHighBitMaskShort) - modifier_state |= WebKit::WebInputEvent::MetaKey; + modifier_state |= blink::WebInputEvent::MetaKey; return modifier_state; } diff --git a/content/browser/web_contents/web_drag_dest_win.h b/content/browser/web_contents/web_drag_dest_win.h index 5ddb7ed..9e3ca8d 100644 --- a/content/browser/web_contents/web_drag_dest_win.h +++ b/content/browser/web_contents/web_drag_dest_win.h @@ -29,7 +29,7 @@ class CONTENT_EXPORT WebDragDest : public ui::DropTargetWin { DropData* current_drop_data() const { return drop_data_.get(); } - void set_drag_cursor(WebKit::WebDragOperation op) { + void set_drag_cursor(blink::WebDragOperation op) { drag_cursor_ = op; } @@ -66,7 +66,7 @@ class CONTENT_EXPORT WebDragDest : public ui::DropTargetWin { // Used to determine what cursor we should display when dragging over web // content area. This can be updated async during a drag operation. - WebKit::WebDragOperation drag_cursor_; + blink::WebDragOperation drag_cursor_; // A special drop target handler for when we try to d&d while an interstitial // page is showing. diff --git a/content/browser/web_contents/web_drag_source_gtk.cc b/content/browser/web_contents/web_drag_source_gtk.cc index 0ad27de..2f9e587 100644 --- a/content/browser/web_contents/web_drag_source_gtk.cc +++ b/content/browser/web_contents/web_drag_source_gtk.cc @@ -28,9 +28,9 @@ #include "ui/gfx/gtk_compat.h" #include "ui/gfx/gtk_util.h" -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; -using WebKit::WebDragOperationNone; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; +using blink::WebDragOperationNone; namespace content { diff --git a/content/browser/web_contents/web_drag_source_gtk.h b/content/browser/web_contents/web_drag_source_gtk.h index bcf9a01..577f60b 100644 --- a/content/browser/web_contents/web_drag_source_gtk.h +++ b/content/browser/web_contents/web_drag_source_gtk.h @@ -39,7 +39,7 @@ class CONTENT_EXPORT WebDragSourceGtk : // Starts a drag for the WebContents this WebDragSourceGtk was created for. // Returns false if the drag could not be started. bool StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, GdkEventButton* last_mouse_down, const SkBitmap& image, const gfx::Vector2d& image_offset); diff --git a/content/browser/web_contents/web_drag_source_mac.mm b/content/browser/web_contents/web_drag_source_mac.mm index 0417379..805e73b 100644 --- a/content/browser/web_contents/web_drag_source_mac.mm +++ b/content/browser/web_contents/web_drag_source_mac.mm @@ -285,7 +285,7 @@ void PromiseWriterHelper(const DropData& drop_data, operation &= ~NSDragOperationMove; contents_->DragSourceEndedAt(localPoint.x, localPoint.y, screenPoint.x, - screenPoint.y, static_cast<WebKit::WebDragOperation>(operation)); + screenPoint.y, static_cast<blink::WebDragOperation>(operation)); } // Make sure the pasteboard owner isn't us. diff --git a/content/browser/web_contents/web_drag_source_win.cc b/content/browser/web_contents/web_drag_source_win.cc index 77dc4c4..6697d73 100644 --- a/content/browser/web_contents/web_drag_source_win.cc +++ b/content/browser/web_contents/web_drag_source_win.cc @@ -13,7 +13,7 @@ #include "content/public/browser/notification_types.h" #include "ui/base/dragdrop/os_exchange_data.h" -using WebKit::WebDragOperationNone; +using blink::WebDragOperationNone; namespace content { namespace { diff --git a/content/browser/web_contents/web_drag_utils_win.cc b/content/browser/web_contents/web_drag_utils_win.cc index bada245..8558c82 100644 --- a/content/browser/web_contents/web_drag_utils_win.cc +++ b/content/browser/web_contents/web_drag_utils_win.cc @@ -7,13 +7,13 @@ #include <oleidl.h> #include "base/logging.h" -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; -using WebKit::WebDragOperationNone; -using WebKit::WebDragOperationCopy; -using WebKit::WebDragOperationLink; -using WebKit::WebDragOperationMove; -using WebKit::WebDragOperationGeneric; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; +using blink::WebDragOperationNone; +using blink::WebDragOperationCopy; +using blink::WebDragOperationLink; +using blink::WebDragOperationMove; +using blink::WebDragOperationGeneric; namespace content { diff --git a/content/browser/web_contents/web_drag_utils_win.h b/content/browser/web_contents/web_drag_utils_win.h index 8721da9..d45cb8e 100644 --- a/content/browser/web_contents/web_drag_utils_win.h +++ b/content/browser/web_contents/web_drag_utils_win.h @@ -11,11 +11,11 @@ namespace content { -WebKit::WebDragOperation WinDragOpToWebDragOp(DWORD effect); -WebKit::WebDragOperationsMask WinDragOpMaskToWebDragOpMask(DWORD effects); +blink::WebDragOperation WinDragOpToWebDragOp(DWORD effect); +blink::WebDragOperationsMask WinDragOpMaskToWebDragOpMask(DWORD effects); -DWORD WebDragOpToWinDragOp(WebKit::WebDragOperation op); -DWORD WebDragOpMaskToWinDragOpMask(WebKit::WebDragOperationsMask ops); +DWORD WebDragOpToWinDragOp(blink::WebDragOperation op); +DWORD WebDragOpMaskToWinDragOpMask(blink::WebDragOperationsMask ops); } // namespace content diff --git a/content/child/appcache/appcache_frontend_impl.cc b/content/child/appcache/appcache_frontend_impl.cc index 0163df2..ee7f556 100644 --- a/content/child/appcache/appcache_frontend_impl.cc +++ b/content/child/appcache/appcache_frontend_impl.cc @@ -9,8 +9,8 @@ #include "third_party/WebKit/public/web/WebApplicationCacheHost.h" #include "third_party/WebKit/public/web/WebConsoleMessage.h" -using WebKit::WebApplicationCacheHost; -using WebKit::WebConsoleMessage; +using blink::WebApplicationCacheHost; +using blink::WebConsoleMessage; namespace content { diff --git a/content/child/appcache/web_application_cache_host_impl.cc b/content/child/appcache/web_application_cache_host_impl.cc index b4a15f3..2088bc6 100644 --- a/content/child/appcache/web_application_cache_host_impl.cc +++ b/content/child/appcache/web_application_cache_host_impl.cc @@ -14,14 +14,14 @@ #include "third_party/WebKit/public/web/WebDataSource.h" #include "third_party/WebKit/public/web/WebFrame.h" -using WebKit::WebApplicationCacheHost; -using WebKit::WebApplicationCacheHostClient; -using WebKit::WebDataSource; -using WebKit::WebFrame; -using WebKit::WebURLRequest; -using WebKit::WebURL; -using WebKit::WebURLResponse; -using WebKit::WebVector; +using blink::WebApplicationCacheHost; +using blink::WebApplicationCacheHostClient; +using blink::WebDataSource; +using blink::WebFrame; +using blink::WebURLRequest; +using blink::WebURL; +using blink::WebURLResponse; +using blink::WebVector; using appcache::AppCacheBackend; using appcache::AppCacheResourceInfo; diff --git a/content/child/appcache/web_application_cache_host_impl.h b/content/child/appcache/web_application_cache_host_impl.h index c0cdea9..afda8a0 100644 --- a/content/child/appcache/web_application_cache_host_impl.h +++ b/content/child/appcache/web_application_cache_host_impl.h @@ -13,28 +13,28 @@ #include "url/gurl.h" #include "webkit/common/appcache/appcache_interfaces.h" -namespace WebKit { +namespace blink { class WebFrame; } namespace content { class WebApplicationCacheHostImpl - : NON_EXPORTED_BASE(public WebKit::WebApplicationCacheHost) { + : NON_EXPORTED_BASE(public blink::WebApplicationCacheHost) { public: // Returns the host having given id or NULL if there is no such host. static WebApplicationCacheHostImpl* FromId(int id); // Returns the host associated with the current document in frame. - static WebApplicationCacheHostImpl* FromFrame(const WebKit::WebFrame* frame); + static WebApplicationCacheHostImpl* FromFrame(const blink::WebFrame* frame); - WebApplicationCacheHostImpl(WebKit::WebApplicationCacheHostClient* client, + WebApplicationCacheHostImpl(blink::WebApplicationCacheHostClient* client, appcache::AppCacheBackend* backend); virtual ~WebApplicationCacheHostImpl(); int host_id() const { return host_id_; } appcache::AppCacheBackend* backend() const { return backend_; } - WebKit::WebApplicationCacheHostClient* client() const { return client_; } + blink::WebApplicationCacheHostClient* client() const { return client_; } virtual void OnCacheSelected(const appcache::AppCacheInfo& info); void OnStatusChanged(appcache::Status); @@ -45,19 +45,19 @@ class WebApplicationCacheHostImpl const std::string& message) {} virtual void OnContentBlocked(const GURL& manifest_url) {} - // WebKit::WebApplicationCacheHost: - virtual void willStartMainResourceRequest(WebKit::WebURLRequest&, - const WebKit::WebFrame*); - virtual void willStartSubResourceRequest(WebKit::WebURLRequest&); + // blink::WebApplicationCacheHost: + virtual void willStartMainResourceRequest(blink::WebURLRequest&, + const blink::WebFrame*); + virtual void willStartSubResourceRequest(blink::WebURLRequest&); virtual void selectCacheWithoutManifest(); - virtual bool selectCacheWithManifest(const WebKit::WebURL& manifestURL); - virtual void didReceiveResponseForMainResource(const WebKit::WebURLResponse&); + virtual bool selectCacheWithManifest(const blink::WebURL& manifestURL); + virtual void didReceiveResponseForMainResource(const blink::WebURLResponse&); virtual void didReceiveDataForMainResource(const char* data, int len); virtual void didFinishLoadingMainResource(bool success); - virtual WebKit::WebApplicationCacheHost::Status status(); + virtual blink::WebApplicationCacheHost::Status status(); virtual bool startUpdate(); virtual bool swapCache(); - virtual void getResourceList(WebKit::WebVector<ResourceInfo>* resources); + virtual void getResourceList(blink::WebVector<ResourceInfo>* resources); virtual void getAssociatedCacheInfo(CacheInfo* info); private: @@ -67,11 +67,11 @@ class WebApplicationCacheHostImpl NO }; - WebKit::WebApplicationCacheHostClient* client_; + blink::WebApplicationCacheHostClient* client_; appcache::AppCacheBackend* backend_; int host_id_; appcache::Status status_; - WebKit::WebURLResponse document_response_; + blink::WebURLResponse document_response_; GURL document_url_; bool is_scheme_supported_; bool is_get_method_; diff --git a/content/child/browser_font_resource_trusted.cc b/content/child/browser_font_resource_trusted.cc index d31ede0..35ad824 100644 --- a/content/child/browser_font_resource_trusted.cc +++ b/content/child/browser_font_resource_trusted.cc @@ -27,13 +27,13 @@ using ppapi::StringVar; using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_ImageData_API; -using WebKit::WebFloatPoint; -using WebKit::WebFloatRect; -using WebKit::WebFont; -using WebKit::WebFontDescription; -using WebKit::WebRect; -using WebKit::WebTextRun; -using WebKit::WebCanvas; +using blink::WebFloatPoint; +using blink::WebFloatRect; +using blink::WebFont; +using blink::WebFontDescription; +using blink::WebRect; +using blink::WebTextRun; +using blink::WebCanvas; namespace content { diff --git a/content/child/browser_font_resource_trusted.h b/content/child/browser_font_resource_trusted.h index 23a4344..09afe0c 100644 --- a/content/child/browser_font_resource_trusted.h +++ b/content/child/browser_font_resource_trusted.h @@ -19,7 +19,7 @@ class SkCanvas; -namespace WebKit { +namespace blink { class WebFont; } @@ -72,7 +72,7 @@ class BrowserFontResource_Trusted PP_Bool image_data_is_opaque); private: - scoped_ptr<WebKit::WebFont> font_; + scoped_ptr<blink::WebFont> font_; DISALLOW_COPY_AND_ASSIGN(BrowserFontResource_Trusted); }; diff --git a/content/child/child_thread.h b/content/child/child_thread.h index 2c1dcd0..89156ba 100644 --- a/content/child/child_thread.h +++ b/content/child/child_thread.h @@ -31,9 +31,9 @@ class SyncChannel; class SyncMessageFilter; } // namespace IPC -namespace WebKit { +namespace blink { class WebFrame; -} // namespace WebKit +} // namespace blink namespace content { class ChildHistogramMessageFilter; diff --git a/content/child/database_util.cc b/content/child/database_util.cc index e6a028b..34cf157 100644 --- a/content/child/database_util.cc +++ b/content/child/database_util.cc @@ -9,8 +9,8 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/sqlite/sqlite3.h" -using WebKit::Platform; -using WebKit::WebString; +using blink::Platform; +using blink::WebString; namespace content { diff --git a/content/child/database_util.h b/content/child/database_util.h index 8b85623..284a147 100644 --- a/content/child/database_util.h +++ b/content/child/database_util.h @@ -16,22 +16,22 @@ namespace content { // WorkerWebKitPlatformSupportImpl to handle database file accesses. class DatabaseUtil { public: - static WebKit::Platform::FileHandle DatabaseOpenFile( - const WebKit::WebString& vfs_file_name, + static blink::Platform::FileHandle DatabaseOpenFile( + const blink::WebString& vfs_file_name, int desired_flags, IPC::SyncMessageFilter* sync_message_filter); static int DatabaseDeleteFile( - const WebKit::WebString& vfs_file_name, + const blink::WebString& vfs_file_name, bool sync_dir, IPC::SyncMessageFilter* sync_message_filter); static long DatabaseGetFileAttributes( - const WebKit::WebString& vfs_file_name, + const blink::WebString& vfs_file_name, IPC::SyncMessageFilter* sync_message_filter); static long long DatabaseGetFileSize( - const WebKit::WebString& vfs_file_name, + const blink::WebString& vfs_file_name, IPC::SyncMessageFilter* sync_message_filter); static long long DatabaseGetSpaceAvailable( - const WebKit::WebString& origin_identifier, + const blink::WebString& origin_identifier, IPC::SyncMessageFilter* sync_message_filter); }; diff --git a/content/child/db_message_filter.cc b/content/child/db_message_filter.cc index 6fc8103..93fe885 100644 --- a/content/child/db_message_filter.cc +++ b/content/child/db_message_filter.cc @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/web/WebDatabase.h" -using WebKit::WebString; +using blink::WebString; namespace content { @@ -33,27 +33,27 @@ bool DBMessageFilter::OnMessageReceived(const IPC::Message& message) { void DBMessageFilter::OnDatabaseUpdateSize(const std::string& origin_identifier, const string16& database_name, int64 database_size) { - WebKit::WebDatabase::updateDatabaseSize( + blink::WebDatabase::updateDatabaseSize( WebString::fromUTF8(origin_identifier), database_name, database_size); } void DBMessageFilter::OnDatabaseUpdateSpaceAvailable( const std::string& origin_identifier, int64 space_available) { - WebKit::WebDatabase::updateSpaceAvailable( + blink::WebDatabase::updateSpaceAvailable( WebString::fromUTF8(origin_identifier), space_available); } void DBMessageFilter::OnDatabaseResetSpaceAvailable( const std::string& origin_identifier) { - WebKit::WebDatabase::resetSpaceAvailable( + blink::WebDatabase::resetSpaceAvailable( WebString::fromUTF8(origin_identifier)); } void DBMessageFilter::OnDatabaseCloseImmediately( const std::string& origin_identifier, const string16& database_name) { - WebKit::WebDatabase::closeDatabaseImmediately( + blink::WebDatabase::closeDatabaseImmediately( WebString::fromUTF8(origin_identifier), database_name); } diff --git a/content/child/fileapi/webfilesystem_impl.cc b/content/child/fileapi/webfilesystem_impl.cc index 1d72fa3..640c1a9 100644 --- a/content/child/fileapi/webfilesystem_impl.cc +++ b/content/child/fileapi/webfilesystem_impl.cc @@ -25,12 +25,12 @@ #include "webkit/common/fileapi/file_system_util.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebFileInfo; -using WebKit::WebFileSystemCallbacks; -using WebKit::WebFileSystemEntry; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebFileInfo; +using blink::WebFileSystemCallbacks; +using blink::WebFileSystemEntry; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; using webkit_glue::WorkerTaskRunner; namespace content { @@ -165,7 +165,7 @@ void ResolveURLCallbackAdapter( thread_id, callbacks_id, waitable_results, &WebFileSystemCallbacks::didResolveURL, MakeTuple(UTF8ToUTF16(info.name), info.root_url, - static_cast<WebKit::WebFileSystemType>(info.mount_type), + static_cast<blink::WebFileSystemType>(info.mount_type), normalized_path.AsUTF16Unsafe(), is_directory)); } @@ -214,7 +214,7 @@ void ReadDirectoryCallbackAdapater( void DidCreateFileWriter( int callbacks_id, const GURL& path, - WebKit::WebFileWriterClient* client, + blink::WebFileWriterClient* client, base::MessageLoopProxy* main_thread_loop, const base::PlatformFileInfo& file_info) { WebFileSystemImpl* filesystem = @@ -226,7 +226,7 @@ void DidCreateFileWriter( filesystem->GetAndUnregisterCallbacks(callbacks_id); if (file_info.is_directory || file_info.size < 0) { - callbacks.didFail(WebKit::WebFileErrorInvalidState); + callbacks.didFail(blink::WebFileErrorInvalidState); return; } WebFileWriterImpl::Type type = @@ -242,7 +242,7 @@ void CreateFileWriterCallbackAdapter( WaitableCallbackResults* waitable_results, base::MessageLoopProxy* main_thread_loop, const GURL& path, - WebKit::WebFileWriterClient* client, + blink::WebFileWriterClient* client, const base::PlatformFileInfo& file_info) { DispatchResultsClosure( thread_id, callbacks_id, waitable_results, @@ -325,8 +325,8 @@ void WebFileSystemImpl::OnWorkerRunLoopStopped() { } void WebFileSystemImpl::openFileSystem( - const WebKit::WebURL& storage_partition, - WebKit::WebFileSystemType type, + const blink::WebURL& storage_partition, + blink::WebFileSystemType type, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -346,7 +346,7 @@ void WebFileSystemImpl::openFileSystem( } void WebFileSystemImpl::resolveURL( - const WebKit::WebURL& filesystem_url, + const blink::WebURL& filesystem_url, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -365,8 +365,8 @@ void WebFileSystemImpl::resolveURL( } void WebFileSystemImpl::deleteFileSystem( - const WebKit::WebURL& storage_partition, - WebKit::WebFileSystemType type, + const blink::WebURL& storage_partition, + blink::WebFileSystemType type, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -383,8 +383,8 @@ void WebFileSystemImpl::deleteFileSystem( } void WebFileSystemImpl::move( - const WebKit::WebURL& src_path, - const WebKit::WebURL& dest_path, + const blink::WebURL& src_path, + const blink::WebURL& dest_path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -400,8 +400,8 @@ void WebFileSystemImpl::move( } void WebFileSystemImpl::copy( - const WebKit::WebURL& src_path, - const WebKit::WebURL& dest_path, + const blink::WebURL& src_path, + const blink::WebURL& dest_path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -417,7 +417,7 @@ void WebFileSystemImpl::copy( } void WebFileSystemImpl::remove( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -433,7 +433,7 @@ void WebFileSystemImpl::remove( } void WebFileSystemImpl::removeRecursively( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -449,7 +449,7 @@ void WebFileSystemImpl::removeRecursively( } void WebFileSystemImpl::readMetadata( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -468,7 +468,7 @@ void WebFileSystemImpl::readMetadata( } void WebFileSystemImpl::createFile( - const WebKit::WebURL& path, + const blink::WebURL& path, bool exclusive, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); @@ -485,7 +485,7 @@ void WebFileSystemImpl::createFile( } void WebFileSystemImpl::createDirectory( - const WebKit::WebURL& path, + const blink::WebURL& path, bool exclusive, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); @@ -502,7 +502,7 @@ void WebFileSystemImpl::createDirectory( } void WebFileSystemImpl::fileExists( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -518,7 +518,7 @@ void WebFileSystemImpl::fileExists( } void WebFileSystemImpl::directoryExists( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -534,7 +534,7 @@ void WebFileSystemImpl::directoryExists( } void WebFileSystemImpl::readDirectory( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -554,7 +554,7 @@ base::Unretained(waitable_results))), void WebFileSystemImpl::createFileWriter( const WebURL& path, - WebKit::WebFileWriterClient* client, + blink::WebFileWriterClient* client, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = @@ -574,7 +574,7 @@ void WebFileSystemImpl::createFileWriter( } void WebFileSystemImpl::createSnapshotFileAndReadMetadata( - const WebKit::WebURL& path, + const blink::WebURL& path, WebFileSystemCallbacks callbacks) { int callbacks_id = RegisterCallbacks(callbacks); WaitableCallbackResults* waitable_results = diff --git a/content/child/fileapi/webfilesystem_impl.h b/content/child/fileapi/webfilesystem_impl.h index 5998efd..d37f9a3 100644 --- a/content/child/fileapi/webfilesystem_impl.h +++ b/content/child/fileapi/webfilesystem_impl.h @@ -18,7 +18,7 @@ namespace base { class MessageLoopProxy; } -namespace WebKit { +namespace blink { class WebURL; class WebFileWriter; class WebFileWriterClient; @@ -27,7 +27,7 @@ class WebFileWriterClient; namespace content { class WebFileSystemImpl - : public WebKit::WebFileSystem, + : public blink::WebFileSystem, public webkit_glue::WorkerTaskRunner::Observer, public base::NonThreadSafe { public: @@ -50,64 +50,64 @@ class WebFileSystemImpl // WebFileSystem implementation. virtual void openFileSystem( - const WebKit::WebURL& storage_partition, - const WebKit::WebFileSystemType type, - WebKit::WebFileSystemCallbacks); + const blink::WebURL& storage_partition, + const blink::WebFileSystemType type, + blink::WebFileSystemCallbacks); virtual void resolveURL( - const WebKit::WebURL& filesystem_url, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& filesystem_url, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void deleteFileSystem( - const WebKit::WebURL& storage_partition, - const WebKit::WebFileSystemType type, - WebKit::WebFileSystemCallbacks); + const blink::WebURL& storage_partition, + const blink::WebFileSystemType type, + blink::WebFileSystemCallbacks); virtual void move( - const WebKit::WebURL& src_path, - const WebKit::WebURL& dest_path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& src_path, + const blink::WebURL& dest_path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void copy( - const WebKit::WebURL& src_path, - const WebKit::WebURL& dest_path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& src_path, + const blink::WebURL& dest_path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void remove( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void removeRecursively( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void readMetadata( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void createFile( - const WebKit::WebURL& path, + const blink::WebURL& path, bool exclusive, - WebKit::WebFileSystemCallbacks) OVERRIDE; + blink::WebFileSystemCallbacks) OVERRIDE; virtual void createDirectory( - const WebKit::WebURL& path, + const blink::WebURL& path, bool exclusive, - WebKit::WebFileSystemCallbacks) OVERRIDE; + blink::WebFileSystemCallbacks) OVERRIDE; virtual void fileExists( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void directoryExists( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void readDirectory( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void createFileWriter( - const WebKit::WebURL& path, - WebKit::WebFileWriterClient*, - WebKit::WebFileSystemCallbacks) OVERRIDE; + const blink::WebURL& path, + blink::WebFileWriterClient*, + blink::WebFileSystemCallbacks) OVERRIDE; virtual void createSnapshotFileAndReadMetadata( - const WebKit::WebURL& path, - WebKit::WebFileSystemCallbacks); + const blink::WebURL& path, + blink::WebFileSystemCallbacks); - int RegisterCallbacks(const WebKit::WebFileSystemCallbacks& callbacks); - WebKit::WebFileSystemCallbacks GetAndUnregisterCallbacks( + int RegisterCallbacks(const blink::WebFileSystemCallbacks& callbacks); + blink::WebFileSystemCallbacks GetAndUnregisterCallbacks( int callbacks_id); private: - typedef std::map<int, WebKit::WebFileSystemCallbacks> CallbacksMap; + typedef std::map<int, blink::WebFileSystemCallbacks> CallbacksMap; scoped_refptr<base::MessageLoopProxy> main_thread_loop_; diff --git a/content/child/fileapi/webfilewriter_base.cc b/content/child/fileapi/webfilewriter_base.cc index 5a97b57..cde644b 100644 --- a/content/child/fileapi/webfilewriter_base.cc +++ b/content/child/fileapi/webfilewriter_base.cc @@ -15,7 +15,7 @@ using fileapi::PlatformFileErrorToWebFileError; namespace content { WebFileWriterBase::WebFileWriterBase(const GURL& path, - WebKit::WebFileWriterClient* client) + blink::WebFileWriterClient* client) : path_(path), client_(client), operation_(kOperationNone), @@ -32,7 +32,7 @@ void WebFileWriterBase::truncate(long long length) { void WebFileWriterBase::write( long long position, - const WebKit::WebString& id) { + const blink::WebString& id) { DCHECK_EQ(kOperationNone, operation_); DCHECK_EQ(kCancelNotInProgress, cancel_state_); operation_ = kOperationWrite; @@ -147,7 +147,7 @@ void WebFileWriterBase::FinishCancel() { DCHECK(kOperationNone != operation_); cancel_state_ = kCancelNotInProgress; operation_ = kOperationNone; - client_->didFail(WebKit::WebFileErrorAbort); + client_->didFail(blink::WebFileErrorAbort); } } // namespace content diff --git a/content/child/fileapi/webfilewriter_base.h b/content/child/fileapi/webfilewriter_base.h index af63ffb..5168e3c 100644 --- a/content/child/fileapi/webfilewriter_base.h +++ b/content/child/fileapi/webfilewriter_base.h @@ -10,7 +10,7 @@ #include "third_party/WebKit/public/platform/WebFileWriter.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebFileWriterClient; class WebURL; } @@ -18,14 +18,14 @@ class WebURL; namespace content { class CONTENT_EXPORT WebFileWriterBase - : public NON_EXPORTED_BASE(WebKit::WebFileWriter) { + : public NON_EXPORTED_BASE(blink::WebFileWriter) { public: - WebFileWriterBase(const GURL& path, WebKit::WebFileWriterClient* client); + WebFileWriterBase(const GURL& path, blink::WebFileWriterClient* client); virtual ~WebFileWriterBase(); // WebFileWriter implementation virtual void truncate(long long length); - virtual void write(long long position, const WebKit::WebString& id); + virtual void write(long long position, const blink::WebString& id); virtual void cancel(); protected: @@ -61,7 +61,7 @@ class CONTENT_EXPORT WebFileWriterBase void FinishCancel(); GURL path_; - WebKit::WebFileWriterClient* client_; + blink::WebFileWriterClient* client_; OperationType operation_; CancelState cancel_state_; }; diff --git a/content/child/fileapi/webfilewriter_base_unittest.cc b/content/child/fileapi/webfilewriter_base_unittest.cc index 95c849a..95e0ba5 100644 --- a/content/child/fileapi/webfilewriter_base_unittest.cc +++ b/content/child/fileapi/webfilewriter_base_unittest.cc @@ -39,7 +39,7 @@ GURL mock_path_as_gurl() { class TestableFileWriter : public WebFileWriterBase { public: - explicit TestableFileWriter(WebKit::WebFileWriterClient* client) + explicit TestableFileWriter(blink::WebFileWriterClient* client) : WebFileWriterBase(mock_path_as_gurl(), client) { reset(); } @@ -128,13 +128,13 @@ class TestableFileWriter : public WebFileWriterBase { }; class FileWriterTest : public testing::Test, - public WebKit::WebFileWriterClient { + public blink::WebFileWriterClient { public: FileWriterTest() { reset(); } - WebKit::WebFileWriter* writer() { + blink::WebFileWriter* writer() { return testable_writer_.get(); } @@ -157,7 +157,7 @@ class FileWriterTest : public testing::Test, testable_writer_.reset(NULL); } - virtual void didFail(WebKit::WebFileError error) { + virtual void didFail(blink::WebFileError error) { EXPECT_FALSE(received_did_fail_); received_did_fail_ = true; fail_error_received_ = error; @@ -174,7 +174,7 @@ class FileWriterTest : public testing::Test, received_did_write_complete_ = false; received_did_truncate_ = false; received_did_fail_ = false; - fail_error_received_ = static_cast<WebKit::WebFileError>(0); + fail_error_received_ = static_cast<blink::WebFileError>(0); } scoped_ptr<TestableFileWriter> testable_writer_; @@ -186,7 +186,7 @@ class FileWriterTest : public testing::Test, bool received_did_write_complete_; bool received_did_truncate_; bool received_did_fail_; - WebKit::WebFileError fail_error_received_; + blink::WebFileError fail_error_received_; DISALLOW_COPY_AND_ASSIGN(FileWriterTest); }; @@ -195,7 +195,7 @@ TEST_F(FileWriterTest, BasicFileWrite) { // Call the webkit facing api. const std::string kBlobId("1234"); writer()->write(kBasicFileWrite_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); // Check that the derived class gets called correctly. EXPECT_TRUE(testable_writer_->received_write_); @@ -238,7 +238,7 @@ TEST_F(FileWriterTest, ErrorFileWrite) { // Call the webkit facing api. const std::string kBlobId("1234"); writer()->write(kErrorFileWrite_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); // Check that the derived class gets called correctly. EXPECT_TRUE(testable_writer_->received_write_); @@ -252,7 +252,7 @@ TEST_F(FileWriterTest, ErrorFileWrite) { // Check that the client gets called correctly. EXPECT_TRUE(received_did_fail_); - EXPECT_EQ(WebKit::WebFileErrorNotFound, fail_error_received_); + EXPECT_EQ(blink::WebFileErrorNotFound, fail_error_received_); EXPECT_EQ(0, received_did_write_count_); EXPECT_FALSE(received_did_truncate_); } @@ -272,7 +272,7 @@ TEST_F(FileWriterTest, ErrorFileTruncate) { // Check that the client gets called correctly. EXPECT_TRUE(received_did_fail_); - EXPECT_EQ(WebKit::WebFileErrorNotFound, fail_error_received_); + EXPECT_EQ(blink::WebFileErrorNotFound, fail_error_received_); EXPECT_FALSE(received_did_truncate_); EXPECT_EQ(0, received_did_write_count_); } @@ -281,7 +281,7 @@ TEST_F(FileWriterTest, MultiFileWrite) { // Call the webkit facing api. const std::string kBlobId("1234"); writer()->write(kMultiFileWrite_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); // Check that the derived class gets called correctly. EXPECT_TRUE(testable_writer_->received_write_); @@ -305,7 +305,7 @@ TEST_F(FileWriterTest, CancelFileWriteBeforeCompletion) { // Call the webkit facing api. const std::string kBlobId("1234"); writer()->write(kCancelFileWriteBeforeCompletion_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); // Check that the derived class gets called correctly. EXPECT_TRUE(testable_writer_->received_write_); @@ -319,7 +319,7 @@ TEST_F(FileWriterTest, CancelFileWriteBeforeCompletion) { // Check that the client gets called correctly. EXPECT_TRUE(received_did_fail_); - EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_); + EXPECT_EQ(blink::WebFileErrorAbort, fail_error_received_); EXPECT_EQ(1, received_did_write_count_); EXPECT_FALSE(received_did_write_complete_); EXPECT_EQ(1, received_did_write_bytes_total_); @@ -330,7 +330,7 @@ TEST_F(FileWriterTest, CancelFileWriteAfterCompletion) { // Call the webkit facing api. const std::string kBlobId("1234"); writer()->write(kCancelFileWriteAfterCompletion_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); // Check that the derived class gets called correctly. EXPECT_TRUE(testable_writer_->received_write_); @@ -344,7 +344,7 @@ TEST_F(FileWriterTest, CancelFileWriteAfterCompletion) { // Check that the client gets called correctly. EXPECT_TRUE(received_did_fail_); - EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_); + EXPECT_EQ(blink::WebFileErrorAbort, fail_error_received_); EXPECT_EQ(1, received_did_write_count_); EXPECT_FALSE(received_did_write_complete_); EXPECT_EQ(1, received_did_write_bytes_total_); @@ -366,7 +366,7 @@ TEST_F(FileWriterTest, CancelFileTruncate) { // Check that the client gets called correctly. EXPECT_TRUE(received_did_fail_); - EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_); + EXPECT_EQ(blink::WebFileErrorAbort, fail_error_received_); EXPECT_FALSE(received_did_truncate_); EXPECT_EQ(0, received_did_write_count_); } @@ -386,7 +386,7 @@ TEST_F(FileWriterTest, CancelFailedTruncate) { // Check that the client gets called correctly. EXPECT_TRUE(received_did_fail_); - EXPECT_EQ(WebKit::WebFileErrorAbort, fail_error_received_); + EXPECT_EQ(blink::WebFileErrorAbort, fail_error_received_); EXPECT_FALSE(received_did_truncate_); EXPECT_EQ(0, received_did_write_count_); } @@ -395,7 +395,7 @@ TEST_F(FileWriterTest, DeleteInCompletionCallbacks) { const std::string kBlobId("1234"); delete_in_client_callback_ = true; writer()->write(kBasicFileWrite_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); EXPECT_FALSE(testable_writer_.get()); reset(); @@ -406,7 +406,7 @@ TEST_F(FileWriterTest, DeleteInCompletionCallbacks) { reset(); delete_in_client_callback_ = true; writer()->write(kErrorFileWrite_Offset, - WebKit::WebString::fromUTF8(kBlobId)); + blink::WebString::fromUTF8(kBlobId)); EXPECT_FALSE(testable_writer_.get()); reset(); diff --git a/content/child/fileapi/webfilewriter_impl.cc b/content/child/fileapi/webfilewriter_impl.cc index bd5fbe3..7077e9a 100644 --- a/content/child/fileapi/webfilewriter_impl.cc +++ b/content/child/fileapi/webfilewriter_impl.cc @@ -122,7 +122,7 @@ class WebFileWriterImpl::WriterBridge }; WebFileWriterImpl::WebFileWriterImpl( - const GURL& path, WebKit::WebFileWriterClient* client, + const GURL& path, blink::WebFileWriterClient* client, Type type, base::MessageLoopProxy* main_thread_loop) : WebFileWriterBase(path, client), diff --git a/content/child/fileapi/webfilewriter_impl.h b/content/child/fileapi/webfilewriter_impl.h index c92ea1e..34f63bd 100644 --- a/content/child/fileapi/webfilewriter_impl.h +++ b/content/child/fileapi/webfilewriter_impl.h @@ -24,7 +24,7 @@ class WebFileWriterImpl : public WebFileWriterBase, }; WebFileWriterImpl(const GURL& path, - WebKit::WebFileWriterClient* client, + blink::WebFileWriterClient* client, Type type, base::MessageLoopProxy* main_thread_loop); virtual ~WebFileWriterImpl(); diff --git a/content/child/image_decoder.cc b/content/child/image_decoder.cc index c5043be..333395e 100644 --- a/content/child/image_decoder.cc +++ b/content/child/image_decoder.cc @@ -10,8 +10,8 @@ #include "third_party/WebKit/public/platform/WebSize.h" #include "third_party/skia/include/core/SkBitmap.h" -using WebKit::WebData; -using WebKit::WebImage; +using blink::WebData; +using blink::WebImage; namespace content { @@ -41,7 +41,7 @@ SkBitmap ImageDecoder::Decode(const unsigned char* data, size_t size) const { // static std::vector<SkBitmap> ImageDecoder::DecodeAll( const unsigned char* data, size_t size) { - const WebKit::WebVector<WebImage>& images = WebImage::framesFromData( + const blink::WebVector<WebImage>& images = WebImage::framesFromData( WebData(reinterpret_cast<const char*>(data), size)); std::vector<SkBitmap> result; for (size_t i = 0; i < images.size(); ++i) diff --git a/content/child/indexed_db/indexed_db_dispatcher.cc b/content/child/indexed_db/indexed_db_dispatcher.cc index 4ba030a..b453f50 100644 --- a/content/child/indexed_db/indexed_db_dispatcher.cc +++ b/content/child/indexed_db/indexed_db_dispatcher.cc @@ -18,15 +18,15 @@ #include "third_party/WebKit/public/platform/WebIDBDatabaseError.h" #include "third_party/WebKit/public/platform/WebIDBDatabaseException.h" -using WebKit::WebData; -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBDatabase; -using WebKit::WebIDBDatabaseCallbacks; -using WebKit::WebIDBDatabaseError; -using WebKit::WebIDBKey; -using WebKit::WebIDBMetadata; -using WebKit::WebString; -using WebKit::WebVector; +using blink::WebData; +using blink::WebIDBCallbacks; +using blink::WebIDBDatabase; +using blink::WebIDBDatabaseCallbacks; +using blink::WebIDBDatabaseError; +using blink::WebIDBKey; +using blink::WebIDBMetadata; +using blink::WebString; +using blink::WebVector; using base::ThreadLocalPointer; using webkit_glue::WorkerTaskRunner; @@ -331,7 +331,7 @@ void IndexedDBDispatcher::RequestIDBDatabasePut( if (value.size() > kMaxIDBValueSizeInBytes) { callbacks->onError(WebIDBDatabaseError( - WebKit::WebIDBDatabaseExceptionUnknownError, + blink::WebIDBDatabaseExceptionUnknownError, WebString::fromUTF8(base::StringPrintf( "The serialized value is too large" " (size=%" PRIuS " bytes, max=%" PRIuS " bytes).", diff --git a/content/child/indexed_db/indexed_db_dispatcher.h b/content/child/indexed_db/indexed_db_dispatcher.h index 686461f..f352b30 100644 --- a/content/child/indexed_db/indexed_db_dispatcher.h +++ b/content/child/indexed_db/indexed_db_dispatcher.h @@ -26,7 +26,7 @@ struct IndexedDBMsg_CallbacksSuccessCursorPrefetch_Params; struct IndexedDBMsg_CallbacksSuccessIDBCursor_Params; struct IndexedDBMsg_CallbacksUpgradeNeeded_Params; -namespace WebKit { +namespace blink { class WebData; } @@ -60,38 +60,38 @@ class CONTENT_EXPORT IndexedDBDispatcher // webkit_glue::WorkerTaskRunner::Observer implementation. virtual void OnWorkerRunLoopStopped() OVERRIDE; - static WebKit::WebIDBMetadata ConvertMetadata( + static blink::WebIDBMetadata ConvertMetadata( const IndexedDBDatabaseMetadata& idb_metadata); void OnMessageReceived(const IPC::Message& msg); bool Send(IPC::Message* msg); void RequestIDBFactoryGetDatabaseNames( - WebKit::WebIDBCallbacks* callbacks, + blink::WebIDBCallbacks* callbacks, const std::string& database_identifier); void RequestIDBFactoryOpen( const string16& name, int64 version, int64 transaction_id, - WebKit::WebIDBCallbacks* callbacks, - WebKit::WebIDBDatabaseCallbacks* database_callbacks, + blink::WebIDBCallbacks* callbacks, + blink::WebIDBDatabaseCallbacks* database_callbacks, const std::string& database_identifier); void RequestIDBFactoryDeleteDatabase(const string16& name, - WebKit::WebIDBCallbacks* callbacks, + blink::WebIDBCallbacks* callbacks, const std::string& database_identifier); void RequestIDBCursorAdvance(unsigned long count, - WebKit::WebIDBCallbacks* callbacks_ptr, + blink::WebIDBCallbacks* callbacks_ptr, int32 ipc_cursor_id); virtual void RequestIDBCursorContinue(const IndexedDBKey& key, - WebKit::WebIDBCallbacks* callbacks_ptr, + blink::WebIDBCallbacks* callbacks_ptr, int32 ipc_cursor_id); virtual void RequestIDBCursorPrefetch(int n, - WebKit::WebIDBCallbacks* callbacks_ptr, + blink::WebIDBCallbacks* callbacks_ptr, int32 ipc_cursor_id); void RequestIDBCursorPrefetchReset(int used_prefetches, @@ -104,8 +104,8 @@ class CONTENT_EXPORT IndexedDBDispatcher void RequestIDBDatabaseCreateTransaction( int32 ipc_database_id, int64 transaction_id, - WebKit::WebIDBDatabaseCallbacks* database_callbacks_ptr, - WebKit::WebVector<long long> object_store_ids, + blink::WebIDBDatabaseCallbacks* database_callbacks_ptr, + blink::WebVector<long long> object_store_ids, unsigned short mode); void RequestIDBDatabaseGet(int32 ipc_database_id, @@ -114,18 +114,18 @@ class CONTENT_EXPORT IndexedDBDispatcher int64 index_id, const IndexedDBKeyRange& key_range, bool key_only, - WebKit::WebIDBCallbacks* callbacks); + blink::WebIDBCallbacks* callbacks); void RequestIDBDatabasePut( int32 ipc_database_id, int64 transaction_id, int64 object_store_id, - const WebKit::WebData& value, + const blink::WebData& value, const IndexedDBKey& key, - WebKit::WebIDBDatabase::PutMode put_mode, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebVector<long long>& index_ids, - const WebKit::WebVector<WebKit::WebVector<WebKit::WebIDBKey> >& + blink::WebIDBDatabase::PutMode put_mode, + blink::WebIDBCallbacks* callbacks, + const blink::WebVector<long long>& index_ids, + const blink::WebVector<blink::WebVector<blink::WebIDBKey> >& index_keys); void RequestIDBDatabaseOpenCursor(int32 ipc_database_id, @@ -135,26 +135,26 @@ class CONTENT_EXPORT IndexedDBDispatcher const IndexedDBKeyRange& key_range, unsigned short direction, bool key_only, - WebKit::WebIDBDatabase::TaskType task_type, - WebKit::WebIDBCallbacks* callbacks); + blink::WebIDBDatabase::TaskType task_type, + blink::WebIDBCallbacks* callbacks); void RequestIDBDatabaseCount(int32 ipc_database_id, int64 transaction_id, int64 object_store_id, int64 index_id, const IndexedDBKeyRange& key_range, - WebKit::WebIDBCallbacks* callbacks); + blink::WebIDBCallbacks* callbacks); void RequestIDBDatabaseDeleteRange(int32 ipc_database_id, int64 transaction_id, int64 object_store_id, const IndexedDBKeyRange& key_range, - WebKit::WebIDBCallbacks* callbacks); + blink::WebIDBCallbacks* callbacks); void RequestIDBDatabaseClear(int32 ipc_database_id, int64 transaction_id, int64 object_store_id, - WebKit::WebIDBCallbacks* callbacks); + blink::WebIDBCallbacks* callbacks); virtual void CursorDestroyed(int32 ipc_cursor_id); void DatabaseDestroyed(int32 ipc_database_id); @@ -167,8 +167,8 @@ class CONTENT_EXPORT IndexedDBDispatcher } template <typename T> - void init_params(T& params, WebKit::WebIDBCallbacks* callbacks_ptr) { - scoped_ptr<WebKit::WebIDBCallbacks> callbacks(callbacks_ptr); + void init_params(T& params, blink::WebIDBCallbacks* callbacks_ptr) { + scoped_ptr<blink::WebIDBCallbacks> callbacks(callbacks_ptr); params.ipc_thread_id = CurrentWorkerId(); params.ipc_callbacks_id = pending_callbacks_.Add(callbacks.release()); } @@ -233,8 +233,8 @@ class CONTENT_EXPORT IndexedDBDispatcher // Careful! WebIDBCallbacks wraps non-threadsafe data types. It must be // destroyed and used on the same thread it was created on. - IDMap<WebKit::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; - IDMap<WebKit::WebIDBDatabaseCallbacks, IDMapOwnPointer> + IDMap<blink::WebIDBCallbacks, IDMapOwnPointer> pending_callbacks_; + IDMap<blink::WebIDBDatabaseCallbacks, IDMapOwnPointer> pending_database_callbacks_; // Map from cursor id to RendererWebIDBCursorImpl. diff --git a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc index 8e8c6c2..61f3b0e 100644 --- a/content/child/indexed_db/indexed_db_dispatcher_unittest.cc +++ b/content/child/indexed_db/indexed_db_dispatcher_unittest.cc @@ -13,12 +13,12 @@ #include "third_party/WebKit/public/platform/WebData.h" #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" -using WebKit::WebData; -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBDatabase; -using WebKit::WebIDBDatabaseError; -using WebKit::WebIDBKey; -using WebKit::WebVector; +using blink::WebData; +using blink::WebIDBCallbacks; +using blink::WebIDBDatabase; +using blink::WebIDBDatabaseError; +using blink::WebIDBKey; +using blink::WebVector; namespace content { namespace { @@ -55,7 +55,7 @@ TEST(IndexedDBDispatcherTest, ValueSizeTest) { MockCallbacks callbacks; IndexedDBDispatcher dispatcher(thread_safe_sender.get()); - IndexedDBKey key(0, WebKit::WebIDBKeyTypeNumber); + IndexedDBKey key(0, blink::WebIDBKeyTypeNumber); dispatcher.RequestIDBDatabasePut(ipc_dummy_id, transaction_id, object_store_id, diff --git a/content/child/indexed_db/indexed_db_key_builders.cc b/content/child/indexed_db/indexed_db_key_builders.cc index d2c2773..162546c 100644 --- a/content/child/indexed_db/indexed_db_key_builders.cc +++ b/content/child/indexed_db/indexed_db_key_builders.cc @@ -7,17 +7,17 @@ #include "base/logging.h" #include "third_party/WebKit/public/platform/WebVector.h" -using WebKit::WebIDBKey; -using WebKit::WebIDBKeyRange; -using WebKit::WebIDBKeyTypeArray; -using WebKit::WebIDBKeyTypeDate; -using WebKit::WebIDBKeyTypeInvalid; -using WebKit::WebIDBKeyTypeMin; -using WebKit::WebIDBKeyTypeNull; -using WebKit::WebIDBKeyTypeNumber; -using WebKit::WebIDBKeyTypeString; -using WebKit::WebVector; -using WebKit::WebString; +using blink::WebIDBKey; +using blink::WebIDBKeyRange; +using blink::WebIDBKeyTypeArray; +using blink::WebIDBKeyTypeDate; +using blink::WebIDBKeyTypeInvalid; +using blink::WebIDBKeyTypeMin; +using blink::WebIDBKeyTypeNull; +using blink::WebIDBKeyTypeNumber; +using blink::WebIDBKeyTypeString; +using blink::WebVector; +using blink::WebString; static content::IndexedDBKey::KeyArray CopyKeyArray(const WebIDBKey& other) { content::IndexedDBKey::KeyArray result; @@ -40,7 +40,7 @@ static std::vector<string16> CopyArray( namespace content { -IndexedDBKey IndexedDBKeyBuilder::Build(const WebKit::WebIDBKey& key) { +IndexedDBKey IndexedDBKeyBuilder::Build(const blink::WebIDBKey& key) { switch (key.keyType()) { case WebIDBKeyTypeArray: return IndexedDBKey(CopyKeyArray(key)); @@ -66,7 +66,7 @@ WebIDBKey WebIDBKeyBuilder::Build(const IndexedDBKey& key) { switch (key.type()) { case WebIDBKeyTypeArray: { const IndexedDBKey::KeyArray& array = key.array(); - WebKit::WebVector<WebIDBKey> web_array(array.size()); + blink::WebVector<WebIDBKey> web_array(array.size()); for (size_t i = 0; i < array.size(); ++i) { web_array[i] = Build(array[i]); } @@ -101,31 +101,31 @@ IndexedDBKeyRange IndexedDBKeyRangeBuilder::Build( } IndexedDBKeyPath IndexedDBKeyPathBuilder::Build( - const WebKit::WebIDBKeyPath& key_path) { + const blink::WebIDBKeyPath& key_path) { switch (key_path.keyPathType()) { - case WebKit::WebIDBKeyPathTypeString: + case blink::WebIDBKeyPathTypeString: return IndexedDBKeyPath(key_path.string()); - case WebKit::WebIDBKeyPathTypeArray: + case blink::WebIDBKeyPathTypeArray: return IndexedDBKeyPath(CopyArray(key_path.array())); - case WebKit::WebIDBKeyPathTypeNull: + case blink::WebIDBKeyPathTypeNull: return IndexedDBKeyPath(); } NOTREACHED(); return IndexedDBKeyPath(); } -WebKit::WebIDBKeyPath WebIDBKeyPathBuilder::Build( +blink::WebIDBKeyPath WebIDBKeyPathBuilder::Build( const IndexedDBKeyPath& key_path) { switch (key_path.type()) { - case WebKit::WebIDBKeyPathTypeString: - return WebKit::WebIDBKeyPath::create(WebString(key_path.string())); - case WebKit::WebIDBKeyPathTypeArray: - return WebKit::WebIDBKeyPath::create(CopyArray(key_path.array())); - case WebKit::WebIDBKeyPathTypeNull: - return WebKit::WebIDBKeyPath::createNull(); + case blink::WebIDBKeyPathTypeString: + return blink::WebIDBKeyPath::create(WebString(key_path.string())); + case blink::WebIDBKeyPathTypeArray: + return blink::WebIDBKeyPath::create(CopyArray(key_path.array())); + case blink::WebIDBKeyPathTypeNull: + return blink::WebIDBKeyPath::createNull(); } NOTREACHED(); - return WebKit::WebIDBKeyPath::createNull(); + return blink::WebIDBKeyPath::createNull(); } } // namespace content diff --git a/content/child/indexed_db/indexed_db_key_builders.h b/content/child/indexed_db/indexed_db_key_builders.h index e15b63b..5a51a8a 100644 --- a/content/child/indexed_db/indexed_db_key_builders.h +++ b/content/child/indexed_db/indexed_db_key_builders.h @@ -13,7 +13,7 @@ #include "third_party/WebKit/public/platform/WebIDBKeyPath.h" #include "third_party/WebKit/public/platform/WebIDBKeyRange.h" -namespace WebKit { +namespace blink { class WebIDBKey; } @@ -21,27 +21,27 @@ namespace content { class CONTENT_EXPORT IndexedDBKeyBuilder { public: - static IndexedDBKey Build(const WebKit::WebIDBKey& key); + static IndexedDBKey Build(const blink::WebIDBKey& key); }; class CONTENT_EXPORT WebIDBKeyBuilder { public: - static WebKit::WebIDBKey Build(const content::IndexedDBKey& key); + static blink::WebIDBKey Build(const content::IndexedDBKey& key); }; class CONTENT_EXPORT IndexedDBKeyRangeBuilder { public: - static IndexedDBKeyRange Build(const WebKit::WebIDBKeyRange& key_range); + static IndexedDBKeyRange Build(const blink::WebIDBKeyRange& key_range); }; class CONTENT_EXPORT IndexedDBKeyPathBuilder { public: - static IndexedDBKeyPath Build(const WebKit::WebIDBKeyPath& key_path); + static IndexedDBKeyPath Build(const blink::WebIDBKeyPath& key_path); }; class CONTENT_EXPORT WebIDBKeyPathBuilder { public: - static WebKit::WebIDBKeyPath Build(const IndexedDBKeyPath& key_path); + static blink::WebIDBKeyPath Build(const IndexedDBKeyPath& key_path); }; } // namespace content diff --git a/content/child/indexed_db/proxy_webidbcursor_impl.cc b/content/child/indexed_db/proxy_webidbcursor_impl.cc index 0907647..7fd87bb 100644 --- a/content/child/indexed_db/proxy_webidbcursor_impl.cc +++ b/content/child/indexed_db/proxy_webidbcursor_impl.cc @@ -11,9 +11,9 @@ #include "content/child/indexed_db/indexed_db_key_builders.h" #include "content/common/indexed_db/indexed_db_messages.h" -using WebKit::WebData; -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBKey; +using blink::WebData; +using blink::WebIDBCallbacks; +using blink::WebIDBKey; namespace content { @@ -60,7 +60,7 @@ void RendererWebIDBCursorImpl::continueFunction( IndexedDBDispatcher::ThreadSpecificInstance(thread_safe_sender_.get()); scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); - if (key.keyType() == WebKit::WebIDBKeyTypeNull) { + if (key.keyType() == blink::WebIDBKeyTypeNull) { // No key, so this would qualify for a prefetch. ++continue_count_; diff --git a/content/child/indexed_db/proxy_webidbcursor_impl.h b/content/child/indexed_db/proxy_webidbcursor_impl.h index 2c8b8f2..87602b8 100644 --- a/content/child/indexed_db/proxy_webidbcursor_impl.h +++ b/content/child/indexed_db/proxy_webidbcursor_impl.h @@ -23,22 +23,22 @@ namespace content { class ThreadSafeSender; class CONTENT_EXPORT RendererWebIDBCursorImpl - : NON_EXPORTED_BASE(public WebKit::WebIDBCursor) { + : NON_EXPORTED_BASE(public blink::WebIDBCursor) { public: RendererWebIDBCursorImpl(int32 ipc_cursor_id, ThreadSafeSender* thread_safe_sender); virtual ~RendererWebIDBCursorImpl(); - virtual void advance(unsigned long count, WebKit::WebIDBCallbacks* callback); - virtual void continueFunction(const WebKit::WebIDBKey& key, - WebKit::WebIDBCallbacks* callback); + virtual void advance(unsigned long count, blink::WebIDBCallbacks* callback); + virtual void continueFunction(const blink::WebIDBKey& key, + blink::WebIDBCallbacks* callback); virtual void postSuccessHandlerCallback(); void SetPrefetchData(const std::vector<IndexedDBKey>& keys, const std::vector<IndexedDBKey>& primary_keys, - const std::vector<WebKit::WebData>& values); + const std::vector<blink::WebData>& values); - void CachedContinue(WebKit::WebIDBCallbacks* callbacks); + void CachedContinue(blink::WebIDBCallbacks* callbacks); void ResetPrefetchCache(); private: @@ -49,7 +49,7 @@ class CONTENT_EXPORT RendererWebIDBCursorImpl // Prefetch cache. std::deque<IndexedDBKey> prefetch_keys_; std::deque<IndexedDBKey> prefetch_primary_keys_; - std::deque<WebKit::WebData> prefetch_values_; + std::deque<blink::WebData> prefetch_values_; // Number of continue calls that would qualify for a pre-fetch. int continue_count_; diff --git a/content/child/indexed_db/proxy_webidbcursor_impl_unittest.cc b/content/child/indexed_db/proxy_webidbcursor_impl_unittest.cc index 9e7c69d..1ca4f21 100644 --- a/content/child/indexed_db/proxy_webidbcursor_impl_unittest.cc +++ b/content/child/indexed_db/proxy_webidbcursor_impl_unittest.cc @@ -14,11 +14,11 @@ #include "third_party/WebKit/public/platform/WebData.h" #include "third_party/WebKit/public/platform/WebIDBCallbacks.h" -using WebKit::WebData; -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBDatabase; -using WebKit::WebIDBKey; -using WebKit::WebIDBKeyTypeNumber; +using blink::WebData; +using blink::WebIDBCallbacks; +using blink::WebIDBDatabase; +using blink::WebIDBKey; +using blink::WebIDBKeyTypeNumber; namespace content { diff --git a/content/child/indexed_db/proxy_webidbdatabase_impl.cc b/content/child/indexed_db/proxy_webidbdatabase_impl.cc index 1cf9778..022093b 100644 --- a/content/child/indexed_db/proxy_webidbdatabase_impl.cc +++ b/content/child/indexed_db/proxy_webidbdatabase_impl.cc @@ -16,14 +16,14 @@ #include "third_party/WebKit/public/platform/WebVector.h" #include "webkit/child/worker_task_runner.h" -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBDatabaseCallbacks; -using WebKit::WebIDBMetadata; -using WebKit::WebIDBKey; -using WebKit::WebIDBKeyPath; -using WebKit::WebIDBKeyRange; -using WebKit::WebString; -using WebKit::WebVector; +using blink::WebIDBCallbacks; +using blink::WebIDBDatabaseCallbacks; +using blink::WebIDBMetadata; +using blink::WebIDBKey; +using blink::WebIDBKeyPath; +using blink::WebIDBKeyRange; +using blink::WebString; +using blink::WebVector; using webkit_glue::WorkerTaskRunner; namespace content { @@ -116,7 +116,7 @@ void RendererWebIDBDatabaseImpl::get( void RendererWebIDBDatabaseImpl::put( long long transaction_id, long long object_store_id, - const WebKit::WebData& value, + const blink::WebData& value, const WebIDBKey& key, PutMode put_mode, WebIDBCallbacks* callbacks, diff --git a/content/child/indexed_db/proxy_webidbdatabase_impl.h b/content/child/indexed_db/proxy_webidbdatabase_impl.h index ce8f0f3..c464560 100644 --- a/content/child/indexed_db/proxy_webidbdatabase_impl.h +++ b/content/child/indexed_db/proxy_webidbdatabase_impl.h @@ -9,7 +9,7 @@ #include "base/memory/ref_counted.h" #include "third_party/WebKit/public/platform/WebIDBDatabase.h" -namespace WebKit { +namespace blink { class WebIDBCallbacks; class WebIDBDatabaseCallbacks; class WebString; @@ -18,76 +18,76 @@ class WebString; namespace content { class ThreadSafeSender; -class RendererWebIDBDatabaseImpl : public WebKit::WebIDBDatabase { +class RendererWebIDBDatabaseImpl : public blink::WebIDBDatabase { public: RendererWebIDBDatabaseImpl(int32 ipc_database_id, int32 ipc_database_callbacks_id, ThreadSafeSender* thread_safe_sender); virtual ~RendererWebIDBDatabaseImpl(); - // WebKit::WebIDBDatabase + // blink::WebIDBDatabase virtual void createObjectStore( long long transaction_id, long long objectstore_id, - const WebKit::WebString& name, - const WebKit::WebIDBKeyPath& key_path, + const blink::WebString& name, + const blink::WebIDBKeyPath& key_path, bool auto_increment); virtual void deleteObjectStore( long long transaction_id, long long object_store_id); virtual void createTransaction( long long transaction_id, - WebKit::WebIDBDatabaseCallbacks* callbacks, - const WebKit::WebVector<long long>& scope, + blink::WebIDBDatabaseCallbacks* callbacks, + const blink::WebVector<long long>& scope, unsigned short mode); virtual void close(); virtual void get(long long transactionId, long long objectStoreId, long long indexId, - const WebKit::WebIDBKeyRange&, + const blink::WebIDBKeyRange&, bool keyOnly, - WebKit::WebIDBCallbacks*); + blink::WebIDBCallbacks*); virtual void put(long long transactionId, long long objectStoreId, - const WebKit::WebData& value, - const WebKit::WebIDBKey&, + const blink::WebData& value, + const blink::WebIDBKey&, PutMode, - WebKit::WebIDBCallbacks*, - const WebKit::WebVector<long long>& indexIds, - const WebKit::WebVector<WebIndexKeys>&); + blink::WebIDBCallbacks*, + const blink::WebVector<long long>& indexIds, + const blink::WebVector<WebIndexKeys>&); virtual void setIndexKeys(long long transactionId, long long objectStoreId, - const WebKit::WebIDBKey&, - const WebKit::WebVector<long long>& indexIds, - const WebKit::WebVector<WebIndexKeys>&); + const blink::WebIDBKey&, + const blink::WebVector<long long>& indexIds, + const blink::WebVector<WebIndexKeys>&); virtual void setIndexesReady(long long transactionId, long long objectStoreId, - const WebKit::WebVector<long long>& indexIds); + const blink::WebVector<long long>& indexIds); virtual void openCursor(long long transactionId, long long objectStoreId, long long indexId, - const WebKit::WebIDBKeyRange&, + const blink::WebIDBKeyRange&, unsigned short direction, bool keyOnly, TaskType, - WebKit::WebIDBCallbacks*); + blink::WebIDBCallbacks*); virtual void count(long long transactionId, long long objectStoreId, long long indexId, - const WebKit::WebIDBKeyRange&, - WebKit::WebIDBCallbacks*); + const blink::WebIDBKeyRange&, + blink::WebIDBCallbacks*); virtual void deleteRange(long long transactionId, long long objectStoreId, - const WebKit::WebIDBKeyRange&, - WebKit::WebIDBCallbacks*); + const blink::WebIDBKeyRange&, + blink::WebIDBCallbacks*); virtual void clear(long long transactionId, long long objectStoreId, - WebKit::WebIDBCallbacks*); + blink::WebIDBCallbacks*); virtual void createIndex(long long transactionId, long long objectStoreId, long long indexId, - const WebKit::WebString& name, - const WebKit::WebIDBKeyPath&, + const blink::WebString& name, + const blink::WebIDBKeyPath&, bool unique, bool multiEntry); virtual void deleteIndex(long long transactionId, long diff --git a/content/child/indexed_db/proxy_webidbfactory_impl.cc b/content/child/indexed_db/proxy_webidbfactory_impl.cc index 1e3d861..62ee3a1 100644 --- a/content/child/indexed_db/proxy_webidbfactory_impl.cc +++ b/content/child/indexed_db/proxy_webidbfactory_impl.cc @@ -9,10 +9,10 @@ #include "third_party/WebKit/public/platform/WebCString.h" #include "third_party/WebKit/public/platform/WebString.h" -using WebKit::WebIDBCallbacks; -using WebKit::WebIDBDatabase; -using WebKit::WebIDBDatabaseCallbacks; -using WebKit::WebString; +using blink::WebIDBCallbacks; +using blink::WebIDBDatabase; +using blink::WebIDBDatabaseCallbacks; +using blink::WebString; namespace content { diff --git a/content/child/indexed_db/proxy_webidbfactory_impl.h b/content/child/indexed_db/proxy_webidbfactory_impl.h index 9b7852d..696a8e1 100644 --- a/content/child/indexed_db/proxy_webidbfactory_impl.h +++ b/content/child/indexed_db/proxy_webidbfactory_impl.h @@ -11,33 +11,33 @@ #include "third_party/WebKit/public/platform/WebIDBFactory.h" #include "third_party/WebKit/public/platform/WebVector.h" -namespace WebKit { +namespace blink { class WebString; } namespace content { class ThreadSafeSender; -class RendererWebIDBFactoryImpl : public WebKit::WebIDBFactory { +class RendererWebIDBFactoryImpl : public blink::WebIDBFactory { public: explicit RendererWebIDBFactoryImpl(ThreadSafeSender* thread_safe_sender); virtual ~RendererWebIDBFactoryImpl(); // See WebIDBFactory.h for documentation on these functions. virtual void getDatabaseNames( - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebString& database_identifier); + blink::WebIDBCallbacks* callbacks, + const blink::WebString& database_identifier); virtual void open( - const WebKit::WebString& name, + const blink::WebString& name, long long version, long long transaction_id, - WebKit::WebIDBCallbacks* callbacks, - WebKit::WebIDBDatabaseCallbacks* databaseCallbacks, - const WebKit::WebString& database_identifier); + blink::WebIDBCallbacks* callbacks, + blink::WebIDBDatabaseCallbacks* databaseCallbacks, + const blink::WebString& database_identifier); virtual void deleteDatabase( - const WebKit::WebString& name, - WebKit::WebIDBCallbacks* callbacks, - const WebKit::WebString& database_identifier); + const blink::WebString& name, + blink::WebIDBCallbacks* callbacks, + const blink::WebString& database_identifier); private: scoped_refptr<ThreadSafeSender> thread_safe_sender_; diff --git a/content/child/npapi/npobject_proxy.cc b/content/child/npapi/npobject_proxy.cc index fa28bbd..45dc68d 100644 --- a/content/child/npapi/npobject_proxy.cc +++ b/content/child/npapi/npobject_proxy.cc @@ -13,7 +13,7 @@ #include "content/child/npapi/plugin_instance.h" #endif -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/child/npapi/npobject_stub.cc b/content/child/npapi/npobject_stub.cc index b58ecca..9746623 100644 --- a/content/child/npapi/npobject_stub.cc +++ b/content/child/npapi/npobject_stub.cc @@ -18,7 +18,7 @@ #include "content/common/plugin_constants_win.h" #endif -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/child/npapi/npobject_util.cc b/content/child/npapi/npobject_util.cc index fe7d365..3ad9bac 100644 --- a/content/child/npapi/npobject_util.cc +++ b/content/child/npapi/npobject_util.cc @@ -13,7 +13,7 @@ #include "third_party/npapi/bindings/nphostapi.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/child/npapi/npruntime_util.cc b/content/child/npapi/npruntime_util.cc index 745406a..da2f42c 100644 --- a/content/child/npapi/npruntime_util.cc +++ b/content/child/npapi/npruntime_util.cc @@ -7,7 +7,7 @@ #include "base/pickle.h" #include "third_party/WebKit/public/web/WebBindings.h" -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/child/npapi/plugin_host.cc b/content/child/npapi/plugin_host.cc index 814964fd..22fe6d0 100644 --- a/content/child/npapi/plugin_host.cc +++ b/content/child/npapi/plugin_host.cc @@ -31,7 +31,7 @@ #include "base/mac/mac_util.h" #endif -using WebKit::WebBindings; +using blink::WebBindings; // Declarations for stub implementations of deprecated functions, which are no // longer listed in npapi.h. @@ -331,7 +331,7 @@ uint32_t NPN_MemFlush(uint32_t size) { // This is for dynamic discovery of new plugins. // Should force a re-scan of the plugins directory to load new ones. void NPN_ReloadPlugins(NPBool reload_pages) { - WebKit::resetPluginCache(reload_pages ? true : false); + blink::resetPluginCache(reload_pages ? true : false); } // Requests a range of bytes for a seekable stream. diff --git a/content/child/npapi/plugin_url_fetcher.cc b/content/child/npapi/plugin_url_fetcher.cc index d971317..8d5e3e2 100644 --- a/content/child/npapi/plugin_url_fetcher.cc +++ b/content/child/npapi/plugin_url_fetcher.cc @@ -31,15 +31,15 @@ namespace { // TODO(jam): this is similar to MultiPartResponseClient in webplugin_impl.cc, // we should remove that other class once we switch to loading from the plugin // process by default. -class MultiPartResponseClient : public WebKit::WebURLLoaderClient { +class MultiPartResponseClient : public blink::WebURLLoaderClient { public: explicit MultiPartResponseClient(PluginStreamUrl* plugin_stream) : byte_range_lower_bound_(0), plugin_stream_(plugin_stream) {} - // WebKit::WebURLLoaderClient implementation: + // blink::WebURLLoaderClient implementation: virtual void didReceiveResponse( - WebKit::WebURLLoader* loader, - const WebKit::WebURLResponse& response) OVERRIDE { + blink::WebURLLoader* loader, + const blink::WebURLResponse& response) OVERRIDE { int64 byte_range_upper_bound, instance_size; if (!webkit_glue::MultipartResponseDelegate::ReadContentRanges( response, &byte_range_lower_bound_, &byte_range_upper_bound, @@ -47,7 +47,7 @@ class MultiPartResponseClient : public WebKit::WebURLLoaderClient { NOTREACHED(); } } - virtual void didReceiveData(WebKit::WebURLLoader* loader, + virtual void didReceiveData(blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length) OVERRIDE { @@ -213,7 +213,7 @@ void PluginURLFetcher::OnReceivedResponse( if (plugin_stream_->seekable()) { int response_code = info.headers->response_code(); if (response_code == 206) { - WebKit::WebURLResponse response; + blink::WebURLResponse response; response.initialize(); webkit_glue::WebURLLoaderImpl::PopulateURLResponse(url_, info, &response); diff --git a/content/child/npapi/plugin_web_event_converter_mac.h b/content/child/npapi/plugin_web_event_converter_mac.h index 3c943f6..a1fc326 100644 --- a/content/child/npapi/plugin_web_event_converter_mac.h +++ b/content/child/npapi/plugin_web_event_converter_mac.h @@ -7,7 +7,7 @@ #include "third_party/npapi/bindings/npapi.h" -namespace WebKit { +namespace blink { class WebInputEvent; class WebKeyboardEvent; class WebMouseEvent; @@ -25,7 +25,7 @@ class PluginWebEventConverter { // Initializes a converter for the given web event. Returns false if the event // could not be converted. - bool InitWithEvent(const WebKit::WebInputEvent& web_event); + bool InitWithEvent(const blink::WebInputEvent& web_event); // Returns a pointer to a plugin event--suitable for passing to // NPP_HandleEvent--corresponding to the the web event this converter was @@ -37,12 +37,12 @@ class PluginWebEventConverter { // Stores a converted plugin representation of the given web event, suitable // for returning from plugin_event. // Returns true if the event was successfully converted. - bool ConvertKeyboardEvent(const WebKit::WebKeyboardEvent& web_event); - bool ConvertMouseEvent(const WebKit::WebMouseEvent& web_event); - bool ConvertMouseWheelEvent(const WebKit::WebMouseWheelEvent& web_event); + bool ConvertKeyboardEvent(const blink::WebKeyboardEvent& web_event); + bool ConvertMouseEvent(const blink::WebMouseEvent& web_event); + bool ConvertMouseWheelEvent(const blink::WebMouseWheelEvent& web_event); // Returns the Cocoa translation of web_event's modifiers. - static NSUInteger CocoaModifiers(const WebKit::WebInputEvent& web_event); + static NSUInteger CocoaModifiers(const blink::WebInputEvent& web_event); NPCocoaEvent cocoa_event_; diff --git a/content/child/npapi/plugin_web_event_converter_mac.mm b/content/child/npapi/plugin_web_event_converter_mac.mm index 091fd71..b9d7df7 100644 --- a/content/child/npapi/plugin_web_event_converter_mac.mm +++ b/content/child/npapi/plugin_web_event_converter_mac.mm @@ -8,10 +8,10 @@ #include "content/child/npapi/plugin_web_event_converter_mac.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; namespace content { diff --git a/content/child/npapi/webplugin_delegate.h b/content/child/npapi/webplugin_delegate.h index 0e1148f..c419a3f 100644 --- a/content/child/npapi/webplugin_delegate.h +++ b/content/child/npapi/webplugin_delegate.h @@ -18,7 +18,7 @@ class GURL; class SkCanvas; struct NPObject; -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -73,7 +73,7 @@ class WebPluginDelegate { // For windowless plugins, gives them a user event like mouse/keyboard. // Returns whether the event was handled. This is only called in windowsless // mode. See NPAPI NPP_HandleEvent for more information. - virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, + virtual bool HandleInputEvent(const blink::WebInputEvent& event, WebCursor::CursorInfo* cursor) = 0; // Gets the NPObject associated with the plugin for scripting. diff --git a/content/child/npapi/webplugin_delegate_impl.cc b/content/child/npapi/webplugin_delegate_impl.cc index 27e3dbd..5756664 100644 --- a/content/child/npapi/webplugin_delegate_impl.cc +++ b/content/child/npapi/webplugin_delegate_impl.cc @@ -18,8 +18,8 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebCursorInfo; -using WebKit::WebInputEvent; +using blink::WebCursorInfo; +using blink::WebInputEvent; namespace content { diff --git a/content/child/npapi/webplugin_delegate_impl.h b/content/child/npapi/webplugin_delegate_impl.h index 4a8c888..ea26204 100644 --- a/content/child/npapi/webplugin_delegate_impl.h +++ b/content/child/npapi/webplugin_delegate_impl.h @@ -91,7 +91,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { const gfx::Rect& clip_rect) OVERRIDE; virtual void Paint(SkCanvas* canvas, const gfx::Rect& rect) OVERRIDE; virtual void SetFocus(bool focused) OVERRIDE; - virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, + virtual bool HandleInputEvent(const blink::WebInputEvent& event, WebCursor::CursorInfo* cursor_info) OVERRIDE; virtual NPObject* GetPluginScriptableObject() OVERRIDE; virtual NPP GetPluginNPP() OVERRIDE; @@ -280,7 +280,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { // Does platform-specific event handling. Arguments and return are identical // to HandleInputEvent. - bool PlatformHandleInputEvent(const WebKit::WebInputEvent& event, + bool PlatformHandleInputEvent(const blink::WebInputEvent& event, WebCursor::CursorInfo* cursor_info); // Closes down and destroys our plugin instance. @@ -440,7 +440,7 @@ class WebPluginDelegateImpl : public WebPluginDelegate { void OnModalLoopEntered(); // Returns true if the message passed in corresponds to a user gesture. - static bool IsUserGesture(const WebKit::WebInputEvent& event); + static bool IsUserGesture(const blink::WebInputEvent& event); // The url with which the plugin was instantiated. std::string plugin_url_; diff --git a/content/child/npapi/webplugin_delegate_impl_android.cc b/content/child/npapi/webplugin_delegate_impl_android.cc index fadaeee..f484d5f 100644 --- a/content/child/npapi/webplugin_delegate_impl_android.cc +++ b/content/child/npapi/webplugin_delegate_impl_android.cc @@ -10,7 +10,7 @@ #include "content/child/npapi/webplugin.h" #include "webkit/common/cursors/webcursor.h" -using WebKit::WebInputEvent; +using blink::WebInputEvent; namespace content { diff --git a/content/child/npapi/webplugin_delegate_impl_aura.cc b/content/child/npapi/webplugin_delegate_impl_aura.cc index 3416990..6abf5f9 100644 --- a/content/child/npapi/webplugin_delegate_impl_aura.cc +++ b/content/child/npapi/webplugin_delegate_impl_aura.cc @@ -7,7 +7,7 @@ #include "content/child/npapi/plugin_instance.h" #include "webkit/common/cursors/webcursor.h" -using WebKit::WebInputEvent; +using blink::WebInputEvent; namespace content { diff --git a/content/child/npapi/webplugin_delegate_impl_gtk.cc b/content/child/npapi/webplugin_delegate_impl_gtk.cc index 371d834..39ecee8 100644 --- a/content/child/npapi/webplugin_delegate_impl_gtk.cc +++ b/content/child/npapi/webplugin_delegate_impl_gtk.cc @@ -22,9 +22,9 @@ #include "third_party/npapi/bindings/npapi_x11.h" -using WebKit::WebKeyboardEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; +using blink::WebKeyboardEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; namespace content { diff --git a/content/child/npapi/webplugin_delegate_impl_mac.mm b/content/child/npapi/webplugin_delegate_impl_mac.mm index 2951fca..c125dc8 100644 --- a/content/child/npapi/webplugin_delegate_impl_mac.mm +++ b/content/child/npapi/webplugin_delegate_impl_mac.mm @@ -27,10 +27,10 @@ #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" #include "webkit/common/cursors/webcursor.h" -using WebKit::WebKeyboardEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; +using blink::WebKeyboardEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; // Important implementation notes: The Mac definition of NPAPI, particularly // the distinction between windowed and windowless modes, differs from the diff --git a/content/child/npapi/webplugin_delegate_impl_win.cc b/content/child/npapi/webplugin_delegate_impl_win.cc index f6d0540..3f6287e 100644 --- a/content/child/npapi/webplugin_delegate_impl_win.cc +++ b/content/child/npapi/webplugin_delegate_impl_win.cc @@ -35,9 +35,9 @@ #include "ui/gfx/win/hwnd_util.h" #include "webkit/common/cursors/webcursor.h" -using WebKit::WebKeyboardEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; +using blink::WebKeyboardEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; namespace content { diff --git a/content/child/plugin_param_traits.cc b/content/child/plugin_param_traits.cc index 7a3908d..27b21dd 100644 --- a/content/child/plugin_param_traits.cc +++ b/content/child/plugin_param_traits.cc @@ -123,13 +123,13 @@ bool ParamTraits<NPIdentifier_Param>::Read(const Message* m, } void ParamTraits<NPIdentifier_Param>::Log(const param_type& p, std::string* l) { - if (WebKit::WebBindings::identifierIsString(p.identifier)) { - NPUTF8* str = WebKit::WebBindings::utf8FromIdentifier(p.identifier); + if (blink::WebBindings::identifierIsString(p.identifier)) { + NPUTF8* str = blink::WebBindings::utf8FromIdentifier(p.identifier); l->append(str); free(str); } else { l->append(base::IntToString( - WebKit::WebBindings::intFromIdentifier(p.identifier))); + blink::WebBindings::intFromIdentifier(p.identifier))); } } diff --git a/content/child/quota_dispatcher.cc b/content/child/quota_dispatcher.cc index dc8bc81..1409580 100644 --- a/content/child/quota_dispatcher.cc +++ b/content/child/quota_dispatcher.cc @@ -18,9 +18,9 @@ using quota::QuotaStatusCode; using quota::StorageType; -using WebKit::WebStorageQuotaCallbacks; -using WebKit::WebStorageQuotaError; -using WebKit::WebStorageQuotaType; +using blink::WebStorageQuotaCallbacks; +using blink::WebStorageQuotaError; +using blink::WebStorageQuotaType; using webkit_glue::WorkerTaskRunner; @@ -34,7 +34,7 @@ namespace { // QuotaDispatcher::Callback implementation for WebStorageQuotaCallbacks. class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { public: - WebStorageQuotaDispatcherCallback(WebKit::WebStorageQuotaCallbacks* callback) + WebStorageQuotaDispatcherCallback(blink::WebStorageQuotaCallbacks* callback) : callbacks_(callback) { DCHECK(callbacks_); } @@ -51,7 +51,7 @@ class WebStorageQuotaDispatcherCallback : public QuotaDispatcher::Callback { private: // Not owned (self-destructed). - WebKit::WebStorageQuotaCallbacks* callbacks_; + blink::WebStorageQuotaCallbacks* callbacks_; }; int CurrentWorkerId() { @@ -135,7 +135,7 @@ void QuotaDispatcher::RequestStorageQuota( // static QuotaDispatcher::Callback* QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper( - WebKit::WebStorageQuotaCallbacks* callbacks) { + blink::WebStorageQuotaCallbacks* callbacks) { return new WebStorageQuotaDispatcherCallback(callbacks); } @@ -167,14 +167,14 @@ void QuotaDispatcher::DidFail( pending_quota_callbacks_.Remove(request_id); } -COMPILE_ASSERT(int(WebKit::WebStorageQuotaTypeTemporary) == \ +COMPILE_ASSERT(int(blink::WebStorageQuotaTypeTemporary) == \ int(quota::kStorageTypeTemporary), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebStorageQuotaTypePersistent) == \ +COMPILE_ASSERT(int(blink::WebStorageQuotaTypePersistent) == \ int(quota::kStorageTypePersistent), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebStorageQuotaErrorNotSupported) == \ +COMPILE_ASSERT(int(blink::WebStorageQuotaErrorNotSupported) == \ int(quota::kQuotaErrorNotSupported), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebStorageQuotaErrorAbort) == \ +COMPILE_ASSERT(int(blink::WebStorageQuotaErrorAbort) == \ int(quota::kQuotaErrorAbort), mismatching_enums); } // namespace content diff --git a/content/child/quota_dispatcher.h b/content/child/quota_dispatcher.h index 8a8754f..d42d02d 100644 --- a/content/child/quota_dispatcher.h +++ b/content/child/quota_dispatcher.h @@ -20,7 +20,7 @@ namespace IPC { class Message; } -namespace WebKit { +namespace blink { class WebStorageQuotaCallbacks; } @@ -69,7 +69,7 @@ class QuotaDispatcher : public webkit_glue::WorkerTaskRunner::Observer { // Creates a new Callback instance for WebStorageQuotaCallbacks. static Callback* CreateWebStorageQuotaCallbacksWrapper( - WebKit::WebStorageQuotaCallbacks* callbacks); + blink::WebStorageQuotaCallbacks* callbacks); private: // Message handlers. diff --git a/content/child/request_extra_data.cc b/content/child/request_extra_data.cc index 2c935ce..ddd2208 100644 --- a/content/child/request_extra_data.cc +++ b/content/child/request_extra_data.cc @@ -4,8 +4,8 @@ #include "content/child/request_extra_data.h" -using WebKit::WebReferrerPolicy; -using WebKit::WebString; +using blink::WebReferrerPolicy; +using blink::WebString; namespace content { diff --git a/content/child/request_extra_data.h b/content/child/request_extra_data.h index 0b3d30a..d0c85fb 100644 --- a/content/child/request_extra_data.h +++ b/content/child/request_extra_data.h @@ -17,8 +17,8 @@ namespace content { class CONTENT_EXPORT RequestExtraData : NON_EXPORTED_BASE(public webkit_glue::WebURLRequestExtraDataImpl) { public: - RequestExtraData(WebKit::WebReferrerPolicy referrer_policy, - const WebKit::WebString& custom_user_agent, + RequestExtraData(blink::WebReferrerPolicy referrer_policy, + const blink::WebString& custom_user_agent, bool was_after_preconnect_request, bool is_main_frame, int64 frame_id, diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc index b072ecf..a5b0880 100644 --- a/content/child/resource_dispatcher_unittest.cc +++ b/content/child/resource_dispatcher_unittest.cc @@ -173,8 +173,8 @@ class ResourceDispatcherTest : public testing::Test, public IPC::Sender { request_info.request_type = ResourceType::SUB_RESOURCE; request_info.appcache_host_id = appcache::kNoHostId; request_info.routing_id = 0; - RequestExtraData extra_data(WebKit::WebReferrerPolicyDefault, - WebKit::WebString(), + RequestExtraData extra_data(blink::WebReferrerPolicyDefault, + blink::WebString(), false, true, 0, GURL(), false, -1, true, PAGE_TRANSITION_LINK, -1, -1); diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 09fc9fe..28eb9f3 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc @@ -13,7 +13,7 @@ #include "media/base/android/media_codec_bridge.h" #endif -using WebKit::WebRuntimeFeatures; +using blink::WebRuntimeFeatures; namespace content { diff --git a/content/child/service_worker/service_worker_dispatcher.cc b/content/child/service_worker/service_worker_dispatcher.cc index b749ffd..f5103fb 100644 --- a/content/child/service_worker/service_worker_dispatcher.cc +++ b/content/child/service_worker/service_worker_dispatcher.cc @@ -11,8 +11,8 @@ #include "content/common/service_worker_messages.h" #include "third_party/WebKit/public/web/WebSecurityOrigin.h" -using WebKit::WebServiceWorkerError; -using WebKit::WebServiceWorkerProvider; +using blink::WebServiceWorkerError; +using blink::WebServiceWorkerProvider; using base::ThreadLocalPointer; using webkit_glue::WorkerTaskRunner; diff --git a/content/child/service_worker/service_worker_dispatcher.h b/content/child/service_worker/service_worker_dispatcher.h index 4187ea6..51a1e21 100644 --- a/content/child/service_worker/service_worker_dispatcher.h +++ b/content/child/service_worker/service_worker_dispatcher.h @@ -14,7 +14,7 @@ class GURL; -namespace WebKit { +namespace blink { class WebURL; } @@ -42,11 +42,11 @@ class ServiceWorkerDispatcher : public webkit_glue::WorkerTaskRunner::Observer { void RegisterServiceWorker( const GURL& pattern, const GURL& script_url, - WebKit::WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks); + blink::WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks); // Corresponds to navigator.unregisterServiceWorker() void UnregisterServiceWorker( const GURL& pattern, - WebKit::WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks); + blink::WebServiceWorkerProvider::WebServiceWorkerCallbacks* callbacks); // |thread_safe_sender| needs to be passed in because if the call leads to // construction it will be needed. @@ -64,10 +64,10 @@ class ServiceWorkerDispatcher : public webkit_glue::WorkerTaskRunner::Observer { int32 request_id); void OnRegistrationError(int32 thread_id, int32 request_id, - WebKit::WebServiceWorkerError::ErrorType error_type, + blink::WebServiceWorkerError::ErrorType error_type, const string16& message); - IDMap<WebKit::WebServiceWorkerProvider::WebServiceWorkerCallbacks, + IDMap<blink::WebServiceWorkerProvider::WebServiceWorkerCallbacks, IDMapOwnPointer> pending_callbacks_; scoped_refptr<ThreadSafeSender> thread_safe_sender_; diff --git a/content/child/service_worker/web_service_worker_impl.h b/content/child/service_worker/web_service_worker_impl.h index a310316..cdcde1b 100644 --- a/content/child/service_worker/web_service_worker_impl.h +++ b/content/child/service_worker/web_service_worker_impl.h @@ -12,7 +12,7 @@ namespace content { class WebServiceWorkerImpl - : NON_EXPORTED_BASE(public WebKit::WebServiceWorker) { + : NON_EXPORTED_BASE(public blink::WebServiceWorker) { public: explicit WebServiceWorkerImpl(int64 service_worker_id) : service_worker_id_(service_worker_id) {} diff --git a/content/child/service_worker/web_service_worker_provider_impl.cc b/content/child/service_worker/web_service_worker_provider_impl.cc index 3da391f..a951a5e 100644 --- a/content/child/service_worker/web_service_worker_provider_impl.cc +++ b/content/child/service_worker/web_service_worker_provider_impl.cc @@ -14,16 +14,16 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" -using WebKit::WebString; -using WebKit::WebURL; +using blink::WebString; +using blink::WebURL; namespace content { WebServiceWorkerProviderImpl::WebServiceWorkerProviderImpl( ThreadSafeSender* thread_safe_sender, ServiceWorkerMessageFilter* message_filter, - const WebKit::WebURL& origin, - scoped_ptr<WebKit::WebServiceWorkerProviderClient> client) + const blink::WebURL& origin, + scoped_ptr<blink::WebServiceWorkerProviderClient> client) : thread_safe_sender_(thread_safe_sender), client_(client.Pass()) {} WebServiceWorkerProviderImpl::~WebServiceWorkerProviderImpl() {} diff --git a/content/child/service_worker/web_service_worker_provider_impl.h b/content/child/service_worker/web_service_worker_provider_impl.h index 1bada5d..29a379f 100644 --- a/content/child/service_worker/web_service_worker_provider_impl.h +++ b/content/child/service_worker/web_service_worker_provider_impl.h @@ -12,7 +12,7 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebSecurityOrigin.h" -namespace WebKit { +namespace blink { class WebString; class WebURL; } @@ -27,25 +27,25 @@ class ThreadSafeSender; class ServiceWorkerMessageFilter; class WebServiceWorkerProviderImpl - : NON_EXPORTED_BASE(public WebKit::WebServiceWorkerProvider) { + : NON_EXPORTED_BASE(public blink::WebServiceWorkerProvider) { public: WebServiceWorkerProviderImpl( ThreadSafeSender* thread_safe_sender, ServiceWorkerMessageFilter* message_filter, - const WebKit::WebURL& origin, - scoped_ptr<WebKit::WebServiceWorkerProviderClient> client); + const blink::WebURL& origin, + scoped_ptr<blink::WebServiceWorkerProviderClient> client); virtual ~WebServiceWorkerProviderImpl(); - virtual void registerServiceWorker(const WebKit::WebURL& pattern, - const WebKit::WebURL& script_url, + virtual void registerServiceWorker(const blink::WebURL& pattern, + const blink::WebURL& script_url, WebServiceWorkerCallbacks*); - virtual void unregisterServiceWorker(const WebKit::WebURL& pattern, + virtual void unregisterServiceWorker(const blink::WebURL& pattern, WebServiceWorkerCallbacks*); private: scoped_refptr<ThreadSafeSender> thread_safe_sender_; - scoped_ptr<WebKit::WebServiceWorkerProviderClient> client_; + scoped_ptr<blink::WebServiceWorkerProviderClient> client_; DISALLOW_COPY_AND_ASSIGN(WebServiceWorkerProviderImpl); }; diff --git a/content/child/site_isolation_policy.cc b/content/child/site_isolation_policy.cc index b917b31..a761a06 100644 --- a/content/child/site_isolation_policy.cc +++ b/content/child/site_isolation_policy.cc @@ -26,11 +26,11 @@ #include "third_party/WebKit/public/web/WebSecurityOrigin.h" using base::StringPiece; -using WebKit::WebDocument; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLResponse; -using WebKit::WebURLRequest; +using blink::WebDocument; +using blink::WebString; +using blink::WebURL; +using blink::WebURLResponse; +using blink::WebURLRequest; namespace content { diff --git a/content/child/socket_stream_dispatcher.cc b/content/child/socket_stream_dispatcher.cc index 87f299f..9370f08 100644 --- a/content/child/socket_stream_dispatcher.cc +++ b/content/child/socket_stream_dispatcher.cc @@ -30,7 +30,7 @@ class IPCWebSocketStreamHandleBridge : public webkit_glue::WebSocketStreamHandleBridge { public: IPCWebSocketStreamHandleBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate) : socket_id_(kNoSocketId), handle_(handle), @@ -58,7 +58,7 @@ class IPCWebSocketStreamHandleBridge // browser process. int socket_id_; - WebKit::WebSocketStreamHandle* handle_; + blink::WebSocketStreamHandle* handle_; webkit_glue::WebSocketStreamHandleDelegate* delegate_; // Map from ID to bridge instance. @@ -177,7 +177,7 @@ SocketStreamDispatcher::SocketStreamDispatcher() { /* static */ webkit_glue::WebSocketStreamHandleBridge* SocketStreamDispatcher::CreateBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate) { return new IPCWebSocketStreamHandleBridge(handle, delegate); } diff --git a/content/child/socket_stream_dispatcher.h b/content/child/socket_stream_dispatcher.h index ba23c80..a52907a 100644 --- a/content/child/socket_stream_dispatcher.h +++ b/content/child/socket_stream_dispatcher.h @@ -11,7 +11,7 @@ #include "base/compiler_specific.h" #include "ipc/ipc_listener.h" -namespace WebKit { +namespace blink { class WebSocketStreamHandle; } @@ -32,7 +32,7 @@ class SocketStreamDispatcher : public IPC::Listener { virtual ~SocketStreamDispatcher() {} static webkit_glue::WebSocketStreamHandleBridge* CreateBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate); // IPC::Listener implementation. diff --git a/content/child/web_database_observer_impl.cc b/content/child/web_database_observer_impl.cc index fb5ce13..d47dfb8 100644 --- a/content/child/web_database_observer_impl.cc +++ b/content/child/web_database_observer_impl.cc @@ -12,8 +12,8 @@ #include "third_party/WebKit/public/web/WebDatabase.h" #include "third_party/sqlite/sqlite3.h" -using WebKit::WebDatabase; -using WebKit::WebString; +using blink::WebDatabase; +using blink::WebString; namespace content { namespace { diff --git a/content/child/web_database_observer_impl.h b/content/child/web_database_observer_impl.h index e97f83e0..07fe1d9 100644 --- a/content/child/web_database_observer_impl.h +++ b/content/child/web_database_observer_impl.h @@ -10,46 +10,46 @@ #include "third_party/WebKit/public/web/WebDatabaseObserver.h" #include "webkit/common/database/database_connections.h" -namespace WebKit { +namespace blink { class WebString; } namespace content { -class WebDatabaseObserverImpl : public WebKit::WebDatabaseObserver { +class WebDatabaseObserverImpl : public blink::WebDatabaseObserver { public: explicit WebDatabaseObserverImpl(IPC::SyncMessageFilter* sender); virtual ~WebDatabaseObserverImpl(); - virtual void databaseOpened(const WebKit::WebDatabase& database) OVERRIDE; - virtual void databaseModified(const WebKit::WebDatabase& database) OVERRIDE; - virtual void databaseClosed(const WebKit::WebString& origin_identifier, - const WebKit::WebString& database_name); + virtual void databaseOpened(const blink::WebDatabase& database) OVERRIDE; + virtual void databaseModified(const blink::WebDatabase& database) OVERRIDE; + virtual void databaseClosed(const blink::WebString& origin_identifier, + const blink::WebString& database_name); // TODO(jochen): Remove this version once the blink side has rolled. - virtual void databaseClosed(const WebKit::WebDatabase& database); + virtual void databaseClosed(const blink::WebDatabase& database); virtual void reportOpenDatabaseResult( - const WebKit::WebDatabase& database, int callsite, + const blink::WebDatabase& database, int callsite, int websql_error, int sqlite_error) OVERRIDE; virtual void reportChangeVersionResult( - const WebKit::WebDatabase& database, int callsite, + const blink::WebDatabase& database, int callsite, int websql_error, int sqlite_error) OVERRIDE; virtual void reportStartTransactionResult( - const WebKit::WebDatabase& database, int callsite, + const blink::WebDatabase& database, int callsite, int websql_error, int sqlite_error) OVERRIDE; virtual void reportCommitTransactionResult( - const WebKit::WebDatabase& database, int callsite, + const blink::WebDatabase& database, int callsite, int websql_error, int sqlite_error) OVERRIDE; virtual void reportExecuteStatementResult( - const WebKit::WebDatabase& database, int callsite, + const blink::WebDatabase& database, int callsite, int websql_error, int sqlite_error) OVERRIDE; virtual void reportVacuumDatabaseResult( - const WebKit::WebDatabase& database, int sqlite_error) OVERRIDE; + const blink::WebDatabase& database, int sqlite_error) OVERRIDE; void WaitForAllDatabasesToClose(); private: - void HandleSqliteError(const WebKit::WebDatabase& database, int error); + void HandleSqliteError(const blink::WebDatabase& database, int error); scoped_refptr<IPC::SyncMessageFilter> sender_; scoped_refptr<webkit_database::DatabaseConnectionsWrapper> open_connections_; diff --git a/content/child/webblobregistry_impl.cc b/content/child/webblobregistry_impl.cc index 6d272ee..fcc3ebf 100644 --- a/content/child/webblobregistry_impl.cc +++ b/content/child/webblobregistry_impl.cc @@ -18,10 +18,10 @@ #include "third_party/WebKit/public/platform/WebURL.h" #include "webkit/common/blob/blob_data.h" -using WebKit::WebBlobData; -using WebKit::WebString; -using WebKit::WebThreadSafeData; -using WebKit::WebURL; +using blink::WebBlobData; +using blink::WebString; +using blink::WebThreadSafeData; +using blink::WebURL; namespace content { @@ -40,7 +40,7 @@ WebBlobRegistryImpl::~WebBlobRegistryImpl() { } void WebBlobRegistryImpl::registerBlobData( - const WebKit::WebString& uuid, const WebKit::WebBlobData& data) { + const blink::WebString& uuid, const blink::WebBlobData& data) { const std::string uuid_str(uuid.utf8()); sender_->Send(new BlobHostMsg_StartBuilding(uuid_str)); diff --git a/content/child/webblobregistry_impl.h b/content/child/webblobregistry_impl.h index 8a04abf..6588a52 100644 --- a/content/child/webblobregistry_impl.h +++ b/content/child/webblobregistry_impl.h @@ -9,7 +9,7 @@ #include "third_party/WebKit/public/platform/WebBlobRegistry.h" #include "webkit/common/blob/blob_data.h" -namespace WebKit { +namespace blink { class WebBlobData; class WebString; class WebThreadSafeData; @@ -19,33 +19,33 @@ class WebURL; namespace content { class ThreadSafeSender; -class WebBlobRegistryImpl : public WebKit::WebBlobRegistry { +class WebBlobRegistryImpl : public blink::WebBlobRegistry { public: explicit WebBlobRegistryImpl(ThreadSafeSender* sender); virtual ~WebBlobRegistryImpl(); - virtual void registerBlobData(const WebKit::WebString& uuid, - const WebKit::WebBlobData& data); - virtual void addBlobDataRef(const WebKit::WebString& uuid); - virtual void removeBlobDataRef(const WebKit::WebString& uuid); - virtual void registerPublicBlobURL(const WebKit::WebURL&, - const WebKit::WebString& uuid); - virtual void revokePublicBlobURL(const WebKit::WebURL&); + virtual void registerBlobData(const blink::WebString& uuid, + const blink::WebBlobData& data); + virtual void addBlobDataRef(const blink::WebString& uuid); + virtual void removeBlobDataRef(const blink::WebString& uuid); + virtual void registerPublicBlobURL(const blink::WebURL&, + const blink::WebString& uuid); + virtual void revokePublicBlobURL(const blink::WebURL&); // Additional support for Streams. - virtual void registerStreamURL(const WebKit::WebURL& url, - const WebKit::WebString& content_type); - virtual void registerStreamURL(const WebKit::WebURL& url, - const WebKit::WebURL& src_url); - virtual void addDataToStream(const WebKit::WebURL& url, - WebKit::WebThreadSafeData& data); - virtual void finalizeStream(const WebKit::WebURL& url); - virtual void abortStream(const WebKit::WebURL& url); - virtual void unregisterStreamURL(const WebKit::WebURL& url); + virtual void registerStreamURL(const blink::WebURL& url, + const blink::WebString& content_type); + virtual void registerStreamURL(const blink::WebURL& url, + const blink::WebURL& src_url); + virtual void addDataToStream(const blink::WebURL& url, + blink::WebThreadSafeData& data); + virtual void finalizeStream(const blink::WebURL& url); + virtual void abortStream(const blink::WebURL& url); + virtual void unregisterStreamURL(const blink::WebURL& url); private: void SendDataForBlob(const std::string& uuid_str, - const WebKit::WebThreadSafeData& data); + const blink::WebThreadSafeData& data); scoped_refptr<ThreadSafeSender> sender_; }; diff --git a/content/child/webkitplatformsupport_impl.cc b/content/child/webkitplatformsupport_impl.cc index 9d60e25..e474aa9 100644 --- a/content/child/webkitplatformsupport_impl.cc +++ b/content/child/webkitplatformsupport_impl.cc @@ -35,14 +35,14 @@ WebKitPlatformSupportImpl::CreateResourceLoader( webkit_glue::WebSocketStreamHandleBridge* WebKitPlatformSupportImpl::CreateWebSocketStreamBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate) { SocketStreamDispatcher* dispatcher = ChildThread::current()->socket_stream_dispatcher(); return dispatcher->CreateBridge(handle, delegate); } -WebKit::WebSocketHandle* WebKitPlatformSupportImpl::createWebSocketHandle() { +blink::WebSocketHandle* WebKitPlatformSupportImpl::createWebSocketHandle() { return new WebSocketBridge; } diff --git a/content/child/webkitplatformsupport_impl.h b/content/child/webkitplatformsupport_impl.h index 3a484d1..e32483b 100644 --- a/content/child/webkitplatformsupport_impl.h +++ b/content/child/webkitplatformsupport_impl.h @@ -17,7 +17,7 @@ namespace content { class CONTENT_EXPORT WebKitPlatformSupportImpl : NON_EXPORTED_BASE(public webkit_glue::WebKitPlatformSupportChildImpl) { public: - typedef WebKit::WebGraphicsContext3D* (OffscreenContextFactory)(); + typedef blink::WebGraphicsContext3D* (OffscreenContextFactory)(); WebKitPlatformSupportImpl(); virtual ~WebKitPlatformSupportImpl(); @@ -30,9 +30,9 @@ class CONTENT_EXPORT WebKitPlatformSupportImpl const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) OVERRIDE; virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketStreamBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; - virtual WebKit::WebSocketHandle* createWebSocketHandle() OVERRIDE; + virtual blink::WebSocketHandle* createWebSocketHandle() OVERRIDE; }; } // namespace content diff --git a/content/child/webmessageportchannel_impl.cc b/content/child/webmessageportchannel_impl.cc index de8866f..aeb8475 100644 --- a/content/child/webmessageportchannel_impl.cc +++ b/content/child/webmessageportchannel_impl.cc @@ -12,10 +12,10 @@ #include "third_party/WebKit/public/platform/WebMessagePortChannelClient.h" #include "third_party/WebKit/public/platform/WebString.h" -using WebKit::WebMessagePortChannel; -using WebKit::WebMessagePortChannelArray; -using WebKit::WebMessagePortChannelClient; -using WebKit::WebString; +using blink::WebMessagePortChannel; +using blink::WebMessagePortChannelArray; +using blink::WebMessagePortChannelClient; +using blink::WebString; namespace content { diff --git a/content/child/webmessageportchannel_impl.h b/content/child/webmessageportchannel_impl.h index 84d3f0e..8390972 100644 --- a/content/child/webmessageportchannel_impl.h +++ b/content/child/webmessageportchannel_impl.h @@ -24,7 +24,7 @@ class ChildThread; // This is thread safe. class WebMessagePortChannelImpl - : public WebKit::WebMessagePortChannel, + : public blink::WebMessagePortChannel, public IPC::Listener, public base::RefCountedThreadSafe<WebMessagePortChannelImpl> { public: @@ -43,13 +43,13 @@ class WebMessagePortChannelImpl virtual ~WebMessagePortChannelImpl(); // WebMessagePortChannel implementation. - virtual void setClient(WebKit::WebMessagePortChannelClient* client); + virtual void setClient(blink::WebMessagePortChannelClient* client); virtual void destroy(); - virtual void entangle(WebKit::WebMessagePortChannel* channel); - virtual void postMessage(const WebKit::WebString& message, - WebKit::WebMessagePortChannelArray* channels); - virtual bool tryGetMessage(WebKit::WebString* message, - WebKit::WebMessagePortChannelArray& channels); + virtual void entangle(blink::WebMessagePortChannel* channel); + virtual void postMessage(const blink::WebString& message, + blink::WebMessagePortChannelArray* channels); + virtual bool tryGetMessage(blink::WebString* message, + blink::WebMessagePortChannelArray& channels); void Init(); void Entangle(scoped_refptr<WebMessagePortChannelImpl> channel); @@ -74,7 +74,7 @@ class WebMessagePortChannelImpl typedef std::queue<Message> MessageQueue; MessageQueue message_queue_; - WebKit::WebMessagePortChannelClient* client_; + blink::WebMessagePortChannelClient* client_; base::Lock lock_; // Locks access to above. int route_id_; // The routing id for this object. diff --git a/content/child/websocket_bridge.cc b/content/child/websocket_bridge.cc index 43c4671..5f0e37d 100644 --- a/content/child/websocket_bridge.cc +++ b/content/child/websocket_bridge.cc @@ -23,11 +23,11 @@ #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebVector.h" -using WebKit::WebSocketHandle; -using WebKit::WebSocketHandleClient; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebSocketHandle; +using blink::WebSocketHandleClient; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; namespace content { diff --git a/content/child/websocket_bridge.h b/content/child/websocket_bridge.h index 9f92647..1ad8368 100644 --- a/content/child/websocket_bridge.h +++ b/content/child/websocket_bridge.h @@ -19,7 +19,7 @@ namespace content { -class WebSocketBridge : public WebKit::WebSocketHandle { +class WebSocketBridge : public blink::WebSocketHandle { public: WebSocketBridge(); @@ -27,17 +27,17 @@ class WebSocketBridge : public WebKit::WebSocketHandle { bool OnMessageReceived(const IPC::Message& message); // WebSocketHandle functions. - virtual void connect(const WebKit::WebURL& url, - const WebKit::WebVector<WebKit::WebString>& protocols, - const WebKit::WebString& origin, - WebKit::WebSocketHandleClient* client) OVERRIDE; + virtual void connect(const blink::WebURL& url, + const blink::WebVector<blink::WebString>& protocols, + const blink::WebString& origin, + blink::WebSocketHandleClient* client) OVERRIDE; virtual void send(bool fin, WebSocketHandle::MessageType type, const char* data, size_t size) OVERRIDE; virtual void flowControl(int64_t quota) OVERRIDE; virtual void close(unsigned short code, - const WebKit::WebString& reason) OVERRIDE; + const blink::WebString& reason) OVERRIDE; virtual void Disconnect(); @@ -55,7 +55,7 @@ class WebSocketBridge : public WebKit::WebSocketHandle { void DidClose(bool was_clean, unsigned short code, const std::string& reason); int channel_id_; - WebKit::WebSocketHandleClient* client_; + blink::WebSocketHandleClient* client_; static const int kInvalidChannelId = -1; }; diff --git a/content/common/accessibility_messages.h b/content/common/accessibility_messages.h index 70d5211..6504802 100644 --- a/content/common/accessibility_messages.h +++ b/content/common/accessibility_messages.h @@ -21,8 +21,8 @@ #define IPC_MESSAGE_START AccessibilityMsgStart -IPC_ENUM_TRAITS(WebKit::WebAXEvent) -IPC_ENUM_TRAITS(WebKit::WebAXRole) +IPC_ENUM_TRAITS(blink::WebAXEvent) +IPC_ENUM_TRAITS(blink::WebAXRole) IPC_ENUM_TRAITS(content::AccessibilityNodeData::BoolAttribute) IPC_ENUM_TRAITS(content::AccessibilityNodeData::FloatAttribute) @@ -50,7 +50,7 @@ IPC_STRUCT_BEGIN(AccessibilityHostMsg_EventParams) IPC_STRUCT_MEMBER(std::vector<content::AccessibilityNodeData>, nodes) // Type of event. - IPC_STRUCT_MEMBER(WebKit::WebAXEvent, event_type) + IPC_STRUCT_MEMBER(blink::WebAXEvent, event_type) // ID of the node that the event applies to. IPC_STRUCT_MEMBER(int, id) diff --git a/content/common/accessibility_node_data.cc b/content/common/accessibility_node_data.cc index f73a812..29a83f1 100644 --- a/content/common/accessibility_node_data.cc +++ b/content/common/accessibility_node_data.cc @@ -34,7 +34,7 @@ namespace content { AccessibilityNodeData::AccessibilityNodeData() : id(-1), - role(WebKit::WebAXRoleUnknown), + role(blink::WebAXRoleUnknown), state(-1) { } @@ -142,161 +142,161 @@ std::string AccessibilityNodeData::DebugString(bool recursive) const { result += "id=" + IntToString(id); switch (role) { - case WebKit::WebAXRoleAlert: result += " ALERT"; break; - case WebKit::WebAXRoleAlertDialog: result += " ALERT_DIALOG"; break; - case WebKit::WebAXRoleAnnotation: result += " ANNOTATION"; break; - case WebKit::WebAXRoleApplication: result += " APPLICATION"; break; - case WebKit::WebAXRoleArticle: result += " ARTICLE"; break; - case WebKit::WebAXRoleBanner: result += " L_BANNER"; break; - case WebKit::WebAXRoleBrowser: result += " BROWSER"; break; - case WebKit::WebAXRoleBusyIndicator: result += " BUSY_INDICATOR"; break; - case WebKit::WebAXRoleButton: result += " BUTTON"; break; - case WebKit::WebAXRoleCanvas: result += " CANVAS"; break; - case WebKit::WebAXRoleCell: result += " CELL"; break; - case WebKit::WebAXRoleCheckBox: result += " CHECKBOX"; break; - case WebKit::WebAXRoleColorWell: result += " COLOR_WELL"; break; - case WebKit::WebAXRoleColumn: result += " COLUMN"; break; - case WebKit::WebAXRoleColumnHeader: result += " COLUMN_HEADER"; break; - case WebKit::WebAXRoleComboBox: result += " COMBO_BOX"; break; - case WebKit::WebAXRoleComplementary: result += " L_COMPLEMENTARY"; break; - case WebKit::WebAXRoleContentInfo: result += " L_CONTENTINFO"; break; - case WebKit::WebAXRoleDefinition: result += " DEFINITION"; break; - case WebKit::WebAXRoleDescriptionListDetail: result += " DD"; break; - case WebKit::WebAXRoleDescriptionListTerm: result += " DT"; break; - case WebKit::WebAXRoleDialog: result += " DIALOG"; break; - case WebKit::WebAXRoleDirectory: result += " DIRECTORY"; break; - case WebKit::WebAXRoleDisclosureTriangle: + case blink::WebAXRoleAlert: result += " ALERT"; break; + case blink::WebAXRoleAlertDialog: result += " ALERT_DIALOG"; break; + case blink::WebAXRoleAnnotation: result += " ANNOTATION"; break; + case blink::WebAXRoleApplication: result += " APPLICATION"; break; + case blink::WebAXRoleArticle: result += " ARTICLE"; break; + case blink::WebAXRoleBanner: result += " L_BANNER"; break; + case blink::WebAXRoleBrowser: result += " BROWSER"; break; + case blink::WebAXRoleBusyIndicator: result += " BUSY_INDICATOR"; break; + case blink::WebAXRoleButton: result += " BUTTON"; break; + case blink::WebAXRoleCanvas: result += " CANVAS"; break; + case blink::WebAXRoleCell: result += " CELL"; break; + case blink::WebAXRoleCheckBox: result += " CHECKBOX"; break; + case blink::WebAXRoleColorWell: result += " COLOR_WELL"; break; + case blink::WebAXRoleColumn: result += " COLUMN"; break; + case blink::WebAXRoleColumnHeader: result += " COLUMN_HEADER"; break; + case blink::WebAXRoleComboBox: result += " COMBO_BOX"; break; + case blink::WebAXRoleComplementary: result += " L_COMPLEMENTARY"; break; + case blink::WebAXRoleContentInfo: result += " L_CONTENTINFO"; break; + case blink::WebAXRoleDefinition: result += " DEFINITION"; break; + case blink::WebAXRoleDescriptionListDetail: result += " DD"; break; + case blink::WebAXRoleDescriptionListTerm: result += " DT"; break; + case blink::WebAXRoleDialog: result += " DIALOG"; break; + case blink::WebAXRoleDirectory: result += " DIRECTORY"; break; + case blink::WebAXRoleDisclosureTriangle: result += " DISCLOSURE_TRIANGLE"; break; - case WebKit::WebAXRoleDiv: result += " DIV"; break; - case WebKit::WebAXRoleDocument: result += " DOCUMENT"; break; - case WebKit::WebAXRoleDrawer: result += " DRAWER"; break; - case WebKit::WebAXRoleEditableText: result += " EDITABLE_TEXT"; break; - case WebKit::WebAXRoleFooter: result += " FOOTER"; break; - case WebKit::WebAXRoleForm: result += " FORM"; break; - case WebKit::WebAXRoleGrid: result += " GRID"; break; - case WebKit::WebAXRoleGroup: result += " GROUP"; break; - case WebKit::WebAXRoleGrowArea: result += " GROW_AREA"; break; - case WebKit::WebAXRoleHeading: result += " HEADING"; break; - case WebKit::WebAXRoleHelpTag: result += " HELP_TAG"; break; - case WebKit::WebAXRoleHorizontalRule: result += " HORIZONTAL_RULE"; break; - case WebKit::WebAXRoleIgnored: result += " IGNORED"; break; - case WebKit::WebAXRoleImage: result += " IMAGE"; break; - case WebKit::WebAXRoleImageMap: result += " IMAGE_MAP"; break; - case WebKit::WebAXRoleImageMapLink: result += " IMAGE_MAP_LINK"; break; - case WebKit::WebAXRoleIncrementor: result += " INCREMENTOR"; break; - case WebKit::WebAXRoleInlineTextBox: result += " INLINE_TEXT_BOX"; break; - case WebKit::WebAXRoleLabel: result += " LABEL"; break; - case WebKit::WebAXRoleLink: result += " LINK"; break; - case WebKit::WebAXRoleList: result += " LIST"; break; - case WebKit::WebAXRoleListBox: result += " LISTBOX"; break; - case WebKit::WebAXRoleListBoxOption: result += " LISTBOX_OPTION"; break; - case WebKit::WebAXRoleListItem: result += " LIST_ITEM"; break; - case WebKit::WebAXRoleListMarker: result += " LIST_MARKER"; break; - case WebKit::WebAXRoleLog: result += " LOG"; break; - case WebKit::WebAXRoleMain: result += " L_MAIN"; break; - case WebKit::WebAXRoleMarquee: result += " MARQUEE"; break; - case WebKit::WebAXRoleMath: result += " MATH"; break; - case WebKit::WebAXRoleMatte: result += " MATTE"; break; - case WebKit::WebAXRoleMenu: result += " MENU"; break; - case WebKit::WebAXRoleMenuBar: result += " MENU_BAR"; break; - case WebKit::WebAXRoleMenuButton: result += " MENU_BUTTON"; break; - case WebKit::WebAXRoleMenuItem: result += " MENU_ITEM"; break; - case WebKit::WebAXRoleMenuListOption: result += " MENU_LIST_OPTION"; break; - case WebKit::WebAXRoleMenuListPopup: result += " MENU_LIST_POPUP"; break; - case WebKit::WebAXRoleNavigation: result += " L_NAVIGATION"; break; - case WebKit::WebAXRoleNote: result += " NOTE"; break; - case WebKit::WebAXRoleOutline: result += " OUTLINE"; break; - case WebKit::WebAXRoleParagraph: result += " PARAGRAPH"; break; - case WebKit::WebAXRolePopUpButton: result += " POPUP_BUTTON"; break; - case WebKit::WebAXRolePresentational: result += " PRESENTATIONAL"; break; - case WebKit::WebAXRoleProgressIndicator: + case blink::WebAXRoleDiv: result += " DIV"; break; + case blink::WebAXRoleDocument: result += " DOCUMENT"; break; + case blink::WebAXRoleDrawer: result += " DRAWER"; break; + case blink::WebAXRoleEditableText: result += " EDITABLE_TEXT"; break; + case blink::WebAXRoleFooter: result += " FOOTER"; break; + case blink::WebAXRoleForm: result += " FORM"; break; + case blink::WebAXRoleGrid: result += " GRID"; break; + case blink::WebAXRoleGroup: result += " GROUP"; break; + case blink::WebAXRoleGrowArea: result += " GROW_AREA"; break; + case blink::WebAXRoleHeading: result += " HEADING"; break; + case blink::WebAXRoleHelpTag: result += " HELP_TAG"; break; + case blink::WebAXRoleHorizontalRule: result += " HORIZONTAL_RULE"; break; + case blink::WebAXRoleIgnored: result += " IGNORED"; break; + case blink::WebAXRoleImage: result += " IMAGE"; break; + case blink::WebAXRoleImageMap: result += " IMAGE_MAP"; break; + case blink::WebAXRoleImageMapLink: result += " IMAGE_MAP_LINK"; break; + case blink::WebAXRoleIncrementor: result += " INCREMENTOR"; break; + case blink::WebAXRoleInlineTextBox: result += " INLINE_TEXT_BOX"; break; + case blink::WebAXRoleLabel: result += " LABEL"; break; + case blink::WebAXRoleLink: result += " LINK"; break; + case blink::WebAXRoleList: result += " LIST"; break; + case blink::WebAXRoleListBox: result += " LISTBOX"; break; + case blink::WebAXRoleListBoxOption: result += " LISTBOX_OPTION"; break; + case blink::WebAXRoleListItem: result += " LIST_ITEM"; break; + case blink::WebAXRoleListMarker: result += " LIST_MARKER"; break; + case blink::WebAXRoleLog: result += " LOG"; break; + case blink::WebAXRoleMain: result += " L_MAIN"; break; + case blink::WebAXRoleMarquee: result += " MARQUEE"; break; + case blink::WebAXRoleMath: result += " MATH"; break; + case blink::WebAXRoleMatte: result += " MATTE"; break; + case blink::WebAXRoleMenu: result += " MENU"; break; + case blink::WebAXRoleMenuBar: result += " MENU_BAR"; break; + case blink::WebAXRoleMenuButton: result += " MENU_BUTTON"; break; + case blink::WebAXRoleMenuItem: result += " MENU_ITEM"; break; + case blink::WebAXRoleMenuListOption: result += " MENU_LIST_OPTION"; break; + case blink::WebAXRoleMenuListPopup: result += " MENU_LIST_POPUP"; break; + case blink::WebAXRoleNavigation: result += " L_NAVIGATION"; break; + case blink::WebAXRoleNote: result += " NOTE"; break; + case blink::WebAXRoleOutline: result += " OUTLINE"; break; + case blink::WebAXRoleParagraph: result += " PARAGRAPH"; break; + case blink::WebAXRolePopUpButton: result += " POPUP_BUTTON"; break; + case blink::WebAXRolePresentational: result += " PRESENTATIONAL"; break; + case blink::WebAXRoleProgressIndicator: result += " PROGRESS_INDICATOR"; break; - case WebKit::WebAXRoleRadioButton: result += " RADIO_BUTTON"; break; - case WebKit::WebAXRoleRadioGroup: result += " RADIO_GROUP"; break; - case WebKit::WebAXRoleRegion: result += " REGION"; break; - case WebKit::WebAXRoleRootWebArea: result += " ROOT_WEB_AREA"; break; - case WebKit::WebAXRoleRow: result += " ROW"; break; - case WebKit::WebAXRoleRowHeader: result += " ROW_HEADER"; break; - case WebKit::WebAXRoleRuler: result += " RULER"; break; - case WebKit::WebAXRoleRulerMarker: result += " RULER_MARKER"; break; - case WebKit::WebAXRoleSVGRoot: result += " SVG_ROOT"; break; - case WebKit::WebAXRoleScrollArea: result += " SCROLLAREA"; break; - case WebKit::WebAXRoleScrollBar: result += " SCROLLBAR"; break; - case WebKit::WebAXRoleSearch: result += " L_SEARCH"; break; - case WebKit::WebAXRoleSheet: result += " SHEET"; break; - case WebKit::WebAXRoleSlider: result += " SLIDER"; break; - case WebKit::WebAXRoleSliderThumb: result += " SLIDER_THUMB"; break; - case WebKit::WebAXRoleSpinButton: result += " SPIN_BUTTON"; break; - case WebKit::WebAXRoleSpinButtonPart: result += " SPIN_BUTTON_PART"; break; - case WebKit::WebAXRoleSplitGroup: result += " SPLIT_GROUP"; break; - case WebKit::WebAXRoleSplitter: result += " SPLITTER"; break; - case WebKit::WebAXRoleStaticText: result += " STATIC_TEXT"; break; - case WebKit::WebAXRoleStatus: result += " STATUS"; break; - case WebKit::WebAXRoleSystemWide: result += " SYSTEM_WIDE"; break; - case WebKit::WebAXRoleTab: result += " TAB"; break; - case WebKit::WebAXRoleTabList: result += " TAB_LIST"; break; - case WebKit::WebAXRoleTabPanel: result += " TAB_PANEL"; break; - case WebKit::WebAXRoleTable: result += " TABLE"; break; - case WebKit::WebAXRoleTableHeaderContainer: + case blink::WebAXRoleRadioButton: result += " RADIO_BUTTON"; break; + case blink::WebAXRoleRadioGroup: result += " RADIO_GROUP"; break; + case blink::WebAXRoleRegion: result += " REGION"; break; + case blink::WebAXRoleRootWebArea: result += " ROOT_WEB_AREA"; break; + case blink::WebAXRoleRow: result += " ROW"; break; + case blink::WebAXRoleRowHeader: result += " ROW_HEADER"; break; + case blink::WebAXRoleRuler: result += " RULER"; break; + case blink::WebAXRoleRulerMarker: result += " RULER_MARKER"; break; + case blink::WebAXRoleSVGRoot: result += " SVG_ROOT"; break; + case blink::WebAXRoleScrollArea: result += " SCROLLAREA"; break; + case blink::WebAXRoleScrollBar: result += " SCROLLBAR"; break; + case blink::WebAXRoleSearch: result += " L_SEARCH"; break; + case blink::WebAXRoleSheet: result += " SHEET"; break; + case blink::WebAXRoleSlider: result += " SLIDER"; break; + case blink::WebAXRoleSliderThumb: result += " SLIDER_THUMB"; break; + case blink::WebAXRoleSpinButton: result += " SPIN_BUTTON"; break; + case blink::WebAXRoleSpinButtonPart: result += " SPIN_BUTTON_PART"; break; + case blink::WebAXRoleSplitGroup: result += " SPLIT_GROUP"; break; + case blink::WebAXRoleSplitter: result += " SPLITTER"; break; + case blink::WebAXRoleStaticText: result += " STATIC_TEXT"; break; + case blink::WebAXRoleStatus: result += " STATUS"; break; + case blink::WebAXRoleSystemWide: result += " SYSTEM_WIDE"; break; + case blink::WebAXRoleTab: result += " TAB"; break; + case blink::WebAXRoleTabList: result += " TAB_LIST"; break; + case blink::WebAXRoleTabPanel: result += " TAB_PANEL"; break; + case blink::WebAXRoleTable: result += " TABLE"; break; + case blink::WebAXRoleTableHeaderContainer: result += " TABLE_HDR_CONTAINER"; break; - case WebKit::WebAXRoleTextArea: result += " TEXTAREA"; break; - case WebKit::WebAXRoleTextField: result += " TEXT_FIELD"; break; - case WebKit::WebAXRoleTimer: result += " TIMER"; break; - case WebKit::WebAXRoleToggleButton: result += " TOGGLE_BUTTON"; break; - case WebKit::WebAXRoleToolbar: result += " TOOLBAR"; break; - case WebKit::WebAXRoleTree: result += " TREE"; break; - case WebKit::WebAXRoleTreeGrid: result += " TREE_GRID"; break; - case WebKit::WebAXRoleTreeItem: result += " TREE_ITEM"; break; - case WebKit::WebAXRoleUnknown: result += " UNKNOWN"; break; - case WebKit::WebAXRoleUserInterfaceTooltip: result += " TOOLTIP"; break; - case WebKit::WebAXRoleValueIndicator: result += " VALUE_INDICATOR"; break; - case WebKit::WebAXRoleWebArea: result += " WEB_AREA"; break; - case WebKit::WebAXRoleWindow: result += " WINDOW"; break; + case blink::WebAXRoleTextArea: result += " TEXTAREA"; break; + case blink::WebAXRoleTextField: result += " TEXT_FIELD"; break; + case blink::WebAXRoleTimer: result += " TIMER"; break; + case blink::WebAXRoleToggleButton: result += " TOGGLE_BUTTON"; break; + case blink::WebAXRoleToolbar: result += " TOOLBAR"; break; + case blink::WebAXRoleTree: result += " TREE"; break; + case blink::WebAXRoleTreeGrid: result += " TREE_GRID"; break; + case blink::WebAXRoleTreeItem: result += " TREE_ITEM"; break; + case blink::WebAXRoleUnknown: result += " UNKNOWN"; break; + case blink::WebAXRoleUserInterfaceTooltip: result += " TOOLTIP"; break; + case blink::WebAXRoleValueIndicator: result += " VALUE_INDICATOR"; break; + case blink::WebAXRoleWebArea: result += " WEB_AREA"; break; + case blink::WebAXRoleWindow: result += " WINDOW"; break; default: assert(false); } - if (state & (1 << WebKit::WebAXStateBusy)) + if (state & (1 << blink::WebAXStateBusy)) result += " BUSY"; - if (state & (1 << WebKit::WebAXStateChecked)) + if (state & (1 << blink::WebAXStateChecked)) result += " CHECKED"; - if (state & (1 << WebKit::WebAXStateCollapsed)) + if (state & (1 << blink::WebAXStateCollapsed)) result += " COLLAPSED"; - if (state & (1 << WebKit::WebAXStateExpanded)) + if (state & (1 << blink::WebAXStateExpanded)) result += " EXPANDED"; - if (state & (1 << WebKit::WebAXStateFocusable)) + if (state & (1 << blink::WebAXStateFocusable)) result += " FOCUSABLE"; - if (state & (1 << WebKit::WebAXStateFocused)) + if (state & (1 << blink::WebAXStateFocused)) result += " FOCUSED"; - if (state & (1 << WebKit::WebAXStateHaspopup)) + if (state & (1 << blink::WebAXStateHaspopup)) result += " HASPOPUP"; - if (state & (1 << WebKit::WebAXStateHovered)) + if (state & (1 << blink::WebAXStateHovered)) result += " HOTTRACKED"; - if (state & (1 << WebKit::WebAXStateIndeterminate)) + if (state & (1 << blink::WebAXStateIndeterminate)) result += " INDETERMINATE"; - if (state & (1 << WebKit::WebAXStateInvisible)) + if (state & (1 << blink::WebAXStateInvisible)) result += " INVISIBLE"; - if (state & (1 << WebKit::WebAXStateLinked)) + if (state & (1 << blink::WebAXStateLinked)) result += " LINKED"; - if (state & (1 << WebKit::WebAXStateMultiselectable)) + if (state & (1 << blink::WebAXStateMultiselectable)) result += " MULTISELECTABLE"; - if (state & (1 << WebKit::WebAXStateOffscreen)) + if (state & (1 << blink::WebAXStateOffscreen)) result += " OFFSCREEN"; - if (state & (1 << WebKit::WebAXStatePressed)) + if (state & (1 << blink::WebAXStatePressed)) result += " PRESSED"; - if (state & (1 << WebKit::WebAXStateProtected)) + if (state & (1 << blink::WebAXStateProtected)) result += " PROTECTED"; - if (state & (1 << WebKit::WebAXStateReadonly)) + if (state & (1 << blink::WebAXStateReadonly)) result += " READONLY"; - if (state & (1 << WebKit::WebAXStateRequired)) + if (state & (1 << blink::WebAXStateRequired)) result += " REQUIRED"; - if (state & (1 << WebKit::WebAXStateSelectable)) + if (state & (1 << blink::WebAXStateSelectable)) result += " SELECTABLE"; - if (state & (1 << WebKit::WebAXStateSelected)) + if (state & (1 << blink::WebAXStateSelected)) result += " SELECTED"; - if (state & (1 << WebKit::WebAXStateVertical)) + if (state & (1 << blink::WebAXStateVertical)) result += " VERTICAL"; - if (state & (1 << WebKit::WebAXStateVisited)) + if (state & (1 << blink::WebAXStateVisited)) result += " VISITED"; result += " (" + IntToString(location.x()) + ", " + @@ -381,17 +381,17 @@ std::string AccessibilityNodeData::DebugString(bool recursive) const { break; case ATTR_TEXT_DIRECTION: switch (int_attributes[i].second) { - case WebKit::WebAXTextDirectionLR: + case blink::WebAXTextDirectionLR: default: result += " text_direction=lr"; break; - case WebKit::WebAXTextDirectionRL: + case blink::WebAXTextDirectionRL: result += " text_direction=rl"; break; - case WebKit::WebAXTextDirectionTB: + case blink::WebAXTextDirectionTB: result += " text_direction=tb"; break; - case WebKit::WebAXTextDirectionBT: + case blink::WebAXTextDirectionBT: result += " text_direction=bt"; break; } diff --git a/content/common/accessibility_node_data.h b/content/common/accessibility_node_data.h index c0c0766..ed39508 100644 --- a/content/common/accessibility_node_data.h +++ b/content/common/accessibility_node_data.h @@ -85,7 +85,7 @@ struct CONTENT_EXPORT AccessibilityNodeData { // Relationships between this element and other elements. ATTR_TITLE_UI_ELEMENT, - // Color value for WebKit::WebAXRoleColorWell, each component is 0..255 + // Color value for blink::WebAXRoleColorWell, each component is 0..255 ATTR_COLOR_VALUE_RED, ATTR_COLOR_VALUE_GREEN, ATTR_COLOR_VALUE_BLUE, @@ -188,7 +188,7 @@ struct CONTENT_EXPORT AccessibilityNodeData { // This is a simple serializable struct. All member variables should be // public and copyable. int32 id; - WebKit::WebAXRole role; + blink::WebAXRole role; uint32 state; gfx::Rect location; std::vector<std::pair<StringAttribute, std::string> > string_attributes; diff --git a/content/common/browser_plugin/browser_plugin_messages.h b/content/common/browser_plugin/browser_plugin_messages.h index 7aaf07f..c3d9fec 100644 --- a/content/common/browser_plugin/browser_plugin_messages.h +++ b/content/common/browser_plugin/browser_plugin_messages.h @@ -35,7 +35,7 @@ #define IPC_MESSAGE_START BrowserPluginMsgStart -IPC_ENUM_TRAITS(WebKit::WebDragStatus) +IPC_ENUM_TRAITS(blink::WebDragStatus) IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params) IPC_STRUCT_MEMBER(bool, enable) @@ -232,9 +232,9 @@ IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetVisibility, // Tells the guest that a drag event happened on the plugin. IPC_MESSAGE_ROUTED5(BrowserPluginHostMsg_DragStatusUpdate, int /* instance_id */, - WebKit::WebDragStatus /* drag_status */, + blink::WebDragStatus /* drag_status */, content::DropData /* drop_data */, - WebKit::WebDragOperationsMask /* operation_mask */, + blink::WebDragOperationsMask /* operation_mask */, gfx::Point /* plugin_location */) // Response to BrowserPluginMsg_PluginAtPositionRequest, returns the browser diff --git a/content/common/child_process_sandbox_support_impl_linux.cc b/content/common/child_process_sandbox_support_impl_linux.cc index 62f1472..1bfb658 100644 --- a/content/common/child_process_sandbox_support_impl_linux.cc +++ b/content/common/child_process_sandbox_support_impl_linux.cc @@ -21,7 +21,7 @@ namespace content { void GetFontFamilyForCharacter(int32_t character, const char* preferred_locale, - WebKit::WebFontFamily* family) { + blink::WebFontFamily* family) { TRACE_EVENT0("sandbox_ipc", "GetFontFamilyForCharacter"); Pickle request; @@ -50,7 +50,7 @@ void GetFontFamilyForCharacter(int32_t character, } void GetRenderStyleForStrike(const char* family, int sizeAndStyle, - WebKit::WebFontRenderStyle* out) { + blink::WebFontRenderStyle* out) { TRACE_EVENT0("sandbox_ipc", "GetRenderStyleForStrike"); Pickle request; diff --git a/content/common/child_process_sandbox_support_impl_linux.h b/content/common/child_process_sandbox_support_impl_linux.h index 23e003e..556652f 100644 --- a/content/common/child_process_sandbox_support_impl_linux.h +++ b/content/common/child_process_sandbox_support_impl_linux.h @@ -9,7 +9,7 @@ #include "content/public/common/child_process_sandbox_support_linux.h" #include "content/public/common/content_descriptors.h" -namespace WebKit { +namespace blink { struct WebFontFamily; struct WebFontRenderStyle; } @@ -25,10 +25,10 @@ namespace content { // The instance has an empty font name if the request could not be satisfied. void GetFontFamilyForCharacter(const int32_t character, const char* preferred_locale, - WebKit::WebFontFamily* family); + blink::WebFontFamily* family); void GetRenderStyleForStrike(const char* family, int sizeAndStyle, - WebKit::WebFontRenderStyle* out); + blink::WebFontRenderStyle* out); inline int GetSandboxFD() { return kSandboxIPCChannel + base::GlobalDescriptors::kBaseDescriptor; diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc index 3374c9c..3b0ab98 100644 --- a/content/common/content_param_traits.cc +++ b/content/common/content_param_traits.cc @@ -63,7 +63,7 @@ bool ParamTraits<WebInputEventPointer>::Read(const Message* m, NOTREACHED(); return false; } - if (data_length < static_cast<int>(sizeof(WebKit::WebInputEvent))) { + if (data_length < static_cast<int>(sizeof(blink::WebInputEvent))) { NOTREACHED(); return false; } diff --git a/content/common/content_param_traits.h b/content/common/content_param_traits.h index 5a1e5fa..d4bc359 100644 --- a/content/common/content_param_traits.h +++ b/content/common/content_param_traits.h @@ -58,7 +58,7 @@ struct ParamTraits<WebCursor> { } }; -typedef const WebKit::WebInputEvent* WebInputEventPointer; +typedef const blink::WebInputEvent* WebInputEventPointer; template <> struct ParamTraits<WebInputEventPointer> { typedef WebInputEventPointer param_type; diff --git a/content/common/content_param_traits_macros.h b/content/common/content_param_traits_macros.h index e422a18..f54b071 100644 --- a/content/common/content_param_traits_macros.h +++ b/content/common/content_param_traits_macros.h @@ -18,7 +18,7 @@ #define IPC_MESSAGE_EXPORT CONTENT_EXPORT IPC_ENUM_TRAITS(ResourceType::Type) -IPC_ENUM_TRAITS(WebKit::WebInputEvent::Type) +IPC_ENUM_TRAITS(blink::WebInputEvent::Type) IPC_ENUM_TRAITS(ui::LatencyComponentType) IPC_STRUCT_TRAITS_BEGIN(ui::LatencyInfo::LatencyComponent) diff --git a/content/common/device_orientation/device_motion_hardware_buffer.h b/content/common/device_orientation/device_motion_hardware_buffer.h index 335cd69..7128229 100644 --- a/content/common/device_orientation/device_motion_hardware_buffer.h +++ b/content/common/device_orientation/device_motion_hardware_buffer.h @@ -10,7 +10,7 @@ namespace content { -typedef SharedMemorySeqLockBuffer<WebKit::WebDeviceMotionData> +typedef SharedMemorySeqLockBuffer<blink::WebDeviceMotionData> DeviceMotionHardwareBuffer; } // namespace content diff --git a/content/common/device_orientation/device_orientation_hardware_buffer.h b/content/common/device_orientation/device_orientation_hardware_buffer.h index c1dc831..0d43bb5 100644 --- a/content/common/device_orientation/device_orientation_hardware_buffer.h +++ b/content/common/device_orientation/device_orientation_hardware_buffer.h @@ -10,7 +10,7 @@ namespace content { -typedef SharedMemorySeqLockBuffer<WebKit::WebDeviceOrientationData> +typedef SharedMemorySeqLockBuffer<blink::WebDeviceOrientationData> DeviceOrientationHardwareBuffer; } // namespace content diff --git a/content/common/dom_storage/dom_storage_messages.h b/content/common/dom_storage/dom_storage_messages.h index 43598d0..cb07fa7 100644 --- a/content/common/dom_storage/dom_storage_messages.h +++ b/content/common/dom_storage/dom_storage_messages.h @@ -38,7 +38,7 @@ IPC_STRUCT_BEGIN(DOMStorageMsg_Event_Params) IPC_STRUCT_MEMBER(int64, namespace_id) IPC_STRUCT_END() -IPC_ENUM_TRAITS(WebKit::WebStorageArea::Result) +IPC_ENUM_TRAITS(blink::WebStorageArea::Result) // DOM Storage messages sent from the browser to the renderer. diff --git a/content/common/drag_messages.h b/content/common/drag_messages.h index 3e21478..1da3c72 100644 --- a/content/common/drag_messages.h +++ b/content/common/drag_messages.h @@ -22,13 +22,13 @@ IPC_MESSAGE_ROUTED5(DragMsg_TargetDragEnter, content::DropData /* drop_data */, gfx::Point /* client_pt */, gfx::Point /* screen_pt */, - WebKit::WebDragOperationsMask /* ops_allowed */, + blink::WebDragOperationsMask /* ops_allowed */, int /* key_modifiers */) IPC_MESSAGE_ROUTED4(DragMsg_TargetDragOver, gfx::Point /* client_pt */, gfx::Point /* screen_pt */, - WebKit::WebDragOperationsMask /* ops_allowed */, + blink::WebDragOperationsMask /* ops_allowed */, int /* key_modifiers */) IPC_MESSAGE_ROUTED0(DragMsg_TargetDragLeave) @@ -44,7 +44,7 @@ IPC_MESSAGE_ROUTED4(DragMsg_SourceEndedOrMoved, gfx::Point /* client_pt */, gfx::Point /* screen_pt */, bool /* ended */, - WebKit::WebDragOperation /* drag_operation */) + blink::WebDragOperation /* drag_operation */) // Notifies the renderer that the system DoDragDrop call has ended. IPC_MESSAGE_ROUTED0(DragMsg_SourceSystemDragEnded) @@ -57,7 +57,7 @@ IPC_MESSAGE_ROUTED0(DragMsg_SourceSystemDragEnded) // drag session at the OS level. IPC_MESSAGE_ROUTED5(DragHostMsg_StartDragging, content::DropData /* drop_data */, - WebKit::WebDragOperationsMask /* ops_allowed */, + blink::WebDragOperationsMask /* ops_allowed */, SkBitmap /* image */, gfx::Vector2d /* image_offset */, content::DragEventSourceInfo /* event_info */) @@ -65,7 +65,7 @@ IPC_MESSAGE_ROUTED5(DragHostMsg_StartDragging, // The page wants to update the mouse cursor during a drag & drop operation. // |is_drop_target| is true if the mouse is over a valid drop target. IPC_MESSAGE_ROUTED1(DragHostMsg_UpdateDragCursor, - WebKit::WebDragOperation /* drag_operation */) + blink::WebDragOperation /* drag_operation */) // Notifies the host that the renderer finished a drop operation. IPC_MESSAGE_ROUTED0(DragHostMsg_TargetDrop_ACK) diff --git a/content/common/drag_traits.h b/content/common/drag_traits.h index 87d52ff..e462680 100644 --- a/content/common/drag_traits.h +++ b/content/common/drag_traits.h @@ -11,7 +11,7 @@ #define IPC_MESSAGE_START DragMsgStart -IPC_ENUM_TRAITS(WebKit::WebDragOperation) +IPC_ENUM_TRAITS(blink::WebDragOperation) IPC_STRUCT_TRAITS_BEGIN(content::DropData::FileInfo) IPC_STRUCT_TRAITS_MEMBER(path) diff --git a/content/common/gamepad_hardware_buffer.h b/content/common/gamepad_hardware_buffer.h index 5559d44..4d31825 100644 --- a/content/common/gamepad_hardware_buffer.h +++ b/content/common/gamepad_hardware_buffer.h @@ -24,9 +24,9 @@ contention is detected by using the associated SeqLock. */ struct GamepadHardwareBuffer { - // FIXME: Use the generic SharedMemorySeqLockBuffer<WebKit::WebGamepads>. + // FIXME: Use the generic SharedMemorySeqLockBuffer<blink::WebGamepads>. OneWriterSeqLock sequence; - WebKit::WebGamepads buffer; + blink::WebGamepads buffer; }; } // namespace content diff --git a/content/common/gamepad_user_gesture.cc b/content/common/gamepad_user_gesture.cc index 037a340..7b530b1 100644 --- a/content/common/gamepad_user_gesture.cc +++ b/content/common/gamepad_user_gesture.cc @@ -10,9 +10,9 @@ namespace content { -bool GamepadsHaveUserGesture(const WebKit::WebGamepads& gamepads) { - for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; i++) { - const WebKit::WebGamepad& pad = gamepads.items[i]; +bool GamepadsHaveUserGesture(const blink::WebGamepads& gamepads) { + for (unsigned i = 0; i < blink::WebGamepads::itemsLengthCap; i++) { + const blink::WebGamepad& pad = gamepads.items[i]; // If the device is physically connected, then check the primary 4 buttons // to see if there is currently an intentional user action. diff --git a/content/common/gamepad_user_gesture.h b/content/common/gamepad_user_gesture.h index d17c69c..6dbd2bf 100644 --- a/content/common/gamepad_user_gesture.h +++ b/content/common/gamepad_user_gesture.h @@ -5,7 +5,7 @@ #ifndef CONTENT_COMMON_GAMEPAD_USER_GESTURE_H_ #define CONTENT_COMMON_GAMEPAD_USER_GESTURE_H_ -namespace WebKit { +namespace blink { class WebGamepads; } @@ -13,7 +13,7 @@ namespace content { // Returns true if any of the gamepads have a button pressed that would be // considerd a user gesture for interaction. -bool GamepadsHaveUserGesture(const WebKit::WebGamepads& gamepads); +bool GamepadsHaveUserGesture(const blink::WebGamepads& gamepads); } // namespace content diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc index a6a3f4e..2128970 100644 --- a/content/common/gpu/client/context_provider_command_buffer.cc +++ b/content/common/gpu/client/context_provider_command_buffer.cc @@ -17,7 +17,7 @@ namespace content { class ContextProviderCommandBuffer::LostContextCallbackProxy - : public WebKit::WebGraphicsContext3D::WebGraphicsContextLostCallback { + : public blink::WebGraphicsContext3D::WebGraphicsContextLostCallback { public: explicit LostContextCallbackProxy(ContextProviderCommandBuffer* provider) : provider_(provider) { @@ -37,7 +37,7 @@ class ContextProviderCommandBuffer::LostContextCallbackProxy }; class ContextProviderCommandBuffer::SwapBuffersCompleteCallbackProxy - : public WebKit::WebGraphicsContext3D:: + : public blink::WebGraphicsContext3D:: WebGraphicsSwapBuffersCompleteCallbackCHROMIUM { public: explicit SwapBuffersCompleteCallbackProxy( diff --git a/content/common/gpu/client/context_provider_command_buffer_browsertest.cc b/content/common/gpu/client/context_provider_command_buffer_browsertest.cc index e58e5d8..702d71d 100644 --- a/content/common/gpu/client/context_provider_command_buffer_browsertest.cc +++ b/content/common/gpu/client/context_provider_command_buffer_browsertest.cc @@ -33,7 +33,7 @@ class ContextProviderCommandBufferBrowserTest : public ContentBrowserTest { scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( gpu_channel_host.get(), - WebKit::WebGraphicsContext3D::Attributes(), + blink::WebGraphicsContext3D::Attributes(), GURL("chrome://gpu/ContextProviderCommandBufferTest"))); return context.Pass(); } diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc index c90d5b5..59318ed 100644 --- a/content/common/gpu/client/gl_helper.cc +++ b/content/common/gpu/client/gl_helper.cc @@ -26,8 +26,8 @@ #include "ui/gfx/size.h" #include "ui/gl/gl_bindings.h" -using WebKit::WebGLId; -using WebKit::WebGraphicsContext3D; +using blink::WebGLId; +using blink::WebGraphicsContext3D; namespace { @@ -84,7 +84,7 @@ class ScalerHolder { scaler_(scaler) { } - void Scale(WebKit::WebGLId src_texture) { + void Scale(blink::WebGLId src_texture) { scaler_->Scale(src_texture, texture_and_framebuffer_.texture()); } @@ -162,7 +162,7 @@ class GLHelper::CopyTextureToImpl : const gfx::Rect& dst_subrect, const base::Callback<void(bool)>& callback); - WebKit::WebGLId CopyAndScaleTexture(WebGLId texture, + blink::WebGLId CopyAndScaleTexture(WebGLId texture, const gfx::Size& src_size, const gfx::Size& dst_size, bool vertically_flip_texture, @@ -179,7 +179,7 @@ class GLHelper::CopyTextureToImpl : // Returns the maximum number of draw buffers available, // 0 if GL_EXT_draw_buffers is not available. - WebKit::WGC3Dint MaxDrawBuffers() const { + blink::WGC3Dint MaxDrawBuffers() const { return max_draw_buffers_; } @@ -214,7 +214,7 @@ class GLHelper::CopyTextureToImpl : unsigned char* pixels; base::Callback<void(bool)> callback; GLuint buffer; - WebKit::WebGLId query; + blink::WebGLId query; }; // A readback pipeline that also converts the data to YUV before @@ -325,7 +325,7 @@ class GLHelper::CopyTextureToImpl : ScopedFlush flush_; std::queue<Request*> request_queue_; - WebKit::WGC3Dint max_draw_buffers_; + blink::WGC3Dint max_draw_buffers_; }; GLHelper::ScalerInterface* GLHelper::CreateScaler( @@ -468,7 +468,7 @@ void GLHelper::CopyTextureToImpl::ReadbackTextureSync( out); } -WebKit::WebGLId GLHelper::CopyTextureToImpl::CopyAndScaleTexture( +blink::WebGLId GLHelper::CopyTextureToImpl::CopyAndScaleTexture( WebGLId src_texture, const gfx::Size& src_size, const gfx::Size& dst_size, @@ -550,7 +550,7 @@ void GLHelper::CopyTextureToImpl::CancelRequests() { } } -GLHelper::GLHelper(WebKit::WebGraphicsContext3D* context, +GLHelper::GLHelper(blink::WebGraphicsContext3D* context, gpu::ContextSupport* context_support) : context_(context), context_support_(context_support) { @@ -591,7 +591,7 @@ void GLHelper::CropScaleReadbackAndCleanMailbox( context_->deleteTexture(mailbox_texture); } -void GLHelper::ReadbackTextureSync(WebKit::WebGLId texture, +void GLHelper::ReadbackTextureSync(blink::WebGLId texture, const gfx::Rect& src_rect, unsigned char* out) { InitCopyTextToImpl(); @@ -600,7 +600,7 @@ void GLHelper::ReadbackTextureSync(WebKit::WebGLId texture, out); } -WebKit::WebGLId GLHelper::CopyTexture(WebKit::WebGLId texture, +blink::WebGLId GLHelper::CopyTexture(blink::WebGLId texture, const gfx::Size& size) { InitCopyTextToImpl(); return copy_texture_to_impl_->CopyAndScaleTexture( @@ -611,8 +611,8 @@ WebKit::WebGLId GLHelper::CopyTexture(WebKit::WebGLId texture, GLHelper::SCALER_QUALITY_FAST); } -WebKit::WebGLId GLHelper::CopyAndScaleTexture( - WebKit::WebGLId texture, +blink::WebGLId GLHelper::CopyAndScaleTexture( + blink::WebGLId texture, const gfx::Size& src_size, const gfx::Size& dst_size, bool vertically_flip_texture, @@ -626,12 +626,12 @@ WebKit::WebGLId GLHelper::CopyAndScaleTexture( } WebGLId GLHelper::CompileShaderFromSource( - const WebKit::WGC3Dchar* source, - WebKit::WGC3Denum type) { + const blink::WGC3Dchar* source, + blink::WGC3Denum type) { ScopedShader shader(context_, context_->createShader(type)); context_->shaderSource(shader, source); context_->compileShader(shader); - WebKit::WGC3Dint compile_status = 0; + blink::WGC3Dint compile_status = 0; context_->getShaderiv(shader, GL_COMPILE_STATUS, &compile_status); if (!compile_status) { LOG(ERROR) << std::string(context_->getShaderInfoLog(shader).utf8()); @@ -653,13 +653,13 @@ void GLHelper::InitScalerImpl() { scaler_impl_.reset(new GLHelperScaling(context_, this)); } -WebKit::WGC3Dint GLHelper::MaxDrawBuffers() { +blink::WGC3Dint GLHelper::MaxDrawBuffers() { InitCopyTextToImpl(); return copy_texture_to_impl_->MaxDrawBuffers(); } -void GLHelper::CopySubBufferDamage(WebKit::WebGLId texture, - WebKit::WebGLId previous_texture, +void GLHelper::CopySubBufferDamage(blink::WebGLId texture, + blink::WebGLId previous_texture, const SkRegion& new_damage, const SkRegion& old_damage) { SkRegion region(old_damage); @@ -685,8 +685,8 @@ void GLHelper::CopySubBufferDamage(WebKit::WebGLId texture, } } -WebKit::WebGLId GLHelper::CreateTexture() { - WebKit::WebGLId texture = context_->createTexture(); +blink::WebGLId GLHelper::CreateTexture() { + blink::WebGLId texture = context_->createTexture(); content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_, texture); context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -696,27 +696,27 @@ WebKit::WebGLId GLHelper::CreateTexture() { return texture; } -WebKit::WebGLId GLHelper::ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, +blink::WebGLId GLHelper::ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, uint32 sync_point) { if (mailbox.IsZero()) return 0; if (sync_point) context_->waitSyncPoint(sync_point); - WebKit::WebGLId texture = CreateTexture(); + blink::WebGLId texture = CreateTexture(); content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_, texture); context_->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); return texture; } -void GLHelper::ResizeTexture(WebKit::WebGLId texture, const gfx::Size& size) { +void GLHelper::ResizeTexture(blink::WebGLId texture, const gfx::Size& size) { content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_, texture); context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGB, size.width(), size.height(), 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); } -void GLHelper::CopyTextureSubImage(WebKit::WebGLId texture, +void GLHelper::CopyTextureSubImage(blink::WebGLId texture, const gfx::Rect& rect) { content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_, texture); context_->copyTexSubImage2D(GL_TEXTURE_2D, 0, @@ -724,7 +724,7 @@ void GLHelper::CopyTextureSubImage(WebKit::WebGLId texture, rect.x(), rect.y(), rect.width(), rect.height()); } -void GLHelper::CopyTextureFullImage(WebKit::WebGLId texture, +void GLHelper::CopyTextureFullImage(blink::WebGLId texture, const gfx::Size& size) { content::ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_, texture); context_->copyTexImage2D(GL_TEXTURE_2D, 0, @@ -967,7 +967,7 @@ void GLHelper::CopyTextureToImpl::ReadbackYUV_MRT::ReadbackYUV( } - std::vector<WebKit::WebGLId> outputs(2); + std::vector<blink::WebGLId> outputs(2); // Convert the scaled texture in to Y, U and V planes. outputs[0] = y_.texture(); outputs[1] = uv_; diff --git a/content/common/gpu/client/gl_helper.h b/content/common/gpu/client/gl_helper.h index de9765a..9df6197 100644 --- a/content/common/gpu/client/gl_helper.h +++ b/content/common/gpu/client/gl_helper.h @@ -34,8 +34,8 @@ class GLHelperScaling; class ScopedWebGLId { public: - typedef void (WebKit::WebGraphicsContext3D::*DeleteFunc)(WebGLId); - ScopedWebGLId(WebKit::WebGraphicsContext3D* context, + typedef void (blink::WebGraphicsContext3D::*DeleteFunc)(WebGLId); + ScopedWebGLId(blink::WebGraphicsContext3D* context, WebGLId id, DeleteFunc delete_func) : context_(context), @@ -62,7 +62,7 @@ class ScopedWebGLId { } private: - WebKit::WebGraphicsContext3D* context_; + blink::WebGraphicsContext3D* context_; WebGLId id_; DeleteFunc delete_func_; @@ -71,55 +71,55 @@ class ScopedWebGLId { class ScopedBuffer : public ScopedWebGLId { public: - ScopedBuffer(WebKit::WebGraphicsContext3D* context, + ScopedBuffer(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedWebGLId(context, id, - &WebKit::WebGraphicsContext3D::deleteBuffer) {} + &blink::WebGraphicsContext3D::deleteBuffer) {} }; class ScopedFramebuffer : public ScopedWebGLId { public: - ScopedFramebuffer(WebKit::WebGraphicsContext3D* context, + ScopedFramebuffer(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedWebGLId(context, id, - &WebKit::WebGraphicsContext3D::deleteFramebuffer) {} + &blink::WebGraphicsContext3D::deleteFramebuffer) {} }; class ScopedProgram : public ScopedWebGLId { public: - ScopedProgram(WebKit::WebGraphicsContext3D* context, + ScopedProgram(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedWebGLId(context, id, - &WebKit::WebGraphicsContext3D::deleteProgram) {} + &blink::WebGraphicsContext3D::deleteProgram) {} }; class ScopedShader : public ScopedWebGLId { public: - ScopedShader(WebKit::WebGraphicsContext3D* context, + ScopedShader(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedWebGLId(context, id, - &WebKit::WebGraphicsContext3D::deleteShader) {} + &blink::WebGraphicsContext3D::deleteShader) {} }; class ScopedTexture : public ScopedWebGLId { public: - ScopedTexture(WebKit::WebGraphicsContext3D* context, + ScopedTexture(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedWebGLId(context, id, - &WebKit::WebGraphicsContext3D::deleteTexture) {} + &blink::WebGraphicsContext3D::deleteTexture) {} }; -template <WebKit::WGC3Denum target> +template <blink::WGC3Denum target> class ScopedBinder { public: - typedef void (WebKit::WebGraphicsContext3D::*BindFunc)(WebKit::WGC3Denum, + typedef void (blink::WebGraphicsContext3D::*BindFunc)(blink::WGC3Denum, WebGLId); - ScopedBinder(WebKit::WebGraphicsContext3D* context, + ScopedBinder(blink::WebGraphicsContext3D* context, WebGLId id, BindFunc bind_func) : context_(context), @@ -132,48 +132,48 @@ class ScopedBinder { } private: - WebKit::WebGraphicsContext3D* context_; + blink::WebGraphicsContext3D* context_; BindFunc bind_func_; DISALLOW_COPY_AND_ASSIGN(ScopedBinder); }; -template <WebKit::WGC3Denum target> +template <blink::WGC3Denum target> class ScopedBufferBinder : ScopedBinder<target> { public: - ScopedBufferBinder(WebKit::WebGraphicsContext3D* context, + ScopedBufferBinder(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedBinder<target>( context, id, - &WebKit::WebGraphicsContext3D::bindBuffer) {} + &blink::WebGraphicsContext3D::bindBuffer) {} }; -template <WebKit::WGC3Denum target> +template <blink::WGC3Denum target> class ScopedFramebufferBinder : ScopedBinder<target> { public: - ScopedFramebufferBinder(WebKit::WebGraphicsContext3D* context, + ScopedFramebufferBinder(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedBinder<target>( context, id, - &WebKit::WebGraphicsContext3D::bindFramebuffer) {} + &blink::WebGraphicsContext3D::bindFramebuffer) {} }; -template <WebKit::WGC3Denum target> +template <blink::WGC3Denum target> class ScopedTextureBinder : ScopedBinder<target> { public: - ScopedTextureBinder(WebKit::WebGraphicsContext3D* context, + ScopedTextureBinder(blink::WebGraphicsContext3D* context, WebGLId id) : ScopedBinder<target>( context, id, - &WebKit::WebGraphicsContext3D::bindTexture) {} + &blink::WebGraphicsContext3D::bindTexture) {} }; class ScopedFlush { public: - explicit ScopedFlush(WebKit::WebGraphicsContext3D* context) + explicit ScopedFlush(blink::WebGraphicsContext3D* context) : context_(context) { } @@ -182,7 +182,7 @@ class ScopedFlush { } private: - WebKit::WebGraphicsContext3D* context_; + blink::WebGraphicsContext3D* context_; DISALLOW_COPY_AND_ASSIGN(ScopedFlush); }; @@ -190,11 +190,11 @@ class ScopedFlush { class ReadbackYUVInterface; -// Provides higher level operations on top of the WebKit::WebGraphicsContext3D +// Provides higher level operations on top of the blink::WebGraphicsContext3D // interfaces. class CONTENT_EXPORT GLHelper { public: - GLHelper(WebKit::WebGraphicsContext3D* context, + GLHelper(blink::WebGraphicsContext3D* context, gpu::ContextSupport* context_support); ~GLHelper(); @@ -224,7 +224,7 @@ class CONTENT_EXPORT GLHelper { // Note that the src_texture will have the min/mag filter set to GL_LINEAR // and wrap_s/t set to CLAMP_TO_EDGE in this call. void CropScaleReadbackAndCleanTexture( - WebKit::WebGLId src_texture, + blink::WebGLId src_texture, const gfx::Size& src_size, const gfx::Rect& src_subrect, const gfx::Size& dst_size, @@ -254,55 +254,55 @@ class CONTENT_EXPORT GLHelper { // texture is assumed to have a format of GL_RGBA with a pixel type of // GL_UNSIGNED_BYTE. This is a blocking call that calls glReadPixels on this // current context. - void ReadbackTextureSync(WebKit::WebGLId texture, + void ReadbackTextureSync(blink::WebGLId texture, const gfx::Rect& src_rect, unsigned char* out); // Creates a copy of the specified texture. |size| is the size of the texture. // Note that the src_texture will have the min/mag filter set to GL_LINEAR // and wrap_s/t set to CLAMP_TO_EDGE in this call. - WebKit::WebGLId CopyTexture(WebKit::WebGLId texture, + blink::WebGLId CopyTexture(blink::WebGLId texture, const gfx::Size& size); // Creates a scaled copy of the specified texture. |src_size| is the size of // the texture and |dst_size| is the size of the resulting copy. // Note that the src_texture will have the min/mag filter set to GL_LINEAR // and wrap_s/t set to CLAMP_TO_EDGE in this call. - WebKit::WebGLId CopyAndScaleTexture( - WebKit::WebGLId texture, + blink::WebGLId CopyAndScaleTexture( + blink::WebGLId texture, const gfx::Size& src_size, const gfx::Size& dst_size, bool vertically_flip_texture, ScalerQuality quality); // Returns the shader compiled from the source. - WebKit::WebGLId CompileShaderFromSource(const WebKit::WGC3Dchar* source, - WebKit::WGC3Denum type); + blink::WebGLId CompileShaderFromSource(const blink::WGC3Dchar* source, + blink::WGC3Denum type); // Copies all pixels from |previous_texture| into |texture| that are // inside the region covered by |old_damage| but not part of |new_damage|. - void CopySubBufferDamage(WebKit::WebGLId texture, - WebKit::WebGLId previous_texture, + void CopySubBufferDamage(blink::WebGLId texture, + blink::WebGLId previous_texture, const SkRegion& new_damage, const SkRegion& old_damage); // Simply creates a texture. - WebKit::WebGLId CreateTexture(); + blink::WebGLId CreateTexture(); // Creates a texture and consumes a mailbox into it. Returns 0 on failure. // Note the mailbox is assumed to be GL_TEXTURE_2D. - WebKit::WebGLId ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, + blink::WebGLId ConsumeMailboxToTexture(const gpu::Mailbox& mailbox, uint32 sync_point); // Resizes the texture's size to |size|. - void ResizeTexture(WebKit::WebGLId texture, const gfx::Size& size); + void ResizeTexture(blink::WebGLId texture, const gfx::Size& size); // Copies the framebuffer data given in |rect| to |texture|. - void CopyTextureSubImage(WebKit::WebGLId texture, const gfx::Rect& rect); + void CopyTextureSubImage(blink::WebGLId texture, const gfx::Rect& rect); // Copies the all framebuffer data to |texture|. |size| specifies the // size of the framebuffer. - void CopyTextureFullImage(WebKit::WebGLId texture, const gfx::Size& size); + void CopyTextureFullImage(blink::WebGLId texture, const gfx::Size& size); // A scaler will cache all intermediate textures and programs // needed to scale from a specified size to a destination size. @@ -315,8 +315,8 @@ class CONTENT_EXPORT GLHelper { // Note that the src_texture will have the min/mag filter set to GL_LINEAR // and wrap_s/t set to CLAMP_TO_EDGE in this call. - virtual void Scale(WebKit::WebGLId source_texture, - WebKit::WebGLId dest_texture) = 0; + virtual void Scale(blink::WebGLId source_texture, + blink::WebGLId dest_texture) = 0; virtual const gfx::Size& SrcSize() = 0; virtual const gfx::Rect& SrcSubrect() = 0; virtual const gfx::Size& DstSize() = 0; @@ -352,7 +352,7 @@ class CONTENT_EXPORT GLHelper { // Returns the maximum number of draw buffers available, // 0 if GL_EXT_draw_buffers is not available. - WebKit::WGC3Dint MaxDrawBuffers(); + blink::WGC3Dint MaxDrawBuffers(); protected: class CopyTextureToImpl; @@ -362,7 +362,7 @@ class CONTENT_EXPORT GLHelper { // Creates |scaler_impl_| if NULL. void InitScalerImpl(); - WebKit::WebGraphicsContext3D* context_; + blink::WebGraphicsContext3D* context_; gpu::ContextSupport* context_support_; scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; scoped_ptr<GLHelperScaling> scaler_impl_; diff --git a/content/common/gpu/client/gl_helper_benchmark.cc b/content/common/gpu/client/gl_helper_benchmark.cc index 6bb4309..bc0664e 100644 --- a/content/common/gpu/client/gl_helper_benchmark.cc +++ b/content/common/gpu/client/gl_helper_benchmark.cc @@ -43,8 +43,8 @@ namespace content { -using WebKit::WebGLId; -using WebKit::WebGraphicsContext3D; +using blink::WebGLId; +using blink::WebGraphicsContext3D; content::GLHelper::ScalerQuality kQualities[] = { content::GLHelper::SCALER_QUALITY_BEST, diff --git a/content/common/gpu/client/gl_helper_scaling.cc b/content/common/gpu/client/gl_helper_scaling.cc index ee90016..ff6a6b7 100644 --- a/content/common/gpu/client/gl_helper_scaling.cc +++ b/content/common/gpu/client/gl_helper_scaling.cc @@ -21,12 +21,12 @@ #include "ui/gfx/size.h" #include "ui/gl/gl_bindings.h" -using WebKit::WebGLId; -using WebKit::WebGraphicsContext3D; +using blink::WebGLId; +using blink::WebGraphicsContext3D; namespace content { -GLHelperScaling::GLHelperScaling(WebKit::WebGraphicsContext3D* context, +GLHelperScaling::GLHelperScaling(blink::WebGraphicsContext3D* context, GLHelper* helper) : context_(context), helper_(helper), @@ -51,8 +51,8 @@ class ShaderProgram : public base::RefCounted<ShaderProgram> { } // Compile shader program, return true if successful. - bool Setup(const WebKit::WGC3Dchar* vertex_shader_text, - const WebKit::WGC3Dchar* fragment_shader_text); + bool Setup(const blink::WGC3Dchar* vertex_shader_text, + const blink::WGC3Dchar* fragment_shader_text); // UseProgram must be called with GL_TEXTURE_2D bound to the // source texture and GL_ARRAY_BUFFER bound to a vertex @@ -75,22 +75,22 @@ class ShaderProgram : public base::RefCounted<ShaderProgram> { ScopedProgram program_; // The location of the position in the program. - WebKit::WGC3Dint position_location_; + blink::WGC3Dint position_location_; // The location of the texture coordinate in the program. - WebKit::WGC3Dint texcoord_location_; + blink::WGC3Dint texcoord_location_; // The location of the source texture in the program. - WebKit::WGC3Dint texture_location_; + blink::WGC3Dint texture_location_; // The location of the texture coordinate of // the sub-rectangle in the program. - WebKit::WGC3Dint src_subrect_location_; + blink::WGC3Dint src_subrect_location_; // Location of size of source image in pixels. - WebKit::WGC3Dint src_pixelsize_location_; + blink::WGC3Dint src_pixelsize_location_; // Location of size of destination image in pixels. - WebKit::WGC3Dint dst_pixelsize_location_; + blink::WGC3Dint dst_pixelsize_location_; // Location of vector for scaling direction. - WebKit::WGC3Dint scaling_vector_location_; + blink::WGC3Dint scaling_vector_location_; // Location of color weights. - WebKit::WGC3Dint color_weights_location_; + blink::WGC3Dint color_weights_location_; DISALLOW_COPY_AND_ASSIGN(ShaderProgram); }; @@ -164,8 +164,8 @@ class ScalerImpl : // GLHelperShader::ShaderInterface implementation. virtual void Execute( - WebKit::WebGLId source_texture, - const std::vector<WebKit::WebGLId>& dest_textures) OVERRIDE { + blink::WebGLId source_texture, + const std::vector<blink::WebGLId>& dest_textures) OVERRIDE { if (subscaler_) { subscaler_->Scale(source_texture, intermediate_texture_); source_texture = intermediate_texture_; @@ -175,8 +175,8 @@ class ScalerImpl : context_, dst_framebuffer_); DCHECK_GT(dest_textures.size(), 0U); - scoped_ptr<WebKit::WGC3Denum[]> buffers( - new WebKit::WGC3Denum[dest_textures.size()]); + scoped_ptr<blink::WGC3Denum[]> buffers( + new blink::WGC3Denum[dest_textures.size()]); for (size_t t = 0; t < dest_textures.size(); t++) { ScopedTextureBinder<GL_TEXTURE_2D> texture_binder(context_, dest_textures[t]); @@ -224,9 +224,9 @@ class ScalerImpl : } // GLHelper::ScalerInterface implementation. - virtual void Scale(WebKit::WebGLId source_texture, - WebKit::WebGLId dest_texture) OVERRIDE { - std::vector<WebKit::WebGLId> tmp(1); + virtual void Scale(blink::WebGLId source_texture, + blink::WebGLId dest_texture) OVERRIDE { + std::vector<blink::WebGLId> tmp(1); tmp[0] = dest_texture; Execute(source_texture, tmp); } @@ -252,7 +252,7 @@ class ScalerImpl : GLHelperScaling* scaler_helper_; GLHelperScaling::ScalerStage spec_; GLfloat color_weights_[4]; - WebKit::WebGLId intermediate_texture_; + blink::WebGLId intermediate_texture_; scoped_refptr<ShaderProgram> shader_program_; ScopedFramebuffer dst_framebuffer_; scoped_ptr<ScalerImpl> subscaler_; @@ -510,7 +510,7 @@ GLHelperScaling::CreateYuvMrtShader( return new ScalerImpl(context_, this, stage, NULL, NULL); } -const WebKit::WGC3Dfloat GLHelperScaling::kVertexAttributes[] = { +const blink::WGC3Dfloat GLHelperScaling::kVertexAttributes[] = { -1.0f, -1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, -1.0f, 1.0f, 0.0f, 1.0f, @@ -533,12 +533,12 @@ GLHelperScaling::GetShaderProgram(ShaderType type, scoped_refptr<ShaderProgram>& cache_entry(shader_programs_[key]); if (!cache_entry.get()) { cache_entry = new ShaderProgram(context_, helper_); - std::basic_string<WebKit::WGC3Dchar> vertex_program; - std::basic_string<WebKit::WGC3Dchar> fragment_program; - std::basic_string<WebKit::WGC3Dchar> vertex_header; - std::basic_string<WebKit::WGC3Dchar> fragment_directives; - std::basic_string<WebKit::WGC3Dchar> fragment_header; - std::basic_string<WebKit::WGC3Dchar> shared_variables; + std::basic_string<blink::WGC3Dchar> vertex_program; + std::basic_string<blink::WGC3Dchar> fragment_program; + std::basic_string<blink::WGC3Dchar> vertex_header; + std::basic_string<blink::WGC3Dchar> fragment_directives; + std::basic_string<blink::WGC3Dchar> fragment_header; + std::basic_string<blink::WGC3Dchar> shared_variables; vertex_header.append( "precision highp float;\n" @@ -871,8 +871,8 @@ GLHelperScaling::GetShaderProgram(ShaderType type, return cache_entry; } -bool ShaderProgram::Setup(const WebKit::WGC3Dchar* vertex_shader_text, - const WebKit::WGC3Dchar* fragment_shader_text) { +bool ShaderProgram::Setup(const blink::WGC3Dchar* vertex_shader_text, + const blink::WGC3Dchar* fragment_shader_text) { // Shaders to map the source texture to |dst_texture_|. ScopedShader vertex_shader(context_, helper_->CompileShaderFromSource( vertex_shader_text, GL_VERTEX_SHADER)); @@ -888,7 +888,7 @@ bool ShaderProgram::Setup(const WebKit::WGC3Dchar* vertex_shader_text, context_->attachShader(program_, fragment_shader); context_->linkProgram(program_); - WebKit::WGC3Dint link_status = 0; + blink::WGC3Dint link_status = 0; context_->getProgramiv(program_, GL_LINK_STATUS, &link_status); if (!link_status) { LOG(ERROR) << std::string(context_->getProgramInfoLog(program_).utf8()); @@ -918,21 +918,21 @@ void ShaderProgram::UseProgram( GLfloat color_weights[4]) { context_->useProgram(program_); - WebKit::WGC3Dintptr offset = 0; + blink::WGC3Dintptr offset = 0; context_->vertexAttribPointer(position_location_, 2, GL_FLOAT, GL_FALSE, - 4 * sizeof(WebKit::WGC3Dfloat), + 4 * sizeof(blink::WGC3Dfloat), offset); context_->enableVertexAttribArray(position_location_); - offset += 2 * sizeof(WebKit::WGC3Dfloat); + offset += 2 * sizeof(blink::WGC3Dfloat); context_->vertexAttribPointer(texcoord_location_, 2, GL_FLOAT, GL_FALSE, - 4 * sizeof(WebKit::WGC3Dfloat), + 4 * sizeof(blink::WGC3Dfloat), offset); context_->enableVertexAttribArray(texcoord_location_); diff --git a/content/common/gpu/client/gl_helper_scaling.h b/content/common/gpu/client/gl_helper_scaling.h index eba283c..22e47c9 100644 --- a/content/common/gpu/client/gl_helper_scaling.h +++ b/content/common/gpu/client/gl_helper_scaling.h @@ -41,13 +41,13 @@ class CONTENT_EXPORT GLHelperScaling { virtual ~ShaderInterface() {} // Note that the src_texture will have the min/mag filter set to GL_LINEAR // and wrap_s/t set to CLAMP_TO_EDGE in this call. - virtual void Execute(WebKit::WebGLId source_texture, - const std::vector<WebKit::WebGLId>& dest_textures) = 0; + virtual void Execute(blink::WebGLId source_texture, + const std::vector<blink::WebGLId>& dest_textures) = 0; }; typedef std::pair<ShaderType, bool> ShaderProgramKeyType; - GLHelperScaling(WebKit::WebGraphicsContext3D* context, + GLHelperScaling(blink::WebGraphicsContext3D* context, GLHelper* helper); ~GLHelperScaling(); void InitBuffer(); @@ -182,9 +182,9 @@ class CONTENT_EXPORT GLHelperScaling { // Interleaved array of 2-dimentional vertex positions (x, y) and // 2-dimentional texture coordinates (s, t). - static const WebKit::WGC3Dfloat kVertexAttributes[]; + static const blink::WGC3Dfloat kVertexAttributes[]; - WebKit::WebGraphicsContext3D* context_; + blink::WebGraphicsContext3D* context_; GLHelper* helper_; // The buffer that holds the vertices and the texture coordinates data for diff --git a/content/common/gpu/client/gl_helper_unittests.cc b/content/common/gpu/client/gl_helper_unittests.cc index 68b930d..548faec 100644 --- a/content/common/gpu/client/gl_helper_unittests.cc +++ b/content/common/gpu/client/gl_helper_unittests.cc @@ -44,8 +44,8 @@ namespace content { -using WebKit::WebGLId; -using WebKit::WebGraphicsContext3D; +using blink::WebGLId; +using blink::WebGraphicsContext3D; using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; content::GLHelper::ScalerQuality kQualities[] = { diff --git a/content/common/gpu/client/gpu_context_tests.h b/content/common/gpu/client/gpu_context_tests.h index 895ce25..a679e72 100644 --- a/content/common/gpu/client/gpu_context_tests.h +++ b/content/common/gpu/client/gpu_context_tests.h @@ -29,7 +29,7 @@ class SignalTest : public ContextTestBase { } // These tests should time out if the callback doesn't get called. - void TestSignalQuery(WebKit::WebGLId query) { + void TestSignalQuery(blink::WebGLId query) { base::RunLoop run_loop; context_support_->SignalQuery( query, @@ -59,7 +59,7 @@ CONTEXT_TEST_F(SignalTest, BasicSignalQueryTest) { }; CONTEXT_TEST_F(SignalTest, SignalQueryUnboundTest) { - WebKit::WebGLId query = context_->createQueryEXT(); + blink::WebGLId query = context_->createQueryEXT(); TestSignalQuery(query); context_->deleteQueryEXT(query); }; diff --git a/content/common/gpu/client/gpu_in_process_context_tests.cc b/content/common/gpu/client/gpu_in_process_context_tests.cc index b341623..7be7890 100644 --- a/content/common/gpu/client/gpu_in_process_context_tests.cc +++ b/content/common/gpu/client/gpu_in_process_context_tests.cc @@ -19,7 +19,7 @@ using webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl; class ContextTestBase : public testing::Test { public: virtual void SetUp() { - WebKit::WebGraphicsContext3D::Attributes attributes; + blink::WebGraphicsContext3D::Attributes attributes; context_ = WebGraphicsContext3DInProcessCommandBufferImpl:: CreateOffscreenContext(attributes); context_->makeContextCurrent(); diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 4779969..e6d4df5 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -605,9 +605,9 @@ void WebGraphicsContext3DCommandBufferImpl::copyTextureToParentTextureCHROMIUM( DELEGATE_TO_GL(rateLimitOffscreenContextCHROMIUM, RateLimitOffscreenContextCHROMIUM) -WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: +blink::WebString WebGraphicsContext3DCommandBufferImpl:: getRequestableExtensionsCHROMIUM() { - return WebKit::WebString::fromUTF8( + return blink::WebString::fromUTF8( gl_->GetRequestableExtensionsCHROMIUM()); } @@ -780,7 +780,7 @@ bool WebGraphicsContext3DCommandBufferImpl::getActiveAttrib( if (size < 0) { return false; } - info.name = WebKit::WebString::fromUTF8(name.get(), length); + info.name = blink::WebString::fromUTF8(name.get(), length); info.type = type; info.size = size; return true; @@ -806,7 +806,7 @@ bool WebGraphicsContext3DCommandBufferImpl::getActiveUniform( if (size < 0) { return false; } - info.name = WebKit::WebString::fromUTF8(name.get(), length); + info.name = blink::WebString::fromUTF8(name.get(), length); info.type = type; info.size = size; return true; @@ -823,7 +823,7 @@ DELEGATE_TO_GL_2(getBooleanv, GetBooleanv, WGC3Denum, WGC3Dboolean*) DELEGATE_TO_GL_3(getBufferParameteriv, GetBufferParameteriv, WGC3Denum, WGC3Denum, WGC3Dint*) -WebKit::WebGraphicsContext3D::Attributes +blink::WebGraphicsContext3D::Attributes WebGraphicsContext3DCommandBufferImpl::getContextAttributes() { return attributes_; } @@ -855,21 +855,21 @@ DELEGATE_TO_GL_2(getIntegerv, GetIntegerv, WGC3Denum, WGC3Dint*) DELEGATE_TO_GL_3(getProgramiv, GetProgramiv, WebGLId, WGC3Denum, WGC3Dint*) -WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getProgramInfoLog( +blink::WebString WebGraphicsContext3DCommandBufferImpl::getProgramInfoLog( WebGLId program) { GLint logLength = 0; gl_->GetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); if (!logLength) - return WebKit::WebString(); + return blink::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); if (!log) - return WebKit::WebString(); + return blink::WebString(); GLsizei returnedLogLength = 0; gl_->GetProgramInfoLog( program, logLength, &returnedLogLength, log.get()); DCHECK_EQ(logLength, returnedLogLength + 1); - WebKit::WebString res = - WebKit::WebString::fromUTF8(log.get(), returnedLogLength); + blink::WebString res = + blink::WebString::fromUTF8(log.get(), returnedLogLength); return res; } @@ -878,71 +878,71 @@ DELEGATE_TO_GL_3(getRenderbufferParameteriv, GetRenderbufferParameteriv, DELEGATE_TO_GL_3(getShaderiv, GetShaderiv, WebGLId, WGC3Denum, WGC3Dint*) -WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderInfoLog( +blink::WebString WebGraphicsContext3DCommandBufferImpl::getShaderInfoLog( WebGLId shader) { GLint logLength = 0; gl_->GetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength); if (!logLength) - return WebKit::WebString(); + return blink::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); if (!log) - return WebKit::WebString(); + return blink::WebString(); GLsizei returnedLogLength = 0; gl_->GetShaderInfoLog( shader, logLength, &returnedLogLength, log.get()); DCHECK_EQ(logLength, returnedLogLength + 1); - WebKit::WebString res = - WebKit::WebString::fromUTF8(log.get(), returnedLogLength); + blink::WebString res = + blink::WebString::fromUTF8(log.get(), returnedLogLength); return res; } DELEGATE_TO_GL_4(getShaderPrecisionFormat, GetShaderPrecisionFormat, WGC3Denum, WGC3Denum, WGC3Dint*, WGC3Dint*) -WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getShaderSource( +blink::WebString WebGraphicsContext3DCommandBufferImpl::getShaderSource( WebGLId shader) { GLint logLength = 0; gl_->GetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &logLength); if (!logLength) - return WebKit::WebString(); + return blink::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); if (!log) - return WebKit::WebString(); + return blink::WebString(); GLsizei returnedLogLength = 0; gl_->GetShaderSource( shader, logLength, &returnedLogLength, log.get()); if (!returnedLogLength) - return WebKit::WebString(); + return blink::WebString(); DCHECK_EQ(logLength, returnedLogLength + 1); - WebKit::WebString res = - WebKit::WebString::fromUTF8(log.get(), returnedLogLength); + blink::WebString res = + blink::WebString::fromUTF8(log.get(), returnedLogLength); return res; } -WebKit::WebString WebGraphicsContext3DCommandBufferImpl:: +blink::WebString WebGraphicsContext3DCommandBufferImpl:: getTranslatedShaderSourceANGLE(WebGLId shader) { GLint logLength = 0; gl_->GetShaderiv( shader, GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE, &logLength); if (!logLength) - return WebKit::WebString(); + return blink::WebString(); scoped_ptr<GLchar[]> log(new GLchar[logLength]); if (!log) - return WebKit::WebString(); + return blink::WebString(); GLsizei returnedLogLength = 0; gl_->GetTranslatedShaderSourceANGLE( shader, logLength, &returnedLogLength, log.get()); if (!returnedLogLength) - return WebKit::WebString(); + return blink::WebString(); DCHECK_EQ(logLength, returnedLogLength + 1); - WebKit::WebString res = - WebKit::WebString::fromUTF8(log.get(), returnedLogLength); + blink::WebString res = + blink::WebString::fromUTF8(log.get(), returnedLogLength); return res; } -WebKit::WebString WebGraphicsContext3DCommandBufferImpl::getString( +blink::WebString WebGraphicsContext3DCommandBufferImpl::getString( WGC3Denum name) { - return WebKit::WebString::fromUTF8( + return blink::WebString::fromUTF8( reinterpret_cast<const char*>(gl_->GetString(name))); } @@ -1459,7 +1459,7 @@ void WebGraphicsContext3DCommandBufferImpl::OnGpuChannelLost() { void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( const std::string& message, int id) { if (error_message_callback_) { - WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); + blink::WebString str = blink::WebString::fromUTF8(message.c_str()); error_message_callback_->onErrorMessage(str, id); } } diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h index c9e5799..a94277e 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h @@ -31,20 +31,20 @@ class GLES2Interface; } } -using WebKit::WebGLId; - -using WebKit::WGC3Dbyte; -using WebKit::WGC3Dchar; -using WebKit::WGC3Denum; -using WebKit::WGC3Dboolean; -using WebKit::WGC3Dbitfield; -using WebKit::WGC3Dint; -using WebKit::WGC3Dsizei; -using WebKit::WGC3Duint; -using WebKit::WGC3Dfloat; -using WebKit::WGC3Dclampf; -using WebKit::WGC3Dintptr; -using WebKit::WGC3Dsizeiptr; +using blink::WebGLId; + +using blink::WGC3Dbyte; +using blink::WGC3Dchar; +using blink::WGC3Denum; +using blink::WGC3Dboolean; +using blink::WGC3Dbitfield; +using blink::WGC3Dint; +using blink::WGC3Dsizei; +using blink::WGC3Duint; +using blink::WGC3Dfloat; +using blink::WGC3Dclampf; +using blink::WGC3Dintptr; +using blink::WGC3Dsizeiptr; namespace content { class GpuChannelHost; @@ -69,7 +69,7 @@ class WebGraphicsContext3DSwapBuffersClient { class WebGraphicsContext3DErrorMessageCallback; class WebGraphicsContext3DCommandBufferImpl - : public WebKit::WebGraphicsContext3D { + : public blink::WebGraphicsContext3D { public: enum MappedMemoryReclaimLimit { kNoLimit = 0, @@ -287,7 +287,7 @@ class WebGraphicsContext3DCommandBufferImpl virtual void getProgramiv(WebGLId program, WGC3Denum pname, WGC3Dint* value); - virtual WebKit::WebString getProgramInfoLog(WebGLId program); + virtual blink::WebString getProgramInfoLog(WebGLId program); virtual void getRenderbufferParameteriv(WGC3Denum target, WGC3Denum pname, @@ -295,15 +295,15 @@ class WebGraphicsContext3DCommandBufferImpl virtual void getShaderiv(WebGLId shader, WGC3Denum pname, WGC3Dint* value); - virtual WebKit::WebString getShaderInfoLog(WebGLId shader); + virtual blink::WebString getShaderInfoLog(WebGLId shader); virtual void getShaderPrecisionFormat(WGC3Denum shadertype, WGC3Denum precisiontype, WGC3Dint* range, WGC3Dint* precision); - virtual WebKit::WebString getShaderSource(WebGLId shader); - virtual WebKit::WebString getString(WGC3Denum name); + virtual blink::WebString getShaderSource(WebGLId shader); + virtual blink::WebString getString(WGC3Denum name); virtual void getTexParameterfv(WGC3Denum target, WGC3Denum pname, @@ -524,7 +524,7 @@ class WebGraphicsContext3DCommandBufferImpl virtual void rateLimitOffscreenContextCHROMIUM(); - virtual WebKit::WebString getRequestableExtensionsCHROMIUM(); + virtual blink::WebString getRequestableExtensionsCHROMIUM(); virtual void requestExtensionCHROMIUM(const char*); virtual void blitFramebufferCHROMIUM( @@ -535,7 +535,7 @@ class WebGraphicsContext3DCommandBufferImpl WGC3Denum target, WGC3Dsizei samples, WGC3Denum internalformat, WGC3Dsizei width, WGC3Dsizei height); - virtual WebKit::WebString getTranslatedShaderSourceANGLE(WebGLId shader); + virtual blink::WebString getTranslatedShaderSourceANGLE(WebGLId shader); virtual void setContextLostCallback( WebGraphicsContext3D::WebGraphicsContextLostCallback* callback); @@ -733,7 +733,7 @@ class WebGraphicsContext3DCommandBufferImpl WebGraphicsContext3D::WebGraphicsSwapBuffersCompleteCallbackCHROMIUM* swapbuffers_complete_callback_; - WebKit::WebGraphicsContext3D::Attributes attributes_; + blink::WebGraphicsContext3D::Attributes attributes_; gfx::GpuPreference gpu_preference_; // Errors raised by synthesizeGLError(). diff --git a/content/common/indexed_db/indexed_db_key.cc b/content/common/indexed_db/indexed_db_key.cc index 529dffa..0ee2383 100644 --- a/content/common/indexed_db/indexed_db_key.cc +++ b/content/common/indexed_db/indexed_db_key.cc @@ -9,15 +9,15 @@ namespace content { -using WebKit::WebIDBKey; -using WebKit::WebIDBKeyType; -using WebKit::WebIDBKeyTypeArray; -using WebKit::WebIDBKeyTypeDate; -using WebKit::WebIDBKeyTypeInvalid; -using WebKit::WebIDBKeyTypeMin; -using WebKit::WebIDBKeyTypeNull; -using WebKit::WebIDBKeyTypeNumber; -using WebKit::WebIDBKeyTypeString; +using blink::WebIDBKey; +using blink::WebIDBKeyType; +using blink::WebIDBKeyTypeArray; +using blink::WebIDBKeyTypeDate; +using blink::WebIDBKeyTypeInvalid; +using blink::WebIDBKeyTypeMin; +using blink::WebIDBKeyTypeNull; +using blink::WebIDBKeyTypeNumber; +using blink::WebIDBKeyTypeString; namespace { diff --git a/content/common/indexed_db/indexed_db_key.h b/content/common/indexed_db/indexed_db_key.h index f453b3a..8cfc67f 100644 --- a/content/common/indexed_db/indexed_db_key.h +++ b/content/common/indexed_db/indexed_db_key.h @@ -13,7 +13,7 @@ #include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebIDBTypes.h" -namespace WebKit { +namespace blink { class WebIDBKey; } @@ -23,12 +23,12 @@ class CONTENT_EXPORT IndexedDBKey { public: typedef std::vector<IndexedDBKey> KeyArray; - IndexedDBKey(); // Defaults to WebKit::WebIDBKeyTypeInvalid. - IndexedDBKey(WebKit::WebIDBKeyType); // must be Null or Invalid + IndexedDBKey(); // Defaults to blink::WebIDBKeyTypeInvalid. + IndexedDBKey(blink::WebIDBKeyType); // must be Null or Invalid explicit IndexedDBKey(const KeyArray& array); explicit IndexedDBKey(const string16& str); IndexedDBKey(double number, - WebKit::WebIDBKeyType type); // must be date or number + blink::WebIDBKeyType type); // must be date or number ~IndexedDBKey(); bool IsValid() const; @@ -37,7 +37,7 @@ class CONTENT_EXPORT IndexedDBKey { bool IsLessThan(const IndexedDBKey& other) const; bool IsEqual(const IndexedDBKey& other) const; - WebKit::WebIDBKeyType type() const { return type_; } + blink::WebIDBKeyType type() const { return type_; } const std::vector<IndexedDBKey>& array() const { return array_; } const string16& string() const { return string_; } double date() const { return date_; } @@ -46,7 +46,7 @@ class CONTENT_EXPORT IndexedDBKey { size_t size_estimate() const { return size_estimate_; } private: - WebKit::WebIDBKeyType type_; + blink::WebIDBKeyType type_; std::vector<IndexedDBKey> array_; string16 string_; double date_; diff --git a/content/common/indexed_db/indexed_db_key_path.cc b/content/common/indexed_db/indexed_db_key_path.cc index be6adfd..b01de73 100644 --- a/content/common/indexed_db/indexed_db_key_path.cc +++ b/content/common/indexed_db/indexed_db_key_path.cc @@ -8,9 +8,9 @@ namespace content { -using WebKit::WebIDBKeyPathTypeArray; -using WebKit::WebIDBKeyPathTypeNull; -using WebKit::WebIDBKeyPathTypeString; +using blink::WebIDBKeyPathTypeArray; +using blink::WebIDBKeyPathTypeNull; +using blink::WebIDBKeyPathTypeString; IndexedDBKeyPath::IndexedDBKeyPath() : type_(WebIDBKeyPathTypeNull) {} @@ -23,12 +23,12 @@ IndexedDBKeyPath::IndexedDBKeyPath(const std::vector<string16>& array) IndexedDBKeyPath::~IndexedDBKeyPath() {} const std::vector<string16>& IndexedDBKeyPath::array() const { - DCHECK(type_ == WebKit::WebIDBKeyPathTypeArray); + DCHECK(type_ == blink::WebIDBKeyPathTypeArray); return array_; } const string16& IndexedDBKeyPath::string() const { - DCHECK(type_ == WebKit::WebIDBKeyPathTypeString); + DCHECK(type_ == blink::WebIDBKeyPathTypeString); return string_; } diff --git a/content/common/indexed_db/indexed_db_key_path.h b/content/common/indexed_db/indexed_db_key_path.h index 1baae2f..a17c193 100644 --- a/content/common/indexed_db/indexed_db_key_path.h +++ b/content/common/indexed_db/indexed_db_key_path.h @@ -16,20 +16,20 @@ namespace content { class CONTENT_EXPORT IndexedDBKeyPath { public: - IndexedDBKeyPath(); // Defaults to WebKit::WebIDBKeyPathTypeNull. + IndexedDBKeyPath(); // Defaults to blink::WebIDBKeyPathTypeNull. explicit IndexedDBKeyPath(const string16&); explicit IndexedDBKeyPath(const std::vector<string16>&); ~IndexedDBKeyPath(); - bool IsNull() const { return type_ == WebKit::WebIDBKeyPathTypeNull; } + bool IsNull() const { return type_ == blink::WebIDBKeyPathTypeNull; } bool operator==(const IndexedDBKeyPath& other) const; - WebKit::WebIDBKeyPathType type() const { return type_; } + blink::WebIDBKeyPathType type() const { return type_; } const std::vector<string16>& array() const; const string16& string() const; private: - WebKit::WebIDBKeyPathType type_; + blink::WebIDBKeyPathType type_; string16 string_; std::vector<string16> array_; }; diff --git a/content/common/indexed_db/indexed_db_key_range.cc b/content/common/indexed_db/indexed_db_key_range.cc index 2c113ee..fa16ddf 100644 --- a/content/common/indexed_db/indexed_db_key_range.cc +++ b/content/common/indexed_db/indexed_db_key_range.cc @@ -10,8 +10,8 @@ namespace content { IndexedDBKeyRange::IndexedDBKeyRange() - : lower_(WebKit::WebIDBKeyTypeNull), - upper_(WebKit::WebIDBKeyTypeNull), + : lower_(blink::WebIDBKeyTypeNull), + upper_(blink::WebIDBKeyTypeNull), lower_open_(false), upper_open_(false) {} diff --git a/content/common/indexed_db/indexed_db_key_unittest.cc b/content/common/indexed_db/indexed_db_key_unittest.cc index 3c51915..7116062 100644 --- a/content/common/indexed_db/indexed_db_key_unittest.cc +++ b/content/common/indexed_db/indexed_db_key_unittest.cc @@ -21,15 +21,15 @@ TEST(IndexedDBKeyTest, KeySizeEstimates) { keys.push_back(IndexedDBKey()); estimates.push_back(static_cast<size_t>(16)); // Overhead. - keys.push_back(IndexedDBKey(WebKit::WebIDBKeyTypeNull)); + keys.push_back(IndexedDBKey(blink::WebIDBKeyTypeNull)); estimates.push_back(static_cast<size_t>(16)); double number = 3.14159; - keys.push_back(IndexedDBKey(number, WebKit::WebIDBKeyTypeNumber)); + keys.push_back(IndexedDBKey(number, blink::WebIDBKeyTypeNumber)); estimates.push_back(static_cast<size_t>(24)); // Overhead + sizeof(double). double date = 1370884329.0; - keys.push_back(IndexedDBKey(date, WebKit::WebIDBKeyTypeDate)); + keys.push_back(IndexedDBKey(date, blink::WebIDBKeyTypeDate)); estimates.push_back(static_cast<size_t>(24)); // Overhead + sizeof(double). const string16 string(1024, static_cast<char16>('X')); @@ -41,7 +41,7 @@ TEST(IndexedDBKeyTest, KeySizeEstimates) { IndexedDBKey::KeyArray array; double value = 123.456; for (size_t i = 0; i < array_size; ++i) { - array.push_back(IndexedDBKey(value, WebKit::WebIDBKeyTypeNumber)); + array.push_back(IndexedDBKey(value, blink::WebIDBKeyTypeNumber)); } keys.push_back(IndexedDBKey(array)); // Overhead + array length * (Overhead + sizeof(double)). diff --git a/content/common/indexed_db/indexed_db_messages.h b/content/common/indexed_db/indexed_db_messages.h index b123ac6..534a7dc 100644 --- a/content/common/indexed_db/indexed_db_messages.h +++ b/content/common/indexed_db/indexed_db_messages.h @@ -19,12 +19,12 @@ // Argument structures used in messages -IPC_ENUM_TRAITS(WebKit::WebIDBCursor::Direction) -IPC_ENUM_TRAITS(WebKit::WebIDBDatabase::PutMode) -IPC_ENUM_TRAITS(WebKit::WebIDBDatabase::TaskType) +IPC_ENUM_TRAITS(blink::WebIDBCursor::Direction) +IPC_ENUM_TRAITS(blink::WebIDBDatabase::PutMode) +IPC_ENUM_TRAITS(blink::WebIDBDatabase::TaskType) -IPC_ENUM_TRAITS_MAX_VALUE(WebKit::WebIDBCallbacks::DataLoss, - WebKit::WebIDBCallbacks::DataLossTotal) +IPC_ENUM_TRAITS_MAX_VALUE(blink::WebIDBCallbacks::DataLoss, + blink::WebIDBCallbacks::DataLossTotal) // Used to enumerate indexed databases. IPC_STRUCT_BEGIN(IndexedDBHostMsg_FactoryGetDatabaseNames_Params) @@ -130,7 +130,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabasePut_Params) // The key to set it on (may not be "valid"/set in some cases). IPC_STRUCT_MEMBER(content::IndexedDBKey, key) // Whether this is an add or a put. - IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::PutMode, put_mode) + IPC_STRUCT_MEMBER(blink::WebIDBDatabase::PutMode, put_mode) // The names of the indexes used below. IPC_STRUCT_MEMBER(std::vector<int64>, index_ids) // The keys for each index, such that each inner vector corresponds @@ -159,7 +159,7 @@ IPC_STRUCT_BEGIN(IndexedDBHostMsg_DatabaseOpenCursor_Params) // If this is just retrieving the key IPC_STRUCT_MEMBER(bool, key_only) // The priority of this cursor. - IPC_STRUCT_MEMBER(WebKit::WebIDBDatabase::TaskType, task_type) + IPC_STRUCT_MEMBER(blink::WebIDBDatabase::TaskType, task_type) IPC_STRUCT_END() // Used to open both cursors and object cursors in IndexedDB. @@ -288,7 +288,7 @@ IPC_STRUCT_BEGIN(IndexedDBMsg_CallbacksUpgradeNeeded_Params) IPC_STRUCT_MEMBER(int32, ipc_database_callbacks_id) IPC_STRUCT_MEMBER(int32, ipc_database_id) IPC_STRUCT_MEMBER(int64, old_version) - IPC_STRUCT_MEMBER(WebKit::WebIDBCallbacks::DataLoss, data_loss) + IPC_STRUCT_MEMBER(blink::WebIDBCallbacks::DataLoss, data_loss) IPC_STRUCT_MEMBER(std::string, data_loss_message) IPC_STRUCT_MEMBER(IndexedDBDatabaseMetadata, idb_metadata) IPC_STRUCT_END() diff --git a/content/common/indexed_db/indexed_db_param_traits.cc b/content/common/indexed_db/indexed_db_param_traits.cc index 595cc81..10c572f 100644 --- a/content/common/indexed_db/indexed_db_param_traits.cc +++ b/content/common/indexed_db/indexed_db_param_traits.cc @@ -15,17 +15,17 @@ using content::IndexedDBKey; using content::IndexedDBKeyPath; using content::IndexedDBKeyRange; -using WebKit::WebIDBKeyPathTypeArray; -using WebKit::WebIDBKeyPathTypeNull; -using WebKit::WebIDBKeyPathTypeString; -using WebKit::WebIDBKeyType; -using WebKit::WebIDBKeyTypeArray; -using WebKit::WebIDBKeyTypeDate; -using WebKit::WebIDBKeyTypeInvalid; -using WebKit::WebIDBKeyTypeMin; -using WebKit::WebIDBKeyTypeNull; -using WebKit::WebIDBKeyTypeNumber; -using WebKit::WebIDBKeyTypeString; +using blink::WebIDBKeyPathTypeArray; +using blink::WebIDBKeyPathTypeNull; +using blink::WebIDBKeyPathTypeString; +using blink::WebIDBKeyType; +using blink::WebIDBKeyTypeArray; +using blink::WebIDBKeyTypeDate; +using blink::WebIDBKeyTypeInvalid; +using blink::WebIDBKeyTypeMin; +using blink::WebIDBKeyTypeNull; +using blink::WebIDBKeyTypeNumber; +using blink::WebIDBKeyTypeString; namespace IPC { diff --git a/content/common/input/input_event.cc b/content/common/input/input_event.cc index dd41278..93e9691 100644 --- a/content/common/input/input_event.cc +++ b/content/common/input/input_event.cc @@ -10,7 +10,7 @@ namespace content { InputEvent::InputEvent() : is_keyboard_shortcut(false) {} -InputEvent::InputEvent(const WebKit::WebInputEvent& web_event, +InputEvent::InputEvent(const blink::WebInputEvent& web_event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut) : web_event(WebInputEventTraits::Clone(web_event)), diff --git a/content/common/input/input_event.h b/content/common/input/input_event.h index 50e6aec..4c13e06 100644 --- a/content/common/input/input_event.h +++ b/content/common/input/input_event.h @@ -11,7 +11,7 @@ #include "content/common/input/scoped_web_input_event.h" #include "ui/events/latency_info.h" -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -21,7 +21,7 @@ namespace content { class CONTENT_EXPORT InputEvent { public: InputEvent(); - InputEvent(const WebKit::WebInputEvent& web_event, + InputEvent(const blink::WebInputEvent& web_event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut); ~InputEvent(); diff --git a/content/common/input/input_param_traits_unittest.cc b/content/common/input/input_param_traits_unittest.cc index 3414ec8..df42fd6 100644 --- a/content/common/input/input_param_traits_unittest.cc +++ b/content/common/input/input_param_traits_unittest.cc @@ -15,7 +15,7 @@ namespace { typedef ScopedVector<InputEvent> InputEvents; -void AddTo(InputEvents& events, const WebKit::WebInputEvent& event) { +void AddTo(InputEvents& events, const blink::WebInputEvent& event) { events.push_back(new InputEvent(event, ui::LatencyInfo(), false)); } @@ -119,30 +119,30 @@ TEST_F(InputParamTraitsTest, InitializedEvents) { ui::LatencyInfo latency; - WebKit::WebKeyboardEvent key_event; - key_event.type = WebKit::WebInputEvent::RawKeyDown; + blink::WebKeyboardEvent key_event; + key_event.type = blink::WebInputEvent::RawKeyDown; key_event.nativeKeyCode = 5; events.push_back(new InputEvent(key_event, latency, false)); - WebKit::WebMouseWheelEvent wheel_event; - wheel_event.type = WebKit::WebInputEvent::MouseWheel; + blink::WebMouseWheelEvent wheel_event; + wheel_event.type = blink::WebInputEvent::MouseWheel; wheel_event.deltaX = 10; latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 1, 1); events.push_back(new InputEvent(wheel_event, latency, false)); - WebKit::WebMouseEvent mouse_event; - mouse_event.type = WebKit::WebInputEvent::MouseDown; + blink::WebMouseEvent mouse_event; + mouse_event.type = blink::WebInputEvent::MouseDown; mouse_event.x = 10; latency.AddLatencyNumber(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 2, 2); events.push_back(new InputEvent(mouse_event, latency, false)); - WebKit::WebGestureEvent gesture_event; - gesture_event.type = WebKit::WebInputEvent::GestureScrollBegin; + blink::WebGestureEvent gesture_event; + gesture_event.type = blink::WebInputEvent::GestureScrollBegin; gesture_event.x = -1; events.push_back(new InputEvent(gesture_event, latency, false)); - WebKit::WebTouchEvent touch_event; - touch_event.type = WebKit::WebInputEvent::TouchStart; + blink::WebTouchEvent touch_event; + touch_event.type = blink::WebInputEvent::TouchStart; touch_event.touchesLength = 1; touch_event.touches[0].radiusX = 1; events.push_back(new InputEvent(touch_event, latency, false)); diff --git a/content/common/input/scoped_web_input_event.cc b/content/common/input/scoped_web_input_event.cc index d9d3e76..8cd6e8a3 100644 --- a/content/common/input/scoped_web_input_event.cc +++ b/content/common/input/scoped_web_input_event.cc @@ -8,12 +8,12 @@ #include "content/common/input/web_input_event_traits.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; namespace content { diff --git a/content/common/input/scoped_web_input_event.h b/content/common/input/scoped_web_input_event.h index c11356f..e25cc0c 100644 --- a/content/common/input/scoped_web_input_event.h +++ b/content/common/input/scoped_web_input_event.h @@ -9,18 +9,18 @@ #include "base/memory/scoped_ptr.h" #include "content/common/content_export.h" -namespace WebKit { +namespace blink { class WebInputEvent; } namespace content { -// WebKit::WebInputEvent does not provide a virtual destructor. +// blink::WebInputEvent does not provide a virtual destructor. struct CONTENT_EXPORT WebInputEventDeleter { WebInputEventDeleter(); - void operator()(WebKit::WebInputEvent* web_event) const; + void operator()(blink::WebInputEvent* web_event) const; }; -typedef scoped_ptr<WebKit::WebInputEvent, +typedef scoped_ptr<blink::WebInputEvent, WebInputEventDeleter> ScopedWebInputEvent; } // namespace content diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc index 2f2eb7f..48787a2 100644 --- a/content/common/input/web_input_event_traits.cc +++ b/content/common/input/web_input_event_traits.cc @@ -6,12 +6,12 @@ #include "base/logging.h" -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebTouchEvent; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebTouchEvent; namespace content { namespace { @@ -106,8 +106,8 @@ void Coalesce(const WebTouchEvent& event_to_coalesce, WebTouchEvent* event) { WebTouchEvent old_event = *event; *event = event_to_coalesce; for (unsigned i = 0; i < event->touchesLength; ++i) { - if (old_event.touches[i].state == WebKit::WebTouchPoint::StateMoved) - event->touches[i].state = WebKit::WebTouchPoint::StateMoved; + if (old_event.touches[i].state == blink::WebTouchPoint::StateMoved) + event->touches[i].state = blink::WebTouchPoint::StateMoved; } } @@ -237,7 +237,7 @@ const char* WebInputEventTraits::GetName(WebInputEvent::Type type) { CASE_TYPE(TouchEnd); CASE_TYPE(TouchCancel); default: - // Must include default to let WebKit::WebInputEvent add new event types + // Must include default to let blink::WebInputEvent add new event types // before they're added here. DLOG(WARNING) << "Unhandled WebInputEvent type in WebInputEventTraits::GetName.\n"; diff --git a/content/common/input/web_input_event_traits.h b/content/common/input/web_input_event_traits.h index dba5f9c..b3b6d07 100644 --- a/content/common/input/web_input_event_traits.h +++ b/content/common/input/web_input_event_traits.h @@ -14,14 +14,14 @@ namespace content { // Utility class for performing operations on and with WebInputEvents. class WebInputEventTraits { public: - static const char* GetName(WebKit::WebInputEvent::Type type); - static size_t GetSize(WebKit::WebInputEvent::Type type); - static ScopedWebInputEvent Clone(const WebKit::WebInputEvent& event); - static void Delete(WebKit::WebInputEvent* event); - static bool CanCoalesce(const WebKit::WebInputEvent& event_to_coalesce, - const WebKit::WebInputEvent& event); - static void Coalesce(const WebKit::WebInputEvent& event_to_coalesce, - WebKit::WebInputEvent* event); + static const char* GetName(blink::WebInputEvent::Type type); + static size_t GetSize(blink::WebInputEvent::Type type); + static ScopedWebInputEvent Clone(const blink::WebInputEvent& event); + static void Delete(blink::WebInputEvent* event); + static bool CanCoalesce(const blink::WebInputEvent& event_to_coalesce, + const blink::WebInputEvent& event); + static void Coalesce(const blink::WebInputEvent& event_to_coalesce, + blink::WebInputEvent* event); }; } // namespace content diff --git a/content/common/input_messages.h b/content/common/input_messages.h index b764740..d8e5955 100644 --- a/content/common/input_messages.h +++ b/content/common/input_messages.h @@ -155,7 +155,7 @@ IPC_MESSAGE_ROUTED3(InputMsg_ActivateNearestFindResult, // Acknowledges receipt of a InputMsg_HandleInputEvent message. IPC_MESSAGE_ROUTED3(InputHostMsg_HandleInputEvent_ACK, - WebKit::WebInputEvent::Type, + blink::WebInputEvent::Type, content::InputEventAckState /* ack_result */, ui::LatencyInfo /* latency_info */) diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc index 3c9375b..5384ab5 100644 --- a/content/common/page_state_serialization.cc +++ b/content/common/page_state_serialization.cc @@ -25,7 +25,7 @@ float g_device_scale_factor_for_testing = 0.0; void AppendDataToHttpBody(ExplodedHttpBody* http_body, const char* data, int data_length) { ExplodedHttpBodyElement element; - element.type = WebKit::WebHTTPBody::Element::TypeData; + element.type = blink::WebHTTPBody::Element::TypeData; element.data.assign(data, data_length); http_body->elements.push_back(element); } @@ -36,7 +36,7 @@ void AppendFileRangeToHttpBody(ExplodedHttpBody* http_body, int file_length, double file_modification_time) { ExplodedHttpBodyElement element; - element.type = WebKit::WebHTTPBody::Element::TypeFile; + element.type = blink::WebHTTPBody::Element::TypeFile; element.file_path = file_path; element.file_start = file_start; element.file_length = file_length; @@ -50,7 +50,7 @@ void AppendURLRangeToHttpBody(ExplodedHttpBody* http_body, int file_length, double file_modification_time) { ExplodedHttpBodyElement element; - element.type = WebKit::WebHTTPBody::Element::TypeFileSystemURL; + element.type = blink::WebHTTPBody::Element::TypeFileSystemURL; element.filesystem_url = url; element.file_start = file_start; element.file_length = file_length; @@ -61,7 +61,7 @@ void AppendURLRangeToHttpBody(ExplodedHttpBody* http_body, void AppendBlobToHttpBody(ExplodedHttpBody* http_body, const std::string& uuid) { ExplodedHttpBodyElement element; - element.type = WebKit::WebHTTPBody::Element::TypeBlob; + element.type = blink::WebHTTPBody::Element::TypeBlob; element.blob_uuid = uuid; http_body->elements.push_back(element); } @@ -72,7 +72,7 @@ void AppendReferencedFilesFromHttpBody( const std::vector<ExplodedHttpBodyElement>& elements, std::vector<base::NullableString16>* referenced_files) { for (size_t i = 0; i < elements.size(); ++i) { - if (elements[i].type == WebKit::WebHTTPBody::Element::TypeFile) + if (elements[i].type == blink::WebHTTPBody::Element::TypeFile) referenced_files->push_back(elements[i].file_path); } } @@ -411,22 +411,22 @@ void WriteHttpBody(const ExplodedHttpBody& http_body, SerializeObject* obj) { for (size_t i = 0; i < http_body.elements.size(); ++i) { const ExplodedHttpBodyElement& element = http_body.elements[i]; WriteInteger(element.type, obj); - if (element.type == WebKit::WebHTTPBody::Element::TypeData) { + if (element.type == blink::WebHTTPBody::Element::TypeData) { WriteData(element.data.data(), static_cast<int>(element.data.size()), obj); - } else if (element.type == WebKit::WebHTTPBody::Element::TypeFile) { + } else if (element.type == blink::WebHTTPBody::Element::TypeFile) { WriteString(element.file_path, obj); WriteInteger64(element.file_start, obj); WriteInteger64(element.file_length, obj); WriteReal(element.file_modification_time, obj); } else if (element.type == - WebKit::WebHTTPBody::Element::TypeFileSystemURL) { + blink::WebHTTPBody::Element::TypeFileSystemURL) { WriteGURL(element.filesystem_url, obj); WriteInteger64(element.file_start, obj); WriteInteger64(element.file_length, obj); WriteReal(element.file_modification_time, obj); } else { - DCHECK(element.type == WebKit::WebHTTPBody::Element::TypeBlob); + DCHECK(element.type == blink::WebHTTPBody::Element::TypeBlob); WriteStdString(element.blob_uuid, obj); } } @@ -444,7 +444,7 @@ void ReadHttpBody(SerializeObject* obj, ExplodedHttpBody* http_body) { for (int i = 0; i < num_elements; ++i) { int type = ReadInteger(obj); - if (type == WebKit::WebHTTPBody::Element::TypeData) { + if (type == blink::WebHTTPBody::Element::TypeData) { const void* data; int length = -1; ReadData(obj, &data, &length); @@ -452,21 +452,21 @@ void ReadHttpBody(SerializeObject* obj, ExplodedHttpBody* http_body) { AppendDataToHttpBody(http_body, static_cast<const char*>(data), length); } - } else if (type == WebKit::WebHTTPBody::Element::TypeFile) { + } else if (type == blink::WebHTTPBody::Element::TypeFile) { base::NullableString16 file_path = ReadString(obj); int64 file_start = ReadInteger64(obj); int64 file_length = ReadInteger64(obj); double file_modification_time = ReadReal(obj); AppendFileRangeToHttpBody(http_body, file_path, file_start, file_length, file_modification_time); - } else if (type == WebKit::WebHTTPBody::Element::TypeFileSystemURL) { + } else if (type == blink::WebHTTPBody::Element::TypeFileSystemURL) { GURL url = ReadGURL(obj); int64 file_start = ReadInteger64(obj); int64 file_length = ReadInteger64(obj); double file_modification_time = ReadReal(obj); AppendURLRangeToHttpBody(http_body, url, file_start, file_length, file_modification_time); - } else if (type == WebKit::WebHTTPBody::Element::TypeBlob) { + } else if (type == blink::WebHTTPBody::Element::TypeBlob) { if (obj->version >= 16) { std::string blob_uuid = ReadStdString(obj); AppendBlobToHttpBody(http_body, blob_uuid); @@ -643,7 +643,7 @@ void ReadPageState(SerializeObject* obj, ExplodedPageState* state) { } // namespace ExplodedHttpBodyElement::ExplodedHttpBodyElement() - : type(WebKit::WebHTTPBody::Element::TypeData), + : type(blink::WebHTTPBody::Element::TypeData), file_start(0), file_length(-1), file_modification_time(std::numeric_limits<double>::quiet_NaN()) { diff --git a/content/common/page_state_serialization.h b/content/common/page_state_serialization.h index 607a89a..da64295 100644 --- a/content/common/page_state_serialization.h +++ b/content/common/page_state_serialization.h @@ -16,7 +16,7 @@ namespace content { struct CONTENT_EXPORT ExplodedHttpBodyElement { - WebKit::WebHTTPBody::Element::Type type; + blink::WebHTTPBody::Element::Type type; std::string data; base::NullableString16 file_path; GURL filesystem_url; diff --git a/content/common/page_state_serialization_unittest.cc b/content/common/page_state_serialization_unittest.cc index 5b79c96..7bf6c53 100644 --- a/content/common/page_state_serialization_unittest.cc +++ b/content/common/page_state_serialization_unittest.cc @@ -116,12 +116,12 @@ class PageStateSerializationTest : public testing::Test { http_body->http_content_type = NS16("text/foo"); ExplodedHttpBodyElement e1; - e1.type = WebKit::WebHTTPBody::Element::TypeData; + e1.type = blink::WebHTTPBody::Element::TypeData; e1.data = "foo"; http_body->elements.push_back(e1); ExplodedHttpBodyElement e2; - e2.type = WebKit::WebHTTPBody::Element::TypeFile; + e2.type = blink::WebHTTPBody::Element::TypeFile; e2.file_path = NS16("file.txt"); e2.file_start = 100; e2.file_length = 1024; @@ -161,17 +161,17 @@ class PageStateSerializationTest : public testing::Test { frame_state->http_body.is_null = false; ExplodedHttpBodyElement e1; - e1.type = WebKit::WebHTTPBody::Element::TypeData; + e1.type = blink::WebHTTPBody::Element::TypeData; e1.data = "first data block"; frame_state->http_body.elements.push_back(e1); ExplodedHttpBodyElement e2; - e2.type = WebKit::WebHTTPBody::Element::TypeFile; + e2.type = blink::WebHTTPBody::Element::TypeFile; e2.file_path = NS16("file.txt"); frame_state->http_body.elements.push_back(e2); ExplodedHttpBodyElement e3; - e3.type = WebKit::WebHTTPBody::Element::TypeData; + e3.type = blink::WebHTTPBody::Element::TypeData; e3.data = "data the second"; frame_state->http_body.elements.push_back(e3); @@ -352,7 +352,7 @@ TEST_F(PageStateSerializationTest, BadMessagesTest2) { p.WriteInt(0); // WebForm p.WriteInt(1); - p.WriteInt(WebKit::WebHTTPBody::Element::TypeData); + p.WriteInt(blink::WebHTTPBody::Element::TypeData); std::string s(static_cast<const char*>(p.data()), p.size()); diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h index 082be1a..111b944 100644 --- a/content/common/resource_messages.h +++ b/content/common/resource_messages.h @@ -138,7 +138,7 @@ IPC_STRUCT_BEGIN(ResourceHostMsg_Request) IPC_STRUCT_MEMBER(GURL, referrer) // The referrer policy to use. - IPC_STRUCT_MEMBER(WebKit::WebReferrerPolicy, referrer_policy) + IPC_STRUCT_MEMBER(blink::WebReferrerPolicy, referrer_policy) // Additional HTTP request headers. IPC_STRUCT_MEMBER(std::string, headers) diff --git a/content/common/service_worker_messages.h b/content/common/service_worker_messages.h index 15806a8..92c6e90 100644 --- a/content/common/service_worker_messages.h +++ b/content/common/service_worker_messages.h @@ -15,7 +15,7 @@ #define IPC_MESSAGE_START ServiceWorkerMsgStart -IPC_ENUM_TRAITS(WebKit::WebServiceWorkerError::ErrorType) +IPC_ENUM_TRAITS(blink::WebServiceWorkerError::ErrorType) // Messages sent from the child process to the browser. @@ -48,5 +48,5 @@ IPC_MESSAGE_CONTROL2(ServiceWorkerMsg_ServiceWorkerUnregistered, IPC_MESSAGE_CONTROL4(ServiceWorkerMsg_ServiceWorkerRegistrationError, int32 /* thread_id */, int32 /* request_id */, - WebKit::WebServiceWorkerError::ErrorType /* code */, + blink::WebServiceWorkerError::ErrorType /* code */, string16 /* message */) diff --git a/content/common/socket_stream_handle_data.cc b/content/common/socket_stream_handle_data.cc index be419d7..dbf75a4 100644 --- a/content/common/socket_stream_handle_data.cc +++ b/content/common/socket_stream_handle_data.cc @@ -7,7 +7,7 @@ #include "webkit/child/websocketstreamhandle_impl.h" using webkit_glue::WebSocketStreamHandleImpl; -using WebKit::WebSocketStreamHandle; +using blink::WebSocketStreamHandle; namespace content { diff --git a/content/common/socket_stream_handle_data.h b/content/common/socket_stream_handle_data.h index c339ec0..470e9ba 100644 --- a/content/common/socket_stream_handle_data.h +++ b/content/common/socket_stream_handle_data.h @@ -8,7 +8,7 @@ #include "base/supports_user_data.h" #include "content_export.h" -namespace WebKit { +namespace blink { class WebSocketStreamHandle; } @@ -24,12 +24,12 @@ class SocketStreamHandleData : public base::SupportsUserData::Data { // Creates SocketStreamHandleData object with |render_view_id| and store it // to |handle|. static void AddToHandle( - WebKit::WebSocketStreamHandle* handle, int render_view_id); + blink::WebSocketStreamHandle* handle, int render_view_id); - // Retrieves the stored user data from WebKit::WebSocketStreamHandle object. + // Retrieves the stored user data from blink::WebSocketStreamHandle object. // |handle| must actually be a WebSocketStreamHandleImpl object. CONTENT_EXPORT static const SocketStreamHandleData* ForHandle( - WebKit::WebSocketStreamHandle* handle); + blink::WebSocketStreamHandle* handle); private: explicit SocketStreamHandleData(int render_view_id) diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 2eb1a05..0eeff75 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -72,11 +72,11 @@ IPC_ENUM_TRAITS(AccessibilityMode) IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) -IPC_ENUM_TRAITS(WebKit::WebContextMenuData::MediaType) -IPC_ENUM_TRAITS(WebKit::WebMediaPlayerAction::Type) -IPC_ENUM_TRAITS(WebKit::WebPluginAction::Type) -IPC_ENUM_TRAITS(WebKit::WebPopupType) -IPC_ENUM_TRAITS(WebKit::WebTextDirection) +IPC_ENUM_TRAITS(blink::WebContextMenuData::MediaType) +IPC_ENUM_TRAITS(blink::WebMediaPlayerAction::Type) +IPC_ENUM_TRAITS(blink::WebPluginAction::Type) +IPC_ENUM_TRAITS(blink::WebPopupType) +IPC_ENUM_TRAITS(blink::WebTextDirection) IPC_ENUM_TRAITS(WindowContainerType) IPC_ENUM_TRAITS(content::FaviconURL::IconType) IPC_ENUM_TRAITS(content::FileChooserParams::Mode) @@ -103,42 +103,42 @@ IPC_STRUCT_TRAITS_BEGIN(FontDescriptor) IPC_STRUCT_TRAITS_END() #endif -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCompositionUnderline) +IPC_STRUCT_TRAITS_BEGIN(blink::WebCompositionUnderline) IPC_STRUCT_TRAITS_MEMBER(startOffset) IPC_STRUCT_TRAITS_MEMBER(endOffset) IPC_STRUCT_TRAITS_MEMBER(color) IPC_STRUCT_TRAITS_MEMBER(thick) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFindOptions) +IPC_STRUCT_TRAITS_BEGIN(blink::WebFindOptions) IPC_STRUCT_TRAITS_MEMBER(forward) IPC_STRUCT_TRAITS_MEMBER(matchCase) IPC_STRUCT_TRAITS_MEMBER(findNext) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebMediaPlayerAction) +IPC_STRUCT_TRAITS_BEGIN(blink::WebMediaPlayerAction) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_MEMBER(enable) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebPluginAction) +IPC_STRUCT_TRAITS_BEGIN(blink::WebPluginAction) IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_MEMBER(enable) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatPoint) +IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatPoint) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(y) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebFloatRect) +IPC_STRUCT_TRAITS_BEGIN(blink::WebFloatRect) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(y) IPC_STRUCT_TRAITS_MEMBER(width) IPC_STRUCT_TRAITS_MEMBER(height) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebScreenInfo) +IPC_STRUCT_TRAITS_BEGIN(blink::WebScreenInfo) IPC_STRUCT_TRAITS_MEMBER(deviceScaleFactor) IPC_STRUCT_TRAITS_MEMBER(depth) IPC_STRUCT_TRAITS_MEMBER(depthPerComponent) @@ -362,7 +362,7 @@ IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) IPC_STRUCT_MEMBER(content::Referrer, referrer) // The window features to use for the new view. - IPC_STRUCT_MEMBER(WebKit::WebWindowFeatures, features) + IPC_STRUCT_MEMBER(blink::WebWindowFeatures, features) IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_CreateWorker_Params) @@ -483,9 +483,9 @@ IPC_STRUCT_END() IPC_STRUCT_BEGIN(ViewHostMsg_SelectionBounds_Params) IPC_STRUCT_MEMBER(gfx::Rect, anchor_rect) - IPC_STRUCT_MEMBER(WebKit::WebTextDirection, anchor_dir) + IPC_STRUCT_MEMBER(blink::WebTextDirection, anchor_dir) IPC_STRUCT_MEMBER(gfx::Rect, focus_rect) - IPC_STRUCT_MEMBER(WebKit::WebTextDirection, focus_dir) + IPC_STRUCT_MEMBER(blink::WebTextDirection, focus_dir) IPC_STRUCT_MEMBER(bool, is_anchor_first) IPC_STRUCT_END() @@ -737,7 +737,7 @@ IPC_STRUCT_BEGIN(ViewMsg_New_Params) IPC_STRUCT_MEMBER(int32, next_page_id) // The properties of the screen associated with the view. - IPC_STRUCT_MEMBER(WebKit::WebScreenInfo, screen_info) + IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info) // The accessibility mode of the renderer. IPC_STRUCT_MEMBER(AccessibilityMode, accessibility_mode) @@ -851,7 +851,7 @@ IPC_MESSAGE_ROUTED0(ViewMsg_TimezoneChange) IPC_MESSAGE_ROUTED0(ViewMsg_Close) IPC_STRUCT_BEGIN(ViewMsg_Resize_Params) - IPC_STRUCT_MEMBER(WebKit::WebScreenInfo, screen_info) + IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info) IPC_STRUCT_MEMBER(gfx::Size, new_size) IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size) IPC_STRUCT_MEMBER(float, overdraw_bottom_height) @@ -949,7 +949,7 @@ IPC_MESSAGE_ROUTED0(ViewMsg_ReloadFrame) IPC_MESSAGE_ROUTED3(ViewMsg_Find, int /* request_id */, string16 /* search_text */, - WebKit::WebFindOptions) + blink::WebFindOptions) // This message notifies the renderer that the user has closed the FindInPage // window (and what action to take regarding the selection). @@ -975,13 +975,13 @@ IPC_MESSAGE_ROUTED2(ViewMsg_CopyImageAt, // located at the given point. IPC_MESSAGE_ROUTED2(ViewMsg_MediaPlayerActionAt, gfx::Point, /* location */ - WebKit::WebMediaPlayerAction) + blink::WebMediaPlayerAction) // Tells the renderer to perform the given action on the plugin located at // the given point. IPC_MESSAGE_ROUTED2(ViewMsg_PluginActionAt, gfx::Point, /* location */ - WebKit::WebPluginAction) + blink::WebPluginAction) // Request for the renderer to evaluate an xpath to a frame and execute a // javascript: url in that frame's context. The message is completely @@ -1096,7 +1096,7 @@ IPC_MESSAGE_ROUTED1(ViewMsg_SetInputMethodActive, IPC_MESSAGE_ROUTED4( ViewMsg_ImeSetComposition, string16, /* text */ - std::vector<WebKit::WebCompositionUnderline>, /* underlines */ + std::vector<blink::WebCompositionUnderline>, /* underlines */ int, /* selectiont_start */ int /* selection_end */) @@ -1111,7 +1111,7 @@ IPC_MESSAGE_ROUTED3(ViewMsg_ImeConfirmComposition, IPC_MESSAGE_ROUTED3(ViewMsg_SetCompositionFromExistingText, int /* start */, int /* end */, - std::vector<WebKit::WebCompositionUnderline> /* underlines */) + std::vector<blink::WebCompositionUnderline> /* underlines */) // Selects between the given start and end offsets in the currently focused // editable field. @@ -1212,7 +1212,7 @@ IPC_MESSAGE_ROUTED1(ViewMsg_DisableAutoResize, // Changes the text direction of the currently selected input field (if any). IPC_MESSAGE_ROUTED1(ViewMsg_SetTextDirection, - WebKit::WebTextDirection /* direction */) + blink::WebTextDirection /* direction */) // Tells the renderer to clear the focused node (if any). IPC_MESSAGE_ROUTED0(ViewMsg_ClearFocusedNode) @@ -1395,7 +1395,7 @@ IPC_SYNC_MESSAGE_CONTROL1_4(ViewHostMsg_CreateWindow, // contains the widget being created. IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_CreateWidget, int /* opener_id */, - WebKit::WebPopupType /* popup type */, + blink::WebPopupType /* popup type */, int /* route_id */, int32 /* surface_id */) @@ -1563,7 +1563,7 @@ IPC_MESSAGE_ROUTED3(ViewHostMsg_DidFinishLoad, IPC_MESSAGE_ROUTED3(ViewHostMsg_UpdateTitle, int32 /* page_id */, string16 /* title */, - WebKit::WebTextDirection /* title direction */) + blink::WebTextDirection /* title direction */) // Change the encoding name of the page in UI when the page has detected // proper encoding name. @@ -1968,7 +1968,7 @@ IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer, // Send the tooltip text for the current mouse position to the browser. IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText, string16 /* tooltip text string */, - WebKit::WebTextDirection /* text direction hint */) + blink::WebTextDirection /* text direction hint */) IPC_MESSAGE_ROUTED0(ViewHostMsg_SelectRange_ACK) IPC_MESSAGE_ROUTED0(ViewHostMsg_MoveCaret_ACK) diff --git a/content/common/worker_messages.h b/content/common/worker_messages.h index 566bcda..a4c2682 100644 --- a/content/common/worker_messages.h +++ b/content/common/worker_messages.h @@ -45,7 +45,7 @@ IPC_STRUCT_BEGIN(WorkerProcessMsg_CreateWorker_Params) IPC_STRUCT_MEMBER(int64, shared_worker_appcache_id) IPC_STRUCT_END() -IPC_ENUM_TRAITS(WebKit::WebContentSecurityPolicyType) +IPC_ENUM_TRAITS(blink::WebContentSecurityPolicyType) //----------------------------------------------------------------------------- // WorkerProcess messages @@ -92,7 +92,7 @@ IPC_MESSAGE_ROUTED5(WorkerMsg_StartWorkerContext, string16 /* user_agent */, string16 /* source_code */, string16 /* content_security_policy */, - WebKit::WebContentSecurityPolicyType) + blink::WebContentSecurityPolicyType) IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc index fb2401c..62be179 100644 --- a/content/plugin/plugin_channel.cc +++ b/content/plugin/plugin_channel.cc @@ -27,7 +27,7 @@ #include "ipc/ipc_channel_posix.h" #endif -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc index 1790f21..4a03540 100644 --- a/content/plugin/webplugin_delegate_stub.cc +++ b/content/plugin/webplugin_delegate_stub.cc @@ -26,8 +26,8 @@ #include "third_party/npapi/bindings/npruntime.h" #include "webkit/common/cursors/webcursor.h" -using WebKit::WebBindings; -using WebKit::WebCursorInfo; +using blink::WebBindings; +using blink::WebCursorInfo; namespace content { @@ -273,7 +273,7 @@ void WebPluginDelegateStub::OnSetFocus(bool focused) { } void WebPluginDelegateStub::OnHandleInputEvent( - const WebKit::WebInputEvent *event, + const blink::WebInputEvent *event, bool* handled, WebCursor* cursor) { WebCursor::CursorInfo cursor_info; diff --git a/content/plugin/webplugin_delegate_stub.h b/content/plugin/webplugin_delegate_stub.h index bbae899..09bcf3d 100644 --- a/content/plugin/webplugin_delegate_stub.h +++ b/content/plugin/webplugin_delegate_stub.h @@ -23,7 +23,7 @@ struct PluginMsg_FetchURL_Params; struct PluginMsg_UpdateGeometry_Param; class WebCursor; -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -69,7 +69,7 @@ class WebPluginDelegateStub : public IPC::Listener, void OnDidFail(int id); void OnDidFinishLoadWithReason(const GURL& url, int reason, int notify_id); void OnSetFocus(bool focused); - void OnHandleInputEvent(const WebKit::WebInputEvent* event, + void OnHandleInputEvent(const blink::WebInputEvent* event, bool* handled, WebCursor* cursor); void OnPaint(const gfx::Rect& damaged_rect); void OnDidPaint(); diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc index acba651..228efe9 100644 --- a/content/plugin/webplugin_proxy.cc +++ b/content/plugin/webplugin_proxy.cc @@ -41,7 +41,7 @@ #include "content/public/common/sandbox_init.h" #endif -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/port/browser/event_with_latency_info.h b/content/port/browser/event_with_latency_info.h index c8d941f..d746ce2 100644 --- a/content/port/browser/event_with_latency_info.h +++ b/content/port/browser/event_with_latency_info.h @@ -9,7 +9,7 @@ #include "content/common/input/web_input_event_traits.h" -namespace WebKit { +namespace blink { class WebGestureEvent; class WebMouseEvent; class WebMouseWheelEvent; @@ -40,13 +40,13 @@ class EventWithLatencyInfo { } }; -typedef EventWithLatencyInfo<WebKit::WebGestureEvent> +typedef EventWithLatencyInfo<blink::WebGestureEvent> GestureEventWithLatencyInfo; -typedef EventWithLatencyInfo<WebKit::WebMouseWheelEvent> +typedef EventWithLatencyInfo<blink::WebMouseWheelEvent> MouseWheelEventWithLatencyInfo; -typedef EventWithLatencyInfo<WebKit::WebMouseEvent> +typedef EventWithLatencyInfo<blink::WebMouseEvent> MouseEventWithLatencyInfo; -typedef EventWithLatencyInfo<WebKit::WebTouchEvent> +typedef EventWithLatencyInfo<blink::WebTouchEvent> TouchEventWithLatencyInfo; } // namespace content diff --git a/content/port/browser/render_view_host_delegate_view.h b/content/port/browser/render_view_host_delegate_view.h index 5e5d9b4..c6fb2e7 100644 --- a/content/port/browser/render_view_host_delegate_view.h +++ b/content/port/browser/render_view_host_delegate_view.h @@ -51,14 +51,14 @@ class CONTENT_EXPORT RenderViewHostDelegateView { // reason, it must inform the renderer that the drag has ended; otherwise, // this results in bugs like http://crbug.com/157134. virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) {} // The page wants to update the mouse cursor during a drag & drop operation. // |operation| describes the current operation (none, move, copy, link.) - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) {} + virtual void UpdateDragCursor(blink::WebDragOperation operation) {} // Notification that view for this delegate got the focus. virtual void GotFocus() {} diff --git a/content/port/browser/render_widget_host_view_port.h b/content/port/browser/render_widget_host_view_port.h index f9444b3..3360bfc 100644 --- a/content/port/browser/render_widget_host_view_port.h +++ b/content/port/browser/render_widget_host_view_port.h @@ -34,7 +34,7 @@ namespace media { class VideoFrame; } -namespace WebKit { +namespace blink { struct WebScreenInfo; } @@ -60,7 +60,7 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, static RenderWidgetHostViewPort* CreateViewForWidget( RenderWidgetHost* widget); - static void GetDefaultScreenInfo(WebKit::WebScreenInfo* results); + static void GetDefaultScreenInfo(blink::WebScreenInfo* results); // Perform all the initialization steps necessary for this object to represent // a popup (such as a <select> dropdown), then shows the popup at |pos|. @@ -241,7 +241,7 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) = 0; - virtual void GetScreenInfo(WebKit::WebScreenInfo* results) = 0; + virtual void GetScreenInfo(blink::WebScreenInfo* results) = 0; // The size of the view's backing surface in non-DPI-adjusted pixels. virtual gfx::Size GetPhysicalBackingSize() const = 0; @@ -282,14 +282,14 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, bool is_pinned_to_left, bool is_pinned_to_right) = 0; // Called when a mousewheel event was not processed by the renderer. - virtual void UnhandledWheelEvent(const WebKit::WebMouseWheelEvent& event) = 0; + virtual void UnhandledWheelEvent(const blink::WebMouseWheelEvent& event) = 0; // Called prior to forwarding input event messages to the renderer, giving // the view a chance to perform in-process event filtering or processing. // Return values of |NOT_CONSUMED| or |UNKNOWN| will result in |input_event| // being forwarded. virtual InputEventAckState FilterInputEvent( - const WebKit::WebInputEvent& input_event) = 0; + const blink::WebInputEvent& input_event) = 0; // Called by the host when it requires an input flush; the flush call should // by synchronized with BeginFrame. @@ -304,8 +304,8 @@ class CONTENT_EXPORT RenderWidgetHostViewPort : public RenderWidgetHostView, virtual void OnOverscrolled(gfx::Vector2dF accumulated_overscroll, gfx::Vector2dF current_fling_velocity) = 0; - virtual void SetPopupType(WebKit::WebPopupType popup_type) = 0; - virtual WebKit::WebPopupType GetPopupType() = 0; + virtual void SetPopupType(blink::WebPopupType popup_type) = 0; + virtual blink::WebPopupType GetPopupType() = 0; virtual BrowserAccessibilityManager* GetBrowserAccessibilityManager() const = 0; diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index 2d46807..f183ae3 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc @@ -97,7 +97,7 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker) command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl); - WebKit::initialize(webkit_platform_support_.get()); + blink::initialize(webkit_platform_support_.get()); // Register interfaces that expect messages from the browser process. Please // note that only those InterfaceProxy-based ones require registration. @@ -112,7 +112,7 @@ void PpapiThread::Shutdown() { ppapi::proxy::PluginGlobals::Get()->set_plugin_proxy_delegate(NULL); if (plugin_entry_points_.shutdown_module) plugin_entry_points_.shutdown_module(); - WebKit::shutdown(); + blink::shutdown(); } bool PpapiThread::Send(IPC::Message* msg) { diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc index 049fe20..6c38dc6 100644 --- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc +++ b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc @@ -28,10 +28,10 @@ #include "third_party/icu/source/common/unicode/utf16.h" #endif -using WebKit::WebSandboxSupport; -using WebKit::WebString; -using WebKit::WebUChar; -using WebKit::WebUChar32; +using blink::WebSandboxSupport; +using blink::WebString; +using blink::WebUChar; +using blink::WebUChar32; typedef struct CGFont* CGFontRef; @@ -53,16 +53,16 @@ class PpapiWebKitPlatformSupportImpl::SandboxSupport virtual void getFontFamilyForCharacter( WebUChar32 character, const char* preferred_locale, - WebKit::WebFontFamily* family); + blink::WebFontFamily* family); virtual void getRenderStyleForStrike( - const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out); + const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out); private: // WebKit likes to ask us for the correct font family to use for a set of // unicode code points. It needs this information frequently so we cache it // here. base::Lock unicode_font_families_mutex_; - std::map<int32_t, WebKit::WebFontFamily> unicode_font_families_; + std::map<int32_t, blink::WebFontFamily> unicode_font_families_; #endif }; @@ -102,9 +102,9 @@ void PpapiWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacter( WebUChar32 character, const char* preferred_locale, - WebKit::WebFontFamily* family) { + blink::WebFontFamily* family) { base::AutoLock lock(unicode_font_families_mutex_); - const std::map<int32_t, WebKit::WebFontFamily>::const_iterator iter = + const std::map<int32_t, blink::WebFontFamily>::const_iterator iter = unicode_font_families_.find(character); if (iter != unicode_font_families_.end()) { family->name = iter->second.name; @@ -118,7 +118,7 @@ PpapiWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacter( } void PpapiWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike( - const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out) { + const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out) { GetRenderStyleForStrike(family, sizeAndStyle, out); } @@ -131,22 +131,22 @@ PpapiWebKitPlatformSupportImpl::PpapiWebKitPlatformSupportImpl() PpapiWebKitPlatformSupportImpl::~PpapiWebKitPlatformSupportImpl() { } -WebKit::WebClipboard* PpapiWebKitPlatformSupportImpl::clipboard() { +blink::WebClipboard* PpapiWebKitPlatformSupportImpl::clipboard() { NOTREACHED(); return NULL; } -WebKit::WebMimeRegistry* PpapiWebKitPlatformSupportImpl::mimeRegistry() { +blink::WebMimeRegistry* PpapiWebKitPlatformSupportImpl::mimeRegistry() { NOTREACHED(); return NULL; } -WebKit::WebFileUtilities* PpapiWebKitPlatformSupportImpl::fileUtilities() { +blink::WebFileUtilities* PpapiWebKitPlatformSupportImpl::fileUtilities() { NOTREACHED(); return NULL; } -WebKit::WebSandboxSupport* PpapiWebKitPlatformSupportImpl::sandboxSupport() { +blink::WebSandboxSupport* PpapiWebKitPlatformSupportImpl::sandboxSupport() { return sandbox_support_.get(); } @@ -167,72 +167,72 @@ bool PpapiWebKitPlatformSupportImpl::isLinkVisited( return false; } -WebKit::WebMessagePortChannel* +blink::WebMessagePortChannel* PpapiWebKitPlatformSupportImpl::createMessagePortChannel() { NOTREACHED(); return NULL; } void PpapiWebKitPlatformSupportImpl::setCookies( - const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies, - const WebKit::WebString& value) { + const blink::WebURL& url, + const blink::WebURL& first_party_for_cookies, + const blink::WebString& value) { NOTREACHED(); } -WebKit::WebString PpapiWebKitPlatformSupportImpl::cookies( - const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies) { +blink::WebString PpapiWebKitPlatformSupportImpl::cookies( + const blink::WebURL& url, + const blink::WebURL& first_party_for_cookies) { NOTREACHED(); - return WebKit::WebString(); + return blink::WebString(); } -WebKit::WebString PpapiWebKitPlatformSupportImpl::defaultLocale() { +blink::WebString PpapiWebKitPlatformSupportImpl::defaultLocale() { NOTREACHED(); - return WebKit::WebString(); + return blink::WebString(); } -WebKit::WebThemeEngine* PpapiWebKitPlatformSupportImpl::themeEngine() { +blink::WebThemeEngine* PpapiWebKitPlatformSupportImpl::themeEngine() { NOTREACHED(); return NULL; } -WebKit::WebURLLoader* PpapiWebKitPlatformSupportImpl::createURLLoader() { +blink::WebURLLoader* PpapiWebKitPlatformSupportImpl::createURLLoader() { NOTREACHED(); return NULL; } -WebKit::WebSocketStreamHandle* +blink::WebSocketStreamHandle* PpapiWebKitPlatformSupportImpl::createSocketStreamHandle() { NOTREACHED(); return NULL; } void PpapiWebKitPlatformSupportImpl::getPluginList(bool refresh, - WebKit::WebPluginListBuilder* builder) { + blink::WebPluginListBuilder* builder) { NOTREACHED(); } -WebKit::WebData PpapiWebKitPlatformSupportImpl::loadResource(const char* name) { +blink::WebData PpapiWebKitPlatformSupportImpl::loadResource(const char* name) { NOTREACHED(); - return WebKit::WebData(); + return blink::WebData(); } -WebKit::WebStorageNamespace* +blink::WebStorageNamespace* PpapiWebKitPlatformSupportImpl::createLocalStorageNamespace() { NOTREACHED(); return 0; } void PpapiWebKitPlatformSupportImpl::dispatchStorageEvent( - const WebKit::WebString& key, const WebKit::WebString& old_value, - const WebKit::WebString& new_value, const WebKit::WebString& origin, - const WebKit::WebURL& url, bool is_local_storage) { + const blink::WebString& key, const blink::WebString& old_value, + const blink::WebString& new_value, const blink::WebString& origin, + const blink::WebURL& url, bool is_local_storage) { NOTREACHED(); } int PpapiWebKitPlatformSupportImpl::databaseDeleteFile( - const WebKit::WebString& vfs_file_name, bool sync_dir) { + const blink::WebString& vfs_file_name, bool sync_dir) { NOTREACHED(); return 0; } diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h index d2a3541..3a016a6 100644 --- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h +++ b/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h @@ -17,33 +17,33 @@ class PpapiWebKitPlatformSupportImpl : public WebKitPlatformSupportImpl { virtual ~PpapiWebKitPlatformSupportImpl(); // WebKitPlatformSupport methods: - virtual WebKit::WebClipboard* clipboard(); - virtual WebKit::WebMimeRegistry* mimeRegistry(); - virtual WebKit::WebFileUtilities* fileUtilities(); - virtual WebKit::WebSandboxSupport* sandboxSupport(); + virtual blink::WebClipboard* clipboard(); + virtual blink::WebMimeRegistry* mimeRegistry(); + virtual blink::WebFileUtilities* fileUtilities(); + virtual blink::WebSandboxSupport* sandboxSupport(); virtual bool sandboxEnabled(); virtual unsigned long long visitedLinkHash(const char* canonicalURL, size_t length); virtual bool isLinkVisited(unsigned long long linkHash); - virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); - virtual void setCookies(const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies, - const WebKit::WebString& value); - virtual WebKit::WebString cookies( - const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies); - virtual WebKit::WebString defaultLocale(); - virtual WebKit::WebThemeEngine* themeEngine(); - virtual WebKit::WebURLLoader* createURLLoader(); - virtual WebKit::WebSocketStreamHandle* createSocketStreamHandle(); - virtual void getPluginList(bool refresh, WebKit::WebPluginListBuilder*); - virtual WebKit::WebData loadResource(const char* name); - virtual WebKit::WebStorageNamespace* createLocalStorageNamespace(); - virtual void dispatchStorageEvent(const WebKit::WebString& key, - const WebKit::WebString& oldValue, const WebKit::WebString& newValue, - const WebKit::WebString& origin, const WebKit::WebURL& url, + virtual blink::WebMessagePortChannel* createMessagePortChannel(); + virtual void setCookies(const blink::WebURL& url, + const blink::WebURL& first_party_for_cookies, + const blink::WebString& value); + virtual blink::WebString cookies( + const blink::WebURL& url, + const blink::WebURL& first_party_for_cookies); + virtual blink::WebString defaultLocale(); + virtual blink::WebThemeEngine* themeEngine(); + virtual blink::WebURLLoader* createURLLoader(); + virtual blink::WebSocketStreamHandle* createSocketStreamHandle(); + virtual void getPluginList(bool refresh, blink::WebPluginListBuilder*); + virtual blink::WebData loadResource(const char* name); + virtual blink::WebStorageNamespace* createLocalStorageNamespace(); + virtual void dispatchStorageEvent(const blink::WebString& key, + const blink::WebString& oldValue, const blink::WebString& newValue, + const blink::WebString& origin, const blink::WebURL& url, bool isLocalStorage); - virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, + virtual int databaseDeleteFile(const blink::WebString& vfs_file_name, bool sync_dir); private: diff --git a/content/public/browser/android/compositor.h b/content/public/browser/android/compositor.h index fa63335..053a454 100644 --- a/content/public/browser/android/compositor.h +++ b/content/public/browser/android/compositor.h @@ -76,27 +76,27 @@ class CONTENT_EXPORT Compositor { // Generates an OpenGL texture and returns a texture handle. May return 0 // if the current context is lost. - virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) = 0; + virtual blink::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) = 0; // Generates an OpenGL compressed texture and returns a texture handle. May // return 0 if the current context is lost. - virtual WebKit::WebGLId GenerateCompressedTexture(gfx::Size& size, + virtual blink::WebGLId GenerateCompressedTexture(gfx::Size& size, int data_size, void* data) = 0; // Deletes an OpenGL texture. - virtual void DeleteTexture(WebKit::WebGLId texture_id) = 0; + virtual void DeleteTexture(blink::WebGLId texture_id) = 0; // Grabs a copy of |texture_id| and saves it into |bitmap|. No scaling is // done. It is assumed that the texture size matches that of the bitmap. - virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, + virtual bool CopyTextureToBitmap(blink::WebGLId texture_id, gfx::JavaBitmap& bitmap) = 0; // Grabs a copy of |texture_id| and saves it into |bitmap|. No scaling is // done. |src_rect| allows the caller to specify which rect of |texture_id| // to copy to |bitmap|. It needs to match the size of |bitmap|. Returns // true if the |texture_id| was copied into |bitmap|, false if not. - virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, + virtual bool CopyTextureToBitmap(blink::WebGLId texture_id, const gfx::Rect& src_rect, gfx::JavaBitmap& bitmap) = 0; protected: diff --git a/content/public/browser/android/content_view_layer_renderer.h b/content/public/browser/android/content_view_layer_renderer.h index abc39cc..a7d563a 100644 --- a/content/public/browser/android/content_view_layer_renderer.h +++ b/content/public/browser/android/content_view_layer_renderer.h @@ -8,7 +8,7 @@ // This interface is used by consumers of the ContentViewRenderView to // attach/detach layers. -namespace WebKit { +namespace blink { class WebLayer; } @@ -16,8 +16,8 @@ namespace content { class ContentViewLayerRenderer { public: - virtual void AttachLayer(WebKit::WebLayer* layer) = 0; - virtual void DetachLayer(WebKit::WebLayer* layer) = 0; + virtual void AttachLayer(blink::WebLayer* layer) = 0; + virtual void DetachLayer(blink::WebLayer* layer) = 0; protected: virtual ~ContentViewLayerRenderer() {} diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc index 0a91186..136a012 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -203,12 +203,12 @@ MediaObserver* ContentBrowserClient::GetMediaObserver() { return NULL; } -WebKit::WebNotificationPresenter::Permission +blink::WebNotificationPresenter::Permission ContentBrowserClient::CheckDesktopNotificationPermission( const GURL& source_origin, ResourceContext* context, int render_process_id) { - return WebKit::WebNotificationPresenter::PermissionAllowed; + return blink::WebNotificationPresenter::PermissionAllowed; } bool ContentBrowserClient::CanCreateWindow( @@ -219,7 +219,7 @@ bool ContentBrowserClient::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/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index 87079c1..e862ca9 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -35,7 +35,7 @@ class CommandLine; class GURL; struct WebPreferences; -namespace WebKit { +namespace blink { struct WebWindowFeatures; } @@ -430,7 +430,7 @@ class CONTENT_EXPORT ContentBrowserClient { // Checks if the given page has permission to show desktop notifications. // This is called on the IO thread. - virtual WebKit::WebNotificationPresenter::Permission + virtual blink::WebNotificationPresenter::Permission CheckDesktopNotificationPermission( const GURL& source_url, ResourceContext* context, @@ -461,7 +461,7 @@ class CONTENT_EXPORT 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/content/public/browser/native_web_keyboard_event.h b/content/public/browser/native_web_keyboard_event.h index 6942222..1585fbd 100644 --- a/content/public/browser/native_web_keyboard_event.h +++ b/content/public/browser/native_web_keyboard_event.h @@ -18,7 +18,7 @@ namespace content { // Owns a platform specific event; used to pass own and pass event through // platform independent code. struct CONTENT_EXPORT NativeWebKeyboardEvent : - NON_EXPORTED_BASE(public WebKit::WebKeyboardEvent) { + NON_EXPORTED_BASE(public blink::WebKeyboardEvent) { NativeWebKeyboardEvent(); explicit NativeWebKeyboardEvent(gfx::NativeEvent native_event); @@ -37,7 +37,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent : int state, double time_stamp_seconds); #elif defined(OS_ANDROID) - NativeWebKeyboardEvent(WebKit::WebInputEvent::Type type, + NativeWebKeyboardEvent(blink::WebInputEvent::Type type, int modifiers, double time_secs, int keycode, @@ -45,7 +45,7 @@ struct CONTENT_EXPORT NativeWebKeyboardEvent : bool is_system_key); // Takes ownership of android_key_event. NativeWebKeyboardEvent(jobject android_key_event, - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, int modifiers, double time_secs, int keycode, diff --git a/content/public/browser/navigation_controller.h b/content/public/browser/navigation_controller.h index 280e1cd..99ed8ca 100644 --- a/content/public/browser/navigation_controller.h +++ b/content/public/browser/navigation_controller.h @@ -349,7 +349,7 @@ class NavigationController { // Random -------------------------------------------------------------------- - // Session storage depends on dom_storage that depends on WebKit::WebString, + // Session storage depends on dom_storage that depends on blink::WebString, // which cannot be used on iOS. #if !defined(OS_IOS) // Returns all the SessionStorageNamespace objects that this diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h index 12b162b..2eed287 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h @@ -35,7 +35,7 @@ namespace ui { struct SelectedFileInfo; } -namespace WebKit { +namespace blink { struct WebFindOptions; struct WebMediaPlayerAction; struct WebPluginAction; @@ -120,7 +120,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // either in a drop or by being cancelled. virtual void DragSourceEndedAt( int client_x, int client_y, int screen_x, int screen_y, - WebKit::WebDragOperation operation) = 0; + blink::WebDragOperation operation) = 0; // Notifies the renderer that a drag and drop operation is in progress, with // droppable items positioned over the renderer's view. @@ -136,12 +136,12 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { const DropData& drop_data, const gfx::Point& client_pt, const gfx::Point& screen_pt, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, int key_modifiers) = 0; virtual void DragTargetDragOver( const gfx::Point& client_pt, const gfx::Point& screen_pt, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, int key_modifiers) = 0; virtual void DragTargetDragLeave() = 0; virtual void DragTargetDrop(const gfx::Point& client_pt, @@ -167,7 +167,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // located at the given point. virtual void ExecuteMediaPlayerActionAtLocation( const gfx::Point& location, - const WebKit::WebMediaPlayerAction& action) = 0; + const blink::WebMediaPlayerAction& action) = 0; // Runs some javascript within the context of a frame in the page. virtual void ExecuteJavascriptInWebFrame(const string16& frame_xpath, @@ -184,14 +184,14 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost { // Tells the renderer to perform the given action on the plugin located at // the given point. virtual void ExecutePluginActionAtLocation( - const gfx::Point& location, const WebKit::WebPluginAction& action) = 0; + const gfx::Point& location, const blink::WebPluginAction& action) = 0; // Asks the renderer to exit fullscreen virtual void ExitFullscreen() = 0; // Finds text on a page. virtual void Find(int request_id, const string16& search_text, - const WebKit::WebFindOptions& options) = 0; + const blink::WebFindOptions& options) = 0; // Notifies the renderer that the user has closed the FindInPage window // (and what action to take regarding the selection). diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h index e54403c..79176d1 100644 --- a/content/public/browser/render_widget_host.h +++ b/content/public/browser/render_widget_host.h @@ -27,7 +27,7 @@ namespace gfx { class Rect; } -namespace WebKit { +namespace blink { class WebMouseEvent; struct WebScreenInfo; } @@ -175,7 +175,7 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { // NotifyTextDirection(). (We may receive keydown events even after we // canceled updating the text direction because of auto-repeat.) // Note: we cannot undo this change for compatibility with Firefox and IE. - virtual void UpdateTextDirection(WebKit::WebTextDirection direction) = 0; + virtual void UpdateTextDirection(blink::WebTextDirection direction) = 0; virtual void NotifyTextDirection() = 0; virtual void Focus() = 0; @@ -221,9 +221,9 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { // Forwards the given message to the renderer. These are called by // the view when it has received a message. virtual void ForwardMouseEvent( - const WebKit::WebMouseEvent& mouse_event) = 0; + const blink::WebMouseEvent& mouse_event) = 0; virtual void ForwardWheelEvent( - const WebKit::WebMouseWheelEvent& wheel_event) = 0; + const blink::WebMouseWheelEvent& wheel_event) = 0; virtual void ForwardKeyboardEvent( const NativeWebKeyboardEvent& key_event) = 0; @@ -298,12 +298,12 @@ class CONTENT_EXPORT RenderWidgetHost : public IPC::Sender { const KeyPressEventCallback& callback) = 0; // Add/remove a callback that can handle all kinds of mouse events. - typedef base::Callback<bool(const WebKit::WebMouseEvent&)> MouseEventCallback; + typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; // Get the screen info corresponding to this render widget. - virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) = 0; + virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; // Grabs snapshot from renderer side and returns the bitmap to a callback. // If |src_rect| is empty, the whole contents is copied. This is an expensive diff --git a/content/public/browser/resource_request_info.h b/content/public/browser/resource_request_info.h index f89b4be..c2e87a1 100644 --- a/content/public/browser/resource_request_info.h +++ b/content/public/browser/resource_request_info.h @@ -80,7 +80,7 @@ class ResourceRequestInfo { virtual ResourceType::Type GetResourceType() const = 0; // Returns the associated referrer policy. - virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const = 0; + virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0; // Returns the associated page transition type. virtual PageTransition GetPageTransition() const = 0; diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc index 924cabb..3e0329b 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc @@ -113,7 +113,7 @@ bool WebContentsDelegate::PreHandleKeyboardEvent( bool WebContentsDelegate::CanDragEnter( WebContents* source, const DropData& data, - WebKit::WebDragOperationsMask operations_allowed) { + blink::WebDragOperationsMask operations_allowed) { return true; } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index dc7e344..69fc22c 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -53,7 +53,7 @@ class Rect; class Size; } -namespace WebKit { +namespace blink { class WebLayer; struct WebWindowFeatures; } @@ -278,7 +278,7 @@ class CONTENT_EXPORT WebContentsDelegate { // cancel the operation. This method is used by Chromium Embedded Framework. virtual bool CanDragEnter(WebContents* source, const DropData& data, - WebKit::WebDragOperationsMask operations_allowed); + blink::WebDragOperationsMask operations_allowed); // Render view drag n drop ended. virtual void DragEnded() {} diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h index 26a3437..ba0bfc4 100644 --- a/content/public/common/common_param_traits_macros.h +++ b/content/public/common/common_param_traits_macros.h @@ -29,17 +29,17 @@ IPC_ENUM_TRAITS(content::ConsoleMessageLevel) IPC_ENUM_TRAITS(content::PageTransition) IPC_ENUM_TRAITS(content::SecurityStyle) -IPC_ENUM_TRAITS(WebKit::WebReferrerPolicy) +IPC_ENUM_TRAITS(blink::WebReferrerPolicy) IPC_ENUM_TRAITS(WindowOpenDisposition) IPC_ENUM_TRAITS(webkit_glue::EditingBehavior) IPC_ENUM_TRAITS(net::RequestPriority) -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebPoint) +IPC_STRUCT_TRAITS_BEGIN(blink::WebPoint) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(y) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebRect) +IPC_STRUCT_TRAITS_BEGIN(blink::WebRect) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(y) IPC_STRUCT_TRAITS_MEMBER(width) @@ -195,7 +195,7 @@ IPC_STRUCT_TRAITS_BEGIN(WebPreferences) #endif IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(WebKit::WebWindowFeatures) +IPC_STRUCT_TRAITS_BEGIN(blink::WebWindowFeatures) IPC_STRUCT_TRAITS_MEMBER(x) IPC_STRUCT_TRAITS_MEMBER(xSet) IPC_STRUCT_TRAITS_MEMBER(y) diff --git a/content/public/common/context_menu_params.cc b/content/public/common/context_menu_params.cc index 5ec5a1f..4a5f485 100644 --- a/content/public/common/context_menu_params.cc +++ b/content/public/common/context_menu_params.cc @@ -15,7 +15,7 @@ CustomContextMenuContext::CustomContextMenuContext() } ContextMenuParams::ContextMenuParams() - : media_type(WebKit::WebContextMenuData::MediaTypeNone), + : media_type(blink::WebContextMenuData::MediaTypeNone), x(0), y(0), has_image_contents(true), @@ -27,14 +27,14 @@ ContextMenuParams::ContextMenuParams() is_editable(false), #if defined(OS_MACOSX) writing_direction_default( - WebKit::WebContextMenuData::CheckableMenuItemDisabled), + blink::WebContextMenuData::CheckableMenuItemDisabled), writing_direction_left_to_right( - WebKit::WebContextMenuData::CheckableMenuItemEnabled), + blink::WebContextMenuData::CheckableMenuItemEnabled), writing_direction_right_to_left( - WebKit::WebContextMenuData::CheckableMenuItemEnabled), + blink::WebContextMenuData::CheckableMenuItemEnabled), #endif // OS_MACOSX edit_flags(0), - referrer_policy(WebKit::WebReferrerPolicyDefault) { + referrer_policy(blink::WebReferrerPolicyDefault) { } ContextMenuParams::~ContextMenuParams() { diff --git a/content/public/common/context_menu_params.h b/content/public/common/context_menu_params.h index 053d5ad..a64dd95 100644 --- a/content/public/common/context_menu_params.h +++ b/content/public/common/context_menu_params.h @@ -48,7 +48,7 @@ struct CONTENT_EXPORT ContextMenuParams { ~ContextMenuParams(); // This is the type of Context Node that the context menu was invoked on. - WebKit::WebContextMenuData::MediaType media_type; + blink::WebContextMenuData::MediaType media_type; // These values represent the coordinates of the mouse when the context menu // was invoked. Coords are relative to the associated RenderView's origin. @@ -143,7 +143,7 @@ struct CONTENT_EXPORT ContextMenuParams { std::string frame_charset; // The referrer policy of the frame on which the menu is invoked. - WebKit::WebReferrerPolicy referrer_policy; + blink::WebReferrerPolicy referrer_policy; CustomContextMenuContext custom_context; std::vector<MenuItem> custom_items; diff --git a/content/public/common/drop_data.cc b/content/public/common/drop_data.cc index 9e42dda..3536efb 100644 --- a/content/public/common/drop_data.cc +++ b/content/public/common/drop_data.cc @@ -16,7 +16,7 @@ DropData::FileInfo::FileInfo(const base::string16& path, } DropData::DropData() - : referrer_policy(WebKit::WebReferrerPolicyDefault) { + : referrer_policy(blink::WebReferrerPolicyDefault) { } DropData::~DropData() { diff --git a/content/public/common/drop_data.h b/content/public/common/drop_data.h index 008b3f9..74ad79d 100644 --- a/content/public/common/drop_data.h +++ b/content/public/common/drop_data.h @@ -44,7 +44,7 @@ struct CONTENT_EXPORT DropData { // Referrer policy to use when dragging a link out of the webview results in // a download. - WebKit::WebReferrerPolicy referrer_policy; + blink::WebReferrerPolicy referrer_policy; // User is dropping one or more files on the webview. std::vector<FileInfo> filenames; diff --git a/content/public/common/menu_item.h b/content/public/common/menu_item.h index c6c20bc..982832c 100644 --- a/content/public/common/menu_item.h +++ b/content/public/common/menu_item.h @@ -17,10 +17,10 @@ namespace content { // custom entries of the context menu. struct CONTENT_EXPORT MenuItem { enum Type { - OPTION = WebKit::WebMenuItemInfo::Option, - CHECKABLE_OPTION = WebKit::WebMenuItemInfo::CheckableOption, - GROUP = WebKit::WebMenuItemInfo::Group, - SEPARATOR = WebKit::WebMenuItemInfo::Separator, + OPTION = blink::WebMenuItemInfo::Option, + CHECKABLE_OPTION = blink::WebMenuItemInfo::CheckableOption, + GROUP = blink::WebMenuItemInfo::Group, + SEPARATOR = blink::WebMenuItemInfo::Separator, SUBMENU // This is currently only used by Pepper, not by WebKit. }; diff --git a/content/public/common/page_state.cc b/content/public/common/page_state.cc index 54c00e3..1e429b8 100644 --- a/content/public/common/page_state.cc +++ b/content/public/common/page_state.cc @@ -76,13 +76,13 @@ PageState PageState::CreateForTesting( state.top.http_body.is_null = false; if (optional_body_data) { ExplodedHttpBodyElement element; - element.type = WebKit::WebHTTPBody::Element::TypeData; + element.type = blink::WebHTTPBody::Element::TypeData; element.data = optional_body_data; state.top.http_body.elements.push_back(element); } if (optional_body_file_path) { ExplodedHttpBodyElement element; - element.type = WebKit::WebHTTPBody::Element::TypeFile; + element.type = blink::WebHTTPBody::Element::TypeFile; element.file_path = ToNullableString16(optional_body_file_path->AsUTF8Unsafe()); state.top.http_body.elements.push_back(element); diff --git a/content/public/common/referrer.h b/content/public/common/referrer.h index c30f4b8..b10bfd6 100644 --- a/content/public/common/referrer.h +++ b/content/public/common/referrer.h @@ -15,14 +15,14 @@ namespace content { // applied to this URL. When passing around referrers that will eventually end // up being used for URL requests, always use this struct. struct CONTENT_EXPORT Referrer { - Referrer(const GURL& url, WebKit::WebReferrerPolicy policy) : url(url), + Referrer(const GURL& url, blink::WebReferrerPolicy policy) : url(url), policy(policy) { } - Referrer() : policy(WebKit::WebReferrerPolicyDefault) { + Referrer() : policy(blink::WebReferrerPolicyDefault) { } GURL url; - WebKit::WebReferrerPolicy policy; + blink::WebReferrerPolicy policy; }; } // namespace content diff --git a/content/public/common/show_desktop_notification_params.cc b/content/public/common/show_desktop_notification_params.cc index b7e35a6..667e558 100644 --- a/content/public/common/show_desktop_notification_params.cc +++ b/content/public/common/show_desktop_notification_params.cc @@ -7,7 +7,7 @@ namespace content { ShowDesktopNotificationHostMsgParams::ShowDesktopNotificationHostMsgParams() - : is_html(false), direction(WebKit::WebTextDirectionDefault), + : is_html(false), direction(blink::WebTextDirectionDefault), notification_id(0) { } diff --git a/content/public/common/show_desktop_notification_params.h b/content/public/common/show_desktop_notification_params.h index ef129cc..2782946 100644 --- a/content/public/common/show_desktop_notification_params.h +++ b/content/public/common/show_desktop_notification_params.h @@ -31,7 +31,7 @@ struct CONTENT_EXPORT ShowDesktopNotificationHostMsgParams { string16 body; // Directionality of the notification. - WebKit::WebTextDirection direction; + blink::WebTextDirection direction; // ReplaceID if this notification should replace an existing one; may be // empty if no replacement is called for. diff --git a/content/public/common/window_container_type.cc b/content/public/common/window_container_type.cc index a1099e6..ec3b12c 100644 --- a/content/public/common/window_container_type.cc +++ b/content/public/common/window_container_type.cc @@ -17,7 +17,7 @@ const char kPersistent[] = "persistent"; } // namespace WindowContainerType WindowFeaturesToContainerType( - const WebKit::WebWindowFeatures& window_features) { + const blink::WebWindowFeatures& window_features) { bool background = false; bool persistent = false; diff --git a/content/public/common/window_container_type.h b/content/public/common/window_container_type.h index 5aec6ed..1d3b46f 100644 --- a/content/public/common/window_container_type.h +++ b/content/public/common/window_container_type.h @@ -5,7 +5,7 @@ #ifndef CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ #define CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ -namespace WebKit { +namespace blink { struct WebWindowFeatures; @@ -30,6 +30,6 @@ enum WindowContainerType { // Conversion function: WindowContainerType WindowFeaturesToContainerType( - const WebKit::WebWindowFeatures& window_features); + const blink::WebWindowFeatures& window_features); #endif // CONTENT_PUBLIC_COMMON_WINDOW_CONTAINER_TYPE_H_ diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc index fbbe343..d577c18 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc @@ -20,13 +20,13 @@ std::string ContentRendererClient::GetDefaultEncoding() { bool ContentRendererClient::OverrideCreatePlugin( RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin) { + blink::WebFrame* frame, + const blink::WebPluginParams& params, + blink::WebPlugin** plugin) { return false; } -WebKit::WebPlugin* ContentRendererClient::CreatePluginReplacement( +blink::WebPlugin* ContentRendererClient::CreatePluginReplacement( RenderView* render_view, const base::FilePath& plugin_path) { return NULL; @@ -46,40 +46,40 @@ void ContentRendererClient::DeferMediaLoad(RenderView* render_view, closure.Run(); } -WebKit::WebMediaStreamCenter* +blink::WebMediaStreamCenter* ContentRendererClient::OverrideCreateWebMediaStreamCenter( - WebKit::WebMediaStreamCenterClient* client) { + blink::WebMediaStreamCenterClient* client) { return NULL; } -WebKit::WebRTCPeerConnectionHandler* +blink::WebRTCPeerConnectionHandler* ContentRendererClient::OverrideCreateWebRTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client) { + blink::WebRTCPeerConnectionHandlerClient* client) { return NULL; } -WebKit::WebMIDIAccessor* +blink::WebMIDIAccessor* ContentRendererClient::OverrideCreateMIDIAccessor( - WebKit::WebMIDIAccessorClient* client) { + blink::WebMIDIAccessorClient* client) { return NULL; } -WebKit::WebAudioDevice* +blink::WebAudioDevice* ContentRendererClient::OverrideCreateAudioDevice( double sample_rate) { return NULL; } -WebKit::WebClipboard* ContentRendererClient::OverrideWebClipboard() { +blink::WebClipboard* ContentRendererClient::OverrideWebClipboard() { return NULL; } -WebKit::WebThemeEngine* ContentRendererClient::OverrideThemeEngine() { +blink::WebThemeEngine* ContentRendererClient::OverrideThemeEngine() { return NULL; } -WebKit::WebSpeechSynthesizer* ContentRendererClient::OverrideSpeechSynthesizer( - WebKit::WebSpeechSynthesizerClient* client) { +blink::WebSpeechSynthesizer* ContentRendererClient::OverrideSpeechSynthesizer( + blink::WebSpeechSynthesizerClient* client) { return NULL; } @@ -92,15 +92,15 @@ bool ContentRendererClient::AllowPopup() { } bool ContentRendererClient::HandleNavigation( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect) { return false; } -bool ContentRendererClient::ShouldFork(WebKit::WebFrame* frame, +bool ContentRendererClient::ShouldFork(blink::WebFrame* frame, const GURL& url, const std::string& http_method, bool is_initial_navigation, @@ -110,7 +110,7 @@ bool ContentRendererClient::ShouldFork(WebKit::WebFrame* frame, } bool ContentRendererClient::WillSendRequest( - WebKit::WebFrame* frame, + blink::WebFrame* frame, PageTransition transition_type, const GURL& url, const GURL& first_party_for_cookies, @@ -131,14 +131,14 @@ bool ContentRendererClient::IsLinkVisited(unsigned long long link_hash) { return false; } -WebKit::WebPrescientNetworking* +blink::WebPrescientNetworking* ContentRendererClient::GetPrescientNetworking() { return NULL; } bool ContentRendererClient::ShouldOverridePageVisibilityState( const RenderView* render_view, - WebKit::WebPageVisibilityState* override_state) { + blink::WebPageVisibilityState* override_state) { return false; } @@ -169,12 +169,12 @@ bool ContentRendererClient::IsExternalPepperPlugin( } bool ContentRendererClient::IsPluginAllowedToCallRequestOSFileHandle( - WebKit::WebPluginContainer* container) { + blink::WebPluginContainer* container) { return false; } bool ContentRendererClient::AllowBrowserPlugin( - WebKit::WebPluginContainer* container) { + blink::WebPluginContainer* container) { return false; } @@ -195,9 +195,9 @@ bool ContentRendererClient::ShouldEnableSiteIsolationPolicy() const { return true; } -WebKit::WebWorkerPermissionClientProxy* +blink::WebWorkerPermissionClientProxy* ContentRendererClient::CreateWorkerPermissionClientProxy( - RenderView* render_view, WebKit::WebFrame* frame) { + RenderView* render_view, blink::WebFrame* frame) { return NULL; } diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index 86b7e31..9a5baad 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -26,7 +26,7 @@ class FilePath; class MessageLoop; } -namespace WebKit { +namespace blink { class WebAudioDevice; class WebClipboard; class WebFrame; @@ -84,13 +84,13 @@ class CONTENT_EXPORT ContentRendererClient { // returns false, the content layer will create the plugin. virtual bool OverrideCreatePlugin( RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin); + blink::WebFrame* frame, + const blink::WebPluginParams& params, + blink::WebPlugin** plugin); // Creates a replacement plug-in that is shown when the plug-in at |file_path| // couldn't be loaded. This allows the embedder to show a custom placeholder. - virtual WebKit::WebPlugin* CreatePluginReplacement( + virtual blink::WebPlugin* CreatePluginReplacement( RenderView* render_view, const base::FilePath& plugin_path); @@ -114,9 +114,9 @@ class CONTENT_EXPORT ContentRendererClient { // (lack of information on the error code) so the caller should take care to // initialize the string values with safe defaults before the call. virtual void GetNavigationErrorStrings( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& failed_request, - const WebKit::WebURLError& error, + blink::WebFrame* frame, + const blink::WebURLRequest& failed_request, + const blink::WebURLError& error, const std::string& accept_languages, std::string* error_html, string16* error_description) {} @@ -129,37 +129,37 @@ class CONTENT_EXPORT ContentRendererClient { // Allows the embedder to override creating a WebMediaStreamCenter. If it // returns NULL the content layer will create the stream center. - virtual WebKit::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( - WebKit::WebMediaStreamCenterClient* client); + virtual blink::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( + blink::WebMediaStreamCenterClient* client); // Allows the embedder to override creating a WebRTCPeerConnectionHandler. If // it returns NULL the content layer will create the connection handler. - virtual WebKit::WebRTCPeerConnectionHandler* + virtual blink::WebRTCPeerConnectionHandler* OverrideCreateWebRTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client); + blink::WebRTCPeerConnectionHandlerClient* client); // Allows the embedder to override creating a WebMIDIAccessor. If it // returns NULL the content layer will create the MIDI accessor. - virtual WebKit::WebMIDIAccessor* OverrideCreateMIDIAccessor( - WebKit::WebMIDIAccessorClient* client); + virtual blink::WebMIDIAccessor* OverrideCreateMIDIAccessor( + blink::WebMIDIAccessorClient* client); // Allows the embedder to override creating a WebAudioDevice. If it // returns NULL the content layer will create the audio device. - virtual WebKit::WebAudioDevice* OverrideCreateAudioDevice( + virtual blink::WebAudioDevice* OverrideCreateAudioDevice( double sample_rate); - // Allows the embedder to override the WebKit::WebClipboard used. If it + // Allows the embedder to override the blink::WebClipboard used. If it // returns NULL the content layer will handle clipboard interactions. - virtual WebKit::WebClipboard* OverrideWebClipboard(); + virtual blink::WebClipboard* OverrideWebClipboard(); // Allows the embedder to override the WebThemeEngine used. If it returns NULL // the content layer will provide an engine. - virtual WebKit::WebThemeEngine* OverrideThemeEngine(); + virtual blink::WebThemeEngine* OverrideThemeEngine(); // Allows the embedder to override the WebSpeechSynthesizer used. // If it returns NULL the content layer will provide an engine. - virtual WebKit::WebSpeechSynthesizer* OverrideSpeechSynthesizer( - WebKit::WebSpeechSynthesizerClient* client); + virtual blink::WebSpeechSynthesizer* OverrideSpeechSynthesizer( + blink::WebSpeechSynthesizerClient* client); // Returns true if the renderer process should schedule the idle handler when // all widgets are hidden. @@ -170,17 +170,17 @@ class CONTENT_EXPORT ContentRendererClient { // Returns true if the navigation was handled by the embedder and should be // ignored by WebKit. This method is used by CEF. - virtual bool HandleNavigation(WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, + virtual bool HandleNavigation(blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect); // Returns true if we should fork a new process for the given navigation. // If |send_referrer| is set to false (which is the default), no referrer // header will be send for the navigation. Otherwise, the referrer header is // set according to the frame's referrer policy. - virtual bool ShouldFork(WebKit::WebFrame* frame, + virtual bool ShouldFork(blink::WebFrame* frame, const GURL& url, const std::string& http_method, bool is_initial_navigation, @@ -189,7 +189,7 @@ class CONTENT_EXPORT ContentRendererClient { // Notifies the embedder that the given frame is requesting the resource at // |url|. If the function returns true, the url is changed to |new_url|. - virtual bool WillSendRequest(WebKit::WebFrame* frame, + virtual bool WillSendRequest(blink::WebFrame* frame, PageTransition transition_type, const GURL& url, const GURL& first_party_for_cookies, @@ -199,23 +199,23 @@ class CONTENT_EXPORT ContentRendererClient { // embedder can potentiall put up a modal dialog on the UI thread as a result. virtual bool ShouldPumpEventsDuringCookieMessage(); - // See the corresponding functions in WebKit::WebFrameClient. - virtual void DidCreateScriptContext(WebKit::WebFrame* frame, + // See the corresponding functions in blink::WebFrameClient. + virtual void DidCreateScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context> context, int extension_group, int world_id) {} - virtual void WillReleaseScriptContext(WebKit::WebFrame* frame, + virtual void WillReleaseScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context>, int world_id) {} - // See WebKit::Platform. + // See blink::Platform. virtual unsigned long long VisitedLinkHash(const char* canonical_url, size_t length); virtual bool IsLinkVisited(unsigned long long link_hash); - virtual WebKit::WebPrescientNetworking* GetPrescientNetworking(); + virtual blink::WebPrescientNetworking* GetPrescientNetworking(); virtual bool ShouldOverridePageVisibilityState( const RenderView* render_view, - WebKit::WebPageVisibilityState* override_state); + blink::WebPageVisibilityState* override_state); // Return true if the GetCookie request will be handled by the embedder. // Cookies are returned in the cookie parameter. @@ -243,10 +243,10 @@ class CONTENT_EXPORT ContentRendererClient { // pp::FileIO::RequestOSFileHandle. // TODO(teravest): Remove this when FileIO is moved to the browser. virtual bool IsPluginAllowedToCallRequestOSFileHandle( - WebKit::WebPluginContainer* container); + blink::WebPluginContainer* container); // Returns whether BrowserPlugin should be allowed within the |container|. - virtual bool AllowBrowserPlugin(WebKit::WebPluginContainer* container); + virtual bool AllowBrowserPlugin(blink::WebPluginContainer* container); // Returns true if the page at |url| can use Pepper MediaStream APIs. virtual bool AllowPepperMediaStreamAPI(const GURL& url); @@ -268,9 +268,9 @@ class CONTENT_EXPORT ContentRendererClient { virtual bool ShouldEnableSiteIsolationPolicy() const; // Creates a permission client proxy for in-renderer worker. - virtual WebKit::WebWorkerPermissionClientProxy* + virtual blink::WebWorkerPermissionClientProxy* CreateWorkerPermissionClientProxy(RenderView* render_view, - WebKit::WebFrame* frame); + blink::WebFrame* frame); }; } // namespace content diff --git a/content/public/renderer/document_state.h b/content/public/renderer/document_state.h index cd9fd58..11b7d5e 100644 --- a/content/public/renderer/document_state.h +++ b/content/public/renderer/document_state.h @@ -22,7 +22,7 @@ class NavigationState; // The RenderView stores an instance of this class in the "extra data" of each // WebDataSource (see RenderView::DidCreateDataSource). class CONTENT_EXPORT DocumentState - : NON_EXPORTED_BASE(public WebKit::WebDataSource::ExtraData), + : NON_EXPORTED_BASE(public blink::WebDataSource::ExtraData), public base::SupportsUserData { public: // The exact values of this enum are used in histograms, so new values must be @@ -43,7 +43,7 @@ class CONTENT_EXPORT DocumentState DocumentState(); virtual ~DocumentState(); - static DocumentState* FromDataSource(WebKit::WebDataSource* ds) { + static DocumentState* FromDataSource(blink::WebDataSource* ds) { return static_cast<DocumentState*>(ds->extraData()); } diff --git a/content/public/renderer/history_item_serialization.cc b/content/public/renderer/history_item_serialization.cc index 9ca4135..96309c9 100644 --- a/content/public/renderer/history_item_serialization.cc +++ b/content/public/renderer/history_item_serialization.cc @@ -13,11 +13,11 @@ #include "third_party/WebKit/public/web/WebHistoryItem.h" #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" -using WebKit::WebHTTPBody; -using WebKit::WebHistoryItem; -using WebKit::WebSerializedScriptValue; -using WebKit::WebString; -using WebKit::WebVector; +using blink::WebHTTPBody; +using blink::WebHistoryItem; +using blink::WebSerializedScriptValue; +using blink::WebString; +using blink::WebVector; namespace content { namespace { diff --git a/content/public/renderer/history_item_serialization.h b/content/public/renderer/history_item_serialization.h index 44eb1e1..dda1cf4 100644 --- a/content/public/renderer/history_item_serialization.h +++ b/content/public/renderer/history_item_serialization.h @@ -9,7 +9,7 @@ #include "content/common/content_export.h" -namespace WebKit { +namespace blink { class WebHistoryItem; } @@ -17,8 +17,8 @@ namespace content { class PageState; CONTENT_EXPORT PageState HistoryItemToPageState( - const WebKit::WebHistoryItem& item); -CONTENT_EXPORT WebKit::WebHistoryItem PageStateToHistoryItem( + const blink::WebHistoryItem& item); +CONTENT_EXPORT blink::WebHistoryItem PageStateToHistoryItem( const PageState& state); } // namespace content diff --git a/content/public/renderer/pepper_plugin_instance.h b/content/public/renderer/pepper_plugin_instance.h index 50e3523..511f311 100644 --- a/content/public/renderer/pepper_plugin_instance.h +++ b/content/public/renderer/pepper_plugin_instance.h @@ -32,7 +32,7 @@ namespace IPC { struct ChannelHandle; } -namespace WebKit { +namespace blink { class WebPluginContainer; } @@ -51,7 +51,7 @@ class PepperPluginInstance { virtual content::RenderView* GetRenderView() = 0; - virtual WebKit::WebPluginContainer* GetContainer() = 0; + virtual blink::WebPluginContainer* GetContainer() = 0; virtual v8::Isolate* GetIsolate() const = 0; diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index 0978535..01857c7 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -18,7 +18,7 @@ struct WebPreferences; -namespace WebKit { +namespace blink { class WebFrame; class WebNode; class WebPlugin; @@ -44,7 +44,7 @@ struct WebPluginInfo; class CONTENT_EXPORT RenderView : public IPC::Sender { public: // Returns the RenderView containing the given WebView. - static RenderView* FromWebView(WebKit::WebView* webview); + static RenderView* FromWebView(blink::WebView* webview); // Returns the RenderView for the given routing ID. static RenderView* FromRoutingID(int routing_id); @@ -75,24 +75,24 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { virtual void SetWebkitPreferences(const WebPreferences& preferences) = 0; // Returns the associated WebView. May return NULL when the view is closing. - virtual WebKit::WebView* GetWebView() = 0; + virtual blink::WebView* GetWebView() = 0; // Gets the focused node. If no such node exists then the node will be isNull. - virtual WebKit::WebNode GetFocusedNode() const = 0; + virtual blink::WebNode GetFocusedNode() const = 0; // Gets the node that the context menu was pressed over. - virtual WebKit::WebNode GetContextMenuNode() const = 0; + virtual blink::WebNode GetContextMenuNode() const = 0; // Returns true if the parameter node is a textfield, text area, a content // editable div, or has an ARIA role of textbox. - virtual bool IsEditableNode(const WebKit::WebNode& node) const = 0; + virtual bool IsEditableNode(const blink::WebNode& node) const = 0; // Create a new NPAPI/Pepper plugin depending on |info|. Returns NULL if no // plugin was found. - virtual WebKit::WebPlugin* CreatePlugin( - WebKit::WebFrame* frame, + virtual blink::WebPlugin* CreatePlugin( + blink::WebFrame* frame, const WebPluginInfo& info, - const WebKit::WebPluginParams& params) = 0; + const blink::WebPluginParams& params) = 0; // Evaluates a string of JavaScript in a particular frame. virtual void EvaluateScript(const string16& frame_xpath, @@ -135,18 +135,18 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { virtual void CancelContextMenu(int request_id) = 0; // Returns the current visibility of the WebView. - virtual WebKit::WebPageVisibilityState GetVisibilityState() const = 0; + virtual blink::WebPageVisibilityState GetVisibilityState() const = 0; // Displays a modal alert dialog containing the given message. Returns // once the user dismisses the dialog. - virtual void RunModalAlertDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message) = 0; + virtual void RunModalAlertDialog(blink::WebFrame* frame, + const blink::WebString& message) = 0; // The client should handle the navigation externally. virtual void LoadURLExternally( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy) = 0; + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy) = 0; // Used by plugins that load data in this RenderView to update the loading // notifications. @@ -163,7 +163,7 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { virtual void ClearEditCommands() = 0; // Returns a collection of security info about |frame|. - virtual SSLStatus GetSSLStatusOfFrame(WebKit::WebFrame* frame) const = 0; + virtual SSLStatus GetSSLStatusOfFrame(blink::WebFrame* frame) const = 0; // Returns |renderer_preferences_.accept_languages| value. virtual const std::string& GetAcceptLanguages() const = 0; diff --git a/content/public/renderer/render_view_observer.cc b/content/public/renderer/render_view_observer.cc index c0271c1..dd439cf 100644 --- a/content/public/renderer/render_view_observer.cc +++ b/content/public/renderer/render_view_observer.cc @@ -6,7 +6,7 @@ #include "content/renderer/render_view_impl.h" -using WebKit::WebFrame; +using blink::WebFrame; namespace content { diff --git a/content/public/renderer/render_view_observer.h b/content/public/renderer/render_view_observer.h index d4ad79a..f3d1094 100644 --- a/content/public/renderer/render_view_observer.h +++ b/content/public/renderer/render_view_observer.h @@ -21,7 +21,7 @@ class PpapiHost; } } -namespace WebKit { +namespace blink { class WebDataSource; class WebFrame; class WebFormElement; @@ -53,48 +53,48 @@ class CONTENT_EXPORT RenderViewObserver : public IPC::Listener, // These match the WebKit API notifications virtual void DidStartLoading() {} virtual void DidStopLoading() {} - virtual void DidFinishDocumentLoad(WebKit::WebFrame* frame) {} - virtual void DidFailLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error) {} - virtual void DidFinishLoad(WebKit::WebFrame* frame) {} - virtual void DidStartProvisionalLoad(WebKit::WebFrame* frame) {} - virtual void DidFailProvisionalLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error) {} - virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, + virtual void DidFinishDocumentLoad(blink::WebFrame* frame) {} + virtual void DidFailLoad(blink::WebFrame* frame, + const blink::WebURLError& error) {} + virtual void DidFinishLoad(blink::WebFrame* frame) {} + virtual void DidStartProvisionalLoad(blink::WebFrame* frame) {} + virtual void DidFailProvisionalLoad(blink::WebFrame* frame, + const blink::WebURLError& error) {} + virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation) {} - virtual void DidClearWindowObject(WebKit::WebFrame* frame) {} - virtual void DidCreateDocumentElement(WebKit::WebFrame* frame) {} - virtual void FrameCreated(WebKit::WebFrame* parent, - WebKit::WebFrame* frame) {} - virtual void FrameDetached(WebKit::WebFrame* frame) {} - virtual void FrameWillClose(WebKit::WebFrame* frame) {} + virtual void DidClearWindowObject(blink::WebFrame* frame) {} + virtual void DidCreateDocumentElement(blink::WebFrame* frame) {} + virtual void FrameCreated(blink::WebFrame* parent, + blink::WebFrame* frame) {} + virtual void FrameDetached(blink::WebFrame* frame) {} + virtual void FrameWillClose(blink::WebFrame* frame) {} virtual void DidMatchCSS( - WebKit::WebFrame* frame, - const WebKit::WebVector<WebKit::WebString>& newly_matching_selectors, - const WebKit::WebVector<WebKit::WebString>& stopped_matching_selectors) {} - virtual void WillSendSubmitEvent(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form) {} - virtual void WillSubmitForm(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form) {} - virtual void DidCreateDataSource(WebKit::WebFrame* frame, - WebKit::WebDataSource* ds) {} - virtual void PrintPage(WebKit::WebFrame* frame, bool user_initiated) {} - virtual void FocusedNodeChanged(const WebKit::WebNode& node) {} - virtual void WillCreateMediaPlayer(WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client) {} + blink::WebFrame* frame, + const blink::WebVector<blink::WebString>& newly_matching_selectors, + const blink::WebVector<blink::WebString>& stopped_matching_selectors) {} + virtual void WillSendSubmitEvent(blink::WebFrame* frame, + const blink::WebFormElement& form) {} + virtual void WillSubmitForm(blink::WebFrame* frame, + const blink::WebFormElement& form) {} + virtual void DidCreateDataSource(blink::WebFrame* frame, + blink::WebDataSource* ds) {} + virtual void PrintPage(blink::WebFrame* frame, bool user_initiated) {} + virtual void FocusedNodeChanged(const blink::WebNode& node) {} + virtual void WillCreateMediaPlayer(blink::WebFrame* frame, + blink::WebMediaPlayerClient* client) {} virtual void ZoomLevelChanged() {}; - virtual void DidChangeScrollOffset(WebKit::WebFrame* frame) {} - virtual void DraggableRegionsChanged(WebKit::WebFrame* frame) {} + virtual void DidChangeScrollOffset(blink::WebFrame* frame) {} + virtual void DraggableRegionsChanged(blink::WebFrame* frame) {} virtual void DidRequestShowContextMenu( - WebKit::WebFrame* frame, - const WebKit::WebContextMenuData& data) {} + blink::WebFrame* frame, + const blink::WebContextMenuData& data) {} virtual void DidCommitCompositorFrame() {} virtual void DidUpdateLayout() {} // These match the RenderView methods. - virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} - virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) {} - virtual void DidHandleGestureEvent(const WebKit::WebGestureEvent& event) {} + virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) {} + virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {} + virtual void DidHandleGestureEvent(const blink::WebGestureEvent& event) {} virtual void DidCreatePepperPlugin(RendererPpapiHost* host) {} // Called when we receive a console message from WebKit for which we requested diff --git a/content/public/renderer/renderer_ppapi_host.h b/content/public/renderer/renderer_ppapi_host.h index 123257d..298a04d 100644 --- a/content/public/renderer/renderer_ppapi_host.h +++ b/content/public/renderer/renderer_ppapi_host.h @@ -34,7 +34,7 @@ class PpapiHost; } } -namespace WebKit { +namespace blink { class WebPluginContainer; } @@ -77,7 +77,7 @@ class RendererPpapiHost { // Returns the WebPluginContainer for the given plugin instance, or NULL if // the instance is invalid. - virtual WebKit::WebPluginContainer* GetContainerForInstance( + virtual blink::WebPluginContainer* GetContainerForInstance( PP_Instance instance) const = 0; // Returns the PID of the child process containing the plugin. If running diff --git a/content/public/renderer/web_preferences.h b/content/public/renderer/web_preferences.h index f383843..a610473 100644 --- a/content/public/renderer/web_preferences.h +++ b/content/public/renderer/web_preferences.h @@ -9,14 +9,14 @@ struct WebPreferences; -namespace WebKit { +namespace blink { class WebView; } namespace content { CONTENT_EXPORT void ApplyWebPreferences(const WebPreferences& prefs, - WebKit::WebView* web_view); + blink::WebView* web_view); } // namespace content diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index f16b854..b18be14 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc @@ -118,7 +118,7 @@ bool ExecuteScriptHelper(RenderViewHost* render_view_host, return true; } -void BuildSimpleWebKeyEvent(WebKit::WebInputEvent::Type type, +void BuildSimpleWebKeyEvent(blink::WebInputEvent::Type type, ui::KeyboardCode key_code, int native_key_code, int modifiers, @@ -132,15 +132,15 @@ void BuildSimpleWebKeyEvent(WebKit::WebInputEvent::Type type, event->timeStampSeconds = base::Time::Now().ToDoubleT(); event->skip_in_browser = true; - if (type == WebKit::WebInputEvent::Char || - type == WebKit::WebInputEvent::RawKeyDown) { + if (type == blink::WebInputEvent::Char || + type == blink::WebInputEvent::RawKeyDown) { event->text[0] = key_code; event->unmodifiedText[0] = key_code; } } void InjectRawKeyEvent(WebContents* web_contents, - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, ui::KeyboardCode key_code, int native_key_code, int modifiers) { @@ -222,7 +222,7 @@ void CrashTab(WebContents* web_contents) { void SimulateMouseClick(WebContents* web_contents, int modifiers, - WebKit::WebMouseEvent::Button button) { + blink::WebMouseEvent::Button button) { int x = web_contents->GetView()->GetContainerSize().width() / 2; int y = web_contents->GetView()->GetContainerSize().height() / 2; SimulateMouseClickAt(web_contents, modifiers, button, gfx::Point(x, y)); @@ -230,10 +230,10 @@ void SimulateMouseClick(WebContents* web_contents, void SimulateMouseClickAt(WebContents* web_contents, int modifiers, - WebKit::WebMouseEvent::Button button, + blink::WebMouseEvent::Button button, const gfx::Point& point) { - WebKit::WebMouseEvent mouse_event; - mouse_event.type = WebKit::WebInputEvent::MouseDown; + blink::WebMouseEvent mouse_event; + mouse_event.type = blink::WebInputEvent::MouseDown; mouse_event.button = button; mouse_event.x = point.x(); mouse_event.y = point.y(); @@ -245,14 +245,14 @@ void SimulateMouseClickAt(WebContents* web_contents, mouse_event.globalY = point.y() + offset.y(); mouse_event.clickCount = 1; web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event); - mouse_event.type = WebKit::WebInputEvent::MouseUp; + mouse_event.type = blink::WebInputEvent::MouseUp; web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event); } void SimulateMouseEvent(WebContents* web_contents, - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, const gfx::Point& point) { - WebKit::WebMouseEvent mouse_event; + blink::WebMouseEvent mouse_event; mouse_event.type = type; mouse_event.x = point.x(); mouse_event.y = point.y(); @@ -284,40 +284,40 @@ void SimulateKeyPressWithCode(WebContents* web_contents, // The order of these key down events shouldn't matter for our simulation. // For our simulation we can use either the left keys or the right keys. if (control) { - modifiers |= WebKit::WebInputEvent::ControlKey; + modifiers |= blink::WebInputEvent::ControlKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::RawKeyDown, + blink::WebInputEvent::RawKeyDown, ui::VKEY_CONTROL, key_converter->CodeToNativeKeycode("ControlLeft"), modifiers); } if (shift) { - modifiers |= WebKit::WebInputEvent::ShiftKey; + modifiers |= blink::WebInputEvent::ShiftKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::RawKeyDown, + blink::WebInputEvent::RawKeyDown, ui::VKEY_SHIFT, key_converter->CodeToNativeKeycode("ShiftLeft"), modifiers); } if (alt) { - modifiers |= WebKit::WebInputEvent::AltKey; + modifiers |= blink::WebInputEvent::AltKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::RawKeyDown, + blink::WebInputEvent::RawKeyDown, ui::VKEY_MENU, key_converter->CodeToNativeKeycode("AltLeft"), modifiers); } if (command) { - modifiers |= WebKit::WebInputEvent::MetaKey; + modifiers |= blink::WebInputEvent::MetaKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::RawKeyDown, + blink::WebInputEvent::RawKeyDown, ui::VKEY_COMMAND, key_converter->CodeToNativeKeycode("OSLeft"), modifiers); @@ -325,61 +325,61 @@ void SimulateKeyPressWithCode(WebContents* web_contents, InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::RawKeyDown, + blink::WebInputEvent::RawKeyDown, key_code, native_key_code, modifiers); InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::Char, + blink::WebInputEvent::Char, key_code, native_key_code, modifiers); InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::KeyUp, + blink::WebInputEvent::KeyUp, key_code, native_key_code, modifiers); // The order of these key releases shouldn't matter for our simulation. if (control) { - modifiers &= ~WebKit::WebInputEvent::ControlKey; + modifiers &= ~blink::WebInputEvent::ControlKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::KeyUp, + blink::WebInputEvent::KeyUp, ui::VKEY_CONTROL, key_converter->CodeToNativeKeycode("ControlLeft"), modifiers); } if (shift) { - modifiers &= ~WebKit::WebInputEvent::ShiftKey; + modifiers &= ~blink::WebInputEvent::ShiftKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::KeyUp, + blink::WebInputEvent::KeyUp, ui::VKEY_SHIFT, key_converter->CodeToNativeKeycode("ShiftLeft"), modifiers); } if (alt) { - modifiers &= ~WebKit::WebInputEvent::AltKey; + modifiers &= ~blink::WebInputEvent::AltKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::KeyUp, + blink::WebInputEvent::KeyUp, ui::VKEY_MENU, key_converter->CodeToNativeKeycode("AltLeft"), modifiers); } if (command) { - modifiers &= ~WebKit::WebInputEvent::MetaKey; + modifiers &= ~blink::WebInputEvent::MetaKey; InjectRawKeyEvent( web_contents, - WebKit::WebInputEvent::KeyUp, + blink::WebInputEvent::KeyUp, ui::VKEY_COMMAND, key_converter->CodeToNativeKeycode("OSLeft"), modifiers); diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h index a0f490295..53b40ec 100644 --- a/content/public/test/browser_test_utils.h +++ b/content/public/test/browser_test_utils.h @@ -65,18 +65,18 @@ void CrashTab(WebContents* web_contents); // may contain bits from WebInputEvent::Modifiers. void SimulateMouseClick(WebContents* web_contents, int modifiers, - WebKit::WebMouseEvent::Button button); + blink::WebMouseEvent::Button button); // Simulates clicking at the point |point| of the given tab asynchronously; // modifiers may contain bits from WebInputEvent::Modifiers. void SimulateMouseClickAt(WebContents* web_contents, int modifiers, - WebKit::WebMouseEvent::Button button, + blink::WebMouseEvent::Button button, const gfx::Point& point); // Simulates asynchronously a mouse enter/move/leave event. void SimulateMouseEvent(WebContents* web_contents, - WebKit::WebInputEvent::Type type, + blink::WebInputEvent::Type type, const gfx::Point& point); // Sends a key press asynchronously. diff --git a/content/public/test/layouttest_support.h b/content/public/test/layouttest_support.h index 7e56763..91a8098 100644 --- a/content/public/test/layouttest_support.h +++ b/content/public/test/layouttest_support.h @@ -7,7 +7,7 @@ #include "base/callback_forward.h" -namespace WebKit { +namespace blink { class WebDeviceMotionData; class WebDeviceOrientationData; class WebGamepads; @@ -39,15 +39,15 @@ void EnableWebTestProxyCreation(const base::Callback< // Sets the WebGamepads that should be returned by // WebKitPlatformSupport::sampleGamepads(). -void SetMockGamepads(const WebKit::WebGamepads& pads); +void SetMockGamepads(const blink::WebGamepads& pads); // Sets WebDeviceMotionData that should be used when registering // a listener through WebKitPlatformSupport::setDeviceMotionListener(). -void SetMockDeviceMotionData(const WebKit::WebDeviceMotionData& data); +void SetMockDeviceMotionData(const blink::WebDeviceMotionData& data); // Sets WebDeviceOrientationData that should be used when registering // a listener through WebKitPlatformSupport::setDeviceOrientationListener(). -void SetMockDeviceOrientationData(const WebKit::WebDeviceOrientationData& data); +void SetMockDeviceOrientationData(const blink::WebDeviceOrientationData& data); // Returns the length of the local session history of a render view. int GetLocalSessionHistoryLength(RenderView* render_view); @@ -62,7 +62,7 @@ void SetFocusAndActivate(RenderView* render_view, bool enable); // Changes the window rect of the given render view. void ForceResizeRenderView(RenderView* render_view, - const WebKit::WebSize& new_size); + const blink::WebSize& new_size); // Set the device scale factor and force the compositor to resize. void SetDeviceScaleFactor(RenderView* render_view, float factor); @@ -76,10 +76,10 @@ void UseSynchronousResizeMode(RenderView* render_view, bool enable); // Control auto resize mode. void EnableAutoResizeMode(RenderView* render_view, - const WebKit::WebSize& min_size, - const WebKit::WebSize& max_size); + const blink::WebSize& min_size, + const blink::WebSize& max_size); void DisableAutoResizeMode(RenderView* render_view, - const WebKit::WebSize& new_size); + const blink::WebSize& new_size); // Forces the |render_view| to use mock media streams. void UseMockMediaStreams(RenderView* render_view); diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc index 7ada255..4862675 100644 --- a/content/public/test/mock_render_thread.cc +++ b/content/public/test/mock_render_thread.cc @@ -160,7 +160,7 @@ scoped_ptr<base::SharedMemory> } void MockRenderThread::RegisterExtension(v8::Extension* extension) { - WebKit::WebScriptController::registerExtension(extension); + blink::WebScriptController::registerExtension(extension); } void MockRenderThread::ScheduleIdleHandler(int64 initial_delay_ms) { @@ -207,7 +207,7 @@ void MockRenderThread::SendCloseMessage() { // The Widget expects to be returned valid route_id. void MockRenderThread::OnCreateWidget(int opener_id, - WebKit::WebPopupType popup_type, + blink::WebPopupType popup_type, int* route_id, int* surface_id) { opener_id_ = opener_id; diff --git a/content/public/test/mock_render_thread.h b/content/public/test/mock_render_thread.h index 17b4fc5..ec03c78 100644 --- a/content/public/test/mock_render_thread.h +++ b/content/public/test/mock_render_thread.h @@ -113,7 +113,7 @@ class MockRenderThread : public RenderThread { // The Widget expects to be returned valid route_id. void OnCreateWidget(int opener_id, - WebKit::WebPopupType popup_type, + blink::WebPopupType popup_type, int* route_id, int* surface_id); diff --git a/content/public/test/render_view_fake_resources_test.cc b/content/public/test/render_view_fake_resources_test.cc index e76ed5a..63fd31a 100644 --- a/content/public/test/render_view_fake_resources_test.cc +++ b/content/public/test/render_view_fake_resources_test.cc @@ -113,20 +113,20 @@ RenderView* RenderViewFakeResourcesTest::view() { return view_; } -WebKit::WebFrame* RenderViewFakeResourcesTest::GetMainFrame() { +blink::WebFrame* RenderViewFakeResourcesTest::GetMainFrame() { return view_->GetWebView()->mainFrame(); } void RenderViewFakeResourcesTest::LoadURL(const std::string& url) { GURL g_url(url); - GetMainFrame()->loadRequest(WebKit::WebURLRequest(g_url)); + GetMainFrame()->loadRequest(blink::WebURLRequest(g_url)); message_loop_.Run(); } void RenderViewFakeResourcesTest::LoadURLWithPost(const std::string& url) { GURL g_url(url); - WebKit::WebURLRequest request(g_url); - request.setHTTPMethod(WebKit::WebString::fromUTF8("POST")); + blink::WebURLRequest request(g_url); + request.setHTTPMethod(blink::WebString::fromUTF8("POST")); GetMainFrame()->loadRequest(request); message_loop_.Run(); } @@ -136,7 +136,7 @@ void RenderViewFakeResourcesTest::GoBack() { } void RenderViewFakeResourcesTest::GoForward( - const WebKit::WebHistoryItem& history_item) { + const blink::WebHistoryItem& history_item) { GoToOffset(1, history_item); } @@ -203,7 +203,7 @@ void RenderViewFakeResourcesTest::OnRenderViewReady() { void RenderViewFakeResourcesTest::GoToOffset( int offset, - const WebKit::WebHistoryItem& history_item) { + const blink::WebHistoryItem& history_item) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); ViewMsg_Navigate_Params params; params.page_id = impl->GetPageId() + offset; diff --git a/content/public/test/render_view_fake_resources_test.h b/content/public/test/render_view_fake_resources_test.h index ce2f6d1..d4a0deb 100644 --- a/content/public/test/render_view_fake_resources_test.h +++ b/content/public/test/render_view_fake_resources_test.h @@ -58,7 +58,7 @@ namespace IPC { class Channel; } -namespace WebKit { +namespace blink { class WebFrame; class WebHistoryItem; } @@ -104,10 +104,10 @@ class RenderViewFakeResourcesTest : public ::testing::Test, // forward navigations, the caller needs to capture the WebHistoryItem // for the page to go forward to (before going back) and pass it to // this method. The WebHistoryItem is available from the WebFrame. - void GoForward(const WebKit::WebHistoryItem& history_item); + void GoForward(const blink::WebHistoryItem& history_item); // Returns the main WebFrame for our RenderView. - WebKit::WebFrame* GetMainFrame(); + blink::WebFrame* GetMainFrame(); // IPC message handlers below @@ -142,7 +142,7 @@ class RenderViewFakeResourcesTest : public ::testing::Test, private: // A helper for GoBack and GoForward. - void GoToOffset(int offset, const WebKit::WebHistoryItem& history_item); + void GoToOffset(int offset, const blink::WebHistoryItem& history_item); // The previous state for whether sandbox support was enabled in // RenderViewWebKitPlatformSupportImpl. diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc index a32cc89..a900c41 100644 --- a/content/public/test/render_view_test.cc +++ b/content/public/test/render_view_test.cc @@ -28,13 +28,13 @@ #include "ui/base/resource/resource_bundle.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebFrame; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebScriptController; -using WebKit::WebScriptSource; -using WebKit::WebString; -using WebKit::WebURLRequest; +using blink::WebFrame; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebScriptController; +using blink::WebScriptSource; +using blink::WebString; +using blink::WebURLRequest; namespace { const int32 kOpenerId = -2; @@ -50,7 +50,7 @@ namespace content { class RendererWebKitPlatformSupportImplNoSandboxImpl : public RendererWebKitPlatformSupportImpl { public: - virtual WebKit::WebSandboxSupport* sandboxSupport() { + virtual blink::WebSandboxSupport* sandboxSupport() { return NULL; } }; @@ -65,7 +65,7 @@ RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox:: ~RendererWebKitPlatformSupportImplNoSandbox() { } -WebKit::Platform* +blink::Platform* RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox::Get() { return webkit_platform_support_.get(); } @@ -117,11 +117,11 @@ void RenderViewTest::LoadHTML(const char* html) { ProcessPendingMessages(); } -void RenderViewTest::GoBack(const WebKit::WebHistoryItem& item) { +void RenderViewTest::GoBack(const blink::WebHistoryItem& item) { GoToOffset(-1, item); } -void RenderViewTest::GoForward(const WebKit::WebHistoryItem& item) { +void RenderViewTest::GoForward(const blink::WebHistoryItem& item) { GoToOffset(1, item); } @@ -149,7 +149,7 @@ void RenderViewTest::SetUp() { // Setting flags and really doing anything with WebKit is fairly fragile and // hacky, but this is the world we live in... webkit_glue::SetJavaScriptFlags(" --expose-gc"); - WebKit::initialize(webkit_platform_support_.Get()); + blink::initialize(webkit_platform_support_.Get()); // Ensure that we register any necessary schemes when initializing WebKit, // since we are using a MockRenderThread. @@ -178,7 +178,7 @@ void RenderViewTest::SetUp() { false, // swapped_out false, // hidden 1, // next_page_id - WebKit::WebScreenInfo(), + blink::WebScreenInfo(), AccessibilityModeOff, true); view->AddRef(); @@ -207,7 +207,7 @@ void RenderViewTest::TearDown() { // (http://crbug.com/21508). base::RunLoop().RunUntilIdle(); - WebKit::shutdown(); + blink::shutdown(); platform_->PlatformUninitialize(); platform_.reset(); @@ -221,14 +221,14 @@ void RenderViewTest::SendNativeKeyEvent( } void RenderViewTest::SendWebKeyboardEvent( - const WebKit::WebKeyboardEvent& key_event) { + const blink::WebKeyboardEvent& key_event) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->OnMessageReceived( InputMsg_HandleInputEvent(0, &key_event, ui::LatencyInfo(), false)); } void RenderViewTest::SendWebMouseEvent( - const WebKit::WebMouseEvent& mouse_event) { + const blink::WebMouseEvent& mouse_event) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->OnMessageReceived( InputMsg_HandleInputEvent(0, &mouse_event, ui::LatencyInfo(), false)); @@ -296,7 +296,7 @@ bool RenderViewTest::SimulateElementClick(const std::string& element_id) { return true; } -void RenderViewTest::SetFocused(const WebKit::WebNode& node) { +void RenderViewTest::SetFocused(const blink::WebNode& node) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->focusedNodeChanged(node); } @@ -325,7 +325,7 @@ void RenderViewTest::Resize(gfx::Size new_size, gfx::Rect resizer_rect, bool is_fullscreen) { ViewMsg_Resize_Params params; - params.screen_info = WebKit::WebScreenInfo(); + params.screen_info = blink::WebScreenInfo(); params.new_size = new_size; params.physical_backing_size = new_size; params.overdraw_bottom_height = 0.f; @@ -340,7 +340,7 @@ bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { return impl->OnMessageReceived(msg); } -void RenderViewTest::DidNavigateWithinPage(WebKit::WebFrame* frame, +void RenderViewTest::DidNavigateWithinPage(blink::WebFrame* frame, bool is_new_navigation) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); impl->didNavigateWithinPage(frame, is_new_navigation); @@ -351,13 +351,13 @@ void RenderViewTest::SendContentStateImmediately() { impl->set_send_content_state_immediately(true); } -WebKit::WebWidget* RenderViewTest::GetWebWidget() { +blink::WebWidget* RenderViewTest::GetWebWidget() { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); return impl->webwidget(); } void RenderViewTest::GoToOffset(int offset, - const WebKit::WebHistoryItem& history_item) { + const blink::WebHistoryItem& history_item) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); int history_list_length = impl->historyBackListCount() + diff --git a/content/public/test/render_view_test.h b/content/public/test/render_view_test.h index 1ae647c..6a5c2a1 100644 --- a/content/public/test/render_view_test.h +++ b/content/public/test/render_view_test.h @@ -19,7 +19,7 @@ #include "third_party/WebKit/public/platform/Platform.h" #include "third_party/WebKit/public/web/WebFrame.h" -namespace WebKit { +namespace blink { class WebHistoryItem; class WebWidget; } @@ -41,7 +41,7 @@ class RenderViewTest : public testing::Test { public: RendererWebKitPlatformSupportImplNoSandbox(); ~RendererWebKitPlatformSupportImplNoSandbox(); - WebKit::Platform* Get(); + blink::Platform* Get(); private: scoped_ptr<RendererWebKitPlatformSupportImplNoSandboxImpl> @@ -56,7 +56,7 @@ class RenderViewTest : public testing::Test { void ProcessPendingMessages(); // Returns a pointer to the main frame. - WebKit::WebFrame* GetMainFrame(); + blink::WebFrame* GetMainFrame(); // Executes the given JavaScript in the context of the main frame. The input // is a NULL-terminated UTF-8 string. @@ -75,17 +75,17 @@ class RenderViewTest : public testing::Test { // Navigates the main frame back or forward in session history and commits. // The caller must capture a WebHistoryItem for the target page. This is // available from the WebFrame. - void GoBack(const WebKit::WebHistoryItem& item); - void GoForward(const WebKit::WebHistoryItem& item); + void GoBack(const blink::WebHistoryItem& item); + void GoForward(const blink::WebHistoryItem& item); // Sends one native key event over IPC. void SendNativeKeyEvent(const NativeWebKeyboardEvent& key_event); // Send a raw keyboard event to the renderer. - void SendWebKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); + void SendWebKeyboardEvent(const blink::WebKeyboardEvent& key_event); // Send a raw mouse event to the renderer. - void SendWebMouseEvent(const WebKit::WebMouseEvent& key_event); + void SendWebMouseEvent(const blink::WebMouseEvent& key_event); // Returns the bounds (coordinates and size) of the element with id // |element_id|. Returns an empty rect if such an element was not found. @@ -97,7 +97,7 @@ class RenderViewTest : public testing::Test { bool SimulateElementClick(const std::string& element_id); // Simulates |node| being focused. - void SetFocused(const WebKit::WebNode& node); + void SetFocused(const blink::WebNode& node); // Clears anything associated with the browsing history. void ClearHistory(); @@ -115,9 +115,9 @@ class RenderViewTest : public testing::Test { // These are all methods from RenderViewImpl that we expose to testing code. bool OnMessageReceived(const IPC::Message& msg); - void DidNavigateWithinPage(WebKit::WebFrame* frame, bool is_new_navigation); + void DidNavigateWithinPage(blink::WebFrame* frame, bool is_new_navigation); void SendContentStateImmediately(); - WebKit::WebWidget* GetWebWidget(); + blink::WebWidget* GetWebWidget(); // testing::Test virtual void SetUp() OVERRIDE; @@ -139,7 +139,7 @@ class RenderViewTest : public testing::Test { scoped_ptr<CommandLine> command_line_; private: - void GoToOffset(int offset, const WebKit::WebHistoryItem& history_item); + void GoToOffset(int offset, const blink::WebHistoryItem& history_item); }; } // namespace content diff --git a/content/public/test/render_widget_test.cc b/content/public/test/render_widget_test.cc index 47d61f6..ce3bb80 100644 --- a/content/public/test/render_widget_test.cc +++ b/content/public/test/render_widget_test.cc @@ -78,7 +78,7 @@ void RenderWidgetTest::TestResizeAndPaint() { "<html><body><div style='position: absolute; top: %d; left: " "%d; background-color: red;'>Hello World</div></body></html>", kTextPositionY, kTextPositionX).c_str()); - WebKit::WebSize old_size = view_->GetWebView()->size(); + blink::WebSize old_size = view_->GetWebView()->size(); SkBitmap bitmap; // If we re-size the view to something smaller than where the 'Hello World' @@ -154,7 +154,7 @@ void RenderWidgetTest::TestOnResize() { // The initial bounds is empty, so setting it to the same thing should do // nothing. ViewMsg_Resize_Params resize_params; - resize_params.screen_info = WebKit::WebScreenInfo(); + resize_params.screen_info = blink::WebScreenInfo(); resize_params.new_size = gfx::Size(); resize_params.physical_backing_size = gfx::Size(); resize_params.overdraw_bottom_height = 0.f; diff --git a/content/public/test/unittest_test_suite.cc b/content/public/test/unittest_test_suite.cc index a8d5a25..934eb44 100644 --- a/content/public/test/unittest_test_suite.cc +++ b/content/public/test/unittest_test_suite.cc @@ -15,7 +15,7 @@ namespace content { #if !defined(OS_IOS) // A stubbed out WebKit platform support impl. class UnitTestTestSuite::UnitTestWebKitPlatformSupport - : public WebKit::Platform { + : public blink::Platform { public: UnitTestWebKitPlatformSupport() {} virtual ~UnitTestWebKitPlatformSupport() {} @@ -37,13 +37,13 @@ UnitTestTestSuite::UnitTestTestSuite(base::TestSuite* test_suite) DCHECK(test_suite); #if !defined(OS_IOS) webkit_platform_support_.reset(new UnitTestWebKitPlatformSupport); - WebKit::initialize(webkit_platform_support_.get()); + blink::initialize(webkit_platform_support_.get()); #endif } UnitTestTestSuite::~UnitTestTestSuite() { #if !defined(OS_IOS) - WebKit::shutdown(); + blink::shutdown(); #endif } diff --git a/content/renderer/accessibility/accessibility_node_serializer.cc b/content/renderer/accessibility/accessibility_node_serializer.cc index 488b693..39fa245 100644 --- a/content/renderer/accessibility/accessibility_node_serializer.cc +++ b/content/renderer/accessibility/accessibility_node_serializer.cc @@ -23,12 +23,12 @@ #include "third_party/WebKit/public/web/WebInputElement.h" #include "third_party/WebKit/public/web/WebNode.h" -using WebKit::WebAXObject; -using WebKit::WebDocument; -using WebKit::WebDocumentType; -using WebKit::WebElement; -using WebKit::WebNode; -using WebKit::WebVector; +using blink::WebAXObject; +using blink::WebDocument; +using blink::WebDocumentType; +using blink::WebElement; +using blink::WebNode; +using blink::WebVector; namespace content { namespace { @@ -55,71 +55,71 @@ bool IsParentUnignoredOf(const WebAXObject& ancestor, uint32 ConvertState(const WebAXObject& o) { uint32 state = 0; if (o.isChecked()) - state |= (1 << WebKit::WebAXStateChecked); + state |= (1 << blink::WebAXStateChecked); if (o.isCollapsed()) - state |= (1 << WebKit::WebAXStateCollapsed); + state |= (1 << blink::WebAXStateCollapsed); if (o.canSetFocusAttribute()) - state |= (1 << WebKit::WebAXStateFocusable); + state |= (1 << blink::WebAXStateFocusable); if (o.isFocused()) - state |= (1 << WebKit::WebAXStateFocused); + state |= (1 << blink::WebAXStateFocused); - if (o.role() == WebKit::WebAXRolePopUpButton || + if (o.role() == blink::WebAXRolePopUpButton || o.ariaHasPopup()) { - state |= (1 << WebKit::WebAXStateHaspopup); + state |= (1 << blink::WebAXStateHaspopup); if (!o.isCollapsed()) - state |= (1 << WebKit::WebAXStateExpanded); + state |= (1 << blink::WebAXStateExpanded); } if (o.isHovered()) - state |= (1 << WebKit::WebAXStateHovered); + state |= (1 << blink::WebAXStateHovered); if (o.isIndeterminate()) - state |= (1 << WebKit::WebAXStateIndeterminate); + state |= (1 << blink::WebAXStateIndeterminate); if (!o.isVisible()) - state |= (1 << WebKit::WebAXStateInvisible); + state |= (1 << blink::WebAXStateInvisible); if (o.isLinked()) - state |= (1 << WebKit::WebAXStateLinked); + state |= (1 << blink::WebAXStateLinked); if (o.isMultiSelectable()) - state |= (1 << WebKit::WebAXStateMultiselectable); + state |= (1 << blink::WebAXStateMultiselectable); if (o.isOffScreen()) - state |= (1 << WebKit::WebAXStateOffscreen); + state |= (1 << blink::WebAXStateOffscreen); if (o.isPressed()) - state |= (1 << WebKit::WebAXStatePressed); + state |= (1 << blink::WebAXStatePressed); if (o.isPasswordField()) - state |= (1 << WebKit::WebAXStateProtected); + state |= (1 << blink::WebAXStateProtected); if (o.isReadOnly()) - state |= (1 << WebKit::WebAXStateReadonly); + state |= (1 << blink::WebAXStateReadonly); if (o.isRequired()) - state |= (1 << WebKit::WebAXStateRequired); + state |= (1 << blink::WebAXStateRequired); if (o.canSetSelectedAttribute()) - state |= (1 << WebKit::WebAXStateSelectable); + state |= (1 << blink::WebAXStateSelectable); if (o.isSelected()) - state |= (1 << WebKit::WebAXStateSelected); + state |= (1 << blink::WebAXStateSelected); if (o.isVisited()) - state |= (1 << WebKit::WebAXStateVisited); + state |= (1 << blink::WebAXStateVisited); if (o.isEnabled()) - state |= (1 << WebKit::WebAXStateEnabled); + state |= (1 << blink::WebAXStateEnabled); if (o.isVertical()) - state |= (1 << WebKit::WebAXStateVertical); + state |= (1 << blink::WebAXStateVertical); if (o.isVisited()) - state |= (1 << WebKit::WebAXStateVisited); + state |= (1 << blink::WebAXStateVisited); return state; } @@ -143,7 +143,7 @@ void SerializeAccessibilityNode( dst->AddStringAttribute(dst->ATTR_VALUE, UTF16ToUTF8(src.stringValue())); } - if (dst->role == WebKit::WebAXRoleColorWell) { + if (dst->role == blink::WebAXRoleColorWell) { int r, g, b; src.colorValue(r, g, b); dst->AddIntAttribute(dst->ATTR_COLOR_VALUE_RED, r); @@ -151,7 +151,7 @@ void SerializeAccessibilityNode( dst->AddIntAttribute(dst->ATTR_COLOR_VALUE_BLUE, b); } - if (dst->role == WebKit::WebAXRoleInlineTextBox) { + if (dst->role == blink::WebAXRoleInlineTextBox) { dst->AddIntAttribute(dst->ATTR_TEXT_DIRECTION, src.textDirection()); WebVector<int> src_character_offsets; @@ -208,18 +208,18 @@ void SerializeAccessibilityNode( if (!src.url().isEmpty()) dst->AddStringAttribute(dst->ATTR_URL, src.url().spec()); - if (dst->role == WebKit::WebAXRoleHeading) + if (dst->role == blink::WebAXRoleHeading) dst->AddIntAttribute(dst->ATTR_HIERARCHICAL_LEVEL, src.headingLevel()); - else if ((dst->role == WebKit::WebAXRoleTreeItem || - dst->role == WebKit::WebAXRoleRow) && + else if ((dst->role == blink::WebAXRoleTreeItem || + dst->role == blink::WebAXRoleRow) && src.hierarchicalLevel() > 0) { dst->AddIntAttribute(dst->ATTR_HIERARCHICAL_LEVEL, src.hierarchicalLevel()); } // Treat the active list box item as focused. - if (dst->role == WebKit::WebAXRoleListBoxOption && + if (dst->role == blink::WebAXRoleListBoxOption && src.isSelectedOptionActive()) { - dst->state |= (1 << WebKit::WebAXStateFocused); + dst->state |= (1 << blink::WebAXStateFocused); } if (src.canvasHasFallbackContent()) @@ -237,7 +237,7 @@ void SerializeAccessibilityNode( is_iframe = (element.tagName() == ASCIIToUTF16("IFRAME")); if (LowerCaseEqualsASCII(element.getAttribute("aria-expanded"), "true")) - dst->state |= (1 << WebKit::WebAXStateExpanded); + dst->state |= (1 << blink::WebAXStateExpanded); // TODO(ctguil): The tagName in WebKit is lower cased but // HTMLElement::nodeName calls localNameUpper. Consider adding @@ -252,9 +252,9 @@ void SerializeAccessibilityNode( dst->html_attributes.push_back(std::make_pair(name, value)); } - if (dst->role == WebKit::WebAXRoleEditableText || - dst->role == WebKit::WebAXRoleTextArea || - dst->role == WebKit::WebAXRoleTextField) { + if (dst->role == blink::WebAXRoleEditableText || + dst->role == blink::WebAXRoleTextArea || + dst->role == blink::WebAXRoleTextField) { dst->AddIntAttribute(dst->ATTR_TEXT_SEL_START, src.selectionStart()); dst->AddIntAttribute(dst->ATTR_TEXT_SEL_END, src.selectionEnd()); @@ -342,10 +342,10 @@ void SerializeAccessibilityNode( container_live_relevant); } - if (dst->role == WebKit::WebAXRoleProgressIndicator || - dst->role == WebKit::WebAXRoleScrollBar || - dst->role == WebKit::WebAXRoleSlider || - dst->role == WebKit::WebAXRoleSpinButton) { + if (dst->role == blink::WebAXRoleProgressIndicator || + dst->role == blink::WebAXRoleScrollBar || + dst->role == blink::WebAXRoleSlider || + dst->role == blink::WebAXRoleSpinButton) { dst->AddFloatAttribute(dst->ATTR_VALUE_FOR_RANGE, src.valueForRange()); dst->AddFloatAttribute(dst->ATTR_MAX_VALUE_FOR_RANGE, src.maxValueForRange()); @@ -353,8 +353,8 @@ void SerializeAccessibilityNode( src.minValueForRange()); } - if (dst->role == WebKit::WebAXRoleDocument || - dst->role == WebKit::WebAXRoleWebArea) { + if (dst->role == blink::WebAXRoleDocument || + dst->role == blink::WebAXRoleWebArea) { dst->AddStringAttribute(dst->ATTR_HTML_TAG, "#document"); const WebDocument& document = src.document(); if (name.empty()) @@ -387,7 +387,7 @@ void SerializeAccessibilityNode( dst->AddIntAttribute(dst->ATTR_SCROLL_Y_MAX, max_offset.height()); } - if (dst->role == WebKit::WebAXRoleTable) { + if (dst->role == blink::WebAXRoleTable) { int column_count = src.columnCount(); int row_count = src.rowCount(); if (column_count > 0 && row_count > 0) { @@ -417,23 +417,23 @@ void SerializeAccessibilityNode( } } - if (dst->role == WebKit::WebAXRoleRow) { + if (dst->role == blink::WebAXRoleRow) { dst->AddIntAttribute(dst->ATTR_TABLE_ROW_INDEX, src.rowIndex()); WebAXObject header = src.rowHeader(); if (!header.isDetached()) dst->AddIntAttribute(dst->ATTR_TABLE_ROW_HEADER_ID, header.axID()); } - if (dst->role == WebKit::WebAXRoleColumn) { + if (dst->role == blink::WebAXRoleColumn) { dst->AddIntAttribute(dst->ATTR_TABLE_COLUMN_INDEX, src.columnIndex()); WebAXObject header = src.columnHeader(); if (!header.isDetached()) dst->AddIntAttribute(dst->ATTR_TABLE_COLUMN_HEADER_ID, header.axID()); } - if (dst->role == WebKit::WebAXRoleCell || - dst->role == WebKit::WebAXRoleRowHeader || - dst->role == WebKit::WebAXRoleColumnHeader) { + if (dst->role == blink::WebAXRoleCell || + dst->role == blink::WebAXRoleRowHeader || + dst->role == blink::WebAXRoleColumnHeader) { dst->AddIntAttribute(dst->ATTR_TABLE_CELL_COLUMN_INDEX, src.cellColumnIndex()); dst->AddIntAttribute(dst->ATTR_TABLE_CELL_COLUMN_SPAN, @@ -466,10 +466,10 @@ bool ShouldIncludeChildNode( const WebAXObject& parent, const WebAXObject& child) { switch(parent.role()) { - case WebKit::WebAXRoleSlider: - case WebKit::WebAXRoleEditableText: - case WebKit::WebAXRoleTextArea: - case WebKit::WebAXRoleTextField: + case blink::WebAXRoleSlider: + case blink::WebAXRoleEditableText: + case blink::WebAXRoleTextArea: + case blink::WebAXRoleTextField: return false; default: break; diff --git a/content/renderer/accessibility/accessibility_node_serializer.h b/content/renderer/accessibility/accessibility_node_serializer.h index 24e7e9e..374a79d 100644 --- a/content/renderer/accessibility/accessibility_node_serializer.h +++ b/content/renderer/accessibility/accessibility_node_serializer.h @@ -11,12 +11,12 @@ namespace content { void SerializeAccessibilityNode( - const WebKit::WebAXObject& src, + const blink::WebAXObject& src, AccessibilityNodeData* dst); bool ShouldIncludeChildNode( - const WebKit::WebAXObject& parent, - const WebKit::WebAXObject& child); + const blink::WebAXObject& parent, + const blink::WebAXObject& child); } // namespace content diff --git a/content/renderer/accessibility/renderer_accessibility.cc b/content/renderer/accessibility/renderer_accessibility.cc index cf2ecd6..18eb78f 100644 --- a/content/renderer/accessibility/renderer_accessibility.cc +++ b/content/renderer/accessibility/renderer_accessibility.cc @@ -12,10 +12,10 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebAXObject; -using WebKit::WebDocument; -using WebKit::WebFrame; -using WebKit::WebView; +using blink::WebAXObject; +using blink::WebDocument; +using blink::WebFrame; +using blink::WebView; namespace content { @@ -44,59 +44,59 @@ WebDocument RendererAccessibility::GetMainDocument() { #ifndef NDEBUG const std::string RendererAccessibility::AccessibilityEventToString( - WebKit::WebAXEvent event) { + blink::WebAXEvent event) { switch (event) { - case WebKit::WebAXEventActiveDescendantChanged: + case blink::WebAXEventActiveDescendantChanged: return "active descendant changed"; - case WebKit::WebAXEventAriaAttributeChanged: + case blink::WebAXEventAriaAttributeChanged: return "aria attribute changed"; - case WebKit::WebAXEventAutocorrectionOccured: + case blink::WebAXEventAutocorrectionOccured: return "autocorrection occurred"; - case WebKit::WebAXEventBlur: + case blink::WebAXEventBlur: return "blur"; - case WebKit::WebAXEventAlert: + case blink::WebAXEventAlert: return "alert"; - case WebKit::WebAXEventCheckedStateChanged: + case blink::WebAXEventCheckedStateChanged: return "check state changed"; - case WebKit::WebAXEventChildrenChanged: + case blink::WebAXEventChildrenChanged: return "children changed"; - case WebKit::WebAXEventFocus: + case blink::WebAXEventFocus: return "focus changed"; - case WebKit::WebAXEventInvalidStatusChanged: + case blink::WebAXEventInvalidStatusChanged: return "invalid status changed"; - case WebKit::WebAXEventLayoutComplete: + case blink::WebAXEventLayoutComplete: return "layout complete"; - case WebKit::WebAXEventLiveRegionChanged: + case blink::WebAXEventLiveRegionChanged: return "live region changed"; - case WebKit::WebAXEventLoadComplete: + case blink::WebAXEventLoadComplete: return "load complete"; - case WebKit::WebAXEventMenuListItemSelected: + case blink::WebAXEventMenuListItemSelected: return "menu list item selected"; - case WebKit::WebAXEventMenuListValueChanged: + case blink::WebAXEventMenuListValueChanged: return "menu list changed"; - case WebKit::WebAXEventShow: + case blink::WebAXEventShow: return "object show"; - case WebKit::WebAXEventHide: + case blink::WebAXEventHide: return "object hide"; - case WebKit::WebAXEventRowCountChanged: + case blink::WebAXEventRowCountChanged: return "row count changed"; - case WebKit::WebAXEventRowCollapsed: + case blink::WebAXEventRowCollapsed: return "row collapsed"; - case WebKit::WebAXEventRowExpanded: + case blink::WebAXEventRowExpanded: return "row expanded"; - case WebKit::WebAXEventScrolledToAnchor: + case blink::WebAXEventScrolledToAnchor: return "scrolled to anchor"; - case WebKit::WebAXEventSelectedChildrenChanged: + case blink::WebAXEventSelectedChildrenChanged: return "selected children changed"; - case WebKit::WebAXEventSelectedTextChanged: + case blink::WebAXEventSelectedTextChanged: return "selected text changed"; - case WebKit::WebAXEventTextChanged: + case blink::WebAXEventTextChanged: return "text changed"; - case WebKit::WebAXEventTextInserted: + case blink::WebAXEventTextInserted: return "text inserted"; - case WebKit::WebAXEventTextRemoved: + case blink::WebAXEventTextRemoved: return "text removed"; - case WebKit::WebAXEventValueChanged: + case blink::WebAXEventValueChanged: return "value changed"; default: NOTREACHED(); diff --git a/content/renderer/accessibility/renderer_accessibility.h b/content/renderer/accessibility/renderer_accessibility.h index 93799ea..cc157ff 100644 --- a/content/renderer/accessibility/renderer_accessibility.h +++ b/content/renderer/accessibility/renderer_accessibility.h @@ -9,7 +9,7 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebAXObject.h" -namespace WebKit { +namespace blink { class WebDocument; }; @@ -55,15 +55,15 @@ class CONTENT_EXPORT RendererAccessibility : public RenderViewObserver { // Called when an accessibility notification occurs in WebKit. virtual void HandleWebAccessibilityEvent( - const WebKit::WebAXObject& obj, WebKit::WebAXEvent event) = 0; + const blink::WebAXObject& obj, blink::WebAXEvent event) = 0; protected: // Returns the main top-level document for this page, or NULL if there's // no view or frame. - WebKit::WebDocument GetMainDocument(); + blink::WebDocument GetMainDocument(); #ifndef NDEBUG - const std::string AccessibilityEventToString(WebKit::WebAXEvent event); + const std::string AccessibilityEventToString(blink::WebAXEvent event); #endif // The RenderViewImpl that owns us. diff --git a/content/renderer/accessibility/renderer_accessibility_browsertest.cc b/content/renderer/accessibility/renderer_accessibility_browsertest.cc index b8da316..6cc5550 100644 --- a/content/renderer/accessibility/renderer_accessibility_browsertest.cc +++ b/content/renderer/accessibility/renderer_accessibility_browsertest.cc @@ -14,8 +14,8 @@ #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebAXObject; -using WebKit::WebDocument; +using blink::WebAXObject; +using blink::WebDocument; namespace content { @@ -102,7 +102,7 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { SetMode(AccessibilityModeEditableTextOnly); // Set a minimum size and give focus so simulated events work. - view()->webwidget()->resize(WebKit::WebSize(500, 500)); + view()->webwidget()->resize(blink::WebSize(500, 500)); view()->webwidget()->setFocus(true); std::string html = @@ -125,16 +125,16 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { AccessibilityHostMsg_EventParams event; GetLastAccEvent(&event); EXPECT_EQ(event.event_type, - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); EXPECT_EQ(event.id, 1); EXPECT_EQ(event.nodes.size(), 2U); EXPECT_EQ(event.nodes[0].id, 1); EXPECT_EQ(event.nodes[0].role, - WebKit::WebAXRoleRootWebArea); + blink::WebAXRoleRootWebArea); EXPECT_EQ(event.nodes[0].state, - (1U << WebKit::WebAXStateReadonly) | - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused)); + (1U << blink::WebAXStateReadonly) | + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused)); EXPECT_EQ(event.nodes[0].child_ids.size(), 1U); } @@ -146,21 +146,21 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { AccessibilityHostMsg_EventParams event; GetLastAccEvent(&event); EXPECT_EQ(event.event_type, - WebKit::WebAXEventFocus); + blink::WebAXEventFocus); EXPECT_EQ(event.id, 3); EXPECT_EQ(event.nodes[0].id, 1); EXPECT_EQ(event.nodes[0].role, - WebKit::WebAXRoleRootWebArea); + blink::WebAXRoleRootWebArea); EXPECT_EQ(event.nodes[0].state, - (1U << WebKit::WebAXStateReadonly) | - (1U << WebKit::WebAXStateFocusable)); + (1U << blink::WebAXStateReadonly) | + (1U << blink::WebAXStateFocusable)); EXPECT_EQ(event.nodes[0].child_ids.size(), 1U); EXPECT_EQ(event.nodes[1].id, 3); EXPECT_EQ(event.nodes[1].role, - WebKit::WebAXRoleGroup); + blink::WebAXRoleGroup); EXPECT_EQ(event.nodes[1].state, - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused)); + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused)); } // Check other editable text nodes. @@ -172,8 +172,8 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { GetLastAccEvent(&event); EXPECT_EQ(event.id, 4); EXPECT_EQ(event.nodes[1].state, - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused)); + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused)); } { @@ -184,8 +184,8 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { GetLastAccEvent(&event); EXPECT_EQ(event.id, 5); EXPECT_EQ(event.nodes[1].state, - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused)); + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused)); } { @@ -196,8 +196,8 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { GetLastAccEvent(&event); EXPECT_EQ(event.id, 6); EXPECT_EQ(event.nodes[1].state, - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused)); + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused)); } // Try focusing things that aren't editable text. @@ -209,9 +209,9 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { GetLastAccEvent(&event); EXPECT_EQ(event.id, 7); EXPECT_EQ(event.nodes[1].state, - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused) | - (1U << WebKit::WebAXStateReadonly)); + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused) | + (1U << blink::WebAXStateReadonly)); } { @@ -222,9 +222,9 @@ TEST_F(RendererAccessibilityTest, EditableTextModeFocusEvents) { GetLastAccEvent(&event); EXPECT_EQ(event.id, 8); EXPECT_EQ(event.nodes[1].state, - (1U << WebKit::WebAXStateFocusable) | - (1U << WebKit::WebAXStateFocused) | - (1U << WebKit::WebAXStateReadonly)); + (1U << blink::WebAXStateFocusable) | + (1U << blink::WebAXStateFocused) | + (1U << blink::WebAXStateReadonly)); } // Clear focus. @@ -269,7 +269,7 @@ TEST_F(RendererAccessibilityTest, SendFullAccessibilityTreeOnReload) { WebAXObject root_obj = document.accessibilityObject(); accessibility->HandleWebAccessibilityEvent( root_obj, - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); accessibility->SendPendingAccessibilityEvents(); EXPECT_EQ(4, accessibility->browser_tree_node_count()); EXPECT_EQ(1, CountAccessibilityNodesSentToBrowser()); @@ -289,7 +289,7 @@ TEST_F(RendererAccessibilityTest, SendFullAccessibilityTreeOnReload) { sink_->ClearMessages(); accessibility->HandleWebAccessibilityEvent( root_obj, - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); accessibility->SendPendingAccessibilityEvents(); EXPECT_EQ(4, accessibility->browser_tree_node_count()); EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser()); @@ -304,7 +304,7 @@ TEST_F(RendererAccessibilityTest, SendFullAccessibilityTreeOnReload) { const WebAXObject& first_child = root_obj.childAt(0); accessibility->HandleWebAccessibilityEvent( first_child, - WebKit::WebAXEventLiveRegionChanged); + blink::WebAXEventLiveRegionChanged); accessibility->SendPendingAccessibilityEvents(); EXPECT_EQ(4, accessibility->browser_tree_node_count()); EXPECT_EQ(4, CountAccessibilityNodesSentToBrowser()); @@ -343,7 +343,7 @@ TEST_F(RendererAccessibilityTest, WebAXObject root_obj = document.accessibilityObject(); accessibility->HandleWebAccessibilityEvent( root_obj, - WebKit::WebAXEventValueChanged); + blink::WebAXEventValueChanged); view()->OnSwapOut(); accessibility->SendPendingAccessibilityEvents(); EXPECT_FALSE(sink_->GetUniqueMessageMatching( @@ -405,7 +405,7 @@ TEST_F(RendererAccessibilityTest, HideAccessibilityObject) { sink_->ClearMessages(); accessibility->HandleWebAccessibilityEvent( node_a, - WebKit::WebAXEventChildrenChanged); + blink::WebAXEventChildrenChanged); accessibility->SendPendingAccessibilityEvents(); EXPECT_EQ(3, accessibility->browser_tree_node_count()); @@ -455,7 +455,7 @@ TEST_F(RendererAccessibilityTest, ShowAccessibilityObject) { WebAXObject node_a = root_obj.childAt(0); accessibility->HandleWebAccessibilityEvent( node_a, - WebKit::WebAXEventChildrenChanged); + blink::WebAXEventChildrenChanged); accessibility->SendPendingAccessibilityEvents(); EXPECT_EQ(4, accessibility->browser_tree_node_count()); @@ -509,7 +509,7 @@ TEST_F(RendererAccessibilityTest, DetachAccessibilityObject) { sink_->ClearMessages(); accessibility->HandleWebAccessibilityEvent( body, - WebKit::WebAXEventChildrenChanged); + blink::WebAXEventChildrenChanged); accessibility->SendPendingAccessibilityEvents(); diff --git a/content/renderer/accessibility/renderer_accessibility_complete.cc b/content/renderer/accessibility/renderer_accessibility_complete.cc index e6c003f..e5a6576 100644 --- a/content/renderer/accessibility/renderer_accessibility_complete.cc +++ b/content/renderer/accessibility/renderer_accessibility_complete.cc @@ -17,14 +17,14 @@ #include "third_party/WebKit/public/web/WebNode.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebAXObject; -using WebKit::WebDocument; -using WebKit::WebFrame; -using WebKit::WebNode; -using WebKit::WebPoint; -using WebKit::WebRect; -using WebKit::WebSize; -using WebKit::WebView; +using blink::WebAXObject; +using blink::WebDocument; +using blink::WebFrame; +using blink::WebNode; +using blink::WebPoint; +using blink::WebRect; +using blink::WebSize; +using blink::WebView; namespace content { @@ -44,7 +44,7 @@ RendererAccessibilityComplete::RendererAccessibilityComplete( // accessibility being enabled. Initialize the browser's cached // accessibility tree by sending it a notification. HandleWebAccessibilityEvent(document.accessibilityObject(), - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); } } @@ -81,11 +81,11 @@ void RendererAccessibilityComplete::FocusedNodeChanged(const WebNode& node) { // When focus is cleared, implicitly focus the document. // TODO(dmazzoni): Make WebKit send this notification instead. HandleWebAccessibilityEvent(document.accessibilityObject(), - WebKit::WebAXEventBlur); + blink::WebAXEventBlur); } } -void RendererAccessibilityComplete::DidFinishLoad(WebKit::WebFrame* frame) { +void RendererAccessibilityComplete::DidFinishLoad(blink::WebFrame* frame) { const WebDocument& document = GetMainDocument(); if (document.isNull()) return; @@ -96,12 +96,12 @@ void RendererAccessibilityComplete::DidFinishLoad(WebKit::WebFrame* frame) { // TODO(dmazzoni): remove this once rdar://5794454 is fixed. WebAXObject new_root = document.accessibilityObject(); if (!browser_root_ || new_root.axID() != browser_root_->id) - HandleWebAccessibilityEvent(new_root, WebKit::WebAXEventLayoutComplete); + HandleWebAccessibilityEvent(new_root, blink::WebAXEventLayoutComplete); } void RendererAccessibilityComplete::HandleWebAccessibilityEvent( - const WebKit::WebAXObject& obj, - WebKit::WebAXEvent event) { + const blink::WebAXObject& obj, + blink::WebAXEvent event) { const WebDocument& document = GetMainDocument(); if (document.isNull()) return; @@ -117,7 +117,7 @@ void RendererAccessibilityComplete::HandleWebAccessibilityEvent( if (!obj.equals(document.accessibilityObject())) { HandleWebAccessibilityEvent( document.accessibilityObject(), - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); } } @@ -189,7 +189,7 @@ void RendererAccessibilityComplete::SendPendingAccessibilityEvents() { // doesn't also send us events for each child that changed // selection state, so make sure we re-send that whole subtree. if (event.event_type == - WebKit::WebAXEventSelectedChildrenChanged) { + blink::WebAXEventSelectedChildrenChanged) { base::hash_map<int32, BrowserTreeNode*>::iterator iter = browser_id_map_.find(obj.axID()); if (iter != browser_id_map_.end()) @@ -208,7 +208,7 @@ void RendererAccessibilityComplete::SendPendingAccessibilityEvents() { obj.axID() != root_id) { obj = obj.parentObject(); if (event.event_type == - WebKit::WebAXEventChildrenChanged) { + blink::WebAXEventChildrenChanged) { event.id = obj.axID(); } } @@ -309,7 +309,7 @@ void RendererAccessibilityComplete::AppendLocationChangeEvents( return; AccessibilityHostMsg_EventParams event_msg; - event_msg.event_type = static_cast<WebKit::WebAXEvent>(-1); + event_msg.event_type = static_cast<blink::WebAXEvent>(-1); event_msg.id = root_object.axID(); event_msg.nodes.resize(location_changes.size()); for (size_t i = 0; i < location_changes.size(); i++) { @@ -329,7 +329,7 @@ RendererAccessibilityComplete::CreateBrowserTreeNode() { } void RendererAccessibilityComplete::SerializeChangedNodes( - const WebKit::WebAXObject& obj, + const blink::WebAXObject& obj, std::vector<AccessibilityNodeData>* dst, std::set<int>* ids_serialized) { if (ids_serialized->find(obj.axID()) != ids_serialized->end()) @@ -432,7 +432,7 @@ void RendererAccessibilityComplete::SerializeChangedNodes( AccessibilityNodeData* serialized_node = &dst->back(); SerializeAccessibilityNode(obj, serialized_node); if (serialized_node->id == browser_root_->id) - serialized_node->role = WebKit::WebAXRoleRootWebArea; + serialized_node->role = blink::WebAXRoleRootWebArea; // Iterate over the children, make note of the ones that are new // and need to be serialized, and update the BrowserTreeNode @@ -528,7 +528,7 @@ void RendererAccessibilityComplete::OnScrollToMakeVisible( // https://bugs.webkit.org/show_bug.cgi?id=73460 HandleWebAccessibilityEvent( document.accessibilityObject(), - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); } void RendererAccessibilityComplete::OnScrollToPoint( @@ -554,7 +554,7 @@ void RendererAccessibilityComplete::OnScrollToPoint( // https://bugs.webkit.org/show_bug.cgi?id=73460 HandleWebAccessibilityEvent( document.accessibilityObject(), - WebKit::WebAXEventLayoutComplete); + blink::WebAXEventLayoutComplete); } void RendererAccessibilityComplete::OnSetTextSelection( @@ -573,11 +573,11 @@ void RendererAccessibilityComplete::OnSetTextSelection( } // TODO(dmazzoni): support elements other than <input>. - WebKit::WebNode node = obj.node(); + blink::WebNode node = obj.node(); if (!node.isNull() && node.isElementNode()) { - WebKit::WebElement element = node.to<WebKit::WebElement>(); - WebKit::WebInputElement* input_element = - WebKit::toWebInputElement(&element); + blink::WebElement element = node.to<blink::WebElement>(); + blink::WebInputElement* input_element = + blink::toWebInputElement(&element); if (input_element && input_element->isTextField()) input_element->setSelectionRange(start_offset, end_offset); } diff --git a/content/renderer/accessibility/renderer_accessibility_complete.h b/content/renderer/accessibility/renderer_accessibility_complete.h index 174062a..d23c7ba 100644 --- a/content/renderer/accessibility/renderer_accessibility_complete.h +++ b/content/renderer/accessibility/renderer_accessibility_complete.h @@ -16,7 +16,7 @@ #include "third_party/WebKit/public/web/WebAXEnums.h" #include "third_party/WebKit/public/web/WebAXObject.h" -namespace WebKit { +namespace blink { class WebDocument; class WebNode; }; @@ -40,12 +40,12 @@ class CONTENT_EXPORT RendererAccessibilityComplete // RenderView::Observer implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; - virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE; + virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; + virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE; // RendererAccessibility. virtual void HandleWebAccessibilityEvent( - const WebKit::WebAXObject& obj, WebKit::WebAXEvent event) OVERRIDE; + const blink::WebAXObject& obj, blink::WebAXEvent event) OVERRIDE; // In order to keep track of what nodes the browser knows about, we keep a // representation of the browser tree - just IDs and parent/child @@ -78,7 +78,7 @@ class CONTENT_EXPORT RendererAccessibilityComplete // |obj|, based on what object ids we know the browser already has. // The set of ids serialized is added to |ids_serialized|, and any // ids previously in that set are not serialized again. - void SerializeChangedNodes(const WebKit::WebAXObject& obj, + void SerializeChangedNodes(const blink::WebAXObject& obj, std::vector<AccessibilityNodeData>* dst, std::set<int>* ids_serialized); @@ -97,19 +97,19 @@ class CONTENT_EXPORT RendererAccessibilityComplete void OnFatalError(); // Checks if a WebKit accessibility object is an editable text node. - bool IsEditableText(const WebKit::WebAXObject& node); + bool IsEditableText(const blink::WebAXObject& node); // Recursively explore the tree of WebKit accessibility objects rooted // at |src|, and for each editable text node encountered, add a // corresponding WebAccessibility node as a child of |dst|. void RecursiveAddEditableTextNodesToTree( - const WebKit::WebAXObject& src, + const blink::WebAXObject& src, AccessibilityNodeData* dst); // Build a tree of serializable AccessibilityNodeData nodes to send to the // browser process, given a WebAXObject node from WebKit. // Modifies |dst| in-place, it's assumed to be empty. - void BuildAccessibilityTree(const WebKit::WebAXObject& src, + void BuildAccessibilityTree(const blink::WebAXObject& src, bool include_children, AccessibilityNodeData* dst); diff --git a/content/renderer/accessibility/renderer_accessibility_focus_only.cc b/content/renderer/accessibility/renderer_accessibility_focus_only.cc index cea316e..050918d 100644 --- a/content/renderer/accessibility/renderer_accessibility_focus_only.cc +++ b/content/renderer/accessibility/renderer_accessibility_focus_only.cc @@ -12,11 +12,11 @@ #include "third_party/WebKit/public/web/WebNode.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebDocument; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebNode; -using WebKit::WebView; +using blink::WebDocument; +using blink::WebElement; +using blink::WebFrame; +using blink::WebNode; +using blink::WebView; namespace { // The root node will always have id 1. Let each child node have a new @@ -36,7 +36,7 @@ RendererAccessibilityFocusOnly::~RendererAccessibilityFocusOnly() { } void RendererAccessibilityFocusOnly::HandleWebAccessibilityEvent( - const WebKit::WebAXObject& obj, WebKit::WebAXEvent event) { + const blink::WebAXObject& obj, blink::WebAXEvent event) { // Do nothing. } @@ -45,7 +45,7 @@ void RendererAccessibilityFocusOnly::FocusedNodeChanged(const WebNode& node) { HandleFocusedNodeChanged(node, true); } -void RendererAccessibilityFocusOnly::DidFinishLoad(WebKit::WebFrame* frame) { +void RendererAccessibilityFocusOnly::DidFinishLoad(blink::WebFrame* frame) { WebView* view = render_view()->GetWebView(); if (view->focusedFrame() != frame) return; @@ -88,8 +88,8 @@ void RendererAccessibilityFocusOnly::HandleFocusedNodeChanged( // event, which doesn't post a native event on Windows. event.event_type = send_focus_event ? - WebKit::WebAXEventFocus : - WebKit::WebAXEventLayoutComplete; + blink::WebAXEventFocus : + blink::WebAXEventLayoutComplete; // Set the id that the event applies to: the root node if nothing // has focus, otherwise the focused node. @@ -101,17 +101,17 @@ void RendererAccessibilityFocusOnly::HandleFocusedNodeChanged( // Always include the root of the tree, the document. It always has id 1. root.id = 1; - root.role = WebKit::WebAXRoleRootWebArea; + root.role = blink::WebAXRoleRootWebArea; root.state = - (1 << WebKit::WebAXStateReadonly) | - (1 << WebKit::WebAXStateFocusable); + (1 << blink::WebAXStateReadonly) | + (1 << blink::WebAXStateFocusable); if (!node_has_focus) - root.state |= (1 << WebKit::WebAXStateFocused); + root.state |= (1 << blink::WebAXStateFocused); root.location = gfx::Rect(render_view_->size()); root.child_ids.push_back(next_id_); child.id = next_id_; - child.role = WebKit::WebAXRoleGroup; + child.role = blink::WebAXRoleGroup; if (!node.isNull() && node.isElementNode()) { child.location = gfx::Rect( @@ -124,10 +124,10 @@ void RendererAccessibilityFocusOnly::HandleFocusedNodeChanged( if (node_has_focus) { child.state = - (1 << WebKit::WebAXStateFocusable) | - (1 << WebKit::WebAXStateFocused); + (1 << blink::WebAXStateFocusable) | + (1 << blink::WebAXStateFocused); if (!node_is_editable_text) - child.state |= (1 << WebKit::WebAXStateReadonly); + child.state |= (1 << blink::WebAXStateReadonly); } #ifndef NDEBUG diff --git a/content/renderer/accessibility/renderer_accessibility_focus_only.h b/content/renderer/accessibility/renderer_accessibility_focus_only.h index 1d01e1d..c8e09c5 100644 --- a/content/renderer/accessibility/renderer_accessibility_focus_only.h +++ b/content/renderer/accessibility/renderer_accessibility_focus_only.h @@ -54,14 +54,14 @@ class RendererAccessibilityFocusOnly : public RendererAccessibility { // RendererAccessibility implementation. virtual void HandleWebAccessibilityEvent( - const WebKit::WebAXObject& obj, WebKit::WebAXEvent event) OVERRIDE; + const blink::WebAXObject& obj, blink::WebAXEvent event) OVERRIDE; // RenderView::Observer implementation. - virtual void FocusedNodeChanged(const WebKit::WebNode& node) OVERRIDE; - virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE; + virtual void FocusedNodeChanged(const blink::WebNode& node) OVERRIDE; + virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE; private: - void HandleFocusedNodeChanged(const WebKit::WebNode& node, + void HandleFocusedNodeChanged(const blink::WebNode& node, bool send_focus_event); int next_id_; diff --git a/content/renderer/active_notification_tracker.cc b/content/renderer/active_notification_tracker.cc index 9f0b6e0..a813ea0 100644 --- a/content/renderer/active_notification_tracker.cc +++ b/content/renderer/active_notification_tracker.cc @@ -9,8 +9,8 @@ #include "third_party/WebKit/public/web/WebNotification.h" #include "third_party/WebKit/public/web/WebNotificationPermissionCallback.h" -using WebKit::WebNotification; -using WebKit::WebNotificationPermissionCallback; +using blink::WebNotification; +using blink::WebNotificationPermissionCallback; namespace content { @@ -38,7 +38,7 @@ bool ActiveNotificationTracker::GetNotification( } int ActiveNotificationTracker::RegisterNotification( - const WebKit::WebNotification& proxy) { + const blink::WebNotification& proxy) { if (reverse_notification_table_.find(proxy) != reverse_notification_table_.end()) { return reverse_notification_table_[proxy]; diff --git a/content/renderer/active_notification_tracker.h b/content/renderer/active_notification_tracker.h index 6591eae..d4d710a 100644 --- a/content/renderer/active_notification_tracker.h +++ b/content/renderer/active_notification_tracker.h @@ -13,7 +13,7 @@ #include "content/common/content_export.h" #include "third_party/WebKit/public/web/WebNotification.h" -namespace WebKit { +namespace blink { class WebNotificationPermissionCallback; } @@ -28,16 +28,16 @@ class CONTENT_EXPORT ActiveNotificationTracker { ~ActiveNotificationTracker(); // Methods for tracking active notification objects. - int RegisterNotification(const WebKit::WebNotification& notification); + int RegisterNotification(const blink::WebNotification& notification); void UnregisterNotification(int id); - bool GetId(const WebKit::WebNotification& notification, int& id); - bool GetNotification(int id, WebKit::WebNotification* notification); + bool GetId(const blink::WebNotification& notification, int& id); + bool GetNotification(int id, blink::WebNotification* notification); // Methods for tracking active permission requests. int RegisterPermissionRequest( - WebKit::WebNotificationPermissionCallback* callback); + blink::WebNotificationPermissionCallback* callback); void OnPermissionRequestComplete(int id); - WebKit::WebNotificationPermissionCallback* GetCallback(int id); + blink::WebNotificationPermissionCallback* GetCallback(int id); // Clears out all active notifications. Useful on page navigation. void Clear(); @@ -47,12 +47,12 @@ class CONTENT_EXPORT ActiveNotificationTracker { void DetachAll(); private: - typedef std::map<WebKit::WebNotification, int> ReverseTable; + typedef std::map<blink::WebNotification, int> ReverseTable; // Tracking maps for active notifications and permission requests. - IDMap<WebKit::WebNotification> notification_table_; + IDMap<blink::WebNotification> notification_table_; ReverseTable reverse_notification_table_; - IDMap<WebKit::WebNotificationPermissionCallback> callback_table_; + IDMap<blink::WebNotificationPermissionCallback> callback_table_; DISALLOW_COPY_AND_ASSIGN(ActiveNotificationTracker); }; diff --git a/content/renderer/active_notification_tracker_unittest.cc b/content/renderer/active_notification_tracker_unittest.cc index 714a0d1..88e8dcd 100644 --- a/content/renderer/active_notification_tracker_unittest.cc +++ b/content/renderer/active_notification_tracker_unittest.cc @@ -10,13 +10,13 @@ namespace content { TEST(ActiveNotificationTrackerTest, TestLookupAndClear) { ActiveNotificationTracker tracker; - WebKit::WebNotification notification1; + blink::WebNotification notification1; int id1 = tracker.RegisterNotification(notification1); - WebKit::WebNotification notification2; + blink::WebNotification notification2; int id2 = tracker.RegisterNotification(notification2); - WebKit::WebNotification result; + blink::WebNotification result; tracker.GetNotification(id1, &result); EXPECT_TRUE(result == notification1); diff --git a/content/renderer/android/content_detector.cc b/content/renderer/android/content_detector.cc index 95caba5..66af041 100644 --- a/content/renderer/android/content_detector.cc +++ b/content/renderer/android/content_detector.cc @@ -9,14 +9,14 @@ #include "third_party/WebKit/public/web/WebHitTestResult.h" #include "third_party/WebKit/public/web/WebSurroundingText.h" -using WebKit::WebRange; -using WebKit::WebSurroundingText; +using blink::WebRange; +using blink::WebSurroundingText; namespace content { ContentDetector::Result::Result() : valid(false) {} -ContentDetector::Result::Result(const WebKit::WebRange& content_boundaries, +ContentDetector::Result::Result(const blink::WebRange& content_boundaries, const std::string& text, const GURL& intent_url) : valid(true), @@ -28,12 +28,12 @@ ContentDetector::Result::Result(const WebKit::WebRange& content_boundaries, ContentDetector::Result::~Result() {} ContentDetector::Result ContentDetector::FindTappedContent( - const WebKit::WebHitTestResult& hit_test) { + const blink::WebHitTestResult& hit_test) { if (hit_test.isNull()) return Result(); std::string content_text; - WebKit::WebRange range = FindContentRange(hit_test, &content_text); + blink::WebRange range = FindContentRange(hit_test, &content_text); if (range.isNull()) return Result(); @@ -42,7 +42,7 @@ ContentDetector::Result ContentDetector::FindTappedContent( } WebRange ContentDetector::FindContentRange( - const WebKit::WebHitTestResult& hit_test, + const blink::WebHitTestResult& hit_test, std::string* content_text) { // As the surrounding text extractor looks at maxLength/2 characters on // either side of the hit point, we need to double max content length here. diff --git a/content/renderer/android/content_detector.h b/content/renderer/android/content_detector.h index d17a585..85ee668 100644 --- a/content/renderer/android/content_detector.h +++ b/content/renderer/android/content_detector.h @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/web/WebRange.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebHitTestResult; } @@ -20,13 +20,13 @@ class ContentDetector { // Holds the content detection results. struct Result { Result(); - Result(const WebKit::WebRange& content_boundaries, + Result(const blink::WebRange& content_boundaries, const std::string& text, const GURL& intent_url); ~Result(); bool valid; - WebKit::WebRange content_boundaries; + blink::WebRange content_boundaries; std::string text; // Processed text of the content. GURL intent_url; // URL of the intent that should process this content. }; @@ -35,7 +35,7 @@ class ContentDetector { // Returns a WebKit range delimiting the contents found around the tapped // position. If no content is found a null range will be returned. - Result FindTappedContent(const WebKit::WebHitTestResult& hit_test); + Result FindTappedContent(const blink::WebHitTestResult& hit_test); protected: ContentDetector() {} @@ -57,7 +57,7 @@ class ContentDetector { // position in order to search for content. virtual size_t GetMaximumContentLength() = 0; - WebKit::WebRange FindContentRange(const WebKit::WebHitTestResult& hit_test, + blink::WebRange FindContentRange(const blink::WebHitTestResult& hit_test, std::string* content_text); DISALLOW_COPY_AND_ASSIGN(ContentDetector); diff --git a/content/renderer/bmp_image_decoder_unittest.cc b/content/renderer/bmp_image_decoder_unittest.cc index 019eeb5..666196a 100644 --- a/content/renderer/bmp_image_decoder_unittest.cc +++ b/content/renderer/bmp_image_decoder_unittest.cc @@ -10,8 +10,8 @@ class BMPImageDecoderTest : public ImageDecoderTest { BMPImageDecoderTest() : ImageDecoderTest("bmp") { } protected: - virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE { - return new WebKit::WebImageDecoder(WebKit::WebImageDecoder::TypeBMP); + virtual blink::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE { + return new blink::WebImageDecoder(blink::WebImageDecoder::TypeBMP); } // The BMPImageDecoderTest tests are really slow under Valgrind. diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc index 77af957..bd78021 100644 --- a/content/renderer/browser_plugin/browser_plugin.cc +++ b/content/renderer/browser_plugin/browser_plugin.cc @@ -43,13 +43,13 @@ #include "base/sys_info.h" #endif -using WebKit::WebCanvas; -using WebKit::WebPluginContainer; -using WebKit::WebPluginParams; -using WebKit::WebPoint; -using WebKit::WebRect; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebCanvas; +using blink::WebPluginContainer; +using blink::WebPluginParams; +using blink::WebPoint; +using blink::WebRect; +using blink::WebURL; +using blink::WebVector; namespace content { @@ -59,7 +59,7 @@ static std::string GetInternalEventName(const char* event_name) { return base::StringPrintf("-internal-%s", event_name); } -typedef std::map<WebKit::WebPluginContainer*, +typedef std::map<blink::WebPluginContainer*, BrowserPlugin*> PluginContainerMap; static base::LazyInstance<PluginContainerMap> g_plugin_container_map = LAZY_INSTANCE_INITIALIZER; @@ -68,7 +68,7 @@ static base::LazyInstance<PluginContainerMap> g_plugin_container_map = BrowserPlugin::BrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, + blink::WebFrame* frame, const WebPluginParams& params) : guest_instance_id_(browser_plugin::kInstanceIDNone), attached_(false), @@ -108,7 +108,7 @@ BrowserPlugin::~BrowserPlugin() { /*static*/ BrowserPlugin* BrowserPlugin::FromContainer( - WebKit::WebPluginContainer* container) { + blink::WebPluginContainer* container) { PluginContainerMap* browser_plugins = g_plugin_container_map.Pointer(); PluginContainerMap::iterator it = browser_plugins->find(container); return it == browser_plugins->end() ? NULL : it->second; @@ -141,14 +141,14 @@ void BrowserPlugin::UpdateDOMAttribute(const std::string& attribute_name, if (!container()) return; - WebKit::WebElement element = container()->element(); - WebKit::WebString web_attribute_name = - WebKit::WebString::fromUTF8(attribute_name); + blink::WebElement element = container()->element(); + blink::WebString web_attribute_name = + blink::WebString::fromUTF8(attribute_name); if (!HasDOMAttribute(attribute_name) || (std::string(element.getAttribute(web_attribute_name).utf8()) != attribute_value)) { element.setAttribute(web_attribute_name, - WebKit::WebString::fromUTF8(attribute_value)); + blink::WebString::fromUTF8(attribute_value)); } } @@ -157,7 +157,7 @@ void BrowserPlugin::RemoveDOMAttribute(const std::string& attribute_name) { return; container()->element().removeAttribute( - WebKit::WebString::fromUTF8(attribute_name)); + blink::WebString::fromUTF8(attribute_name)); } std::string BrowserPlugin::GetDOMAttributeValue( @@ -166,7 +166,7 @@ std::string BrowserPlugin::GetDOMAttributeValue( return std::string(); return container()->element().getAttribute( - WebKit::WebString::fromUTF8(attribute_name)).utf8(); + blink::WebString::fromUTF8(attribute_name)).utf8(); } bool BrowserPlugin::HasDOMAttribute(const std::string& attribute_name) const { @@ -174,7 +174,7 @@ bool BrowserPlugin::HasDOMAttribute(const std::string& attribute_name) const { return false; return container()->element().hasAttribute( - WebKit::WebString::fromUTF8(attribute_name)); + blink::WebString::fromUTF8(attribute_name)); } std::string BrowserPlugin::GetNameAttribute() const { @@ -481,8 +481,8 @@ void BrowserPlugin::OnShouldAcceptTouchEvents(int guest_instance_id, bool accept) { if (container()) { container()->requestTouchEventType(accept ? - WebKit::WebPluginContainer::TouchEventRequestTypeRaw : - WebKit::WebPluginContainer::TouchEventRequestTypeNone); + blink::WebPluginContainer::TouchEventRequestTypeRaw : + blink::WebPluginContainer::TouchEventRequestTypeNone); } } @@ -636,29 +636,29 @@ NPObject* BrowserPlugin::GetContentWindow() const { content_window_routing_id_); if (!guest_render_view) return NULL; - WebKit::WebFrame* guest_frame = guest_render_view->GetWebView()->mainFrame(); + blink::WebFrame* guest_frame = guest_render_view->GetWebView()->mainFrame(); return guest_frame->windowObject(); } // static -bool BrowserPlugin::AttachWindowTo(const WebKit::WebNode& node, int window_id) { +bool BrowserPlugin::AttachWindowTo(const blink::WebNode& node, int window_id) { if (node.isNull()) return false; if (!node.isElementNode()) return false; - WebKit::WebElement shim_element = node.toConst<WebKit::WebElement>(); + blink::WebElement shim_element = node.toConst<blink::WebElement>(); // The shim containing the BrowserPlugin must be attached to a document. if (shim_element.document().isNull()) return false; - WebKit::WebNode shadow_root = shim_element.shadowRoot(); + blink::WebNode shadow_root = shim_element.shadowRoot(); if (shadow_root.isNull() || !shadow_root.hasChildNodes()) return false; - WebKit::WebNode plugin_element = shadow_root.firstChild(); - WebKit::WebPluginContainer* plugin_container = + blink::WebNode plugin_element = shadow_root.firstChild(); + blink::WebPluginContainer* plugin_container = plugin_element.pluginContainer(); if (!plugin_container) return false; @@ -782,7 +782,7 @@ void BrowserPlugin::TriggerEvent(const std::string& event_name, if (!container()) return; - WebKit::WebFrame* frame = container()->element().document().frame(); + blink::WebFrame* frame = container()->element().document().frame(); if (!frame) return; @@ -803,17 +803,17 @@ void BrowserPlugin::TriggerEvent(const std::string& event_name, return; } - WebKit::WebDOMEvent dom_event = frame->document().createEvent("CustomEvent"); - WebKit::WebDOMCustomEvent event = dom_event.to<WebKit::WebDOMCustomEvent>(); + blink::WebDOMEvent dom_event = frame->document().createEvent("CustomEvent"); + blink::WebDOMCustomEvent event = dom_event.to<blink::WebDOMCustomEvent>(); // The events triggered directly from the plugin <object> are internal events // whose implementation details can (and likely will) change over time. The // wrapper/shim (e.g. <webview> tag) should receive these events, and expose a // more appropriate (and stable) event to the consumers as part of the API. event.initCustomEvent( - WebKit::WebString::fromUTF8(GetInternalEventName(event_name.c_str())), + blink::WebString::fromUTF8(GetInternalEventName(event_name.c_str())), false, false, - WebKit::WebSerializedScriptValue::serialize( + blink::WebSerializedScriptValue::serialize( v8::String::New(json_string.c_str(), json_string.size()))); container()->element().dispatchEvent(event); } @@ -835,7 +835,7 @@ bool BrowserPlugin::ShouldGuestBeFocused() const { return plugin_focused_ && embedder_focused; } -WebKit::WebPluginContainer* BrowserPlugin::container() const { +blink::WebPluginContainer* BrowserPlugin::container() const { return container_; } @@ -918,7 +918,7 @@ NPObject* BrowserPlugin::scriptableObject() { NPObject* browser_plugin_np_object(bindings_->np_object()); // The object is expected to be retained before it is returned. - WebKit::WebBindings::retainObject(browser_plugin_np_object); + blink::WebBindings::retainObject(browser_plugin_np_object); return browser_plugin_np_object; } @@ -990,7 +990,7 @@ bool BrowserPlugin::InBounds(const gfx::Point& position) const { gfx::Point BrowserPlugin::ToLocalCoordinates(const gfx::Point& point) const { if (container_) - return container_->windowToLocalPoint(WebKit::WebPoint(point)); + return container_->windowToLocalPoint(blink::WebPoint(point)); return gfx::Point(point.x() - plugin_rect_.x(), point.y() - plugin_rect_.y()); } @@ -1182,34 +1182,34 @@ bool BrowserPlugin::acceptsInputEvents() { return true; } -bool BrowserPlugin::handleInputEvent(const WebKit::WebInputEvent& event, - WebKit::WebCursorInfo& cursor_info) { +bool BrowserPlugin::handleInputEvent(const blink::WebInputEvent& event, + blink::WebCursorInfo& cursor_info) { if (guest_crashed_ || !HasGuestInstanceID()) return false; - if (event.type == WebKit::WebInputEvent::ContextMenu) + if (event.type == blink::WebInputEvent::ContextMenu) return true; - const WebKit::WebInputEvent* modified_event = &event; - scoped_ptr<WebKit::WebTouchEvent> touch_event; + const blink::WebInputEvent* modified_event = &event; + scoped_ptr<blink::WebTouchEvent> touch_event; // WebKit gives BrowserPlugin a list of touches that are down, but the browser // process expects a list of all touches. We modify the TouchEnd event here to // match these expectations. - if (event.type == WebKit::WebInputEvent::TouchEnd) { - const WebKit::WebTouchEvent* orig_touch_event = - static_cast<const WebKit::WebTouchEvent*>(&event); - touch_event.reset(new WebKit::WebTouchEvent()); - memcpy(touch_event.get(), orig_touch_event, sizeof(WebKit::WebTouchEvent)); + if (event.type == blink::WebInputEvent::TouchEnd) { + const blink::WebTouchEvent* orig_touch_event = + static_cast<const blink::WebTouchEvent*>(&event); + touch_event.reset(new blink::WebTouchEvent()); + memcpy(touch_event.get(), orig_touch_event, sizeof(blink::WebTouchEvent)); if (touch_event->changedTouchesLength > 0) { memcpy(&touch_event->touches[touch_event->touchesLength], &touch_event->changedTouches, - touch_event->changedTouchesLength * sizeof(WebKit::WebTouchPoint)); + touch_event->changedTouchesLength * sizeof(blink::WebTouchPoint)); } touch_event->touchesLength += touch_event->changedTouchesLength; modified_event = touch_event.get(); } - if (WebKit::WebInputEvent::isKeyboardEventType(event.type) && + if (blink::WebInputEvent::isKeyboardEventType(event.type) && !edit_commands_.empty()) { browser_plugin_manager()->Send( new BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent( @@ -1228,11 +1228,11 @@ bool BrowserPlugin::handleInputEvent(const WebKit::WebInputEvent& event, return true; } -bool BrowserPlugin::handleDragStatusUpdate(WebKit::WebDragStatus drag_status, - const WebKit::WebDragData& drag_data, - WebKit::WebDragOperationsMask mask, - const WebKit::WebPoint& position, - const WebKit::WebPoint& screen) { +bool BrowserPlugin::handleDragStatusUpdate(blink::WebDragStatus drag_status, + const blink::WebDragData& drag_data, + blink::WebDragOperationsMask mask, + const blink::WebPoint& position, + const blink::WebPoint& screen) { if (guest_crashed_ || !HasGuestInstanceID()) return false; browser_plugin_manager()->Send( @@ -1247,7 +1247,7 @@ bool BrowserPlugin::handleDragStatusUpdate(WebKit::WebDragStatus drag_status, } void BrowserPlugin::didReceiveResponse( - const WebKit::WebURLResponse& response) { + const blink::WebURLResponse& response) { } void BrowserPlugin::didReceiveData(const char* data, int data_length) { @@ -1256,20 +1256,20 @@ void BrowserPlugin::didReceiveData(const char* data, int data_length) { void BrowserPlugin::didFinishLoading() { } -void BrowserPlugin::didFailLoading(const WebKit::WebURLError& error) { +void BrowserPlugin::didFailLoading(const blink::WebURLError& error) { } -void BrowserPlugin::didFinishLoadingFrameRequest(const WebKit::WebURL& url, +void BrowserPlugin::didFinishLoadingFrameRequest(const blink::WebURL& url, void* notify_data) { } void BrowserPlugin::didFailLoadingFrameRequest( - const WebKit::WebURL& url, + const blink::WebURL& url, void* notify_data, - const WebKit::WebURLError& error) { + const blink::WebURLError& error) { } -bool BrowserPlugin::executeEditCommand(const WebKit::WebString& name) { +bool BrowserPlugin::executeEditCommand(const blink::WebString& name) { browser_plugin_manager()->Send(new BrowserPluginHostMsg_ExecuteEditCommand( render_view_routing_id_, guest_instance_id_, @@ -1279,8 +1279,8 @@ bool BrowserPlugin::executeEditCommand(const WebKit::WebString& name) { return true; } -bool BrowserPlugin::executeEditCommand(const WebKit::WebString& name, - const WebKit::WebString& value) { +bool BrowserPlugin::executeEditCommand(const blink::WebString& name, + const blink::WebString& value) { edit_commands_.push_back(EditCommand(name.utf8(), value.utf8())); // BrowserPlugin swallows edit commands. return true; @@ -1302,7 +1302,7 @@ void BrowserPlugin::OnMouseLockLost() { } bool BrowserPlugin::HandleMouseLockedInputEvent( - const WebKit::WebMouseEvent& event) { + const blink::WebMouseEvent& event) { browser_plugin_manager()->Send( new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, guest_instance_id_, diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h index 05a88cc..ad5bad3 100644 --- a/content/renderer/browser_plugin/browser_plugin.h +++ b/content/renderer/browser_plugin/browser_plugin.h @@ -33,7 +33,7 @@ class BrowserPluginManager; class MockBrowserPlugin; class CONTENT_EXPORT BrowserPlugin : - NON_EXPORTED_BASE(public WebKit::WebPlugin), + NON_EXPORTED_BASE(public blink::WebPlugin), public MouseLockDispatcher::LockTarget { public: RenderViewImpl* render_view() const { return render_view_.get(); } @@ -41,7 +41,7 @@ class CONTENT_EXPORT BrowserPlugin : int guest_instance_id() const { return guest_instance_id_; } bool attached() const { return attached_; } - static BrowserPlugin* FromContainer(WebKit::WebPluginContainer* container); + static BrowserPlugin* FromContainer(blink::WebPluginContainer* container); bool OnMessageReceived(const IPC::Message& msg); @@ -101,7 +101,7 @@ class CONTENT_EXPORT BrowserPlugin : // Attaches the window identified by |window_id| to the the given node // encapsulating a BrowserPlugin. - static bool AttachWindowTo(const WebKit::WebNode& node, + static bool AttachWindowTo(const blink::WebNode& node, int window_id); // Informs the guest of an updated focus state. @@ -138,9 +138,9 @@ class CONTENT_EXPORT BrowserPlugin : // Returns whether a message should be forwarded to BrowserPlugin. static bool ShouldForwardToBrowserPlugin(const IPC::Message& message); - // WebKit::WebPlugin implementation. - virtual WebKit::WebPluginContainer* container() const OVERRIDE; - virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE; + // blink::WebPlugin implementation. + virtual blink::WebPluginContainer* container() const OVERRIDE; + virtual bool initialize(blink::WebPluginContainer* container) OVERRIDE; virtual void destroy() OVERRIDE; virtual NPObject* scriptableObject() OVERRIDE; virtual struct _NPP* pluginNPP() OVERRIDE; @@ -148,45 +148,45 @@ class CONTENT_EXPORT BrowserPlugin : virtual bool supportsEditCommands() const OVERRIDE; virtual bool canProcessDrag() const OVERRIDE; virtual void paint( - WebKit::WebCanvas* canvas, - const WebKit::WebRect& rect) OVERRIDE; + blink::WebCanvas* canvas, + const blink::WebRect& rect) OVERRIDE; virtual void updateGeometry( - const WebKit::WebRect& frame_rect, - const WebKit::WebRect& clip_rect, - const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, + const blink::WebRect& frame_rect, + const blink::WebRect& clip_rect, + const blink::WebVector<blink::WebRect>& cut_outs_rects, bool is_visible) OVERRIDE; virtual void updateFocus(bool focused) OVERRIDE; virtual void updateVisibility(bool visible) OVERRIDE; virtual bool acceptsInputEvents() OVERRIDE; virtual bool handleInputEvent( - const WebKit::WebInputEvent& event, - WebKit::WebCursorInfo& cursor_info) OVERRIDE; - virtual bool handleDragStatusUpdate(WebKit::WebDragStatus drag_status, - const WebKit::WebDragData& drag_data, - WebKit::WebDragOperationsMask mask, - const WebKit::WebPoint& position, - const WebKit::WebPoint& screen) OVERRIDE; + const blink::WebInputEvent& event, + blink::WebCursorInfo& cursor_info) OVERRIDE; + virtual bool handleDragStatusUpdate(blink::WebDragStatus drag_status, + const blink::WebDragData& drag_data, + blink::WebDragOperationsMask mask, + const blink::WebPoint& position, + const blink::WebPoint& screen) OVERRIDE; virtual void didReceiveResponse( - const WebKit::WebURLResponse& response) OVERRIDE; + const blink::WebURLResponse& response) OVERRIDE; virtual void didReceiveData(const char* data, int data_length) OVERRIDE; virtual void didFinishLoading() OVERRIDE; - virtual void didFailLoading(const WebKit::WebURLError& error) OVERRIDE; + virtual void didFailLoading(const blink::WebURLError& error) OVERRIDE; virtual void didFinishLoadingFrameRequest( - const WebKit::WebURL& url, + const blink::WebURL& url, void* notify_data) OVERRIDE; virtual void didFailLoadingFrameRequest( - const WebKit::WebURL& url, + const blink::WebURL& url, void* notify_data, - const WebKit::WebURLError& error) OVERRIDE; - virtual bool executeEditCommand(const WebKit::WebString& name) OVERRIDE; - virtual bool executeEditCommand(const WebKit::WebString& name, - const WebKit::WebString& value) OVERRIDE; + const blink::WebURLError& error) OVERRIDE; + virtual bool executeEditCommand(const blink::WebString& name) OVERRIDE; + virtual bool executeEditCommand(const blink::WebString& name, + const blink::WebString& value) OVERRIDE; // MouseLockDispatcher::LockTarget implementation. virtual void OnLockMouseACK(bool succeeded) OVERRIDE; virtual void OnMouseLockLost() OVERRIDE; virtual bool HandleMouseLockedInputEvent( - const WebKit::WebMouseEvent& event) OVERRIDE; + const blink::WebMouseEvent& event) OVERRIDE; private: friend class base::DeleteHelper<BrowserPlugin>; @@ -206,8 +206,8 @@ class CONTENT_EXPORT BrowserPlugin : // guest WebContents that's hosted by this BrowserPlugin. BrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params); + blink::WebFrame* frame, + const blink::WebPluginParams& params); virtual ~BrowserPlugin(); @@ -307,7 +307,7 @@ class CONTENT_EXPORT BrowserPlugin : // If the |render_view_| is destroyed before the BrowserPlugin is destroyed // then we will attempt to access a NULL pointer. int render_view_routing_id_; - WebKit::WebPluginContainer* container_; + blink::WebPluginContainer* container_; scoped_ptr<BrowserPluginBindings> bindings_; scoped_ptr<BrowserPluginBackingStore> backing_store_; scoped_ptr<base::SharedMemory> current_damage_buffer_; diff --git a/content/renderer/browser_plugin/browser_plugin_bindings.cc b/content/renderer/browser_plugin/browser_plugin_bindings.cc index 5dd5231..ffeafcf 100644 --- a/content/renderer/browser_plugin/browser_plugin_bindings.cc +++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc @@ -28,12 +28,12 @@ #include "third_party/npapi/bindings/npapi.h" #include "v8/include/v8.h" -using WebKit::WebBindings; -using WebKit::WebElement; -using WebKit::WebDOMEvent; -using WebKit::WebDOMMessageEvent; -using WebKit::WebPluginContainer; -using WebKit::WebString; +using blink::WebBindings; +using blink::WebElement; +using blink::WebDOMEvent; +using blink::WebDOMMessageEvent; +using blink::WebPluginContainer; +using blink::WebString; namespace content { @@ -242,7 +242,7 @@ class BrowserPluginBindingAttach: public BrowserPluginMethodBinding { return false; scoped_ptr<V8ValueConverter> converter(V8ValueConverter::create()); - v8::Handle<v8::Value> obj(WebKit::WebBindings::toV8Value(&args[0])); + v8::Handle<v8::Value> obj(blink::WebBindings::toV8Value(&args[0])); scoped_ptr<base::Value> value( converter->FromV8Value(obj, bindings->instance()->render_view()-> GetWebView()->mainFrame()->mainWorldScriptContext())); @@ -272,7 +272,7 @@ class BrowserPluginBindingAttachWindowTo : public BrowserPluginMethodBinding { virtual bool Invoke(BrowserPluginBindings* bindings, const NPVariant* args, NPVariant* result) OVERRIDE { - WebKit::WebNode node; + blink::WebNode node; WebBindings::getNode(NPVARIANT_TO_OBJECT(args[0]), &node); int window_id = IntFromNPVariant(args[1]); BOOLEAN_TO_NPVARIANT(BrowserPlugin::AttachWindowTo(node, window_id), diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc index d12b45b..fab51e5 100644 --- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc +++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc @@ -61,7 +61,7 @@ class TestContentRendererClient : public ContentRendererClient { virtual ~TestContentRendererClient() { } virtual bool AllowBrowserPlugin( - WebKit::WebPluginContainer* container) OVERRIDE { + blink::WebPluginContainer* container) OVERRIDE { // Allow BrowserPlugin for tests. return true; } @@ -114,7 +114,7 @@ std::string BrowserPluginTest::ExecuteScriptAndReturnString( const std::string& script) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue( - WebKit::WebScriptSource(WebKit::WebString::fromUTF8(script.c_str()))); + blink::WebScriptSource(blink::WebString::fromUTF8(script.c_str()))); if (value.IsEmpty() || !value->IsString()) return std::string(); @@ -129,7 +129,7 @@ int BrowserPluginTest::ExecuteScriptAndReturnInt( const std::string& script) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue( - WebKit::WebScriptSource(WebKit::WebString::fromUTF8(script.c_str()))); + blink::WebScriptSource(blink::WebString::fromUTF8(script.c_str()))); if (value.IsEmpty() || !value->IsInt32()) return 0; @@ -142,7 +142,7 @@ bool BrowserPluginTest::ExecuteScriptAndReturnBool( const std::string& script, bool* result) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Handle<v8::Value> value = GetMainFrame()->executeScriptAndReturnValue( - WebKit::WebScriptSource(WebKit::WebString::fromUTF8(script.c_str()))); + blink::WebScriptSource(blink::WebString::fromUTF8(script.c_str()))); if (value.IsEmpty() || !value->IsBoolean()) return false; diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc index 12e5f34..e2b4a69 100644 --- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc +++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc @@ -32,7 +32,7 @@ BrowserPluginCompositingHelper::SwapBuffersInfo::SwapBuffersInfo() } BrowserPluginCompositingHelper::BrowserPluginCompositingHelper( - WebKit::WebPluginContainer* container, + blink::WebPluginContainer* container, BrowserPluginManager* manager, int instance_id, int host_routing_id) diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h index 93eba2f..a1d1603 100644 --- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h +++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h @@ -28,7 +28,7 @@ class DelegatedFrameResourceCollection; class DelegatedRendererLayer; } -namespace WebKit { +namespace blink { class WebPluginContainer; class WebLayer; } @@ -40,7 +40,7 @@ class BrowserPluginManager; class CONTENT_EXPORT BrowserPluginCompositingHelper : public base::RefCounted<BrowserPluginCompositingHelper> { public: - BrowserPluginCompositingHelper(WebKit::WebPluginContainer* container, + BrowserPluginCompositingHelper(blink::WebPluginContainer* container, BrowserPluginManager* manager, int instance_id, int host_routing_id); @@ -106,8 +106,8 @@ class CONTENT_EXPORT BrowserPluginCompositingHelper : scoped_refptr<cc::SolidColorLayer> background_layer_; scoped_refptr<cc::TextureLayer> texture_layer_; scoped_refptr<cc::DelegatedRendererLayer> delegated_layer_; - scoped_ptr<WebKit::WebLayer> web_layer_; - WebKit::WebPluginContainer* container_; + scoped_ptr<blink::WebLayer> web_layer_; + blink::WebPluginContainer* container_; scoped_refptr<BrowserPluginManager> browser_plugin_manager_; }; diff --git a/content/renderer/browser_plugin/browser_plugin_manager.h b/content/renderer/browser_plugin/browser_plugin_manager.h index 7e08a1e..687e62c 100644 --- a/content/renderer/browser_plugin/browser_plugin_manager.h +++ b/content/renderer/browser_plugin/browser_plugin_manager.h @@ -12,7 +12,7 @@ #include "content/public/renderer/render_view_observer.h" #include "ipc/ipc_sender.h" -namespace WebKit { +namespace blink { class WebFrame; struct WebPluginParams; } @@ -46,8 +46,8 @@ class CONTENT_EXPORT BrowserPluginManager // responsible for removing its association via RemoveBrowserPlugin. virtual BrowserPlugin* CreateBrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) = 0; + blink::WebFrame* frame, + const blink::WebPluginParams& params) = 0; // Asynchronously requests a new browser-process-allocated instance ID. // After the browser process allocates an ID, it calls back into the diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc index e7732f8..18ebeca 100644 --- a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc +++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc @@ -24,8 +24,8 @@ BrowserPluginManagerImpl::~BrowserPluginManagerImpl() { BrowserPlugin* BrowserPluginManagerImpl::CreateBrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) { + blink::WebFrame* frame, + const blink::WebPluginParams& params) { return new BrowserPlugin(render_view, frame, params); } diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.h b/content/renderer/browser_plugin/browser_plugin_manager_impl.h index 30ee72c..45f4ece 100644 --- a/content/renderer/browser_plugin/browser_plugin_manager_impl.h +++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.h @@ -23,8 +23,8 @@ class BrowserPluginManagerImpl : public BrowserPluginManager { // BrowserPluginManager implementation. virtual BrowserPlugin* CreateBrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) OVERRIDE; + blink::WebFrame* frame, + const blink::WebPluginParams& params) OVERRIDE; virtual void AllocateInstanceID( const base::WeakPtr<BrowserPlugin>& browser_plugin) OVERRIDE; diff --git a/content/renderer/browser_plugin/mock_browser_plugin.cc b/content/renderer/browser_plugin/mock_browser_plugin.cc index 39b2d2d..f39b13a 100644 --- a/content/renderer/browser_plugin/mock_browser_plugin.cc +++ b/content/renderer/browser_plugin/mock_browser_plugin.cc @@ -8,8 +8,8 @@ namespace content { MockBrowserPlugin::MockBrowserPlugin(RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) + blink::WebFrame* frame, + const blink::WebPluginParams& params) : BrowserPlugin(render_view, frame, params) { } diff --git a/content/renderer/browser_plugin/mock_browser_plugin.h b/content/renderer/browser_plugin/mock_browser_plugin.h index acd001b..76621b5 100644 --- a/content/renderer/browser_plugin/mock_browser_plugin.h +++ b/content/renderer/browser_plugin/mock_browser_plugin.h @@ -12,8 +12,8 @@ namespace content { class MockBrowserPlugin : public BrowserPlugin { public: MockBrowserPlugin(RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params); + blink::WebFrame* frame, + const blink::WebPluginParams& params); virtual ~MockBrowserPlugin(); diff --git a/content/renderer/browser_plugin/mock_browser_plugin_manager.cc b/content/renderer/browser_plugin/mock_browser_plugin_manager.cc index 9007f6e..c3656400 100644 --- a/content/renderer/browser_plugin/mock_browser_plugin_manager.cc +++ b/content/renderer/browser_plugin/mock_browser_plugin_manager.cc @@ -22,8 +22,8 @@ MockBrowserPluginManager::~MockBrowserPluginManager() { BrowserPlugin* MockBrowserPluginManager::CreateBrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) { + blink::WebFrame* frame, + const blink::WebPluginParams& params) { return new MockBrowserPlugin(render_view, frame, params); } diff --git a/content/renderer/browser_plugin/mock_browser_plugin_manager.h b/content/renderer/browser_plugin/mock_browser_plugin_manager.h index 78ae0be..544d263 100644 --- a/content/renderer/browser_plugin/mock_browser_plugin_manager.h +++ b/content/renderer/browser_plugin/mock_browser_plugin_manager.h @@ -20,8 +20,8 @@ class MockBrowserPluginManager : public BrowserPluginManager { // BrowserPluginManager implementation. virtual BrowserPlugin* CreateBrowserPlugin( RenderViewImpl* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) OVERRIDE; + blink::WebFrame* frame, + const blink::WebPluginParams& params) OVERRIDE; virtual void AllocateInstanceID( const base::WeakPtr<BrowserPlugin>& browser_plugin) OVERRIDE; diff --git a/content/renderer/clipboard_utils.cc b/content/renderer/clipboard_utils.cc index d146f67..28c04c9 100644 --- a/content/renderer/clipboard_utils.cc +++ b/content/renderer/clipboard_utils.cc @@ -11,8 +11,8 @@ namespace content { -std::string URLToMarkup(const WebKit::WebURL& url, - const WebKit::WebString& title) { +std::string URLToMarkup(const blink::WebURL& url, + const blink::WebString& title) { std::string markup("<a href=\""); markup.append(url.spec()); markup.append("\">"); @@ -22,8 +22,8 @@ std::string URLToMarkup(const WebKit::WebURL& url, return markup; } -std::string URLToImageMarkup(const WebKit::WebURL& url, - const WebKit::WebString& title) { +std::string URLToImageMarkup(const blink::WebURL& url, + const blink::WebString& title) { std::string markup("<img src=\""); markup.append(net::EscapeForHTML(url.spec())); markup.append("\""); diff --git a/content/renderer/clipboard_utils.h b/content/renderer/clipboard_utils.h index e767907..3acf7b4 100644 --- a/content/renderer/clipboard_utils.h +++ b/content/renderer/clipboard_utils.h @@ -9,18 +9,18 @@ #include "content/common/content_export.h" -namespace WebKit { +namespace blink { class WebString; class WebURL; } namespace content { -CONTENT_EXPORT std::string URLToMarkup(const WebKit::WebURL& url, - const WebKit::WebString& title); +CONTENT_EXPORT std::string URLToMarkup(const blink::WebURL& url, + const blink::WebString& title); -CONTENT_EXPORT std::string URLToImageMarkup(const WebKit::WebURL& url, - const WebKit::WebString& title); +CONTENT_EXPORT std::string URLToImageMarkup(const blink::WebURL& url, + const blink::WebString& title); } // namespace content diff --git a/content/renderer/context_menu_params_builder.cc b/content/renderer/context_menu_params_builder.cc index e8cd078..f864459 100644 --- a/content/renderer/context_menu_params_builder.cc +++ b/content/renderer/context_menu_params_builder.cc @@ -16,7 +16,7 @@ namespace content { // static ContextMenuParams ContextMenuParamsBuilder::Build( - const WebKit::WebContextMenuData& data) { + const blink::WebContextMenuData& data) { ContextMenuParams params; params.media_type = data.mediaType; params.x = data.mousePosition.x; @@ -55,7 +55,7 @@ ContextMenuParams ContextMenuParamsBuilder::Build( params.frame_page_state = HistoryItemToPageState(data.frameHistoryItem); if (!params.link_url.is_empty()) { - WebKit::WebNode selectedNode = data.node; + blink::WebNode selectedNode = data.node; // If there are other embedded tags (like <a ..>Some <b>text</b></a>) // we need to extract the parent <a/> node. @@ -63,7 +63,7 @@ ContextMenuParams ContextMenuParamsBuilder::Build( selectedNode = selectedNode.parentNode(); } - WebKit::WebElement selectedElement = selectedNode.to<WebKit::WebElement>(); + blink::WebElement selectedElement = selectedNode.to<blink::WebElement>(); if (selectedNode.isLink() && !selectedElement.isNull()) { params.link_text = selectedElement.innerText(); } else { diff --git a/content/renderer/context_menu_params_builder.h b/content/renderer/context_menu_params_builder.h index 414d61b..624f855 100644 --- a/content/renderer/context_menu_params_builder.h +++ b/content/renderer/context_menu_params_builder.h @@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_CONTEXT_MENU_PARAMS_BUILDER_H_ #define CONTENT_RENDERER_CONTEXT_MENU_PARAMS_BUILDER_H_ -namespace WebKit { +namespace blink { struct WebContextMenuData; } @@ -14,7 +14,7 @@ struct ContextMenuParams; class ContextMenuParamsBuilder { public: - static ContextMenuParams Build(const WebKit::WebContextMenuData& data); + static ContextMenuParams Build(const blink::WebContextMenuData& data); }; } // namespace content diff --git a/content/renderer/cpp_bound_class_unittest.cc b/content/renderer/cpp_bound_class_unittest.cc index 2c0f75f..0aeab77 100644 --- a/content/renderer/cpp_bound_class_unittest.cc +++ b/content/renderer/cpp_bound_class_unittest.cc @@ -59,7 +59,7 @@ class TestObserver : public RenderViewObserver { public: explicit TestObserver(RenderView* render_view) : RenderViewObserver(render_view) {} - virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE { + virtual void DidClearWindowObject(blink::WebFrame* frame) OVERRIDE { example_bound_class_.BindToJavascript(frame, "example"); } void set_fallback_method_enabled(bool use_fallback) { @@ -80,7 +80,7 @@ class CppBoundClassTest : public RenderViewTest { observer_.reset(new TestObserver(view_)); observer_->set_fallback_method_enabled(useFallback()); - WebKit::WebURLRequest url_request; + blink::WebURLRequest url_request; url_request.initialize(); url_request.setURL(GURL(kAboutBlankURL)); diff --git a/content/renderer/cursor_utils.cc b/content/renderer/cursor_utils.cc index 80351c9..97085b2 100644 --- a/content/renderer/cursor_utils.cc +++ b/content/renderer/cursor_utils.cc @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/web/WebCursorInfo.h" #include "webkit/common/cursors/webcursor.h" -using WebKit::WebCursorInfo; +using blink::WebCursorInfo; namespace content { diff --git a/content/renderer/cursor_utils.h b/content/renderer/cursor_utils.h index 2e594af..e19f758 100644 --- a/content/renderer/cursor_utils.h +++ b/content/renderer/cursor_utils.h @@ -7,20 +7,20 @@ class WebCursor; -namespace WebKit { +namespace blink { struct WebCursorInfo; } namespace content { -// Adapts our cursor info to WebKit::WebCursorInfo. +// Adapts our cursor info to blink::WebCursorInfo. bool GetWebKitCursorInfo(const WebCursor& cursor, - WebKit::WebCursorInfo* webkit_cursor_info); + blink::WebCursorInfo* webkit_cursor_info); -// Adapts WebKit::CursorInfo to our cursor. +// Adapts blink::CursorInfo to our cursor. void InitializeCursorFromWebKitCursorInfo( WebCursor* cursor, - const WebKit::WebCursorInfo& webkit_cursor_info); + const blink::WebCursorInfo& webkit_cursor_info); } // namespace content diff --git a/content/renderer/date_time_formatter.cc b/content/renderer/date_time_formatter.cc index a0ce77b..1b94049 100644 --- a/content/renderer/date_time_formatter.cc +++ b/content/renderer/date_time_formatter.cc @@ -77,10 +77,10 @@ static const char* FindLongestTimePatternWhichMatches(const std::string& value, } DateTimeFormatter::DateTimeFormatter( - const WebKit::WebDateTimeChooserParams& source) + const blink::WebDateTimeChooserParams& source) : formatted_string_(source.currentValue.utf8()) { CreatePatternMap(); - if (source.type == WebKit::WebDateTimeInputTypeTime) + if (source.type == blink::WebDateTimeInputTypeTime) time_pattern_ = FindLongestTimePatternWhichMatches(formatted_string_, source.step); ExtractType(source); @@ -214,27 +214,27 @@ const std::string DateTimeFormatter::FormatString() const { } void DateTimeFormatter::ExtractType( - const WebKit::WebDateTimeChooserParams& source) { + const blink::WebDateTimeChooserParams& source) { switch (source.type) { - case WebKit::WebDateTimeInputTypeDate: + case blink::WebDateTimeInputTypeDate: type_ = ui::TEXT_INPUT_TYPE_DATE; break; - case WebKit::WebDateTimeInputTypeDateTime: + case blink::WebDateTimeInputTypeDateTime: type_ = ui::TEXT_INPUT_TYPE_DATE_TIME; break; - case WebKit::WebDateTimeInputTypeDateTimeLocal: + case blink::WebDateTimeInputTypeDateTimeLocal: type_ = ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL; break; - case WebKit::WebDateTimeInputTypeMonth: + case blink::WebDateTimeInputTypeMonth: type_ = ui::TEXT_INPUT_TYPE_MONTH; break; - case WebKit::WebDateTimeInputTypeTime: + case blink::WebDateTimeInputTypeTime: type_ = ui::TEXT_INPUT_TYPE_TIME; break; - case WebKit::WebDateTimeInputTypeWeek: + case blink::WebDateTimeInputTypeWeek: type_ = ui::TEXT_INPUT_TYPE_WEEK; break; - case WebKit::WebDateTimeInputTypeNone: + case blink::WebDateTimeInputTypeNone: default: type_ = ui::TEXT_INPUT_TYPE_NONE; } diff --git a/content/renderer/date_time_formatter.h b/content/renderer/date_time_formatter.h index b2b7341..b91e117 100644 --- a/content/renderer/date_time_formatter.h +++ b/content/renderer/date_time_formatter.h @@ -13,9 +13,9 @@ #include "third_party/icu/source/i18n/unicode/gregocal.h" #include "ui/base/ime/text_input_type.h" -namespace WebKit { +namespace blink { struct WebDateTimeChooserParams; -} // namespace WebKit +} // namespace blink namespace content { @@ -24,7 +24,7 @@ namespace content { // It is timezone agnostic. class CONTENT_EXPORT DateTimeFormatter { public: - explicit DateTimeFormatter(const WebKit::WebDateTimeChooserParams& source); + explicit DateTimeFormatter(const blink::WebDateTimeChooserParams& source); DateTimeFormatter(ui::TextInputType type, int year, int month, @@ -55,7 +55,7 @@ class CONTENT_EXPORT DateTimeFormatter { const std::string FormatString() const; int ExtractValue( const icu::Calendar* calendar, UCalendarDateFields value) const; - void ExtractType(const WebKit::WebDateTimeChooserParams& source); + void ExtractType(const blink::WebDateTimeChooserParams& source); void ClearAll(); ui::TextInputType type_; diff --git a/content/renderer/date_time_formatter_unittest.cc b/content/renderer/date_time_formatter_unittest.cc index 0d8b07f..b521188 100644 --- a/content/renderer/date_time_formatter_unittest.cc +++ b/content/renderer/date_time_formatter_unittest.cc @@ -17,9 +17,9 @@ class RendererDateTimePickerTest { }; TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { - WebKit::WebDateTimeChooserParams params; + blink::WebDateTimeChooserParams params; params.currentValue = "2010-07"; - params.type = WebKit::WebDateTimeInputTypeMonth; + params.type = blink::WebDateTimeInputTypeMonth; DateTimeFormatter sut(params); EXPECT_EQ(2010, sut.GetYear()); @@ -36,7 +36,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_MONTH, sut.GetType()); params.currentValue = "2012-05-25"; - params.type = WebKit::WebDateTimeInputTypeDate; + params.type = blink::WebDateTimeInputTypeDate; DateTimeFormatter sut2(params); EXPECT_EQ(2012, sut2.GetYear()); EXPECT_EQ(4, sut2.GetMonth()); @@ -49,7 +49,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_DATE, sut2.GetType()); params.currentValue = "2013-05-21T12:15"; - params.type = WebKit::WebDateTimeInputTypeDateTimeLocal; + params.type = blink::WebDateTimeInputTypeDateTimeLocal; DateTimeFormatter sut3(params); EXPECT_EQ(2013, sut3.GetYear()); EXPECT_EQ(4, sut3.GetMonth()); @@ -62,7 +62,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL, sut3.GetType()); params.currentValue = "2013-W15"; - params.type = WebKit::WebDateTimeInputTypeWeek; + params.type = blink::WebDateTimeInputTypeWeek; DateTimeFormatter sut4(params); EXPECT_EQ(2013, sut4.GetYear()); EXPECT_EQ(3, sut4.GetMonth()); @@ -75,7 +75,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_WEEK, sut4.GetType()); params.currentValue = "12:15"; - params.type = WebKit::WebDateTimeInputTypeTime; + params.type = blink::WebDateTimeInputTypeTime; DateTimeFormatter sut5(params); EXPECT_EQ(12, sut5.GetHour()); EXPECT_EQ(15, sut5.GetMinute()); @@ -84,7 +84,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_TIME, sut5.GetType()); params.currentValue = "12:15:02"; - params.type = WebKit::WebDateTimeInputTypeTime; + params.type = blink::WebDateTimeInputTypeTime; DateTimeFormatter sut6(params); EXPECT_EQ(12, sut6.GetHour()); EXPECT_EQ(15, sut6.GetMinute()); @@ -93,7 +93,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_TIME, sut6.GetType()); params.currentValue = "12:15:02.1"; - params.type = WebKit::WebDateTimeInputTypeTime; + params.type = blink::WebDateTimeInputTypeTime; DateTimeFormatter sut7(params); EXPECT_EQ(12, sut7.GetHour()); EXPECT_EQ(15, sut7.GetMinute()); @@ -102,7 +102,7 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { EXPECT_EQ(ui::TEXT_INPUT_TYPE_TIME, sut7.GetType()); params.currentValue = "12:15:02.123"; - params.type = WebKit::WebDateTimeInputTypeTime; + params.type = blink::WebDateTimeInputTypeTime; DateTimeFormatter sut8(params); EXPECT_EQ(12, sut8.GetHour()); EXPECT_EQ(15, sut8.GetMinute()); @@ -115,9 +115,9 @@ TEST(RendererDateTimePickerTest, TestParserValidStringInputs) { TEST(RendererDateTimePickerTest, TestParserInvalidStringInputs) { // Random non parsable text - WebKit::WebDateTimeChooserParams params; + blink::WebDateTimeChooserParams params; params.currentValue = "<script injection"; - params.type = WebKit::WebDateTimeInputTypeMonth; + params.type = blink::WebDateTimeInputTypeMonth; DateTimeFormatter sut(params); EXPECT_EQ(0, sut.GetYear()); EXPECT_EQ(0, sut.GetMonth()); @@ -129,7 +129,7 @@ TEST(RendererDateTimePickerTest, TestParserInvalidStringInputs) { // unimplemented type params.currentValue = "week 23"; - params.type = WebKit::WebDateTimeInputTypeWeek; // Not implemented + params.type = blink::WebDateTimeInputTypeWeek; // Not implemented DateTimeFormatter sut2(params); EXPECT_EQ(0, sut2.GetYear()); EXPECT_EQ(0, sut2.GetMonth()); @@ -141,7 +141,7 @@ TEST(RendererDateTimePickerTest, TestParserInvalidStringInputs) { // type is a subset of pattern params.currentValue = "2012-05-25"; - params.type = WebKit::WebDateTimeInputTypeDateTimeLocal; + params.type = blink::WebDateTimeInputTypeDateTimeLocal; DateTimeFormatter sut3(params); EXPECT_EQ(0, sut3.GetYear()); EXPECT_EQ(0, sut3.GetMonth()); @@ -153,7 +153,7 @@ TEST(RendererDateTimePickerTest, TestParserInvalidStringInputs) { // type is a superset of pattern params.currentValue = "2013-05-21T12:15"; - params.type = WebKit::WebDateTimeInputTypeMonth; + params.type = blink::WebDateTimeInputTypeMonth; DateTimeFormatter sut4(params); EXPECT_EQ(2013, sut4.GetYear()); EXPECT_EQ(4, sut4.GetMonth()); diff --git a/content/renderer/device_orientation/device_motion_event_pump.cc b/content/renderer/device_orientation/device_motion_event_pump.cc index e7ad8ca..c60bd7a 100644 --- a/content/renderer/device_orientation/device_motion_event_pump.cc +++ b/content/renderer/device_orientation/device_motion_event_pump.cc @@ -22,7 +22,7 @@ DeviceMotionEventPump::~DeviceMotionEventPump() { } bool DeviceMotionEventPump::SetListener( - WebKit::WebDeviceMotionListener* listener) { + blink::WebDeviceMotionListener* listener) { listener_ = listener; return listener_ ? RequestStart() : Stop(); } @@ -39,7 +39,7 @@ bool DeviceMotionEventPump::OnControlMessageReceived( void DeviceMotionEventPump::FireEvent() { DCHECK(listener_); - WebKit::WebDeviceMotionData data; + blink::WebDeviceMotionData data; if (reader_->GetLatestData(&data) && data.allAvailableSensorsAreActive) listener_->didChangeDeviceMotion(data); } diff --git a/content/renderer/device_orientation/device_motion_event_pump.h b/content/renderer/device_orientation/device_motion_event_pump.h index 4fa453d..f262ad4 100644 --- a/content/renderer/device_orientation/device_motion_event_pump.h +++ b/content/renderer/device_orientation/device_motion_event_pump.h @@ -10,13 +10,13 @@ #include "content/renderer/shared_memory_seqlock_reader.h" #include "third_party/WebKit/public/platform/WebDeviceMotionData.h" -namespace WebKit { +namespace blink { class WebDeviceMotionListener; } namespace content { -typedef SharedMemorySeqLockReader<WebKit::WebDeviceMotionData> +typedef SharedMemorySeqLockReader<blink::WebDeviceMotionData> DeviceMotionSharedMemoryReader; class CONTENT_EXPORT DeviceMotionEventPump : public DeviceSensorEventPump { @@ -27,7 +27,7 @@ class CONTENT_EXPORT DeviceMotionEventPump : public DeviceSensorEventPump { // Sets the listener to receive updates for device motion data at // regular intervals. Returns true if the registration was successful. - bool SetListener(WebKit::WebDeviceMotionListener* listener); + bool SetListener(blink::WebDeviceMotionListener* listener); // RenderProcessObserver implementation. virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; @@ -38,7 +38,7 @@ class CONTENT_EXPORT DeviceMotionEventPump : public DeviceSensorEventPump { virtual bool SendStartMessage() OVERRIDE; virtual bool SendStopMessage() OVERRIDE; - WebKit::WebDeviceMotionListener* listener_; + blink::WebDeviceMotionListener* listener_; scoped_ptr<DeviceMotionSharedMemoryReader> reader_; }; diff --git a/content/renderer/device_orientation/device_motion_event_pump_unittest.cc b/content/renderer/device_orientation/device_motion_event_pump_unittest.cc index 7ec3e04..6cb78b6 100644 --- a/content/renderer/device_orientation/device_motion_event_pump_unittest.cc +++ b/content/renderer/device_orientation/device_motion_event_pump_unittest.cc @@ -17,14 +17,14 @@ namespace content { class DeviceMotionEventPumpTest : public testing::Test { }; -class MockDeviceMotionListener : public WebKit::WebDeviceMotionListener { +class MockDeviceMotionListener : public blink::WebDeviceMotionListener { public: MockDeviceMotionListener(); virtual ~MockDeviceMotionListener() { } virtual void didChangeDeviceMotion( - const WebKit::WebDeviceMotionData&) OVERRIDE; + const blink::WebDeviceMotionData&) OVERRIDE; bool did_change_device_motion_; - WebKit::WebDeviceMotionData data_; + blink::WebDeviceMotionData data_; }; MockDeviceMotionListener::MockDeviceMotionListener() @@ -33,7 +33,7 @@ MockDeviceMotionListener::MockDeviceMotionListener() } void MockDeviceMotionListener::didChangeDeviceMotion( - const WebKit::WebDeviceMotionData& data) { + const blink::WebDeviceMotionData& data) { memcpy(&data_, &data, sizeof(data)); did_change_device_motion_ = true; } @@ -71,7 +71,7 @@ TEST_F(DeviceMotionEventPumpTest, MAYBE_DidStartPolling) { memset(buffer, 0, sizeof(DeviceMotionHardwareBuffer)); shared_memory.ShareToProcess(base::kNullProcessHandle, &handle); - WebKit::WebDeviceMotionData& data = buffer->data; + blink::WebDeviceMotionData& data = buffer->data; data.accelerationX = 1; data.hasAccelerationX = true; data.accelerationY = 2; @@ -87,7 +87,7 @@ TEST_F(DeviceMotionEventPumpTest, MAYBE_DidStartPolling) { RunAllPendingInMessageLoop(); motion_pump->SetListener(0); - WebKit::WebDeviceMotionData& received_data = listener->data_; + blink::WebDeviceMotionData& received_data = listener->data_; EXPECT_TRUE(listener->did_change_device_motion_); EXPECT_TRUE(received_data.hasAccelerationX); EXPECT_EQ(1, (double)received_data.accelerationX); @@ -128,7 +128,7 @@ TEST_F(DeviceMotionEventPumpTest, MAYBE_DidStartPollingNotAllSensorsActive) { memset(buffer, 0, sizeof(DeviceMotionHardwareBuffer)); shared_memory.ShareToProcess(base::kNullProcessHandle, &handle); - WebKit::WebDeviceMotionData& data = buffer->data; + blink::WebDeviceMotionData& data = buffer->data; data.accelerationX = 1; data.hasAccelerationX = true; data.accelerationY = 2; @@ -144,7 +144,7 @@ TEST_F(DeviceMotionEventPumpTest, MAYBE_DidStartPollingNotAllSensorsActive) { RunAllPendingInMessageLoop(); motion_pump->SetListener(0); - WebKit::WebDeviceMotionData& received_data = listener->data_; + blink::WebDeviceMotionData& received_data = listener->data_; // No change in device motion because allAvailableSensorsAreActive is false. EXPECT_FALSE(listener->did_change_device_motion_); EXPECT_FALSE(received_data.hasAccelerationX); diff --git a/content/renderer/device_orientation/device_orientation_event_pump.cc b/content/renderer/device_orientation/device_orientation_event_pump.cc index ca45537..1493043 100644 --- a/content/renderer/device_orientation/device_orientation_event_pump.cc +++ b/content/renderer/device_orientation/device_orientation_event_pump.cc @@ -26,7 +26,7 @@ DeviceOrientationEventPump::~DeviceOrientationEventPump() { } bool DeviceOrientationEventPump::SetListener( - WebKit::WebDeviceOrientationListener* listener) { + blink::WebDeviceOrientationListener* listener) { listener_ = listener; return listener_ ? RequestStart() : Stop(); } @@ -43,7 +43,7 @@ bool DeviceOrientationEventPump::OnControlMessageReceived( void DeviceOrientationEventPump::FireEvent() { DCHECK(listener_); - WebKit::WebDeviceOrientationData data; + blink::WebDeviceOrientationData data; if (reader_->GetLatestData(&data) && ShouldFireEvent(data)) { memcpy(&data_, &data, sizeof(data)); listener_->didChangeDeviceOrientation(data); @@ -59,7 +59,7 @@ static bool IsSignificantlyDifferent(bool hasAngle1, double angle1, } bool DeviceOrientationEventPump::ShouldFireEvent( - const WebKit::WebDeviceOrientationData& data) const { + const blink::WebDeviceOrientationData& data) const { return data.allAvailableSensorsAreActive && (IsSignificantlyDifferent( data_.hasAlpha, data_.alpha, data.hasAlpha, data.alpha) || diff --git a/content/renderer/device_orientation/device_orientation_event_pump.h b/content/renderer/device_orientation/device_orientation_event_pump.h index 26658ff..ac7f31c 100644 --- a/content/renderer/device_orientation/device_orientation_event_pump.h +++ b/content/renderer/device_orientation/device_orientation_event_pump.h @@ -10,13 +10,13 @@ #include "content/renderer/shared_memory_seqlock_reader.h" #include "third_party/WebKit/public/platform/WebDeviceOrientationData.h" -namespace WebKit { +namespace blink { class WebDeviceOrientationListener; } namespace content { -typedef SharedMemorySeqLockReader<WebKit::WebDeviceOrientationData> +typedef SharedMemorySeqLockReader<blink::WebDeviceOrientationData> DeviceOrientationSharedMemoryReader; class CONTENT_EXPORT DeviceOrientationEventPump : public DeviceSensorEventPump { @@ -31,7 +31,7 @@ class CONTENT_EXPORT DeviceOrientationEventPump : public DeviceSensorEventPump { // Sets the listener to receive updates for device orientation data at // regular intervals. Returns true if the registration was successful. - bool SetListener(WebKit::WebDeviceOrientationListener* listener); + bool SetListener(blink::WebDeviceOrientationListener* listener); // RenderProcessObserver implementation. virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; @@ -42,10 +42,10 @@ class CONTENT_EXPORT DeviceOrientationEventPump : public DeviceSensorEventPump { virtual bool SendStartMessage() OVERRIDE; virtual bool SendStopMessage() OVERRIDE; - bool ShouldFireEvent(const WebKit::WebDeviceOrientationData& data) const; + bool ShouldFireEvent(const blink::WebDeviceOrientationData& data) const; - WebKit::WebDeviceOrientationListener* listener_; - WebKit::WebDeviceOrientationData data_; + blink::WebDeviceOrientationListener* listener_; + blink::WebDeviceOrientationData data_; scoped_ptr<DeviceOrientationSharedMemoryReader> reader_; }; diff --git a/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc b/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc index e1f568b..402cd07 100644 --- a/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc +++ b/content/renderer/device_orientation/device_orientation_event_pump_unittest.cc @@ -14,15 +14,15 @@ namespace content { class MockDeviceOrientationListener - : public WebKit::WebDeviceOrientationListener { + : public blink::WebDeviceOrientationListener { public: MockDeviceOrientationListener(); virtual ~MockDeviceOrientationListener() { } virtual void didChangeDeviceOrientation( - const WebKit::WebDeviceOrientationData&) OVERRIDE; + const blink::WebDeviceOrientationData&) OVERRIDE; void ResetDidChangeOrientation(); bool did_change_device_orientation_; - WebKit::WebDeviceOrientationData data_; + blink::WebDeviceOrientationData data_; }; MockDeviceOrientationListener::MockDeviceOrientationListener() @@ -31,7 +31,7 @@ MockDeviceOrientationListener::MockDeviceOrientationListener() } void MockDeviceOrientationListener::didChangeDeviceOrientation( - const WebKit::WebDeviceOrientationData& data) { + const blink::WebDeviceOrientationData& data) { memcpy(&data_, &data, sizeof(data)); did_change_device_orientation_ = true; } @@ -75,7 +75,7 @@ class DeviceOrientationEventPumpTest : public testing::Test { } void InitBuffer() { - WebKit::WebDeviceOrientationData& data = buffer_->data; + blink::WebDeviceOrientationData& data = buffer_->data; data.alpha = 1; data.hasAlpha = true; data.beta = 2; @@ -107,7 +107,7 @@ TEST_F(DeviceOrientationEventPumpTest, MAYBE_DidStartPolling) { base::MessageLoop::current()->Run(); - WebKit::WebDeviceOrientationData& received_data = listener_->data_; + blink::WebDeviceOrientationData& received_data = listener_->data_; EXPECT_TRUE(listener_->did_change_device_orientation_); EXPECT_TRUE(received_data.allAvailableSensorsAreActive); EXPECT_EQ(1, (double)received_data.alpha); @@ -136,7 +136,7 @@ TEST_F(DeviceOrientationEventPumpTest, base::MessageLoop::current()->Run(); - WebKit::WebDeviceOrientationData& received_data = listener_->data_; + blink::WebDeviceOrientationData& received_data = listener_->data_; EXPECT_TRUE(listener_->did_change_device_orientation_); EXPECT_TRUE(received_data.allAvailableSensorsAreActive); EXPECT_EQ(1, (double)received_data.alpha); diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc index 6b83e8d..5c37855 100644 --- a/content/renderer/devtools/devtools_agent.cc +++ b/content/renderer/devtools/devtools_agent.cc @@ -29,15 +29,15 @@ #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" #endif -using WebKit::WebConsoleMessage; -using WebKit::WebDevToolsAgent; -using WebKit::WebDevToolsAgentClient; -using WebKit::WebFrame; -using WebKit::WebPoint; -using WebKit::WebString; -using WebKit::WebCString; -using WebKit::WebVector; -using WebKit::WebView; +using blink::WebConsoleMessage; +using blink::WebDevToolsAgent; +using blink::WebDevToolsAgentClient; +using blink::WebFrame; +using blink::WebPoint; +using blink::WebString; +using blink::WebCString; +using blink::WebVector; +using blink::WebView; using base::debug::TraceLog; @@ -108,7 +108,7 @@ bool DevToolsAgent::OnMessageReceived(const IPC::Message& message) { } void DevToolsAgent::sendMessageToInspectorFrontend( - const WebKit::WebString& message) { + const blink::WebString& message) { Send(new DevToolsClientMsg_DispatchOnInspectorFrontend(routing_id(), message.utf8())); } @@ -118,11 +118,11 @@ int DevToolsAgent::hostIdentifier() { } void DevToolsAgent::saveAgentRuntimeState( - const WebKit::WebString& state) { + const blink::WebString& state) { Send(new DevToolsHostMsg_SaveAgentRuntimeState(routing_id(), state.utf8())); } -WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* +blink::WebDevToolsAgentClient::WebKitClientMessageLoop* DevToolsAgent::createClientMessageLoop() { return new WebKitClientMessageLoopImpl(); } @@ -171,8 +171,8 @@ void DevToolsAgent::TraceEventCallbackWrapper( } void DevToolsAgent::enableDeviceEmulation( - const WebKit::WebSize& device_size, - const WebKit::WebRect& view_rect, + const blink::WebSize& device_size, + const blink::WebRect& view_rect, float device_scale_factor, bool fit_to_view) { RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); @@ -188,7 +188,7 @@ void DevToolsAgent::disableDeviceEmulation() { #if defined(USE_TCMALLOC) && !defined(OS_WIN) static void AllocationVisitor(void* data, const void* ptr) { - typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; + typedef blink::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; Visitor* visitor = reinterpret_cast<Visitor*>(data); visitor->visitObject(ptr); } diff --git a/content/renderer/devtools/devtools_agent.h b/content/renderer/devtools/devtools_agent.h index 45d5566..fcefaaf 100644 --- a/content/renderer/devtools/devtools_agent.h +++ b/content/renderer/devtools/devtools_agent.h @@ -14,7 +14,7 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebDevToolsAgentClient.h" -namespace WebKit { +namespace blink { class WebDevToolsAgent; } @@ -26,7 +26,7 @@ class RenderViewImpl; // agents infrastructure are flowing through this communication agent. // There is a corresponding DevToolsClient object on the client side. class DevToolsAgent : public RenderViewObserver, - public WebKit::WebDevToolsAgentClient { + public blink::WebDevToolsAgentClient { public: explicit DevToolsAgent(RenderViewImpl* render_view); virtual ~DevToolsAgent(); @@ -34,7 +34,7 @@ class DevToolsAgent : public RenderViewObserver, // Returns agent instance for its host id. static DevToolsAgent* FromHostId(int host_id); - WebKit::WebDevToolsAgent* GetWebAgent(); + blink::WebDevToolsAgent* GetWebAgent(); bool IsAttached(); @@ -45,11 +45,11 @@ class DevToolsAgent : public RenderViewObserver, virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // WebDevToolsAgentClient implementation - virtual void sendMessageToInspectorFrontend(const WebKit::WebString& data); + virtual void sendMessageToInspectorFrontend(const blink::WebString& data); virtual int hostIdentifier(); - virtual void saveAgentRuntimeState(const WebKit::WebString& state); - virtual WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* + virtual void saveAgentRuntimeState(const blink::WebString& state); + virtual blink::WebDevToolsAgentClient::WebKitClientMessageLoop* createClientMessageLoop(); virtual void clearBrowserCache(); virtual void clearBrowserCookies(); @@ -63,8 +63,8 @@ class DevToolsAgent : public RenderViewObserver, virtual void setTraceEventCallback(TraceEventCallback cb); virtual void enableDeviceEmulation( - const WebKit::WebSize& device_size, - const WebKit::WebRect& view_rect, float device_scale_factor, + const blink::WebSize& device_size, + const blink::WebRect& view_rect, float device_scale_factor, bool fit_to_view); virtual void disableDeviceEmulation(); diff --git a/content/renderer/devtools/devtools_agent_filter.cc b/content/renderer/devtools/devtools_agent_filter.cc index 1613ad8..fc9e34f 100644 --- a/content/renderer/devtools/devtools_agent_filter.cc +++ b/content/renderer/devtools/devtools_agent_filter.cc @@ -11,8 +11,8 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/web/WebDevToolsAgent.h" -using WebKit::WebDevToolsAgent; -using WebKit::WebString; +using blink::WebDevToolsAgent; +using blink::WebString; namespace content { diff --git a/content/renderer/devtools/devtools_client.cc b/content/renderer/devtools/devtools_client.cc index 5793d2c..41b9481 100644 --- a/content/renderer/devtools/devtools_client.cc +++ b/content/renderer/devtools/devtools_client.cc @@ -18,8 +18,8 @@ #include "ui/base/ui_base_switches.h" #include "webkit/common/appcache/appcache_interfaces.h" -using WebKit::WebDevToolsFrontend; -using WebKit::WebString; +using blink::WebDevToolsFrontend; +using blink::WebString; namespace content { diff --git a/content/renderer/devtools/devtools_client.h b/content/renderer/devtools/devtools_client.h index 1c9d3f8..be1e902 100644 --- a/content/renderer/devtools/devtools_client.h +++ b/content/renderer/devtools/devtools_client.h @@ -12,7 +12,7 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebDevToolsFrontendClient.h" -namespace WebKit { +namespace blink { class WebDevToolsFrontend; class WebString; } @@ -29,7 +29,7 @@ class RenderViewImpl; // code in glue class CONTENT_EXPORT DevToolsClient : public RenderViewObserver, - NON_EXPORTED_BASE(public WebKit::WebDevToolsFrontendClient) { + NON_EXPORTED_BASE(public blink::WebDevToolsFrontendClient) { public: explicit DevToolsClient(RenderViewImpl* render_view); virtual ~DevToolsClient(); @@ -39,14 +39,14 @@ class CONTENT_EXPORT DevToolsClient virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // WebDevToolsFrontendClient implementation. - virtual void sendMessageToBackend(const WebKit::WebString&) OVERRIDE; - virtual void sendMessageToEmbedder(const WebKit::WebString&) OVERRIDE; + virtual void sendMessageToBackend(const blink::WebString&) OVERRIDE; + virtual void sendMessageToEmbedder(const blink::WebString&) OVERRIDE; virtual bool isUnderTest() OVERRIDE; void OnDispatchOnInspectorFrontend(const std::string& message); - scoped_ptr<WebKit::WebDevToolsFrontend> web_tools_frontend_; + scoped_ptr<blink::WebDevToolsFrontend> web_tools_frontend_; DISALLOW_COPY_AND_ASSIGN(DevToolsClient); }; diff --git a/content/renderer/disambiguation_popup_helper.cc b/content/renderer/disambiguation_popup_helper.cc index 88f2e51..9fff7b9 100644 --- a/content/renderer/disambiguation_popup_helper.cc +++ b/content/renderer/disambiguation_popup_helper.cc @@ -7,8 +7,8 @@ #include "third_party/WebKit/public/platform/WebRect.h" #include "ui/gfx/size_conversions.h" -using WebKit::WebRect; -using WebKit::WebVector; +using blink::WebRect; +using blink::WebVector; namespace { diff --git a/content/renderer/disambiguation_popup_helper.h b/content/renderer/disambiguation_popup_helper.h index 535683d..0238f8a 100644 --- a/content/renderer/disambiguation_popup_helper.h +++ b/content/renderer/disambiguation_popup_helper.h @@ -13,7 +13,7 @@ class Rect; class Size; } -namespace WebKit { +namespace blink { struct WebRect; } @@ -24,7 +24,7 @@ class DisambiguationPopupHelper { public: CONTENT_EXPORT static float ComputeZoomAreaAndScaleFactor( const gfx::Rect& tap_rect, - const WebKit::WebVector<WebKit::WebRect>& target_rects, + const blink::WebVector<blink::WebRect>& target_rects, const gfx::Size& screen_size, const gfx::Size& visible_content_size, float total_scale, diff --git a/content/renderer/disambiguation_popup_helper_unittest.cc b/content/renderer/disambiguation_popup_helper_unittest.cc index 0b6d002..8cbbe4b 100644 --- a/content/renderer/disambiguation_popup_helper_unittest.cc +++ b/content/renderer/disambiguation_popup_helper_unittest.cc @@ -33,7 +33,7 @@ class DisambiguationPopupHelperUnittest : public testing::Test { TEST_F(DisambiguationPopupHelperUnittest, ClipByViewport) { gfx::Rect tap_rect(1000, 1000, 10, 10); - WebKit::WebVector<WebKit::WebRect> target_rects(static_cast<size_t>(1)); + blink::WebVector<blink::WebRect> target_rects(static_cast<size_t>(1)); target_rects[0] = gfx::Rect(-20, -20, 10, 10); gfx::Rect zoom_rect; @@ -50,7 +50,7 @@ TEST_F(DisambiguationPopupHelperUnittest, ClipByViewport) { TEST_F(DisambiguationPopupHelperUnittest, MiniTarget) { gfx::Rect tap_rect(-5, -5, 20, 20); - WebKit::WebVector<WebKit::WebRect> target_rects(static_cast<size_t>(1)); + blink::WebVector<blink::WebRect> target_rects(static_cast<size_t>(1)); target_rects[0] = gfx::Rect(10, 10, 1, 1); gfx::Rect zoom_rect; @@ -68,7 +68,7 @@ TEST_F(DisambiguationPopupHelperUnittest, MiniTarget) { TEST_F(DisambiguationPopupHelperUnittest, LongLinks) { gfx::Rect tap_rect(10, 10, 20, 20); - WebKit::WebVector<WebKit::WebRect> target_rects(static_cast<size_t>(2)); + blink::WebVector<blink::WebRect> target_rects(static_cast<size_t>(2)); target_rects[0] = gfx::Rect(15, 15, 1000, 5); target_rects[1] = gfx::Rect(15, 25, 1000, 5); diff --git a/content/renderer/dom_serializer_browsertest.cc b/content/renderer/dom_serializer_browsertest.cc index 2239998..e6aae19 100644 --- a/content/renderer/dom_serializer_browsertest.cc +++ b/content/renderer/dom_serializer_browsertest.cc @@ -35,21 +35,21 @@ #include "third_party/WebKit/public/web/WebPageSerializerClient.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebCString; -using WebKit::WebData; -using WebKit::WebDocument; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebNode; -using WebKit::WebNodeCollection; -using WebKit::WebNodeList; -using WebKit::WebPageSerializer; -using WebKit::WebPageSerializerClient; -using WebKit::WebNode; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebView; -using WebKit::WebVector; +using blink::WebCString; +using blink::WebData; +using blink::WebDocument; +using blink::WebElement; +using blink::WebFrame; +using blink::WebNode; +using blink::WebNodeCollection; +using blink::WebNodeList; +using blink::WebPageSerializer; +using blink::WebPageSerializerClient; +using blink::WebNode; +using blink::WebString; +using blink::WebURL; +using blink::WebView; +using blink::WebVector; namespace content { @@ -150,7 +150,7 @@ class LoadObserver : public RenderViewObserver { : RenderViewObserver(render_view), quit_closure_(quit_closure) {} - virtual void DidFinishLoad(WebKit::WebFrame* frame) OVERRIDE { + virtual void DidFinishLoad(blink::WebFrame* frame) OVERRIDE { if (frame == render_view()->GetWebView()->mainFrame()) quit_closure_.Run(); } diff --git a/content/renderer/dom_storage/dom_storage_dispatcher.cc b/content/renderer/dom_storage/dom_storage_dispatcher.cc index 8759153b..b4daaad 100644 --- a/content/renderer/dom_storage/dom_storage_dispatcher.cc +++ b/content/renderer/dom_storage/dom_storage_dispatcher.cc @@ -142,7 +142,7 @@ class DomStorageDispatcher::ProxyImpl : public DOMStorageProxy { // to more reliably commit changes during shutdown. void PushPendingCallback(const CompletionCallback& callback) { if (pending_callbacks_.empty()) - WebKit::Platform::current()->suddenTerminationChanged(false); + blink::Platform::current()->suddenTerminationChanged(false); pending_callbacks_.push_back(callback); } @@ -150,7 +150,7 @@ class DomStorageDispatcher::ProxyImpl : public DOMStorageProxy { CompletionCallback callback = pending_callbacks_.front(); pending_callbacks_.pop_front(); if (pending_callbacks_.empty()) - WebKit::Platform::current()->suddenTerminationChanged(true); + blink::Platform::current()->suddenTerminationChanged(true); return callback; } @@ -316,7 +316,7 @@ void DomStorageDispatcher::OnStorageEvent( } if (params.namespace_id == kLocalStorageNamespaceId) { - WebKit::WebStorageEventDispatcher::dispatchLocalStorageEvent( + blink::WebStorageEventDispatcher::dispatchLocalStorageEvent( params.key, params.old_value, params.new_value, @@ -327,7 +327,7 @@ void DomStorageDispatcher::OnStorageEvent( } else { WebStorageNamespaceImpl session_namespace_for_event_dispatch(params.namespace_id); - WebKit::WebStorageEventDispatcher::dispatchSessionStorageEvent( + blink::WebStorageEventDispatcher::dispatchSessionStorageEvent( params.key, params.old_value, params.new_value, diff --git a/content/renderer/dom_storage/webstoragearea_impl.cc b/content/renderer/dom_storage/webstoragearea_impl.cc index d5bf07d..c307535 100644 --- a/content/renderer/dom_storage/webstoragearea_impl.cc +++ b/content/renderer/dom_storage/webstoragearea_impl.cc @@ -14,8 +14,8 @@ #include "content/renderer/render_thread_impl.h" #include "third_party/WebKit/public/platform/WebURL.h" -using WebKit::WebString; -using WebKit::WebURL; +using blink::WebString; +using blink::WebURL; namespace content { diff --git a/content/renderer/dom_storage/webstoragearea_impl.h b/content/renderer/dom_storage/webstoragearea_impl.h index 7854562..24056ce 100644 --- a/content/renderer/dom_storage/webstoragearea_impl.h +++ b/content/renderer/dom_storage/webstoragearea_impl.h @@ -16,7 +16,7 @@ namespace content { class DOMStorageCachedArea; -class WebStorageAreaImpl : public WebKit::WebStorageArea { +class WebStorageAreaImpl : public blink::WebStorageArea { public: static WebStorageAreaImpl* FromConnectionId(int id); @@ -25,14 +25,14 @@ class WebStorageAreaImpl : public WebKit::WebStorageArea { // See WebStorageArea.h for documentation on these functions. virtual unsigned length(); - virtual WebKit::WebString key(unsigned index); - virtual WebKit::WebString getItem(const WebKit::WebString& key); + virtual blink::WebString key(unsigned index); + virtual blink::WebString getItem(const blink::WebString& key); virtual void setItem( - const WebKit::WebString& key, const WebKit::WebString& value, - const WebKit::WebURL& page_url, WebStorageArea::Result& result); + const blink::WebString& key, const blink::WebString& value, + const blink::WebURL& page_url, WebStorageArea::Result& result); virtual void removeItem( - const WebKit::WebString& key, const WebKit::WebURL& page_url); - virtual void clear(const WebKit::WebURL& url); + const blink::WebString& key, const blink::WebURL& page_url); + virtual void clear(const blink::WebURL& url); virtual size_t memoryBytesUsedByCache() const; private: diff --git a/content/renderer/dom_storage/webstoragenamespace_impl.cc b/content/renderer/dom_storage/webstoragenamespace_impl.cc index d5f1dc5..531263d 100644 --- a/content/renderer/dom_storage/webstoragenamespace_impl.cc +++ b/content/renderer/dom_storage/webstoragenamespace_impl.cc @@ -10,9 +10,9 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "url/gurl.h" -using WebKit::WebStorageArea; -using WebKit::WebStorageNamespace; -using WebKit::WebString; +using blink::WebStorageArea; +using blink::WebStorageNamespace; +using blink::WebString; namespace content { diff --git a/content/renderer/dom_storage/webstoragenamespace_impl.h b/content/renderer/dom_storage/webstoragenamespace_impl.h index 52c1b35..364e648 100644 --- a/content/renderer/dom_storage/webstoragenamespace_impl.h +++ b/content/renderer/dom_storage/webstoragenamespace_impl.h @@ -10,7 +10,7 @@ namespace content { -class WebStorageNamespaceImpl : public WebKit::WebStorageNamespace { +class WebStorageNamespaceImpl : public blink::WebStorageNamespace { public: // The default constructor creates a local storage namespace, the second // constructor should be used for session storage namepaces. @@ -19,9 +19,9 @@ class WebStorageNamespaceImpl : public WebKit::WebStorageNamespace { virtual ~WebStorageNamespaceImpl(); // See WebStorageNamespace.h for documentation on these functions. - virtual WebKit::WebStorageArea* createStorageArea( - const WebKit::WebString& origin); - virtual WebKit::WebStorageNamespace* copy(); + virtual blink::WebStorageArea* createStorageArea( + const blink::WebString& origin); + virtual blink::WebStorageNamespace* copy(); virtual bool isSameNamespace(const WebStorageNamespace&) const; private: diff --git a/content/renderer/drop_data_builder.cc b/content/renderer/drop_data_builder.cc index 56bc81a..f9e5c42 100644 --- a/content/renderer/drop_data_builder.cc +++ b/content/renderer/drop_data_builder.cc @@ -11,15 +11,15 @@ #include "third_party/WebKit/public/platform/WebVector.h" #include "ui/base/clipboard/clipboard.h" -using WebKit::WebDragData; -using WebKit::WebVector; +using blink::WebDragData; +using blink::WebVector; namespace content { //static DropData DropDataBuilder::Build(const WebDragData& drag_data) { DropData result; - result.referrer_policy = WebKit::WebReferrerPolicyDefault; + result.referrer_policy = blink::WebReferrerPolicyDefault; const WebVector<WebDragData::Item>& item_list = drag_data.items(); for (size_t i = 0; i < item_list.size(); ++i) { diff --git a/content/renderer/drop_data_builder.h b/content/renderer/drop_data_builder.h index 4870d47..2dfb7b9 100644 --- a/content/renderer/drop_data_builder.h +++ b/content/renderer/drop_data_builder.h @@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_DROP_DATA_BUILDER_H_ #define CONTENT_RENDERER_DROP_DATA_BUILDER_H_ -namespace WebKit { +namespace blink { class WebDragData; } @@ -14,7 +14,7 @@ struct DropData; class DropDataBuilder { public: - static DropData Build(const WebKit::WebDragData& data); + static DropData Build(const blink::WebDragData& data); }; } // namespace content diff --git a/content/renderer/external_popup_menu.cc b/content/renderer/external_popup_menu.cc index 070ccd3..0cb922b 100644 --- a/content/renderer/external_popup_menu.cc +++ b/content/renderer/external_popup_menu.cc @@ -14,8 +14,8 @@ namespace content { ExternalPopupMenu::ExternalPopupMenu( RenderViewImpl* render_view, - const WebKit::WebPopupMenuInfo& popup_menu_info, - WebKit::WebExternalPopupMenuClient* popup_menu_client) + const blink::WebPopupMenuInfo& popup_menu_info, + blink::WebExternalPopupMenuClient* popup_menu_client) : render_view_(render_view), popup_menu_info_(popup_menu_info), popup_menu_client_(popup_menu_client), @@ -26,8 +26,8 @@ void ExternalPopupMenu::SetOriginScaleForEmulation(float scale) { origin_scale_for_emulation_ = scale; } -void ExternalPopupMenu::show(const WebKit::WebRect& bounds) { - WebKit::WebRect rect = bounds; +void ExternalPopupMenu::show(const blink::WebRect& bounds) { + blink::WebRect rect = bounds; if (origin_scale_for_emulation_) { rect.x *= origin_scale_for_emulation_; rect.y *= origin_scale_for_emulation_; diff --git a/content/renderer/external_popup_menu.h b/content/renderer/external_popup_menu.h index 28d65ac..6266542 100644 --- a/content/renderer/external_popup_menu.h +++ b/content/renderer/external_popup_menu.h @@ -12,18 +12,18 @@ #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" #include "ui/gfx/point.h" -namespace WebKit { +namespace blink { class WebExternalPopupMenuClient; } namespace content { class RenderViewImpl; -class ExternalPopupMenu : public WebKit::WebExternalPopupMenu { +class ExternalPopupMenu : public blink::WebExternalPopupMenu { public: ExternalPopupMenu(RenderViewImpl* render_view, - const WebKit::WebPopupMenuInfo& popup_menu_info, - WebKit::WebExternalPopupMenuClient* popup_menu_client); + const blink::WebPopupMenuInfo& popup_menu_info, + blink::WebExternalPopupMenuClient* popup_menu_client); virtual ~ExternalPopupMenu() {} @@ -40,14 +40,14 @@ class ExternalPopupMenu : public WebKit::WebExternalPopupMenu { void DidSelectItems(bool canceled, const std::vector<int>& selected_indices); #endif - // WebKit::WebExternalPopupMenu implementation: - virtual void show(const WebKit::WebRect& bounds); + // blink::WebExternalPopupMenu implementation: + virtual void show(const blink::WebRect& bounds); virtual void close(); private: RenderViewImpl* render_view_; - WebKit::WebPopupMenuInfo popup_menu_info_; - WebKit::WebExternalPopupMenuClient* popup_menu_client_; + blink::WebPopupMenuInfo popup_menu_info_; + blink::WebExternalPopupMenuClient* popup_menu_client_; // Popups may be displaced when screen metrics emulation is enabled. // This scale is used to properly adjust popup position. diff --git a/content/renderer/external_popup_menu_browsertest.cc b/content/renderer/external_popup_menu_browsertest.cc index 30e5397..fd6041d 100644 --- a/content/renderer/external_popup_menu_browsertest.cc +++ b/content/renderer/external_popup_menu_browsertest.cc @@ -31,7 +31,7 @@ class ExternalPopupMenuTest : public RenderViewTest { virtual void SetUp() { RenderViewTest::SetUp(); // We need to set this explictly as RenderMain is not run. - WebKit::WebView::setUseExternalPopupMenus(true); + blink::WebView::setUseExternalPopupMenus(true); std::string html = "<select id='mySelect' onchange='selectChanged(this)'>" " <option>zero</option>" @@ -52,7 +52,7 @@ class ExternalPopupMenuTest : public RenderViewTest { LoadHTML(html.c_str()); // Set a minimum size and give focus so simulated events work. - view()->webwidget()->resize(WebKit::WebSize(500, 500)); + view()->webwidget()->resize(blink::WebSize(500, 500)); view()->webwidget()->setFocus(true); } diff --git a/content/renderer/fetchers/alt_error_page_resource_fetcher.cc b/content/renderer/fetchers/alt_error_page_resource_fetcher.cc index cbcab09..56cb6b8 100644 --- a/content/renderer/fetchers/alt_error_page_resource_fetcher.cc +++ b/content/renderer/fetchers/alt_error_page_resource_fetcher.cc @@ -8,10 +8,10 @@ #include "base/bind_helpers.h" #include "content/renderer/fetchers/resource_fetcher.h" -using WebKit::WebFrame; -using WebKit::WebURLError; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebURLError; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/fetchers/alt_error_page_resource_fetcher.h b/content/renderer/fetchers/alt_error_page_resource_fetcher.h index 6d82857..7fcf34c 100644 --- a/content/renderer/fetchers/alt_error_page_resource_fetcher.h +++ b/content/renderer/fetchers/alt_error_page_resource_fetcher.h @@ -11,7 +11,7 @@ #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebFrame; class WebURLResponse; } @@ -26,16 +26,16 @@ class AltErrorPageResourceFetcher { // This will be called when the alternative error page has been fetched, // successfully or not. If there is a failure, the third parameter (the // data) will be empty. - typedef base::Callback<void(WebKit::WebFrame*, - const WebKit::WebURLRequest&, - const WebKit::WebURLError&, + typedef base::Callback<void(blink::WebFrame*, + const blink::WebURLRequest&, + const blink::WebURLError&, const std::string&)> Callback; AltErrorPageResourceFetcher( const GURL& url, - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& original_request, - const WebKit::WebURLError& original_error, + blink::WebFrame* frame, + const blink::WebURLRequest& original_request, + const blink::WebURLError& original_error, const Callback& callback); ~AltErrorPageResourceFetcher(); @@ -43,22 +43,22 @@ class AltErrorPageResourceFetcher { void Cancel(); private: - void OnURLFetchComplete(const WebKit::WebURLResponse& response, + void OnURLFetchComplete(const blink::WebURLResponse& response, const std::string& data); // Does the actual fetching. scoped_ptr<ResourceFetcherWithTimeout> fetcher_; - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; Callback callback_; // The original request. If loading the alternate error page fails, it's // needed to generate the error page. - WebKit::WebURLRequest original_request_; + blink::WebURLRequest original_request_; // The error associated with this load. If there's an error talking with the // alt error page server, we need this to complete the original load. - WebKit::WebURLError original_error_; + blink::WebURLError original_error_; DISALLOW_COPY_AND_ASSIGN(AltErrorPageResourceFetcher); }; diff --git a/content/renderer/fetchers/image_resource_fetcher.cc b/content/renderer/fetchers/image_resource_fetcher.cc index 0ce0d4e..fe6d1cd 100644 --- a/content/renderer/fetchers/image_resource_fetcher.cc +++ b/content/renderer/fetchers/image_resource_fetcher.cc @@ -12,9 +12,9 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/size.h" -using WebKit::WebFrame; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/fetchers/image_resource_fetcher.h b/content/renderer/fetchers/image_resource_fetcher.h index 2ddb20d..a7d16c1 100644 --- a/content/renderer/fetchers/image_resource_fetcher.h +++ b/content/renderer/fetchers/image_resource_fetcher.h @@ -22,10 +22,10 @@ class ImageResourceFetcher { ImageResourceFetcher( const GURL& image_url, - WebKit::WebFrame* frame, + blink::WebFrame* frame, int id, int image_size, - WebKit::WebURLRequest::TargetType target_type, + blink::WebURLRequest::TargetType target_type, const Callback& callback); virtual ~ImageResourceFetcher(); @@ -38,7 +38,7 @@ class ImageResourceFetcher { private: // ResourceFetcher::Callback. Decodes the image and invokes callback_. - void OnURLFetchComplete(const WebKit::WebURLResponse& response, + void OnURLFetchComplete(const blink::WebURLResponse& response, const std::string& data); Callback callback_; diff --git a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc index 304abe8..f910406 100644 --- a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc +++ b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc @@ -11,9 +11,9 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/size.h" -using WebKit::WebFrame; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h index 3e7c326..4377a26 100644 --- a/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h +++ b/content/renderer/fetchers/multi_resolution_image_resource_fetcher.h @@ -24,9 +24,9 @@ class MultiResolutionImageResourceFetcher{ MultiResolutionImageResourceFetcher( const GURL& image_url, - WebKit::WebFrame* frame, + blink::WebFrame* frame, int id, - WebKit::WebURLRequest::TargetType target_type, + blink::WebURLRequest::TargetType target_type, const Callback& callback); virtual ~MultiResolutionImageResourceFetcher(); @@ -42,7 +42,7 @@ class MultiResolutionImageResourceFetcher{ private: // ResourceFetcher::Callback. Decodes the image and invokes callback_. - void OnURLFetchComplete(const WebKit::WebURLResponse& response, + void OnURLFetchComplete(const blink::WebURLResponse& response, const std::string& data); Callback callback_; diff --git a/content/renderer/fetchers/resource_fetcher.cc b/content/renderer/fetchers/resource_fetcher.cc index 455f59e..ccdda07 100644 --- a/content/renderer/fetchers/resource_fetcher.cc +++ b/content/renderer/fetchers/resource_fetcher.cc @@ -15,11 +15,11 @@ #include "third_party/WebKit/public/web/WebKit.h" using base::TimeDelta; -using WebKit::WebFrame; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { @@ -54,7 +54,7 @@ void ResourceFetcher::Start(WebFrame* frame) { request.setFirstPartyForCookies(frame->document().firstPartyForCookies()); frame->dispatchWillSendRequest(request); - loader_.reset(WebKit::Platform::current()->createURLLoader()); + loader_.reset(blink::Platform::current()->createURLLoader()); loader_->loadAsynchronously(request, this); } diff --git a/content/renderer/fetchers/resource_fetcher.h b/content/renderer/fetchers/resource_fetcher.h index 5900973..038dc55 100644 --- a/content/renderer/fetchers/resource_fetcher.h +++ b/content/renderer/fetchers/resource_fetcher.h @@ -27,7 +27,7 @@ class GURL; -namespace WebKit { +namespace blink { class WebFrame; class WebURLLoader; struct WebURLError; @@ -36,18 +36,18 @@ struct WebURLError; namespace content { class CONTENT_EXPORT ResourceFetcher - : NON_EXPORTED_BASE(public WebKit::WebURLLoaderClient) { + : NON_EXPORTED_BASE(public blink::WebURLLoaderClient) { public: // This will be called when the URL has been fetched, successfully or not. // If there is a failure, response and data will both be empty. |response| // and |data| are both valid until the URLFetcher instance is destroyed. - typedef base::Callback<void(const WebKit::WebURLResponse&, + typedef base::Callback<void(const blink::WebURLResponse&, const std::string&)> Callback; // We need a frame to make requests. ResourceFetcher( - const GURL& url, WebKit::WebFrame* frame, - WebKit::WebURLRequest::TargetType target_type, + const GURL& url, blink::WebFrame* frame, + blink::WebURLRequest::TargetType target_type, const Callback& callback); virtual ~ResourceFetcher(); @@ -59,43 +59,43 @@ class CONTENT_EXPORT ResourceFetcher protected: // WebURLLoaderClient methods: virtual void willSendRequest( - WebKit::WebURLLoader* loader, WebKit::WebURLRequest& new_request, - const WebKit::WebURLResponse& redirect_response); + blink::WebURLLoader* loader, blink::WebURLRequest& new_request, + const blink::WebURLResponse& redirect_response); virtual void didSendData( - WebKit::WebURLLoader* loader, unsigned long long bytes_sent, + blink::WebURLLoader* loader, unsigned long long bytes_sent, unsigned long long total_bytes_to_be_sent); virtual void didReceiveResponse( - WebKit::WebURLLoader* loader, const WebKit::WebURLResponse& response); + blink::WebURLLoader* loader, const blink::WebURLResponse& response); virtual void didReceiveCachedMetadata( - WebKit::WebURLLoader* loader, const char* data, int data_length); + blink::WebURLLoader* loader, const char* data, int data_length); virtual void didReceiveData( - WebKit::WebURLLoader* loader, const char* data, int data_length, + blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length); virtual void didFinishLoading( - WebKit::WebURLLoader* loader, double finishTime); + blink::WebURLLoader* loader, double finishTime); virtual void didFail( - WebKit::WebURLLoader* loader, const WebKit::WebURLError& error); + blink::WebURLLoader* loader, const blink::WebURLError& error); - scoped_ptr<WebKit::WebURLLoader> loader_; + scoped_ptr<blink::WebURLLoader> loader_; // URL we're fetching GURL url_; // Target type - WebKit::WebURLRequest::TargetType target_type_; + blink::WebURLRequest::TargetType target_type_; // A copy of the original resource response - WebKit::WebURLResponse response_; + blink::WebURLResponse response_; // Set to true once the request is compelte. bool completed_; private: // Start the actual download. - void Start(WebKit::WebFrame* frame); + void Start(blink::WebFrame* frame); - void RunCallback(const WebKit::WebURLResponse& response, + void RunCallback(const blink::WebURLResponse& response, const std::string& data); // Callback when we're done @@ -114,8 +114,8 @@ class CONTENT_EXPORT ResourceFetcherWithTimeout : NON_EXPORTED_BASE(public ResourceFetcher) { public: ResourceFetcherWithTimeout(const GURL& url, - WebKit::WebFrame* frame, - WebKit::WebURLRequest::TargetType target_type, + blink::WebFrame* frame, + blink::WebURLRequest::TargetType target_type, int timeout_secs, const Callback& callback); virtual ~ResourceFetcherWithTimeout(); diff --git a/content/renderer/gamepad_shared_memory_reader.cc b/content/renderer/gamepad_shared_memory_reader.cc index f4e8194..23edeb3 100644 --- a/content/renderer/gamepad_shared_memory_reader.cc +++ b/content/renderer/gamepad_shared_memory_reader.cc @@ -35,14 +35,14 @@ GamepadSharedMemoryReader::GamepadSharedMemoryReader() static_cast<GamepadHardwareBuffer*>(memory); } -void GamepadSharedMemoryReader::SampleGamepads(WebKit::WebGamepads& gamepads) { +void GamepadSharedMemoryReader::SampleGamepads(blink::WebGamepads& gamepads) { // ========== // DANGER // ========== // // This logic is duplicated in Pepper as well. If you change it, that also // needs to be in sync. See ppapi/proxy/gamepad_resource.cc. - WebKit::WebGamepads read_into; + blink::WebGamepads read_into; TRACE_EVENT0("GAMEPAD", "SampleGamepads"); if (!base::SharedMemory::IsHandleValid(renderer_shared_memory_handle_)) @@ -82,7 +82,7 @@ void GamepadSharedMemoryReader::SampleGamepads(WebKit::WebGamepads& gamepads) { // gamepads to prevent fingerprinting. The actual data is not cleared. // WebKit will only copy out data into the JS buffers for connected // gamepads so this is sufficient. - for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; i++) + for (unsigned i = 0; i < blink::WebGamepads::itemsLengthCap; i++) gamepads.items[i].connected = false; } } diff --git a/content/renderer/gamepad_shared_memory_reader.h b/content/renderer/gamepad_shared_memory_reader.h index 8c10b90..08dc41a 100644 --- a/content/renderer/gamepad_shared_memory_reader.h +++ b/content/renderer/gamepad_shared_memory_reader.h @@ -17,7 +17,7 @@ class GamepadSharedMemoryReader { public: GamepadSharedMemoryReader(); virtual ~GamepadSharedMemoryReader(); - void SampleGamepads(WebKit::WebGamepads&); + void SampleGamepads(blink::WebGamepads&); private: base::SharedMemoryHandle renderer_shared_memory_handle_; diff --git a/content/renderer/geolocation_dispatcher.cc b/content/renderer/geolocation_dispatcher.cc index 57eeeb6..031376c 100644 --- a/content/renderer/geolocation_dispatcher.cc +++ b/content/renderer/geolocation_dispatcher.cc @@ -13,11 +13,11 @@ #include "third_party/WebKit/public/web/WebGeolocationPosition.h" #include "third_party/WebKit/public/web/WebGeolocationError.h" -using WebKit::WebGeolocationController; -using WebKit::WebGeolocationError; -using WebKit::WebGeolocationPermissionRequest; -using WebKit::WebGeolocationPermissionRequestManager; -using WebKit::WebGeolocationPosition; +using blink::WebGeolocationController; +using blink::WebGeolocationError; +using blink::WebGeolocationPermissionRequest; +using blink::WebGeolocationPermissionRequestManager; +using blink::WebGeolocationPosition; namespace content { @@ -150,7 +150,7 @@ void GeolocationDispatcher::OnPositionUpdated( } controller_->errorOccurred( WebGeolocationError( - code, WebKit::WebString::fromUTF8(geoposition.error_message))); + code, blink::WebString::fromUTF8(geoposition.error_message))); } } diff --git a/content/renderer/geolocation_dispatcher.h b/content/renderer/geolocation_dispatcher.h index bda1ff7..5a96070 100644 --- a/content/renderer/geolocation_dispatcher.h +++ b/content/renderer/geolocation_dispatcher.h @@ -10,7 +10,7 @@ #include "third_party/WebKit/public/web/WebGeolocationClient.h" #include "third_party/WebKit/public/web/WebGeolocationController.h" -namespace WebKit { +namespace blink { class WebGeolocationController; class WebGeolocationPermissionRequest; class WebGeolocationPermissionRequestManager; @@ -25,7 +25,7 @@ struct Geoposition; // WebKit. // It's the complement of GeolocationDispatcherHost (owned by RenderViewHost). class GeolocationDispatcher : public RenderViewObserver, - public WebKit::WebGeolocationClient { + public blink::WebGeolocationClient { public: explicit GeolocationDispatcher(RenderViewImpl* render_view); virtual ~GeolocationDispatcher(); @@ -39,12 +39,12 @@ class GeolocationDispatcher : public RenderViewObserver, virtual void startUpdating(); virtual void stopUpdating(); virtual void setEnableHighAccuracy(bool enable_high_accuracy); - virtual void setController(WebKit::WebGeolocationController* controller); - virtual bool lastPosition(WebKit::WebGeolocationPosition& position); + virtual void setController(blink::WebGeolocationController* controller); + virtual bool lastPosition(blink::WebGeolocationPosition& position); virtual void requestPermission( - const WebKit::WebGeolocationPermissionRequest& permissionRequest); + const blink::WebGeolocationPermissionRequest& permissionRequest); virtual void cancelPermissionRequest( - const WebKit::WebGeolocationPermissionRequest& permissionRequest); + const blink::WebGeolocationPermissionRequest& permissionRequest); // Permission for using geolocation has been set. void OnPermissionSet(int bridge_id, bool is_allowed); @@ -55,9 +55,9 @@ class GeolocationDispatcher : public RenderViewObserver, // The controller_ is valid for the lifetime of the underlying // WebCore::GeolocationController. geolocationDestroyed() is // invoked when the underlying object is destroyed. - scoped_ptr< WebKit::WebGeolocationController> controller_; + scoped_ptr< blink::WebGeolocationController> controller_; - scoped_ptr<WebKit::WebGeolocationPermissionRequestManager> + scoped_ptr<blink::WebGeolocationPermissionRequestManager> pending_permissions_; bool enable_high_accuracy_; bool updating_; diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc index 1af771d..7acb6c6 100644 --- a/content/renderer/gpu/gpu_benchmarking_extension.cc +++ b/content/renderer/gpu/gpu_benchmarking_extension.cc @@ -32,13 +32,13 @@ #include "v8/include/v8.h" #include "webkit/renderer/compositor_bindings/web_rendering_stats_impl.h" -using WebKit::WebCanvas; -using WebKit::WebFrame; -using WebKit::WebImageCache; -using WebKit::WebPrivatePtr; -using WebKit::WebRenderingStatsImpl; -using WebKit::WebSize; -using WebKit::WebView; +using blink::WebCanvas; +using blink::WebFrame; +using blink::WebImageCache; +using blink::WebPrivatePtr; +using blink::WebRenderingStatsImpl; +using blink::WebSize; +using blink::WebView; const char kGpuBenchmarkingExtensionName[] = "v8/GpuBenchmarking"; @@ -488,7 +488,7 @@ class GpuBenchmarkingWrapper : public v8::Extension { int mouse_event_y = 0; if (arglen == 3) { - WebKit::WebRect rect = context.render_view_impl()->windowRect(); + blink::WebRect rect = context.render_view_impl()->windowRect(); mouse_event_x = rect.x + rect.width / 2; mouse_event_y = rect.y + rect.height / 2; } else { diff --git a/content/renderer/gpu/input_event_filter.cc b/content/renderer/gpu/input_event_filter.cc index 208c471..69ae39f 100644 --- a/content/renderer/gpu/input_event_filter.cc +++ b/content/renderer/gpu/input_event_filter.cc @@ -14,7 +14,7 @@ #include "content/renderer/gpu/input_event_filter.h" #include "ui/gfx/vector2d_f.h" -using WebKit::WebInputEvent; +using blink::WebInputEvent; namespace content { @@ -148,7 +148,7 @@ void InputEventFilter::ForwardToHandler(const IPC::Message& message) { SendACK(event->type, ack, latency_info, routing_id); } -void InputEventFilter::SendACK(WebKit::WebInputEvent::Type type, +void InputEventFilter::SendACK(blink::WebInputEvent::Type type, InputEventAckState ack_result, const ui::LatencyInfo& latency_info, int routing_id) { diff --git a/content/renderer/gpu/input_event_filter.h b/content/renderer/gpu/input_event_filter.h index b452620..f155693 100644 --- a/content/renderer/gpu/input_event_filter.h +++ b/content/renderer/gpu/input_event_filter.h @@ -62,7 +62,7 @@ class CONTENT_EXPORT InputEventFilter void ForwardToMainListener(const IPC::Message& message); void ForwardToHandler(const IPC::Message& message); - void SendACK(WebKit::WebInputEvent::Type type, + void SendACK(blink::WebInputEvent::Type type, InputEventAckState ack_result, const ui::LatencyInfo& latency_info, int routing_id); diff --git a/content/renderer/gpu/input_event_filter_unittest.cc b/content/renderer/gpu/input_event_filter_unittest.cc index d8e6052..93a0707 100644 --- a/content/renderer/gpu/input_event_filter_unittest.cc +++ b/content/renderer/gpu/input_event_filter_unittest.cc @@ -14,8 +14,8 @@ #include "ipc/ipc_test_sink.h" #include "testing/gtest/include/gtest/gtest.h" -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; namespace content { namespace { diff --git a/content/renderer/gpu/input_handler_manager.cc b/content/renderer/gpu/input_handler_manager.cc index 1db011b..affb844 100644 --- a/content/renderer/gpu/input_handler_manager.cc +++ b/content/renderer/gpu/input_handler_manager.cc @@ -12,7 +12,7 @@ #include "content/renderer/gpu/input_handler_manager_client.h" #include "content/renderer/gpu/input_handler_wrapper.h" -using WebKit::WebInputEvent; +using blink::WebInputEvent; namespace content { diff --git a/content/renderer/gpu/input_handler_manager.h b/content/renderer/gpu/input_handler_manager.h index 3811d63..7c7c4d6 100644 --- a/content/renderer/gpu/input_handler_manager.h +++ b/content/renderer/gpu/input_handler_manager.h @@ -21,7 +21,7 @@ class InputHandler; struct DidOverscrollParams; } -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -52,7 +52,7 @@ class InputHandlerManager { // Called from the compositor's thread. InputEventAckState HandleInputEvent(int routing_id, - const WebKit::WebInputEvent* input_event, + const blink::WebInputEvent* input_event, const ui::LatencyInfo& latency_info); // Called from the compositor's thread. diff --git a/content/renderer/gpu/input_handler_manager_client.h b/content/renderer/gpu/input_handler_manager_client.h index c147a8a6..63bb44e7 100644 --- a/content/renderer/gpu/input_handler_manager_client.h +++ b/content/renderer/gpu/input_handler_manager_client.h @@ -20,7 +20,7 @@ class InputHandler; struct DidOverscrollParams; } -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -35,7 +35,7 @@ class CONTENT_EXPORT InputHandlerManagerClient { // The client should only makes calls to |handler| on the compositor thread. typedef base::Callback< InputEventAckState(int /*routing_id*/, - const WebKit::WebInputEvent*, + const blink::WebInputEvent*, const ui::LatencyInfo& latency_info)> Handler; // Called from the main thread. diff --git a/content/renderer/gpu/input_handler_proxy.cc b/content/renderer/gpu/input_handler_proxy.cc index 77dd0f0..911ebbb 100644 --- a/content/renderer/gpu/input_handler_proxy.cc +++ b/content/renderer/gpu/input_handler_proxy.cc @@ -12,14 +12,14 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/events/latency_info.h" -using WebKit::WebFloatPoint; -using WebKit::WebFloatSize; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebPoint; -using WebKit::WebTouchEvent; +using blink::WebFloatPoint; +using blink::WebFloatSize; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebPoint; +using blink::WebTouchEvent; namespace { @@ -263,7 +263,7 @@ InputHandlerProxy::HandleGestureFling( gesture_event.sourceDevice, WebFloatPoint(gesture_event.data.flingStart.velocityX, gesture_event.data.flingStart.velocityY), - WebKit::WebSize())); + blink::WebSize())); fling_overscrolled_horizontally_ = false; fling_overscrolled_vertically_ = false; TRACE_EVENT_ASYNC_BEGIN0( @@ -365,7 +365,7 @@ bool InputHandlerProxy::CancelCurrentFling() { had_fling_animation); fling_curve_.reset(); gesture_scroll_on_impl_thread_ = false; - fling_parameters_ = WebKit::WebActiveWheelFlingParameters(); + fling_parameters_ = blink::WebActiveWheelFlingParameters(); return had_fling_animation; } diff --git a/content/renderer/gpu/input_handler_proxy.h b/content/renderer/gpu/input_handler_proxy.h index e307827..e022144 100644 --- a/content/renderer/gpu/input_handler_proxy.h +++ b/content/renderer/gpu/input_handler_proxy.h @@ -25,7 +25,7 @@ class InputHandlerProxyClient; // intended for a specific WebWidget. class CONTENT_EXPORT InputHandlerProxy : public cc::InputHandlerClient, - public NON_EXPORTED_BASE(WebKit::WebGestureCurveTarget) { + public NON_EXPORTED_BASE(blink::WebGestureCurveTarget) { public: explicit InputHandlerProxy(cc::InputHandler* input_handler); virtual ~InputHandlerProxy(); @@ -38,9 +38,9 @@ class CONTENT_EXPORT InputHandlerProxy DROP_EVENT }; EventDisposition HandleInputEventWithLatencyInfo( - const WebKit::WebInputEvent& event, + const blink::WebInputEvent& event, const ui::LatencyInfo& latency_info); - EventDisposition HandleInputEvent(const WebKit::WebInputEvent& event); + EventDisposition HandleInputEvent(const blink::WebInputEvent& event); // cc::InputHandlerClient implementation. virtual void WillShutdown() OVERRIDE; @@ -48,27 +48,27 @@ class CONTENT_EXPORT InputHandlerProxy virtual void MainThreadHasStoppedFlinging() OVERRIDE; virtual void DidOverscroll(const cc::DidOverscrollParams& params) OVERRIDE; - // WebKit::WebGestureCurveTarget implementation. - virtual void scrollBy(const WebKit::WebFloatSize& offset); - virtual void notifyCurrentFlingVelocity(const WebKit::WebFloatSize& velocity); + // blink::WebGestureCurveTarget implementation. + virtual void scrollBy(const blink::WebFloatSize& offset); + virtual void notifyCurrentFlingVelocity(const blink::WebFloatSize& velocity); bool gesture_scroll_on_impl_thread_for_testing() const { return gesture_scroll_on_impl_thread_; } private: - EventDisposition HandleGestureFling(const WebKit::WebGestureEvent& event); + EventDisposition HandleGestureFling(const blink::WebGestureEvent& event); // Returns true if we scrolled by the increment. - bool TouchpadFlingScroll(const WebKit::WebFloatSize& increment); + bool TouchpadFlingScroll(const blink::WebFloatSize& increment); // Returns true if we actually had an active fling to cancel. bool CancelCurrentFling(); - scoped_ptr<WebKit::WebGestureCurve> fling_curve_; + scoped_ptr<blink::WebGestureCurve> fling_curve_; // Parameters for the active fling animation, stored in case we need to // transfer it out later. - WebKit::WebActiveWheelFlingParameters fling_parameters_; + blink::WebActiveWheelFlingParameters fling_parameters_; InputHandlerProxyClient* client_; cc::InputHandler* input_handler_; diff --git a/content/renderer/gpu/input_handler_proxy_client.h b/content/renderer/gpu/input_handler_proxy_client.h index 6ef000c..2b9b9ef 100644 --- a/content/renderer/gpu/input_handler_proxy_client.h +++ b/content/renderer/gpu/input_handler_proxy_client.h @@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ #define CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ -namespace WebKit { +namespace blink { class WebGestureCurve; struct WebActiveWheelFlingParameters; struct WebFloatPoint; @@ -23,14 +23,14 @@ class InputHandlerProxyClient { // Transfers an active wheel fling animation initiated by a previously // handled input event out to the client. virtual void TransferActiveWheelFlingAnimation( - const WebKit::WebActiveWheelFlingParameters& params) = 0; + const blink::WebActiveWheelFlingParameters& params) = 0; // Creates a new fling animation curve instance for device |device_source| // with |velocity| and already scrolled |cumulative_scroll| pixels. - virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( + virtual blink::WebGestureCurve* CreateFlingAnimationCurve( int device_source, - const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll) = 0; + const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll) = 0; virtual void DidOverscroll(const cc::DidOverscrollParams& params) = 0; diff --git a/content/renderer/gpu/input_handler_proxy_unittest.cc b/content/renderer/gpu/input_handler_proxy_unittest.cc index 999b4d1..b93e0d0 100644 --- a/content/renderer/gpu/input_handler_proxy_unittest.cc +++ b/content/renderer/gpu/input_handler_proxy_unittest.cc @@ -16,14 +16,14 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/events/latency_info.h" -using WebKit::WebActiveWheelFlingParameters; -using WebKit::WebFloatPoint; -using WebKit::WebFloatSize; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebPoint; -using WebKit::WebSize; +using blink::WebActiveWheelFlingParameters; +using blink::WebFloatPoint; +using blink::WebFloatSize; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseWheelEvent; +using blink::WebPoint; +using blink::WebSize; namespace content { namespace { @@ -79,18 +79,18 @@ class MockInputHandler : public cc::InputHandler { // A simple WebGestureCurve implementation that flings at a constant velocity // indefinitely. -class FakeWebGestureCurve : public WebKit::WebGestureCurve { +class FakeWebGestureCurve : public blink::WebGestureCurve { public: - FakeWebGestureCurve(const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll) + FakeWebGestureCurve(const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll) : velocity_(velocity), cumulative_scroll_(cumulative_scroll) {} virtual ~FakeWebGestureCurve() {} // Returns false if curve has finished and can no longer be applied. - virtual bool apply(double time, WebKit::WebGestureCurveTarget* target) { - WebKit::WebSize displacement(velocity_.x * time, velocity_.y * time); - WebKit::WebFloatSize increment( + virtual bool apply(double time, blink::WebGestureCurveTarget* target) { + blink::WebSize displacement(velocity_.x * time, velocity_.y * time); + blink::WebFloatSize increment( displacement.width - cumulative_scroll_.width, displacement.height - cumulative_scroll_.height); cumulative_scroll_ = displacement; @@ -101,8 +101,8 @@ class FakeWebGestureCurve : public WebKit::WebGestureCurve { } private: - WebKit::WebFloatPoint velocity_; - WebKit::WebSize cumulative_scroll_; + blink::WebFloatPoint velocity_; + blink::WebSize cumulative_scroll_; DISALLOW_COPY_AND_ASSIGN(FakeWebGestureCurve); }; @@ -118,7 +118,7 @@ class MockInputHandlerProxyClient MOCK_METHOD1(TransferActiveWheelFlingAnimation, void(const WebActiveWheelFlingParameters&)); - virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( + virtual blink::WebGestureCurve* CreateFlingAnimationCurve( int deviceSource, const WebFloatPoint& velocity, const WebSize& cumulative_scroll) OVERRIDE { diff --git a/content/renderer/gpu/input_handler_wrapper.cc b/content/renderer/gpu/input_handler_wrapper.cc index 348ff6d..d1747f2 100644 --- a/content/renderer/gpu/input_handler_wrapper.cc +++ b/content/renderer/gpu/input_handler_wrapper.cc @@ -30,7 +30,7 @@ InputHandlerWrapper::~InputHandlerWrapper() { } void InputHandlerWrapper::TransferActiveWheelFlingAnimation( - const WebKit::WebActiveWheelFlingParameters& params) { + const blink::WebActiveWheelFlingParameters& params) { main_loop_->PostTask( FROM_HERE, base::Bind(&RenderViewImpl::TransferActiveWheelFlingAnimation, @@ -42,11 +42,11 @@ void InputHandlerWrapper::WillShutdown() { input_handler_manager_->RemoveInputHandler(routing_id_); } -WebKit::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( +blink::WebGestureCurve* InputHandlerWrapper::CreateFlingAnimationCurve( int deviceSource, - const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll) { - return WebKit::Platform::current()->createFlingAnimationCurve( + const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll) { + return blink::Platform::current()->createFlingAnimationCurve( deviceSource, velocity, cumulative_scroll); } diff --git a/content/renderer/gpu/input_handler_wrapper.h b/content/renderer/gpu/input_handler_wrapper.h index f72bae5..9a5ba0c 100644 --- a/content/renderer/gpu/input_handler_wrapper.h +++ b/content/renderer/gpu/input_handler_wrapper.h @@ -30,11 +30,11 @@ class InputHandlerWrapper // InputHandlerProxyClient implementation. virtual void WillShutdown() OVERRIDE; virtual void TransferActiveWheelFlingAnimation( - const WebKit::WebActiveWheelFlingParameters& params) OVERRIDE; - virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( + const blink::WebActiveWheelFlingParameters& params) OVERRIDE; + virtual blink::WebGestureCurve* CreateFlingAnimationCurve( int deviceSource, - const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulativeScroll) OVERRIDE; + const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulativeScroll) OVERRIDE; virtual void DidOverscroll(const cc::DidOverscrollParams& params) OVERRIDE; private: diff --git a/content/renderer/gpu/mailbox_output_surface.cc b/content/renderer/gpu/mailbox_output_surface.cc index 0d7d397..09e1ec0 100644 --- a/content/renderer/gpu/mailbox_output_surface.cc +++ b/content/renderer/gpu/mailbox_output_surface.cc @@ -53,7 +53,7 @@ MailboxOutputSurface::~MailboxOutputSurface() { void MailboxOutputSurface::EnsureBackbuffer() { is_backbuffer_discarded_ = false; - WebKit::WebGraphicsContext3D* context3d = context_provider_->Context3d(); + blink::WebGraphicsContext3D* context3d = context_provider_->Context3d(); if (!current_backing_.texture_id) { // Find a texture of matching size to recycle. @@ -103,7 +103,7 @@ void MailboxOutputSurface::EnsureBackbuffer() { void MailboxOutputSurface::DiscardBackbuffer() { is_backbuffer_discarded_ = true; - WebKit::WebGraphicsContext3D* context3d = context_provider_->Context3d(); + blink::WebGraphicsContext3D* context3d = context_provider_->Context3d(); if (current_backing_.texture_id) { context3d->deleteTexture(current_backing_.texture_id); @@ -137,7 +137,7 @@ void MailboxOutputSurface::BindFramebuffer() { EnsureBackbuffer(); DCHECK(current_backing_.texture_id); - WebKit::WebGraphicsContext3D* context3d = context_provider_->Context3d(); + blink::WebGraphicsContext3D* context3d = context_provider_->Context3d(); if (!fbo_) fbo_ = context3d->createFramebuffer(); diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index 9d728cc..85b204b 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -39,9 +39,9 @@ namespace cc { class Layer; } -using WebKit::WebFloatPoint; -using WebKit::WebSize; -using WebKit::WebRect; +using blink::WebFloatPoint; +using blink::WebSize; +using blink::WebRect; namespace content { namespace { @@ -430,7 +430,7 @@ void RenderWidgetCompositor::setSurfaceReady() { layer_tree_host_->SetLayerTreeHostClientReady(); } -void RenderWidgetCompositor::setRootLayer(const WebKit::WebLayer& layer) { +void RenderWidgetCompositor::setRootLayer(const blink::WebLayer& layer) { layer_tree_host_->SetRootLayer( static_cast<const webkit::WebLayerImpl*>(&layer)->layer()); } @@ -466,7 +466,7 @@ float RenderWidgetCompositor::deviceScaleFactor() const { return layer_tree_host_->device_scale_factor(); } -void RenderWidgetCompositor::setBackgroundColor(WebKit::WebColor color) { +void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { layer_tree_host_->set_background_color(color); } @@ -489,7 +489,7 @@ void RenderWidgetCompositor::setPageScaleFactorAndLimits( } void RenderWidgetCompositor::startPageScaleAnimation( - const WebKit::WebPoint& destination, + const blink::WebPoint& destination, bool use_anchor, float new_page_scale, double duration_sec) { @@ -521,16 +521,16 @@ void RenderWidgetCompositor::didStopFlinging() { layer_tree_host_->DidStopFlinging(); } -void RenderWidgetCompositor::registerForAnimations(WebKit::WebLayer* layer) { +void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { cc::Layer* cc_layer = static_cast<webkit::WebLayerImpl*>(layer)->layer(); cc_layer->layer_animation_controller()->SetAnimationRegistrar( layer_tree_host_->animation_registrar()); } void RenderWidgetCompositor::registerViewportLayers( - const WebKit::WebLayer* pageScaleLayer, - const WebKit::WebLayer* innerViewportScrollLayer, - const WebKit::WebLayer* outerViewportScrollLayer) { + const blink::WebLayer* pageScaleLayer, + const blink::WebLayer* innerViewportScrollLayer, + const blink::WebLayer* outerViewportScrollLayer) { layer_tree_host_->RegisterViewportLayers( static_cast<const webkit::WebLayerImpl*>(pageScaleLayer)->layer(), static_cast<const webkit::WebLayerImpl*>(innerViewportScrollLayer) diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index 44a3e8a..c5fd2cc 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h @@ -31,7 +31,7 @@ class LayerTreeHost; namespace content { class RenderWidget; -class RenderWidgetCompositor : public WebKit::WebLayerTreeView, +class RenderWidgetCompositor : public blink::WebLayerTreeView, public cc::LayerTreeHostClient, public cc::LayerTreeHostSingleThreadClient { public: @@ -69,25 +69,25 @@ class RenderWidgetCompositor : public WebKit::WebLayerTreeView, // WebLayerTreeView implementation. virtual void setSurfaceReady(); - virtual void setRootLayer(const WebKit::WebLayer& layer); + virtual void setRootLayer(const blink::WebLayer& layer); virtual void clearRootLayer(); virtual void setViewportSize( - const WebKit::WebSize& unused_deprecated, - const WebKit::WebSize& device_viewport_size); - virtual WebKit::WebSize layoutViewportSize() const; - virtual WebKit::WebSize deviceViewportSize() const; - virtual WebKit::WebFloatPoint adjustEventPointForPinchZoom( - const WebKit::WebFloatPoint& point) const; + const blink::WebSize& unused_deprecated, + const blink::WebSize& device_viewport_size); + virtual blink::WebSize layoutViewportSize() const; + virtual blink::WebSize deviceViewportSize() const; + virtual blink::WebFloatPoint adjustEventPointForPinchZoom( + const blink::WebFloatPoint& point) const; virtual void setDeviceScaleFactor(float device_scale); virtual float deviceScaleFactor() const; - virtual void setBackgroundColor(WebKit::WebColor color); + virtual void setBackgroundColor(blink::WebColor color); virtual void setHasTransparentBackground(bool transparent); virtual void setOverhangBitmap(const SkBitmap& bitmap); virtual void setVisible(bool visible); virtual void setPageScaleFactorAndLimits(float page_scale_factor, float minimum, float maximum); - virtual void startPageScaleAnimation(const WebKit::WebPoint& destination, + virtual void startPageScaleAnimation(const blink::WebPoint& destination, bool use_anchor, float new_page_scale, double duration_sec); @@ -95,16 +95,16 @@ class RenderWidgetCompositor : public WebKit::WebLayerTreeView, virtual void setNeedsRedraw(); virtual bool commitRequested() const; virtual void didStopFlinging(); - virtual bool compositeAndReadback(void *pixels, const WebKit::WebRect& rect); + virtual bool compositeAndReadback(void *pixels, const blink::WebRect& rect); virtual void finishAllRendering(); virtual void setDeferCommits(bool defer_commits); - virtual void registerForAnimations(WebKit::WebLayer* layer); + virtual void registerForAnimations(blink::WebLayer* layer); virtual void registerViewportLayers( - const WebKit::WebLayer* pageScaleLayer, - const WebKit::WebLayer* innerViewportScrollLayer, - const WebKit::WebLayer* outerViewportScrollLayer) OVERRIDE; + const blink::WebLayer* pageScaleLayer, + const blink::WebLayer* innerViewportScrollLayer, + const blink::WebLayer* outerViewportScrollLayer) OVERRIDE; virtual void clearViewportLayers() OVERRIDE; - virtual void renderingStats(WebKit::WebRenderingStats& stats) const {} + virtual void renderingStats(blink::WebRenderingStats& stats) const {} virtual void setShowFPSCounter(bool show); virtual void setShowPaintRects(bool show); virtual void setShowDebugBorders(bool show); diff --git a/content/renderer/ico_image_decoder_unittest.cc b/content/renderer/ico_image_decoder_unittest.cc index 83f5a3f..4beca93 100644 --- a/content/renderer/ico_image_decoder_unittest.cc +++ b/content/renderer/ico_image_decoder_unittest.cc @@ -6,15 +6,15 @@ #include "content/test/image_decoder_test.h" #include "third_party/WebKit/public/web/WebImageDecoder.h" -using WebKit::WebImageDecoder; +using blink::WebImageDecoder; class ICOImageDecoderTest : public ImageDecoderTest { public: ICOImageDecoderTest() : ImageDecoderTest("ico") { } protected: - virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE { - return new WebKit::WebImageDecoder(WebKit::WebImageDecoder::TypeICO); + virtual blink::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE { + return new blink::WebImageDecoder(blink::WebImageDecoder::TypeICO); } }; diff --git a/content/renderer/idle_user_detector.cc b/content/renderer/idle_user_detector.cc index 0f138a8..dff78d1 100644 --- a/content/renderer/idle_user_detector.cc +++ b/content/renderer/idle_user_detector.cc @@ -25,7 +25,7 @@ bool IdleUserDetector::OnMessageReceived(const IPC::Message& message) { return false; } -void IdleUserDetector::OnHandleInputEvent(const WebKit::WebInputEvent* event, +void IdleUserDetector::OnHandleInputEvent(const blink::WebInputEvent* event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut) { if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { diff --git a/content/renderer/idle_user_detector.h b/content/renderer/idle_user_detector.h index 500d8f75..a5ee80b 100644 --- a/content/renderer/idle_user_detector.h +++ b/content/renderer/idle_user_detector.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "content/public/renderer/render_view_observer.h" -namespace WebKit { +namespace blink { class WebInputEvent; } @@ -29,7 +29,7 @@ class IdleUserDetector : public RenderViewObserver { // RenderViewObserver implementation: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - void OnHandleInputEvent(const WebKit::WebInputEvent* event, + void OnHandleInputEvent(const blink::WebInputEvent* event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut); diff --git a/content/renderer/image_loading_helper.cc b/content/renderer/image_loading_helper.cc index 22a36c8..ecdb0fc 100644 --- a/content/renderer/image_loading_helper.cc +++ b/content/renderer/image_loading_helper.cc @@ -22,10 +22,10 @@ #include "ui/gfx/skbitmap_operations.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebFrame; -using WebKit::WebVector; -using WebKit::WebURL; -using WebKit::WebURLRequest; +using blink::WebFrame; +using blink::WebVector; +using blink::WebURL; +using blink::WebURLRequest; namespace { diff --git a/content/renderer/input_tag_speech_dispatcher.cc b/content/renderer/input_tag_speech_dispatcher.cc index afce8c2..b9490ce7 100644 --- a/content/renderer/input_tag_speech_dispatcher.cc +++ b/content/renderer/input_tag_speech_dispatcher.cc @@ -18,18 +18,18 @@ #include "third_party/WebKit/public/web/WebSpeechInputListener.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebDocument; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebInputElement; -using WebKit::WebNode; -using WebKit::WebView; +using blink::WebDocument; +using blink::WebElement; +using blink::WebFrame; +using blink::WebInputElement; +using blink::WebNode; +using blink::WebView; namespace content { InputTagSpeechDispatcher::InputTagSpeechDispatcher( RenderViewImpl* render_view, - WebKit::WebSpeechInputListener* listener) + blink::WebSpeechInputListener* listener) : RenderViewObserver(render_view), listener_(listener) { } @@ -53,10 +53,10 @@ bool InputTagSpeechDispatcher::OnMessageReceived( bool InputTagSpeechDispatcher::startRecognition( int request_id, - const WebKit::WebRect& element_rect, - const WebKit::WebString& language, - const WebKit::WebString& grammar, - const WebKit::WebSecurityOrigin& origin) { + const blink::WebRect& element_rect, + const blink::WebString& language, + const blink::WebString& grammar, + const blink::WebSecurityOrigin& origin) { DVLOG(1) << "InputTagSpeechDispatcher::startRecognition enter"; InputTagSpeechHostMsg_StartRecognition_Params params; @@ -92,7 +92,7 @@ void InputTagSpeechDispatcher::OnSpeechRecognitionResults( DCHECK_EQ(results.size(), 1U); const SpeechRecognitionResult& result = results[0]; - WebKit::WebSpeechInputResultArray webkit_result(result.hypotheses.size()); + blink::WebSpeechInputResultArray webkit_result(result.hypotheses.size()); for (size_t i = 0; i < result.hypotheses.size(); ++i) { webkit_result[i].assign(result.hypotheses[i].utterance, result.hypotheses[i].confidence); @@ -131,8 +131,8 @@ void InputTagSpeechDispatcher::OnSpeechRecognitionToggleSpeechInput() { if (focused_node.isNull() || !focused_node.isElementNode()) return; - WebKit::WebElement element = focused_node.to<WebKit::WebElement>(); - WebKit::WebInputElement* input_element = WebKit::toWebInputElement(&element); + blink::WebElement element = focused_node.to<blink::WebElement>(); + blink::WebInputElement* input_element = blink::toWebInputElement(&element); if (!input_element) return; if (!input_element->isSpeechInputEnabled()) diff --git a/content/renderer/input_tag_speech_dispatcher.h b/content/renderer/input_tag_speech_dispatcher.h index b51d723..ee9dda9 100644 --- a/content/renderer/input_tag_speech_dispatcher.h +++ b/content/renderer/input_tag_speech_dispatcher.h @@ -10,7 +10,7 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebSpeechInputController.h" -namespace WebKit { +namespace blink { class WebSpeechInputListener; } @@ -21,21 +21,21 @@ struct SpeechRecognitionResult; // InputTagSpeechDispatcher is a delegate for messages used by WebKit. It's // the complement of InputTagSpeechDispatcherHost (owned by RenderViewHost). class InputTagSpeechDispatcher : public RenderViewObserver, - public WebKit::WebSpeechInputController { + public blink::WebSpeechInputController { public: InputTagSpeechDispatcher(RenderViewImpl* render_view, - WebKit::WebSpeechInputListener* listener); + blink::WebSpeechInputListener* listener); private: // RenderView::Observer implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - // WebKit::WebSpeechInputController. + // blink::WebSpeechInputController. virtual bool startRecognition(int request_id, - const WebKit::WebRect& element_rect, - const WebKit::WebString& language, - const WebKit::WebString& grammar, - const WebKit::WebSecurityOrigin& origin); + const blink::WebRect& element_rect, + const blink::WebString& language, + const blink::WebString& grammar, + const blink::WebSecurityOrigin& origin); virtual void cancelRecognition(int request_id); virtual void stopRecording(int request_id); @@ -46,7 +46,7 @@ class InputTagSpeechDispatcher : public RenderViewObserver, void OnSpeechRecognitionComplete(int request_id); void OnSpeechRecognitionToggleSpeechInput(); - WebKit::WebSpeechInputListener* listener_; + blink::WebSpeechInputListener* listener_; DISALLOW_COPY_AND_ASSIGN(InputTagSpeechDispatcher); }; diff --git a/content/renderer/internal_document_state_data.cc b/content/renderer/internal_document_state_data.cc index cd400f3..e3370dc 100644 --- a/content/renderer/internal_document_state_data.cc +++ b/content/renderer/internal_document_state_data.cc @@ -25,14 +25,14 @@ InternalDocumentStateData::InternalDocumentStateData() is_overriding_user_agent_(false), must_reset_scroll_and_scale_state_(false), cache_policy_override_set_(false), - cache_policy_override_(WebKit::WebURLRequest::UseProtocolCachePolicy), + cache_policy_override_(blink::WebURLRequest::UseProtocolCachePolicy), referrer_policy_set_(false), - referrer_policy_(WebKit::WebReferrerPolicyDefault) { + referrer_policy_(blink::WebReferrerPolicyDefault) { } // static InternalDocumentStateData* InternalDocumentStateData::FromDataSource( - WebKit::WebDataSource* ds) { + blink::WebDataSource* ds) { return FromDocumentState(static_cast<DocumentState*>(ds->extraData())); } diff --git a/content/renderer/internal_document_state_data.h b/content/renderer/internal_document_state_data.h index 9fba893..6d2f2bc 100644 --- a/content/renderer/internal_document_state_data.h +++ b/content/renderer/internal_document_state_data.h @@ -13,7 +13,7 @@ #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebDataSource; } @@ -27,7 +27,7 @@ class InternalDocumentStateData : public base::SupportsUserData::Data { public: InternalDocumentStateData(); - static InternalDocumentStateData* FromDataSource(WebKit::WebDataSource* ds); + static InternalDocumentStateData* FromDataSource(blink::WebDataSource* ds); static InternalDocumentStateData* FromDocumentState(DocumentState* ds); // Set to true once RenderViewImpl::didFirstVisuallyNonEmptyLayout() is @@ -89,16 +89,16 @@ class InternalDocumentStateData : public base::SupportsUserData::Data { // by default is not set. You can mark a NavigationState as not having a cache // state by way of clear_cache_policy_override. void set_cache_policy_override( - WebKit::WebURLRequest::CachePolicy cache_policy) { + blink::WebURLRequest::CachePolicy cache_policy) { cache_policy_override_ = cache_policy; cache_policy_override_set_ = true; } - WebKit::WebURLRequest::CachePolicy cache_policy_override() const { + blink::WebURLRequest::CachePolicy cache_policy_override() const { return cache_policy_override_; } void clear_cache_policy_override() { cache_policy_override_set_ = false; - cache_policy_override_ = WebKit::WebURLRequest::UseProtocolCachePolicy; + cache_policy_override_ = blink::WebURLRequest::UseProtocolCachePolicy; } bool is_cache_policy_override_set() const { return cache_policy_override_set_; @@ -107,15 +107,15 @@ class InternalDocumentStateData : public base::SupportsUserData::Data { // Sets the referrer policy to use. This is only used for browser initiated // navigations, otherwise, the referrer policy is defined by the frame's // document. - WebKit::WebReferrerPolicy referrer_policy() const { + blink::WebReferrerPolicy referrer_policy() const { return referrer_policy_; } - void set_referrer_policy(WebKit::WebReferrerPolicy referrer_policy) { + void set_referrer_policy(blink::WebReferrerPolicy referrer_policy) { referrer_policy_ = referrer_policy; referrer_policy_set_ = true; } void clear_referrer_policy() { - referrer_policy_ = WebKit::WebReferrerPolicyDefault; + referrer_policy_ = blink::WebReferrerPolicyDefault; referrer_policy_set_ = false; } bool is_referrer_policy_set() const { return referrer_policy_set_; } @@ -138,9 +138,9 @@ class InternalDocumentStateData : public base::SupportsUserData::Data { bool is_overriding_user_agent_; bool must_reset_scroll_and_scale_state_; bool cache_policy_override_set_; - WebKit::WebURLRequest::CachePolicy cache_policy_override_; + blink::WebURLRequest::CachePolicy cache_policy_override_; bool referrer_policy_set_; - WebKit::WebReferrerPolicy referrer_policy_; + blink::WebReferrerPolicy referrer_policy_; scoped_ptr<AltErrorPageResourceFetcher> alt_error_page_fetcher_; DISALLOW_COPY_AND_ASSIGN(InternalDocumentStateData); diff --git a/content/renderer/java/java_bridge_channel.cc b/content/renderer/java/java_bridge_channel.cc index 235425a..0d6d3f6 100644 --- a/content/renderer/java/java_bridge_channel.cc +++ b/content/renderer/java/java_bridge_channel.cc @@ -27,12 +27,12 @@ JavaBridgeChannel::JavaBridgeChannel() : peer_owner_id_(new struct _NPP) { // Register the dummy owner Id for our peer (the Browser process) as an object // owner, and have all objects received from the peer owned by it. - WebKit::WebBindings::registerObjectOwner(peer_owner_id_.get()); + blink::WebBindings::registerObjectOwner(peer_owner_id_.get()); SetDefaultNPObjectOwner(peer_owner_id_.get()); } JavaBridgeChannel::~JavaBridgeChannel() { - WebKit::WebBindings::unregisterObjectOwner(peer_owner_id_.get()); + blink::WebBindings::unregisterObjectOwner(peer_owner_id_.get()); } int JavaBridgeChannel::GenerateRouteID() { diff --git a/content/renderer/java/java_bridge_dispatcher.cc b/content/renderer/java/java_bridge_dispatcher.cc index 376ecb1..633295a 100644 --- a/content/renderer/java/java_bridge_dispatcher.cc +++ b/content/renderer/java/java_bridge_dispatcher.cc @@ -36,7 +36,7 @@ void JavaBridgeDispatcher::EnsureChannelIsSetUp() { JavaBridgeDispatcher::~JavaBridgeDispatcher() { for (ObjectMap::const_iterator iter = objects_.begin(); iter != objects_.end(); ++iter) { - WebKit::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); + blink::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); } } @@ -51,7 +51,7 @@ bool JavaBridgeDispatcher::OnMessageReceived(const IPC::Message& msg) { return handled; } -void JavaBridgeDispatcher::DidClearWindowObject(WebKit::WebFrame* web_frame) { +void JavaBridgeDispatcher::DidClearWindowObject(blink::WebFrame* web_frame) { // Note that we have to (re)bind all objects, as they will have been unbound // when the window object was cleared. for (ObjectMap::const_iterator iter = objects_.begin(); @@ -90,7 +90,7 @@ void JavaBridgeDispatcher::OnAddNamedObject( // OnRemoveNamedObject() is called for that object. ObjectMap::iterator iter = objects_.find(name); if (iter != objects_.end()) { - WebKit::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); + blink::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); } objects_[name] = variant; } @@ -106,7 +106,7 @@ void JavaBridgeDispatcher::OnRemoveNamedObject(const string16& name) { // is present. ObjectMap::iterator iter = objects_.find(name); DCHECK(iter != objects_.end()); - WebKit::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); + blink::WebBindings::releaseObject(NPVARIANT_TO_OBJECT(iter->second)); objects_.erase(iter); } diff --git a/content/renderer/java/java_bridge_dispatcher.h b/content/renderer/java/java_bridge_dispatcher.h index 29a10374..a50eb38 100644 --- a/content/renderer/java/java_bridge_dispatcher.h +++ b/content/renderer/java/java_bridge_dispatcher.h @@ -30,7 +30,7 @@ class JavaBridgeDispatcher : public RenderViewObserver { private: // RenderViewObserver override: virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; + virtual void DidClearWindowObject(blink::WebFrame* frame) OVERRIDE; // Message handlers void OnAddNamedObject(const string16& name, diff --git a/content/renderer/load_progress_tracker.cc b/content/renderer/load_progress_tracker.cc index 3a04b72..0cc26fd 100644 --- a/content/renderer/load_progress_tracker.cc +++ b/content/renderer/load_progress_tracker.cc @@ -38,7 +38,7 @@ void LoadProgressTracker::DidStopLoading() { ResetStates(); } -void LoadProgressTracker::DidChangeLoadProgress(WebKit::WebFrame* frame, +void LoadProgressTracker::DidChangeLoadProgress(blink::WebFrame* frame, double progress) { if (tracked_frame_ && frame != tracked_frame_) return; diff --git a/content/renderer/load_progress_tracker.h b/content/renderer/load_progress_tracker.h index a239350..c4ed37e 100644 --- a/content/renderer/load_progress_tracker.h +++ b/content/renderer/load_progress_tracker.h @@ -9,7 +9,7 @@ #include "base/memory/weak_ptr.h" #include "base/time/time.h" -namespace WebKit { +namespace blink { class WebFrame; } @@ -23,7 +23,7 @@ class LoadProgressTracker { void DidStopLoading(); - void DidChangeLoadProgress(WebKit::WebFrame* frame, double progress); + void DidChangeLoadProgress(blink::WebFrame* frame, double progress); private: void ResetStates(); @@ -32,7 +32,7 @@ class LoadProgressTracker { RenderViewImpl* render_view_; - WebKit::WebFrame* tracked_frame_; + blink::WebFrame* tracked_frame_; double progress_; diff --git a/content/renderer/media/active_loader.cc b/content/renderer/media/active_loader.cc index e7601ea..6951514 100644 --- a/content/renderer/media/active_loader.cc +++ b/content/renderer/media/active_loader.cc @@ -9,7 +9,7 @@ namespace content { -ActiveLoader::ActiveLoader(scoped_ptr<WebKit::WebURLLoader> loader) +ActiveLoader::ActiveLoader(scoped_ptr<blink::WebURLLoader> loader) : loader_(loader.Pass()), deferred_(false) { } diff --git a/content/renderer/media/active_loader.h b/content/renderer/media/active_loader.h index 751e6a9..1c30214 100644 --- a/content/renderer/media/active_loader.h +++ b/content/renderer/media/active_loader.h @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -namespace WebKit { +namespace blink { class WebURLLoader; } @@ -21,7 +21,7 @@ class ActiveLoader { public: // Creates an ActiveLoader with the given loader. It is assumed that the // initial state of |loader| is loading and not deferred. - explicit ActiveLoader(scoped_ptr<WebKit::WebURLLoader> loader); + explicit ActiveLoader(scoped_ptr<blink::WebURLLoader> loader); ~ActiveLoader(); // Starts or stops deferring the resource load. @@ -31,7 +31,7 @@ class ActiveLoader { private: friend class BufferedDataSourceTest; - scoped_ptr<WebKit::WebURLLoader> loader_; + scoped_ptr<blink::WebURLLoader> loader_; bool deferred_; DISALLOW_IMPLICIT_CONSTRUCTORS(ActiveLoader); diff --git a/content/renderer/media/android/audio_decoder_android.cc b/content/renderer/media/android/audio_decoder_android.cc index afc6dec..b589d67 100644 --- a/content/renderer/media/android/audio_decoder_android.cc +++ b/content/renderer/media/android/audio_decoder_android.cc @@ -113,7 +113,7 @@ class WAVEDecoder { // WAVE file, |destination_bus| is filled with the decoded data and // DecodeWAVEFile returns true. Otherwise, DecodeWAVEFile returns // false. - bool DecodeWAVEFile(WebKit::WebAudioBus* destination_bus); + bool DecodeWAVEFile(blink::WebAudioBus* destination_bus); private: // Minimum number of bytes in a WAVE file to hold all of the data we @@ -157,7 +157,7 @@ class WAVEDecoder { // Read data chunk and save it to |destination_bus|. Returns false // if the data chunk could not be read correctly. - bool CopyDataChunkToBus(WebKit::WebAudioBus* destination_bus); + bool CopyDataChunkToBus(blink::WebAudioBus* destination_bus); // The WAVE chunk ID that identifies the chunk. uint8_t chunk_id_[kChunkIDLength]; @@ -293,7 +293,7 @@ bool WAVEDecoder::ReadFMTChunk() { return false; } -bool WAVEDecoder::CopyDataChunkToBus(WebKit::WebAudioBus* destination_bus) { +bool WAVEDecoder::CopyDataChunkToBus(blink::WebAudioBus* destination_bus) { // The data chunk contains the audio data itself. if (!bytes_per_sample_ || bytes_per_sample_ > kMaximumBytesPerSample) { DVLOG(1) << "WARNING: data chunk without preceeding fmt chunk," @@ -326,7 +326,7 @@ bool WAVEDecoder::CopyDataChunkToBus(WebKit::WebAudioBus* destination_bus) { return true; } -bool WAVEDecoder::DecodeWAVEFile(WebKit::WebAudioBus* destination_bus) { +bool WAVEDecoder::DecodeWAVEFile(blink::WebAudioBus* destination_bus) { // Parse and decode WAVE file. If we can't parse it, return false. if (buffer_ + kMinimumWAVLength > buffer_end_) { @@ -395,7 +395,7 @@ bool WAVEDecoder::DecodeWAVEFile(WebKit::WebAudioBus* destination_bus) { // bus and copy the pcm data to the destination bus as it's being // received. static void CopyPcmDataToBus(int input_fd, - WebKit::WebAudioBus* destination_bus, + blink::WebAudioBus* destination_bus, size_t number_of_frames, unsigned number_of_channels, double file_sample_rate) { @@ -433,7 +433,7 @@ static void CopyPcmDataToBus(int input_fd, // until there's no more data and then copy the data to the // destination bus. static void BufferAndCopyPcmDataToBus(int input_fd, - WebKit::WebAudioBus* destination_bus, + blink::WebAudioBus* destination_bus, unsigned number_of_channels, double file_sample_rate) { int16_t pipe_data[PIPE_BUF / sizeof(int16_t)]; @@ -478,7 +478,7 @@ static void BufferAndCopyPcmDataToBus(int input_fd, destination_bus->resizeSmaller(decoded_frames); } -static bool TryWAVEFileDecoder(WebKit::WebAudioBus* destination_bus, +static bool TryWAVEFileDecoder(blink::WebAudioBus* destination_bus, const uint8_t* encoded_data, size_t data_size) { WAVEDecoder decoder(encoded_data, data_size); @@ -493,7 +493,7 @@ static bool TryWAVEFileDecoder(WebKit::WebAudioBus* destination_bus, // to the browser to start the decoder using this buffer and one end // of a pipe. The MediaCodec class will decode the data from the // shared memory and write the PCM samples back to us over a pipe. -bool DecodeAudioFileData(WebKit::WebAudioBus* destination_bus, const char* data, +bool DecodeAudioFileData(blink::WebAudioBus* destination_bus, const char* data, size_t data_size, double sample_rate, scoped_refptr<ThreadSafeSender> sender) { // Try to decode the data as a WAVE file first. If it can't be diff --git a/content/renderer/media/android/audio_decoder_android.h b/content/renderer/media/android/audio_decoder_android.h index c6c3b40..d2cac15 100644 --- a/content/renderer/media/android/audio_decoder_android.h +++ b/content/renderer/media/android/audio_decoder_android.h @@ -7,13 +7,13 @@ #include "content/child/thread_safe_sender.h" -namespace WebKit { +namespace blink { class WebAudioBus; } namespace content { -bool DecodeAudioFileData(WebKit::WebAudioBus* destination_bus, +bool DecodeAudioFileData(blink::WebAudioBus* destination_bus, const char* data, size_t data_size, double sample_rate, diff --git a/content/renderer/media/android/media_info_loader.cc b/content/renderer/media/android/media_info_loader.cc index 1025550..167de7c 100644 --- a/content/renderer/media/android/media_info_loader.cc +++ b/content/renderer/media/android/media_info_loader.cc @@ -12,12 +12,12 @@ #include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/web/WebFrame.h" -using WebKit::WebFrame; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLLoaderOptions; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLLoaderOptions; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { @@ -25,7 +25,7 @@ static const int kHttpOK = 200; MediaInfoLoader::MediaInfoLoader( const GURL& url, - WebKit::WebMediaPlayer::CORSMode cors_mode, + blink::WebMediaPlayer::CORSMode cors_mode, const ReadyCB& ready_cb) : loader_failed_(false), url_(url), @@ -35,7 +35,7 @@ MediaInfoLoader::MediaInfoLoader( MediaInfoLoader::~MediaInfoLoader() {} -void MediaInfoLoader::Start(WebKit::WebFrame* frame) { +void MediaInfoLoader::Start(blink::WebFrame* frame) { // Make sure we have not started. DCHECK(!ready_cb_.is_null()); CHECK(frame); @@ -45,14 +45,14 @@ void MediaInfoLoader::Start(WebKit::WebFrame* frame) { // Prepare the request. WebURLRequest request(url_); request.setTargetType(WebURLRequest::TargetIsMedia); - frame->setReferrerForRequest(request, WebKit::WebURL()); + frame->setReferrerForRequest(request, blink::WebURL()); scoped_ptr<WebURLLoader> loader; if (test_loader_) { loader = test_loader_.Pass(); } else { WebURLLoaderOptions options; - if (cors_mode_ == WebKit::WebMediaPlayer::CORSModeUnspecified) { + if (cors_mode_ == blink::WebMediaPlayer::CORSModeUnspecified) { options.allowCredentials = true; options.crossOriginRequestPolicy = WebURLLoaderOptions::CrossOriginRequestPolicyAllow; @@ -60,7 +60,7 @@ void MediaInfoLoader::Start(WebKit::WebFrame* frame) { options.exposeAllResponseHeaders = true; options.crossOriginRequestPolicy = WebURLLoaderOptions::CrossOriginRequestPolicyUseAccessControl; - if (cors_mode_ == WebKit::WebMediaPlayer::CORSModeUseCredentials) + if (cors_mode_ == blink::WebMediaPlayer::CORSModeUseCredentials) options.allowCredentials = true; } loader.reset(frame->createAssociatedURLLoader(options)); @@ -72,7 +72,7 @@ void MediaInfoLoader::Start(WebKit::WebFrame* frame) { } ///////////////////////////////////////////////////////////////////////////// -// WebKit::WebURLLoaderClient implementation. +// blink::WebURLLoaderClient implementation. void MediaInfoLoader::willSendRequest( WebURLLoader* loader, WebURLRequest& newRequest, @@ -81,7 +81,7 @@ void MediaInfoLoader::willSendRequest( // In this case we shouldn't do anything. if (ready_cb_.is_null()) { // Set the url in the request to an invalid value (empty url). - newRequest.setURL(WebKit::WebURL()); + newRequest.setURL(blink::WebURL()); return; } @@ -126,7 +126,7 @@ void MediaInfoLoader::didReceiveData( } void MediaInfoLoader::didDownloadData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, int dataLength, int encodedDataLength) { NOTIMPLEMENTED(); @@ -169,7 +169,7 @@ bool MediaInfoLoader::DidPassCORSAccessCheck() const { DCHECK(ready_cb_.is_null()) << "Must become ready before calling DidPassCORSAccessCheck()"; return !loader_failed_ && - cors_mode_ != WebKit::WebMediaPlayer::CORSModeUnspecified; + cors_mode_ != blink::WebMediaPlayer::CORSModeUnspecified; } ///////////////////////////////////////////////////////////////////////////// diff --git a/content/renderer/media/android/media_info_loader.h b/content/renderer/media/android/media_info_loader.h index 5a6fc05..600590b 100644 --- a/content/renderer/media/android/media_info_loader.h +++ b/content/renderer/media/android/media_info_loader.h @@ -16,7 +16,7 @@ #include "third_party/WebKit/public/web/WebMediaPlayer.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebFrame; class WebURLLoader; class WebURLRequest; @@ -27,7 +27,7 @@ namespace content { // This class provides additional information about a media URL. Currently it // can be used to determine if a media URL has a single security origin and // whether the URL passes a CORS access check. -class CONTENT_EXPORT MediaInfoLoader : private WebKit::WebURLLoaderClient { +class CONTENT_EXPORT MediaInfoLoader : private blink::WebURLLoaderClient { public: // Status codes for start operations on MediaInfoLoader. enum Status { @@ -51,12 +51,12 @@ class CONTENT_EXPORT MediaInfoLoader : private WebKit::WebURLLoaderClient { typedef base::Callback<void(Status)> ReadyCB; MediaInfoLoader( const GURL& url, - WebKit::WebMediaPlayer::CORSMode cors_mode, + blink::WebMediaPlayer::CORSMode cors_mode, const ReadyCB& ready_cb); virtual ~MediaInfoLoader(); // Start loading media info. - void Start(WebKit::WebFrame* frame); + void Start(blink::WebFrame* frame); // Returns true if the media resource has a single origin, false otherwise. // Only valid to call after the loader becomes ready. @@ -69,48 +69,48 @@ class CONTENT_EXPORT MediaInfoLoader : private WebKit::WebURLLoaderClient { private: friend class MediaInfoLoaderTest; - // WebKit::WebURLLoaderClient implementation. + // blink::WebURLLoaderClient implementation. virtual void willSendRequest( - WebKit::WebURLLoader* loader, - WebKit::WebURLRequest& newRequest, - const WebKit::WebURLResponse& redirectResponse); + blink::WebURLLoader* loader, + blink::WebURLRequest& newRequest, + const blink::WebURLResponse& redirectResponse); virtual void didSendData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, unsigned long long bytesSent, unsigned long long totalBytesToBeSent); virtual void didReceiveResponse( - WebKit::WebURLLoader* loader, - const WebKit::WebURLResponse& response); + blink::WebURLLoader* loader, + const blink::WebURLResponse& response); virtual void didDownloadData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, int data_length, int encodedDataLength); virtual void didReceiveData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length); virtual void didReceiveCachedMetadata( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, const char* data, int dataLength); virtual void didFinishLoading( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, double finishTime); virtual void didFail( - WebKit::WebURLLoader* loader, - const WebKit::WebURLError&); + blink::WebURLLoader* loader, + const blink::WebURLError&); void DidBecomeReady(Status status); // Injected WebURLLoader instance for testing purposes. - scoped_ptr<WebKit::WebURLLoader> test_loader_; + scoped_ptr<blink::WebURLLoader> test_loader_; // Keeps track of an active WebURLLoader and associated state. scoped_ptr<ActiveLoader> active_loader_; bool loader_failed_; GURL url_; - WebKit::WebMediaPlayer::CORSMode cors_mode_; + blink::WebMediaPlayer::CORSMode cors_mode_; bool single_origin_; ReadyCB ready_cb_; diff --git a/content/renderer/media/android/media_info_loader_unittest.cc b/content/renderer/media/android/media_info_loader_unittest.cc index 7e47ba5..07a5429 100644 --- a/content/renderer/media/android/media_info_loader_unittest.cc +++ b/content/renderer/media/android/media_info_loader_unittest.cc @@ -17,10 +17,10 @@ using ::testing::_; using ::testing::InSequence; using ::testing::NiceMock; -using WebKit::WebString; -using WebKit::WebURLError; -using WebKit::WebURLResponse; -using WebKit::WebView; +using blink::WebString; +using blink::WebURLError; +using blink::WebURLResponse; +using blink::WebView; namespace content { @@ -45,7 +45,7 @@ class MediaInfoLoaderTest : public testing::Test { void Initialize( const char* url, - WebKit::WebMediaPlayer::CORSMode cors_mode) { + blink::WebMediaPlayer::CORSMode cors_mode) { gurl_ = GURL(url); loader_.reset(new MediaInfoLoader( @@ -55,7 +55,7 @@ class MediaInfoLoaderTest : public testing::Test { // |test_loader_| will be used when Start() is called. url_loader_ = new NiceMock<MockWebURLLoader>(); - loader_->test_loader_ = scoped_ptr<WebKit::WebURLLoader>(url_loader_); + loader_->test_loader_ = scoped_ptr<blink::WebURLLoader>(url_loader_); } void Start() { @@ -72,8 +72,8 @@ class MediaInfoLoaderTest : public testing::Test { void Redirect(const char* url) { GURL redirect_url(url); - WebKit::WebURLRequest new_request(redirect_url); - WebKit::WebURLResponse redirect_response(gurl_); + blink::WebURLRequest new_request(redirect_url); + blink::WebURLResponse redirect_response(gurl_); loader_->willSendRequest(url_loader_, new_request, redirect_response); @@ -116,20 +116,20 @@ class MediaInfoLoaderTest : public testing::Test { }; TEST_F(MediaInfoLoaderTest, StartStop) { - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); Stop(); } TEST_F(MediaInfoLoaderTest, LoadFailure) { - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); FailLoad(); } TEST_F(MediaInfoLoaderTest, HasSingleOriginNoRedirect) { // Make sure no redirect case works as expected. - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); SendResponse(kHttpOK, MediaInfoLoader::kOk); EXPECT_TRUE(loader_->HasSingleOrigin()); @@ -137,7 +137,7 @@ TEST_F(MediaInfoLoaderTest, HasSingleOriginNoRedirect) { TEST_F(MediaInfoLoaderTest, HasSingleOriginSingleRedirect) { // Test redirect to the same domain. - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); Redirect(kHttpRedirectToSameDomainUrl1); SendResponse(kHttpOK, MediaInfoLoader::kOk); @@ -146,7 +146,7 @@ TEST_F(MediaInfoLoaderTest, HasSingleOriginSingleRedirect) { TEST_F(MediaInfoLoaderTest, HasSingleOriginDoubleRedirect) { // Test redirect twice to the same domain. - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); Redirect(kHttpRedirectToSameDomainUrl1); Redirect(kHttpRedirectToSameDomainUrl2); @@ -156,7 +156,7 @@ TEST_F(MediaInfoLoaderTest, HasSingleOriginDoubleRedirect) { TEST_F(MediaInfoLoaderTest, HasSingleOriginDifferentDomain) { // Test redirect to a different domain. - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); Redirect(kHttpRedirectToDifferentDomainUrl1); SendResponse(kHttpOK, MediaInfoLoader::kOk); @@ -165,7 +165,7 @@ TEST_F(MediaInfoLoaderTest, HasSingleOriginDifferentDomain) { TEST_F(MediaInfoLoaderTest, HasSingleOriginMultipleDomains) { // Test redirect to the same domain and then to a different domain. - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUnspecified); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUnspecified); Start(); Redirect(kHttpRedirectToSameDomainUrl1); Redirect(kHttpRedirectToDifferentDomainUrl1); @@ -174,14 +174,14 @@ TEST_F(MediaInfoLoaderTest, HasSingleOriginMultipleDomains) { } TEST_F(MediaInfoLoaderTest, CORSAccessCheckPassed) { - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUseCredentials); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUseCredentials); Start(); SendResponse(kHttpOK, MediaInfoLoader::kOk); EXPECT_TRUE(loader_->DidPassCORSAccessCheck()); } TEST_F(MediaInfoLoaderTest, CORSAccessCheckFailed) { - Initialize(kHttpUrl, WebKit::WebMediaPlayer::CORSModeUseCredentials); + Initialize(kHttpUrl, blink::WebMediaPlayer::CORSModeUseCredentials); Start(); SendResponse(kHttpNotFound, MediaInfoLoader::kFailed); EXPECT_FALSE(loader_->DidPassCORSAccessCheck()); diff --git a/content/renderer/media/android/media_source_delegate.cc b/content/renderer/media/android/media_source_delegate.cc index ad6aab2..7d7e917 100644 --- a/content/renderer/media/android/media_source_delegate.cc +++ b/content/renderer/media/android/media_source_delegate.cc @@ -25,8 +25,8 @@ using media::DemuxerStream; using media::DemuxerConfigs; using media::DemuxerData; -using WebKit::WebMediaPlayer; -using WebKit::WebString; +using blink::WebMediaPlayer; +using blink::WebString; namespace { @@ -202,7 +202,7 @@ void MediaSourceDelegate::InitializeMediaStream( } #endif -const WebKit::WebTimeRanges& MediaSourceDelegate::Buffered() { +const blink::WebTimeRanges& MediaSourceDelegate::Buffered() { buffered_web_time_ranges_ = ConvertToWebTimeRanges(buffered_time_ranges_); return buffered_web_time_ranges_; diff --git a/content/renderer/media/android/media_source_delegate.h b/content/renderer/media/android/media_source_delegate.h index 4c3564e..b9ae5be 100644 --- a/content/renderer/media/android/media_source_delegate.h +++ b/content/renderer/media/android/media_source_delegate.h @@ -38,9 +38,9 @@ class RendererDemuxerAndroid; class MediaSourceDelegate : public media::DemuxerHost { public: - typedef base::Callback<void(WebKit::WebMediaSource*)> + typedef base::Callback<void(blink::WebMediaSource*)> MediaSourceOpenedCB; - typedef base::Callback<void(WebKit::WebMediaPlayer::NetworkState)> + typedef base::Callback<void(blink::WebMediaPlayer::NetworkState)> UpdateNetworkStateCB; typedef base::Callback<void(const base::TimeDelta&)> DurationChangeCB; @@ -73,7 +73,7 @@ class MediaSourceDelegate : public media::DemuxerHost { const UpdateNetworkStateCB& update_network_state_cb); #endif - const WebKit::WebTimeRanges& Buffered(); + const blink::WebTimeRanges& Buffered(); size_t DecodedFrameCount() const; size_t DroppedFrameCount() const; size_t AudioDecodedByteCount() const; @@ -218,14 +218,14 @@ class MediaSourceDelegate : public media::DemuxerHost { media::PipelineStatistics statistics_; media::Ranges<base::TimeDelta> buffered_time_ranges_; // Keep a list of buffered time ranges. - WebKit::WebTimeRanges buffered_web_time_ranges_; + blink::WebTimeRanges buffered_web_time_ranges_; MediaSourceOpenedCB media_source_opened_cb_; media::Demuxer::NeedKeyCB need_key_cb_; // The currently selected key system. Empty string means that no key system // has been selected. - WebKit::WebString current_key_system_; + blink::WebString current_key_system_; // Temporary for EME v0.1. In the future the init data type should be passed // through GenerateKeyRequest() directly from WebKit. diff --git a/content/renderer/media/android/renderer_media_player_manager.cc b/content/renderer/media/android/renderer_media_player_manager.cc index d465a25..4750549 100644 --- a/content/renderer/media/android/renderer_media_player_manager.cc +++ b/content/renderer/media/android/renderer_media_player_manager.cc @@ -324,11 +324,11 @@ ProxyMediaKeys* RendererMediaPlayerManager::GetMediaKeys(int media_keys_id) { return (iter != media_keys_.end()) ? iter->second : NULL; } -bool RendererMediaPlayerManager::CanEnterFullscreen(WebKit::WebFrame* frame) { +bool RendererMediaPlayerManager::CanEnterFullscreen(blink::WebFrame* frame) { return !fullscreen_frame_ || IsInFullscreen(frame); } -void RendererMediaPlayerManager::DidEnterFullscreen(WebKit::WebFrame* frame) { +void RendererMediaPlayerManager::DidEnterFullscreen(blink::WebFrame* frame) { fullscreen_frame_ = frame; } @@ -336,7 +336,7 @@ void RendererMediaPlayerManager::DidExitFullscreen() { fullscreen_frame_ = NULL; } -bool RendererMediaPlayerManager::IsInFullscreen(WebKit::WebFrame* frame) { +bool RendererMediaPlayerManager::IsInFullscreen(blink::WebFrame* frame) { return fullscreen_frame_ == frame; } diff --git a/content/renderer/media/android/renderer_media_player_manager.h b/content/renderer/media/android/renderer_media_player_manager.h index 4a16b83..730eac4 100644 --- a/content/renderer/media/android/renderer_media_player_manager.h +++ b/content/renderer/media/android/renderer_media_player_manager.h @@ -21,7 +21,7 @@ #include "ui/gfx/rect_f.h" #endif -namespace WebKit { +namespace blink { class WebFrame; } @@ -117,14 +117,14 @@ class RendererMediaPlayerManager : public RenderViewObserver { void ReleaseVideoResources(); // Checks whether a player can enter fullscreen. - bool CanEnterFullscreen(WebKit::WebFrame* frame); + bool CanEnterFullscreen(blink::WebFrame* frame); // Called when a player entered or exited fullscreen. - void DidEnterFullscreen(WebKit::WebFrame* frame); + void DidEnterFullscreen(blink::WebFrame* frame); void DidExitFullscreen(); // Checks whether the Webframe is in fullscreen. - bool IsInFullscreen(WebKit::WebFrame* frame); + bool IsInFullscreen(blink::WebFrame* frame); // Gets the pointer to WebMediaPlayerAndroid given the |player_id|. WebMediaPlayerAndroid* GetMediaPlayer(int player_id); @@ -179,7 +179,7 @@ class RendererMediaPlayerManager : public RenderViewObserver { int next_media_player_id_; // WebFrame of the fullscreen video. - WebKit::WebFrame* fullscreen_frame_; + blink::WebFrame* fullscreen_frame_; DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); }; diff --git a/content/renderer/media/android/stream_texture_factory_android.h b/content/renderer/media/android/stream_texture_factory_android.h index aa304de..849cc06 100644 --- a/content/renderer/media/android/stream_texture_factory_android.h +++ b/content/renderer/media/android/stream_texture_factory_android.h @@ -10,7 +10,7 @@ #include "gpu/command_buffer/common/mailbox.h" #include "ui/gfx/size.h" -namespace WebKit { +namespace blink { class WebGraphicsContext3D; } @@ -75,7 +75,7 @@ class StreamTextureFactory { virtual void SetStreamTextureSize(int32 texture_id, const gfx::Size& size) = 0; - virtual WebKit::WebGraphicsContext3D* Context3d() = 0; + virtual blink::WebGraphicsContext3D* Context3d() = 0; }; } // namespace content diff --git a/content/renderer/media/android/stream_texture_factory_android_impl.cc b/content/renderer/media/android/stream_texture_factory_android_impl.cc index 9c29203..3b421ca 100644 --- a/content/renderer/media/android/stream_texture_factory_android_impl.cc +++ b/content/renderer/media/android/stream_texture_factory_android_impl.cc @@ -80,7 +80,7 @@ void StreamTextureProxyImpl::OnMatrixChanged(const float matrix[16]) { } // namespace StreamTextureFactoryImpl::StreamTextureFactoryImpl( - WebKit::WebGraphicsContext3D* context, + blink::WebGraphicsContext3D* context, GpuChannelHost* channel, int view_id) : context_(context), channel_(channel), view_id_(view_id) { @@ -137,7 +137,7 @@ void StreamTextureFactoryImpl::SetStreamTextureSize( channel_->Send(new GpuChannelMsg_SetStreamTextureSize(stream_id, size)); } -WebKit::WebGraphicsContext3D* StreamTextureFactoryImpl::Context3d() { +blink::WebGraphicsContext3D* StreamTextureFactoryImpl::Context3d() { return context_; } diff --git a/content/renderer/media/android/stream_texture_factory_android_impl.h b/content/renderer/media/android/stream_texture_factory_android_impl.h index f55d23c..0cd3d58 100644 --- a/content/renderer/media/android/stream_texture_factory_android_impl.h +++ b/content/renderer/media/android/stream_texture_factory_android_impl.h @@ -7,7 +7,7 @@ #include "content/renderer/media/android/stream_texture_factory_android.h" -namespace WebKit { +namespace blink { class WebGraphicsContext3D; } @@ -17,7 +17,7 @@ class GpuChannelHost; class StreamTextureFactoryImpl : public StreamTextureFactory { public: - StreamTextureFactoryImpl(WebKit::WebGraphicsContext3D* context, + StreamTextureFactoryImpl(blink::WebGraphicsContext3D* context, GpuChannelHost* channel, int view_id); virtual ~StreamTextureFactoryImpl(); @@ -33,10 +33,10 @@ class StreamTextureFactoryImpl : public StreamTextureFactory { virtual void DestroyStreamTexture(unsigned texture_id) OVERRIDE; virtual void SetStreamTextureSize(int32 texture_id, const gfx::Size& size) OVERRIDE; - virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; + virtual blink::WebGraphicsContext3D* Context3d() OVERRIDE; private: - WebKit::WebGraphicsContext3D* context_; + blink::WebGraphicsContext3D* context_; scoped_refptr<GpuChannelHost> channel_; int view_id_; diff --git a/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc b/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc index 3e99e88..c284328 100644 --- a/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc +++ b/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.cc @@ -154,7 +154,7 @@ unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture( gpu::Mailbox* texture_mailbox, unsigned* texture_mailbox_sync_point) { DCHECK(context_provider_); - WebKit::WebGraphicsContext3D* context = context_provider_->Context3d(); + blink::WebGraphicsContext3D* context = context_provider_->Context3d(); unsigned stream_id = 0; if (context->makeContextCurrent()) { *texture_id = context->createTexture(); @@ -173,7 +173,7 @@ unsigned StreamTextureFactorySynchronousImpl::CreateStreamTexture( void StreamTextureFactorySynchronousImpl::DestroyStreamTexture( unsigned texture_id) { DCHECK(context_provider_); - WebKit::WebGraphicsContext3D* context = context_provider_->Context3d(); + blink::WebGraphicsContext3D* context = context_provider_->Context3d(); if (context->makeContextCurrent()) { context->destroyStreamTextureCHROMIUM(texture_id); context->deleteTexture(texture_id); @@ -185,7 +185,7 @@ void StreamTextureFactorySynchronousImpl::SetStreamTextureSize( int32 stream_id, const gfx::Size& size) {} -WebKit::WebGraphicsContext3D* +blink::WebGraphicsContext3D* StreamTextureFactorySynchronousImpl::Context3d() { DCHECK(context_provider_); return context_provider_->Context3d(); diff --git a/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h b/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h index 807cc96..51c77e5 100644 --- a/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h +++ b/content/renderer/media/android/stream_texture_factory_android_synchronous_impl.h @@ -13,7 +13,7 @@ namespace gfx { class SurfaceTexture; } -namespace WebKit { +namespace blink { class WebGraphicsContext3D; } @@ -27,7 +27,7 @@ class StreamTextureFactorySynchronousImpl : public StreamTextureFactory { virtual scoped_refptr<gfx::SurfaceTexture> GetSurfaceTexture( uint32 stream_id) = 0; - virtual WebKit::WebGraphicsContext3D* Context3d() = 0; + virtual blink::WebGraphicsContext3D* Context3d() = 0; protected: friend class base::RefCountedThreadSafe<ContextProvider>; @@ -52,7 +52,7 @@ class StreamTextureFactorySynchronousImpl : public StreamTextureFactory { virtual void DestroyStreamTexture(unsigned texture_id) OVERRIDE; virtual void SetStreamTextureSize(int32 stream_id, const gfx::Size& size) OVERRIDE; - virtual WebKit::WebGraphicsContext3D* Context3d() OVERRIDE; + virtual blink::WebGraphicsContext3D* Context3d() OVERRIDE; private: CreateContextProviderCallback create_context_provider_callback_; diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc index 9e83eb5..c0cc390 100644 --- a/content/renderer/media/android/webmediaplayer_android.cc +++ b/content/renderer/media/android/webmediaplayer_android.cc @@ -47,11 +47,11 @@ static const uint32 kGLTextureExternalOES = 0x8D65; -using WebKit::WebMediaPlayer; -using WebKit::WebSize; -using WebKit::WebString; -using WebKit::WebTimeRanges; -using WebKit::WebURL; +using blink::WebMediaPlayer; +using blink::WebSize; +using blink::WebString; +using blink::WebTimeRanges; +using blink::WebURL; using media::MediaPlayerAndroid; using media::VideoFrame; @@ -75,8 +75,8 @@ void WebMediaPlayerAndroid::OnReleaseRemotePlaybackTexture( } WebMediaPlayerAndroid::WebMediaPlayerAndroid( - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, + blink::WebFrame* frame, + blink::WebMediaPlayerClient* client, base::WeakPtr<WebMediaPlayerDelegate> delegate, RendererMediaPlayerManager* manager, StreamTextureFactory* factory, @@ -147,7 +147,7 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid( #endif TryCreateStreamTextureProxyIfNeeded(); - if (WebKit::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()) { + if (blink::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()) { // TODO(xhwang): Report an error when there is encrypted stream but EME is // not enabled. Currently the player just doesn't start and waits for ever. decryptor_.reset(new ProxyDecryptor( @@ -180,7 +180,7 @@ WebMediaPlayerAndroid::~WebMediaPlayerAndroid() { stream_texture_factory_->DestroyStreamTexture(texture_id_); if (remote_playback_texture_id_) { - WebKit::WebGraphicsContext3D* context = + blink::WebGraphicsContext3D* context = stream_texture_factory_->Context3d(); if (context->makeContextCurrent()) context->deleteTexture(remote_playback_texture_id_); @@ -212,7 +212,7 @@ WebMediaPlayerAndroid::~WebMediaPlayerAndroid() { } void WebMediaPlayerAndroid::load(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode) { switch (load_type) { case LoadTypeURL: @@ -508,14 +508,14 @@ bool WebMediaPlayerAndroid::didLoadingProgress() const { return ret; } -void WebMediaPlayerAndroid::paint(WebKit::WebCanvas* canvas, - const WebKit::WebRect& rect, +void WebMediaPlayerAndroid::paint(blink::WebCanvas* canvas, + const blink::WebRect& rect, unsigned char alpha) { NOTIMPLEMENTED(); } bool WebMediaPlayerAndroid::copyVideoTextureToPlatformTexture( - WebKit::WebGraphicsContext3D* web_graphics_context, + blink::WebGraphicsContext3D* web_graphics_context, unsigned int texture, unsigned int level, unsigned int internal_format, @@ -908,7 +908,7 @@ void WebMediaPlayerAndroid::DrawRemotePlaybackIcon() { DCHECK(main_thread_checker_.CalledOnValidThread()); if (!video_weblayer_) return; - WebKit::WebGraphicsContext3D* context = stream_texture_factory_->Context3d(); + blink::WebGraphicsContext3D* context = stream_texture_factory_->Context3d(); if (!context->makeContextCurrent()) return; @@ -1171,7 +1171,7 @@ bool WebMediaPlayerAndroid::RetrieveGeometryChange(gfx::RectF* rect) { // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is // that UMA_* macros require the names to be constant throughout the process' // lifetime. -static void EmeUMAHistogramEnumeration(const WebKit::WebString& key_system, +static void EmeUMAHistogramEnumeration(const blink::WebString& key_system, const std::string& method, int sample, int boundary_value) { @@ -1181,7 +1181,7 @@ static void EmeUMAHistogramEnumeration(const WebKit::WebString& key_system, base::Histogram::kUmaTargetedHistogramFlag)->Add(sample); } -static void EmeUMAHistogramCounts(const WebKit::WebString& key_system, +static void EmeUMAHistogramCounts(const blink::WebString& key_system, const std::string& method, int sample) { // Use the same parameters as UMA_HISTOGRAM_COUNTS. @@ -1351,7 +1351,7 @@ void WebMediaPlayerAndroid::OnKeyError(const std::string& session_id, client_->keyError( current_key_system_, WebString::fromUTF8(session_id), - static_cast<WebKit::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), + static_cast<blink::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), system_code); } @@ -1370,7 +1370,7 @@ void WebMediaPlayerAndroid::OnKeyMessage(const std::string& session_id, } void WebMediaPlayerAndroid::OnMediaSourceOpened( - WebKit::WebMediaSource* web_media_source) { + blink::WebMediaSource* web_media_source) { client_->mediaSourceOpened(web_media_source); } @@ -1378,8 +1378,8 @@ void WebMediaPlayerAndroid::OnNeedKey(const std::string& type, const std::vector<uint8>& init_data) { DCHECK(main_loop_->BelongsToCurrentThread()); // Do not fire NeedKey event if encrypted media is not enabled. - if (!WebKit::WebRuntimeFeatures::isEncryptedMediaEnabled() && - !WebKit::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()) { + if (!blink::WebRuntimeFeatures::isEncryptedMediaEnabled() && + !blink::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()) { return; } @@ -1414,7 +1414,7 @@ void WebMediaPlayerAndroid::DoReleaseRemotePlaybackTexture(uint32 sync_point) { DCHECK(main_thread_checker_.CalledOnValidThread()); DCHECK(remote_playback_texture_id_); - WebKit::WebGraphicsContext3D* context = + blink::WebGraphicsContext3D* context = stream_texture_factory_->Context3d(); if (sync_point) diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h index 0edc3ef..42fe04c 100644 --- a/content/renderer/media/android/webmediaplayer_android.h +++ b/content/renderer/media/android/webmediaplayer_android.h @@ -36,7 +36,7 @@ class Demuxer; class MediaLog; } -namespace WebKit { +namespace blink { class WebFrame; } @@ -53,12 +53,12 @@ class MediaStreamAudioRenderer; class MediaStreamClient; #endif -// This class implements WebKit::WebMediaPlayer by keeping the android +// This class implements blink::WebMediaPlayer by keeping the android // media player in the browser process. It listens to all the status changes // sent from the browser process and sends playback controls to the media // player. class WebMediaPlayerAndroid - : public WebKit::WebMediaPlayer, + : public blink::WebMediaPlayer, public cc::VideoFrameProvider, public base::MessageLoop::DestructionObserver, public base::SupportsWeakPtr<WebMediaPlayerAndroid> { @@ -71,8 +71,8 @@ class WebMediaPlayerAndroid // blink, so that enterFullscreen() will not be called if another video is // already in fullscreen. WebMediaPlayerAndroid( - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, + blink::WebFrame* frame, + blink::WebMediaPlayerClient* client, base::WeakPtr<WebMediaPlayerDelegate> delegate, RendererMediaPlayerManager* manager, StreamTextureFactory* factory, @@ -80,14 +80,14 @@ class WebMediaPlayerAndroid media::MediaLog* media_log); virtual ~WebMediaPlayerAndroid(); - // WebKit::WebMediaPlayer implementation. + // blink::WebMediaPlayer implementation. virtual void enterFullscreen(); virtual void exitFullscreen(); virtual bool canEnterFullscreen() const; // Resource loading. virtual void load(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode) OVERRIDE; // Playback controls. @@ -99,16 +99,16 @@ class WebMediaPlayerAndroid virtual bool supportsSave() const; virtual void setRate(double rate); virtual void setVolume(double volume); - virtual const WebKit::WebTimeRanges& buffered(); + virtual const blink::WebTimeRanges& buffered(); virtual double maxTimeSeekable() const; // Methods for painting. - virtual void paint(WebKit::WebCanvas* canvas, - const WebKit::WebRect& rect, + virtual void paint(blink::WebCanvas* canvas, + const blink::WebRect& rect, unsigned char alpha); virtual bool copyVideoTextureToPlatformTexture( - WebKit::WebGraphicsContext3D* web_graphics_context, + blink::WebGraphicsContext3D* web_graphics_context, unsigned int texture, unsigned int level, unsigned int internal_format, @@ -121,7 +121,7 @@ class WebMediaPlayerAndroid virtual bool hasAudio() const; // Dimensions of the video. - virtual WebKit::WebSize naturalSize() const; + virtual blink::WebSize naturalSize() const; // Getters of playback state. virtual bool paused() const; @@ -132,8 +132,8 @@ class WebMediaPlayerAndroid virtual bool didLoadingProgress() const; // Internal states of loading and network. - virtual WebKit::WebMediaPlayer::NetworkState networkState() const; - virtual WebKit::WebMediaPlayer::ReadyState readyState() const; + virtual blink::WebMediaPlayer::NetworkState networkState() const; + virtual blink::WebMediaPlayer::ReadyState readyState() const; virtual bool hasSingleSecurityOrigin() const; virtual bool didPassCORSAccessCheck() const; @@ -198,19 +198,19 @@ class WebMediaPlayerAndroid #endif virtual MediaKeyException generateKeyRequest( - const WebKit::WebString& key_system, + const blink::WebString& key_system, const unsigned char* init_data, unsigned init_data_length) OVERRIDE; virtual MediaKeyException addKey( - const WebKit::WebString& key_system, + const blink::WebString& key_system, const unsigned char* key, unsigned key_length, const unsigned char* init_data, unsigned init_data_length, - const WebKit::WebString& session_id) OVERRIDE; + const blink::WebString& session_id) OVERRIDE; virtual MediaKeyException cancelKeyRequest( - const WebKit::WebString& key_system, - const WebKit::WebString& session_id) OVERRIDE; + const blink::WebString& key_system, + const blink::WebString& session_id) OVERRIDE; void OnKeyAdded(const std::string& session_id); void OnKeyError(const std::string& session_id, @@ -220,7 +220,7 @@ class WebMediaPlayerAndroid const std::vector<uint8>& message, const std::string& destination_url); - void OnMediaSourceOpened(WebKit::WebMediaSource* web_media_source); + void OnMediaSourceOpened(blink::WebMediaSource* web_media_source); void OnNeedKey(const std::string& type, const std::vector<uint8>& init_data); @@ -242,8 +242,8 @@ class WebMediaPlayerAndroid void UpdatePlayingState(bool is_playing_); // Helper methods for posting task for setting states and update WebKit. - void UpdateNetworkState(WebKit::WebMediaPlayer::NetworkState state); - void UpdateReadyState(WebKit::WebMediaPlayer::ReadyState state); + void UpdateNetworkState(blink::WebMediaPlayer::NetworkState state); + void UpdateReadyState(blink::WebMediaPlayer::ReadyState state); void TryCreateStreamTextureProxyIfNeeded(); void DoCreateStreamTexture(); @@ -270,22 +270,22 @@ class WebMediaPlayerAndroid // Actually do the work for generateKeyRequest/addKey so they can easily // report results to UMA. MediaKeyException GenerateKeyRequestInternal( - const WebKit::WebString& key_system, + const blink::WebString& key_system, const unsigned char* init_data, unsigned init_data_length); - MediaKeyException AddKeyInternal(const WebKit::WebString& key_system, + MediaKeyException AddKeyInternal(const blink::WebString& key_system, const unsigned char* key, unsigned key_length, const unsigned char* init_data, unsigned init_data_length, - const WebKit::WebString& session_id); + const blink::WebString& session_id); MediaKeyException CancelKeyRequestInternal( - const WebKit::WebString& key_system, - const WebKit::WebString& session_id); + const blink::WebString& key_system, + const blink::WebString& session_id); - WebKit::WebFrame* const frame_; + blink::WebFrame* const frame_; - WebKit::WebMediaPlayerClient* const client_; + blink::WebMediaPlayerClient* const client_; // |delegate_| is used to notify the browser process of the player status, so // that the browser process can control screen locks. @@ -295,13 +295,13 @@ class WebMediaPlayerAndroid base::WeakPtr<WebMediaPlayerDelegate> delegate_; // Save the list of buffered time ranges. - WebKit::WebTimeRanges buffered_; + blink::WebTimeRanges buffered_; // Size of the video. - WebKit::WebSize natural_size_; + blink::WebSize natural_size_; // Size that has been sent to StreamTexture. - WebKit::WebSize cached_stream_texture_size_; + blink::WebSize cached_stream_texture_size_; // The video frame object used for rendering by the compositor. scoped_refptr<media::VideoFrame> current_frame_; @@ -346,8 +346,8 @@ class WebMediaPlayerAndroid int player_id_; // Current player states. - WebKit::WebMediaPlayer::NetworkState network_state_; - WebKit::WebMediaPlayer::ReadyState ready_state_; + blink::WebMediaPlayer::NetworkState network_state_; + blink::WebMediaPlayer::ReadyState ready_state_; // GL texture ID used to show the remote playback icon. unsigned int remote_playback_texture_id_; @@ -437,7 +437,7 @@ class WebMediaPlayerAndroid // The currently selected key system. Empty string means that no key system // has been selected. - WebKit::WebString current_key_system_; + blink::WebString current_key_system_; // Temporary for EME v0.1. In the future the init data type should be passed // through GenerateKeyRequest() directly from WebKit. diff --git a/content/renderer/media/audio_decoder.cc b/content/renderer/media/audio_decoder.cc index 64cf6dd..dd9f1fa 100644 --- a/content/renderer/media/audio_decoder.cc +++ b/content/renderer/media/audio_decoder.cc @@ -19,13 +19,13 @@ using media::AudioBus; using media::AudioFileReader; using media::InMemoryUrlProtocol; using std::vector; -using WebKit::WebAudioBus; +using blink::WebAudioBus; namespace content { // Decode in-memory audio file data. bool DecodeAudioFileData( - WebKit::WebAudioBus* destination_bus, + blink::WebAudioBus* destination_bus, const char* data, size_t data_size, double sample_rate) { DCHECK(destination_bus); if (!destination_bus) diff --git a/content/renderer/media/audio_decoder.h b/content/renderer/media/audio_decoder.h index bef404b..9c14ed9 100644 --- a/content/renderer/media/audio_decoder.h +++ b/content/renderer/media/audio_decoder.h @@ -7,12 +7,12 @@ #include "base/basictypes.h" -namespace WebKit { class WebAudioBus; } +namespace blink { class WebAudioBus; } namespace content { // Decode in-memory audio file data. -bool DecodeAudioFileData(WebKit::WebAudioBus* destination_bus, const char* data, +bool DecodeAudioFileData(blink::WebAudioBus* destination_bus, const char* data, size_t data_size, double sample_rate); } // namespace content diff --git a/content/renderer/media/buffered_data_source.cc b/content/renderer/media/buffered_data_source.cc index 861111e..98c58eb 100644 --- a/content/renderer/media/buffered_data_source.cc +++ b/content/renderer/media/buffered_data_source.cc @@ -10,7 +10,7 @@ #include "media/base/media_log.h" #include "net/base/net_errors.h" -using WebKit::WebFrame; +using blink::WebFrame; namespace { diff --git a/content/renderer/media/buffered_data_source.h b/content/renderer/media/buffered_data_source.h index 6b1d68c..4cad071 100644 --- a/content/renderer/media/buffered_data_source.h +++ b/content/renderer/media/buffered_data_source.h @@ -39,7 +39,7 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { // |downloading_cb| will be called whenever the downloading/paused state of // the source changes. BufferedDataSource(const scoped_refptr<base::MessageLoopProxy>& render_loop, - WebKit::WebFrame* frame, + blink::WebFrame* frame, media::MediaLog* media_log, const DownloadingCB& downloading_cb); virtual ~BufferedDataSource(); @@ -161,7 +161,7 @@ class CONTENT_EXPORT BufferedDataSource : public media::DataSource { bool streaming_; // A webframe for loading. - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; // A resource loader for the media resource. scoped_ptr<BufferedResourceLoader> loader_; diff --git a/content/renderer/media/buffered_data_source_unittest.cc b/content/renderer/media/buffered_data_source_unittest.cc index e1ef766..b7808a8 100644 --- a/content/renderer/media/buffered_data_source_unittest.cc +++ b/content/renderer/media/buffered_data_source_unittest.cc @@ -22,11 +22,11 @@ using ::testing::InSequence; using ::testing::NiceMock; using ::testing::StrictMock; -using WebKit::WebFrame; -using WebKit::WebString; -using WebKit::WebURLLoader; -using WebKit::WebURLResponse; -using WebKit::WebView; +using blink::WebFrame; +using blink::WebString; +using blink::WebURLLoader; +using blink::WebURLResponse; +using blink::WebView; namespace content { diff --git a/content/renderer/media/buffered_resource_loader.cc b/content/renderer/media/buffered_resource_loader.cc index a99f7ec..278d5ba 100644 --- a/content/renderer/media/buffered_resource_loader.cc +++ b/content/renderer/media/buffered_resource_loader.cc @@ -20,13 +20,13 @@ #include "third_party/WebKit/public/web/WebKit.h" #include "third_party/WebKit/public/web/WebURLLoaderOptions.h" -using WebKit::WebFrame; -using WebKit::WebString; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLLoaderOptions; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebString; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLLoaderOptions; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { @@ -169,7 +169,7 @@ void BufferedResourceLoader::Start( last_byte_position_))); } - frame->setReferrerForRequest(request, WebKit::WebURL()); + frame->setReferrerForRequest(request, blink::WebURL()); // Disable compression, compression for audio/video doesn't make sense... request.setHTTPHeaderField( @@ -322,7 +322,7 @@ bool BufferedResourceLoader::range_supported() { } ///////////////////////////////////////////////////////////////////////////// -// WebKit::WebURLLoaderClient implementation. +// blink::WebURLLoaderClient implementation. void BufferedResourceLoader::willSendRequest( WebURLLoader* loader, WebURLRequest& newRequest, @@ -332,7 +332,7 @@ void BufferedResourceLoader::willSendRequest( // In this case we shouldn't do anything. if (start_cb_.is_null()) { // Set the url in the request to an invalid value (empty url). - newRequest.setURL(WebKit::WebURL()); + newRequest.setURL(blink::WebURL()); return; } @@ -467,7 +467,7 @@ void BufferedResourceLoader::didReceiveData( } void BufferedResourceLoader::didDownloadData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, int dataLength, int encoded_data_length) { NOTIMPLEMENTED(); diff --git a/content/renderer/media/buffered_resource_loader.h b/content/renderer/media/buffered_resource_loader.h index 24b5ad8..fffa44c 100644 --- a/content/renderer/media/buffered_resource_loader.h +++ b/content/renderer/media/buffered_resource_loader.h @@ -36,7 +36,7 @@ const char kHttpsScheme[] = "https"; // pausing resource loading when the in-memory buffer is full and resuming // resource loading when there is available capacity. class CONTENT_EXPORT BufferedResourceLoader - : NON_EXPORTED_BASE(public WebKit::WebURLLoaderClient) { + : NON_EXPORTED_BASE(public blink::WebURLLoaderClient) { public: // kNeverDefer - Aggresively buffer; never defer loading while paused. // kReadThenDefer - Request only enough data to fulfill read requests. @@ -106,7 +106,7 @@ class CONTENT_EXPORT BufferedResourceLoader void Start(const StartCB& start_cb, const LoadingStateChangedCB& loading_cb, const ProgressCB& progress_cb, - WebKit::WebFrame* frame); + blink::WebFrame* frame); // Stops everything associated with this loader, including active URL loads // and pending callbacks. @@ -138,36 +138,36 @@ class CONTENT_EXPORT BufferedResourceLoader // Returns true if the server supports byte range requests. bool range_supported(); - // WebKit::WebURLLoaderClient implementation. + // blink::WebURLLoaderClient implementation. virtual void willSendRequest( - WebKit::WebURLLoader* loader, - WebKit::WebURLRequest& newRequest, - const WebKit::WebURLResponse& redirectResponse); + blink::WebURLLoader* loader, + blink::WebURLRequest& newRequest, + const blink::WebURLResponse& redirectResponse); virtual void didSendData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, unsigned long long bytesSent, unsigned long long totalBytesToBeSent); virtual void didReceiveResponse( - WebKit::WebURLLoader* loader, - const WebKit::WebURLResponse& response); + blink::WebURLLoader* loader, + const blink::WebURLResponse& response); virtual void didDownloadData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, int data_length, int encoded_data_length); virtual void didReceiveData( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length); virtual void didReceiveCachedMetadata( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, const char* data, int dataLength); virtual void didFinishLoading( - WebKit::WebURLLoader* loader, + blink::WebURLLoader* loader, double finishTime); virtual void didFail( - WebKit::WebURLLoader* loader, - const WebKit::WebURLError&); + blink::WebURLLoader* loader, + const blink::WebURLError&); // Returns true if the media resource has a single origin, false otherwise. // Only valid to call after Start() has completed. @@ -235,7 +235,7 @@ class CONTENT_EXPORT BufferedResourceLoader void ReadInternal(); // If we have made a range request, verify the response from the server. - bool VerifyPartialResponse(const WebKit::WebURLResponse& response); + bool VerifyPartialResponse(const blink::WebURLResponse& response); // Returns the value for a range request header using parameters // |first_byte_position| and |last_byte_position|. Negative numbers other @@ -316,7 +316,7 @@ class CONTENT_EXPORT BufferedResourceLoader int last_offset_; // Injected WebURLLoader instance for testing purposes. - scoped_ptr<WebKit::WebURLLoader> test_loader_; + scoped_ptr<blink::WebURLLoader> test_loader_; // Bitrate of the media. Set to 0 if unknown. int bitrate_; diff --git a/content/renderer/media/buffered_resource_loader_unittest.cc b/content/renderer/media/buffered_resource_loader_unittest.cc index cd8a4b6..656f1e8 100644 --- a/content/renderer/media/buffered_resource_loader_unittest.cc +++ b/content/renderer/media/buffered_resource_loader_unittest.cc @@ -30,10 +30,10 @@ using ::testing::Return; using ::testing::Truly; using ::testing::NiceMock; -using WebKit::WebString; -using WebKit::WebURLError; -using WebKit::WebURLResponse; -using WebKit::WebView; +using blink::WebString; +using blink::WebURLError; +using blink::WebURLResponse; +using blink::WebView; namespace content { @@ -53,7 +53,7 @@ enum NetworkState { }; // Predicate that tests that request disallows compressed data. -static bool CorrectAcceptEncoding(const WebKit::WebURLRequest &request) { +static bool CorrectAcceptEncoding(const blink::WebURLRequest &request) { std::string value = request.httpHeaderField( WebString::fromUTF8(net::HttpRequestHeaders::kAcceptEncoding)).utf8(); return (value.find("identity;q=1") != std::string::npos) && @@ -88,7 +88,7 @@ class BufferedResourceLoaderTest : public testing::Test { // |test_loader_| will be used when Start() is called. url_loader_ = new NiceMock<MockWebURLLoader>(); - loader_->test_loader_ = scoped_ptr<WebKit::WebURLLoader>(url_loader_); + loader_->test_loader_ = scoped_ptr<blink::WebURLLoader>(url_loader_); } void SetLoaderBuffer(int forward_capacity, int backward_capacity) { @@ -187,8 +187,8 @@ class BufferedResourceLoaderTest : public testing::Test { void Redirect(const char* url) { GURL redirectUrl(url); - WebKit::WebURLRequest newRequest(redirectUrl); - WebKit::WebURLResponse redirectResponse(gurl_); + blink::WebURLRequest newRequest(redirectUrl); + blink::WebURLResponse redirectResponse(gurl_); loader_->willSendRequest(url_loader_, newRequest, redirectResponse); diff --git a/content/renderer/media/cache_util.cc b/content/renderer/media/cache_util.cc index f7326c1..2114ddd 100644 --- a/content/renderer/media/cache_util.cc +++ b/content/renderer/media/cache_util.cc @@ -18,7 +18,7 @@ using base::Time; using base::TimeDelta; using net::HttpVersion; -using WebKit::WebURLResponse; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/media/cache_util.h b/content/renderer/media/cache_util.h index 061e87a..aca8d8a 100644 --- a/content/renderer/media/cache_util.h +++ b/content/renderer/media/cache_util.h @@ -10,7 +10,7 @@ #include "base/basictypes.h" #include "content/common/content_export.h" -namespace WebKit { +namespace blink { class WebURLResponse; } @@ -34,7 +34,7 @@ enum UncacheableReason { // Return the logical OR of the reasons "response" cannot be used for a future // request (using the disk cache), or 0 if it might be useful. uint32 CONTENT_EXPORT GetReasonsForUncacheability( - const WebKit::WebURLResponse& response); + const blink::WebURLResponse& response); } // namespace content diff --git a/content/renderer/media/cache_util_unittest.cc b/content/renderer/media/cache_util_unittest.cc index 806b201..2db66b9 100644 --- a/content/renderer/media/cache_util_unittest.cc +++ b/content/renderer/media/cache_util_unittest.cc @@ -14,8 +14,8 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -using WebKit::WebString; -using WebKit::WebURLResponse; +using blink::WebString; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/media/crypto/content_decryption_module_factory.cc b/content/renderer/media/crypto/content_decryption_module_factory.cc index 34f0525..7bfa45b 100644 --- a/content/renderer/media/crypto/content_decryption_module_factory.cc +++ b/content/renderer/media/crypto/content_decryption_module_factory.cc @@ -28,13 +28,13 @@ namespace content { // closeHelperPluginSoon() when the Helper Plugin is no longer needed. static scoped_refptr<PepperPluginInstanceImpl> CreateHelperPlugin( const std::string& plugin_type, - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame) { + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame) { DCHECK(web_media_player_client); DCHECK(web_frame); - WebKit::WebPlugin* web_plugin = web_media_player_client->createHelperPlugin( - WebKit::WebString::fromUTF8(plugin_type), web_frame); + blink::WebPlugin* web_plugin = web_media_player_client->createHelperPlugin( + blink::WebString::fromUTF8(plugin_type), web_frame); if (!web_plugin) return NULL; @@ -51,8 +51,8 @@ static scoped_ptr<media::MediaKeys> CreatePpapiDecryptor( const media::KeyErrorCB& key_error_cb, const media::KeyMessageCB& key_message_cb, const base::Closure& destroy_plugin_cb, - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame) { + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame) { DCHECK(web_media_player_client); DCHECK(web_frame); @@ -81,8 +81,8 @@ static scoped_ptr<media::MediaKeys> CreatePpapiDecryptor( } void ContentDecryptionModuleFactory::DestroyHelperPlugin( - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame) { + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame) { web_media_player_client->closeHelperPluginSoon(web_frame); } #endif // defined(ENABLE_PEPPER_CDMS) @@ -90,8 +90,8 @@ void ContentDecryptionModuleFactory::DestroyHelperPlugin( scoped_ptr<media::MediaKeys> ContentDecryptionModuleFactory::Create( const std::string& key_system, #if defined(ENABLE_PEPPER_CDMS) - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame, + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame, const base::Closure& destroy_plugin_cb, #elif defined(OS_ANDROID) RendererMediaPlayerManager* manager, diff --git a/content/renderer/media/crypto/content_decryption_module_factory.h b/content/renderer/media/crypto/content_decryption_module_factory.h index 3d32832..6a84f0f 100644 --- a/content/renderer/media/crypto/content_decryption_module_factory.h +++ b/content/renderer/media/crypto/content_decryption_module_factory.h @@ -13,7 +13,7 @@ class GURL; #if defined(ENABLE_PEPPER_CDMS) -namespace WebKit { +namespace blink { class WebFrame; class WebMediaPlayerClient; } @@ -29,8 +29,8 @@ class ContentDecryptionModuleFactory { const std::string& key_system, #if defined(ENABLE_PEPPER_CDMS) // TODO(ddorwin): We need different pointers for the WD API. - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame, + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame, const base::Closure& destroy_plugin_cb, #elif defined(OS_ANDROID) RendererMediaPlayerManager* manager, @@ -43,8 +43,8 @@ class ContentDecryptionModuleFactory { #if defined(ENABLE_PEPPER_CDMS) static void DestroyHelperPlugin( - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame); + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame); #endif // defined(ENABLE_PEPPER_CDMS) }; diff --git a/content/renderer/media/crypto/key_systems.cc b/content/renderer/media/crypto/key_systems.cc index 4201533..cc7cdd1 100644 --- a/content/renderer/media/crypto/key_systems.cc +++ b/content/renderer/media/crypto/key_systems.cc @@ -21,7 +21,7 @@ namespace content { // Convert a WebString to ASCII, falling back on an empty string in the case // of a non-ASCII string. -static std::string ToASCIIOrEmpty(const WebKit::WebString& string) { +static std::string ToASCIIOrEmpty(const blink::WebString& string) { return IsStringASCII(string) ? UTF16ToASCII(string) : std::string(); } @@ -317,7 +317,7 @@ std::vector<uint8> KeySystems::GetUUID(const std::string& concrete_key_system) { //------------------------------------------------------------------------------ -bool IsConcreteSupportedKeySystem(const WebKit::WebString& key_system) { +bool IsConcreteSupportedKeySystem(const blink::WebString& key_system) { return KeySystems::GetInstance().IsConcreteSupportedKeySystem( ToASCIIOrEmpty(key_system)); } @@ -330,7 +330,7 @@ bool IsSupportedKeySystemWithMediaMimeType( mime_type, codecs, key_system); } -std::string KeySystemNameForUMA(const WebKit::WebString& key_system) { +std::string KeySystemNameForUMA(const blink::WebString& key_system) { return KeySystemNameForUMAInternal(key_system); } diff --git a/content/renderer/media/crypto/key_systems.h b/content/renderer/media/crypto/key_systems.h index 47dc06a..597395a 100644 --- a/content/renderer/media/crypto/key_systems.h +++ b/content/renderer/media/crypto/key_systems.h @@ -11,7 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "content/common/content_export.h" -namespace WebKit { +namespace blink { class WebString; } @@ -24,7 +24,7 @@ namespace content { // |key_system| supports a specific type of media or to check parent key // systems. CONTENT_EXPORT bool IsConcreteSupportedKeySystem( - const WebKit::WebString& key_system); + const blink::WebString& key_system); // Returns whether |key_sytem| supports the specified media type and codec(s). CONTENT_EXPORT bool IsSupportedKeySystemWithMediaMimeType( @@ -34,7 +34,7 @@ CONTENT_EXPORT bool IsSupportedKeySystemWithMediaMimeType( // Returns a name for |key_system| suitable to UMA logging. CONTENT_EXPORT std::string KeySystemNameForUMA( - const WebKit::WebString& key_system); + const blink::WebString& key_system); // Returns whether AesDecryptor can be used for the given |concrete_key_system|. CONTENT_EXPORT bool CanUseAesDecryptor(const std::string& concrete_key_system); diff --git a/content/renderer/media/crypto/key_systems_info.cc b/content/renderer/media/crypto/key_systems_info.cc index 2b1828c..c6aa2b4 100644 --- a/content/renderer/media/crypto/key_systems_info.cc +++ b/content/renderer/media/crypto/key_systems_info.cc @@ -14,7 +14,7 @@ namespace content { static const char kClearKeyKeySystem[] = "webkit-org.w3.clearkey"; -std::string KeySystemNameForUMAInternal(const WebKit::WebString& key_system) { +std::string KeySystemNameForUMAInternal(const blink::WebString& key_system) { if (key_system == kClearKeyKeySystem) return "ClearKey"; #if defined(WIDEVINE_CDM_AVAILABLE) diff --git a/content/renderer/media/crypto/key_systems_info.h b/content/renderer/media/crypto/key_systems_info.h index 086c318..e121e82 100644 --- a/content/renderer/media/crypto/key_systems_info.h +++ b/content/renderer/media/crypto/key_systems_info.h @@ -7,7 +7,7 @@ #include <string> -namespace WebKit { +namespace blink { class WebString; } @@ -17,7 +17,7 @@ namespace content { // This function can be called frequently. Hence this function should be // implemented not to impact performance and does not rely on the main // key system map. -std::string KeySystemNameForUMAInternal(const WebKit::WebString& key_system); +std::string KeySystemNameForUMAInternal(const blink::WebString& key_system); } // namespace content diff --git a/content/renderer/media/crypto/key_systems_unittest.cc b/content/renderer/media/crypto/key_systems_unittest.cc index 624b811..9333279 100644 --- a/content/renderer/media/crypto/key_systems_unittest.cc +++ b/content/renderer/media/crypto/key_systems_unittest.cc @@ -33,7 +33,7 @@ #endif // defined(NDEBUG) #endif // defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) -using WebKit::WebString; +using blink::WebString; // These are the (fake) key systems that are registered for these tests. // kUsesAes uses the AesDecryptor like Clear Key. diff --git a/content/renderer/media/crypto/proxy_decryptor.cc b/content/renderer/media/crypto/proxy_decryptor.cc index d0b7084..a75e71c 100644 --- a/content/renderer/media/crypto/proxy_decryptor.cc +++ b/content/renderer/media/crypto/proxy_decryptor.cc @@ -23,8 +23,8 @@ void ProxyDecryptor::DestroyHelperPlugin() { ProxyDecryptor::ProxyDecryptor( #if defined(ENABLE_PEPPER_CDMS) - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame, + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame, #elif defined(OS_ANDROID) RendererMediaPlayerManager* manager, int media_keys_id, diff --git a/content/renderer/media/crypto/proxy_decryptor.h b/content/renderer/media/crypto/proxy_decryptor.h index 336819f..686270f 100644 --- a/content/renderer/media/crypto/proxy_decryptor.h +++ b/content/renderer/media/crypto/proxy_decryptor.h @@ -17,7 +17,7 @@ class GURL; -namespace WebKit { +namespace blink { #if defined(ENABLE_PEPPER_CDMS) class WebFrame; class WebMediaPlayerClient; @@ -40,8 +40,8 @@ class ProxyDecryptor : public media::MediaKeys { public: ProxyDecryptor( #if defined(ENABLE_PEPPER_CDMS) - WebKit::WebMediaPlayerClient* web_media_player_client, - WebKit::WebFrame* web_frame, + blink::WebMediaPlayerClient* web_media_player_client, + blink::WebFrame* web_frame, #elif defined(OS_ANDROID) RendererMediaPlayerManager* manager, int media_keys_id, @@ -91,8 +91,8 @@ class ProxyDecryptor : public media::MediaKeys { void DestroyHelperPlugin(); // Needed to create the PpapiDecryptor. - WebKit::WebMediaPlayerClient* web_media_player_client_; - WebKit::WebFrame* web_frame_; + blink::WebMediaPlayerClient* web_media_player_client_; + blink::WebFrame* web_frame_; #elif defined(OS_ANDROID) RendererMediaPlayerManager* manager_; int media_keys_id_; diff --git a/content/renderer/media/media_stream_center.cc b/content/renderer/media/media_stream_center.cc index c3ae47a..4a34a46 100644 --- a/content/renderer/media/media_stream_center.cc +++ b/content/renderer/media/media_stream_center.cc @@ -28,19 +28,19 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/libjingle/source/talk/app/webrtc/jsep.h" -using WebKit::WebFrame; -using WebKit::WebView; +using blink::WebFrame; +using blink::WebView; namespace content { -MediaStreamCenter::MediaStreamCenter(WebKit::WebMediaStreamCenterClient* client, +MediaStreamCenter::MediaStreamCenter(blink::WebMediaStreamCenterClient* client, MediaStreamDependencyFactory* factory) : rtc_factory_(factory), next_request_id_(0) {} MediaStreamCenter::~MediaStreamCenter() {} bool MediaStreamCenter::getMediaStreamTrackSources( - const WebKit::WebMediaStreamTrackSourcesRequest& request) { + const blink::WebMediaStreamTrackSourcesRequest& request) { if (!CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableDeviceEnumeration)) { int request_id = next_request_id_++; @@ -53,8 +53,8 @@ bool MediaStreamCenter::getMediaStreamTrackSources( } void MediaStreamCenter::didEnableMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& component) { + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& component) { webrtc::MediaStreamTrackInterface* track = MediaStreamDependencyFactory::GetNativeMediaStreamTrack(component); if (track) @@ -62,8 +62,8 @@ void MediaStreamCenter::didEnableMediaStreamTrack( } void MediaStreamCenter::didDisableMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& component) { + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& component) { webrtc::MediaStreamTrackInterface* track = MediaStreamDependencyFactory::GetNativeMediaStreamTrack(component); if (track) @@ -71,9 +71,9 @@ void MediaStreamCenter::didDisableMediaStreamTrack( } bool MediaStreamCenter::didStopMediaStreamTrack( - const WebKit::WebMediaStreamTrack& web_track) { + const blink::WebMediaStreamTrack& web_track) { DVLOG(1) << "MediaStreamCenter::didStopMediaStreamTrack"; - WebKit::WebMediaStreamSource web_source = web_track.source(); + blink::WebMediaStreamSource web_source = web_track.source(); MediaStreamSourceExtraData* extra_data = static_cast<MediaStreamSourceExtraData*>(web_source.extraData()); if (!extra_data) { @@ -86,7 +86,7 @@ bool MediaStreamCenter::didStopMediaStreamTrack( } void MediaStreamCenter::didStopLocalMediaStream( - const WebKit::WebMediaStream& stream) { + const blink::WebMediaStream& stream) { DVLOG(1) << "MediaStreamCenter::didStopLocalMediaStream"; MediaStreamExtraData* extra_data = static_cast<MediaStreamExtraData*>(stream.extraData()); @@ -101,12 +101,12 @@ void MediaStreamCenter::didStopLocalMediaStream( // MediaStreamTrack by disabling it if the same device is used as source by // multiple tracks. Note that disabling a track here, don't affect the // enabled property in JS. - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; stream.audioTracks(audio_tracks); for (size_t i = 0; i < audio_tracks.size(); ++i) didDisableMediaStreamTrack(stream, audio_tracks[i]); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; stream.videoTracks(video_tracks); for (size_t i = 0; i < video_tracks.size(); ++i) didDisableMediaStreamTrack(stream, video_tracks[i]); @@ -115,15 +115,15 @@ void MediaStreamCenter::didStopLocalMediaStream( } void MediaStreamCenter::didCreateMediaStream( - WebKit::WebMediaStream& stream) { + blink::WebMediaStream& stream) { if (!rtc_factory_) return; rtc_factory_->CreateNativeLocalMediaStream(&stream); } bool MediaStreamCenter::didAddMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track) { + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track) { if (!rtc_factory_) return false; @@ -131,8 +131,8 @@ bool MediaStreamCenter::didAddMediaStreamTrack( } bool MediaStreamCenter::didRemoveMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track) { + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track) { if (!rtc_factory_) return false; @@ -155,29 +155,29 @@ void MediaStreamCenter::OnGetSourcesComplete( RequestMap::iterator request_it = requests_.find(request_id); DCHECK(request_it != requests_.end()); - WebKit::WebVector<WebKit::WebSourceInfo> sourceInfos(devices.size()); + blink::WebVector<blink::WebSourceInfo> sourceInfos(devices.size()); for (size_t i = 0; i < devices.size(); ++i) { const MediaStreamDevice& device = devices[i].device; DCHECK(device.type == MEDIA_DEVICE_AUDIO_CAPTURE || device.type == MEDIA_DEVICE_VIDEO_CAPTURE); - WebKit::WebSourceInfo::VideoFacingMode video_facing; + blink::WebSourceInfo::VideoFacingMode video_facing; switch (device.video_facing) { case MEDIA_VIDEO_FACING_USER: - video_facing = WebKit::WebSourceInfo::VideoFacingModeUser; + video_facing = blink::WebSourceInfo::VideoFacingModeUser; break; case MEDIA_VIDEO_FACING_ENVIRONMENT: - video_facing = WebKit::WebSourceInfo::VideoFacingModeEnvironment; + video_facing = blink::WebSourceInfo::VideoFacingModeEnvironment; break; default: - video_facing = WebKit::WebSourceInfo::VideoFacingModeNone; + video_facing = blink::WebSourceInfo::VideoFacingModeNone; } sourceInfos[i] - .initialize(WebKit::WebString::fromUTF8(device.id), + .initialize(blink::WebString::fromUTF8(device.id), device.type == MEDIA_DEVICE_AUDIO_CAPTURE - ? WebKit::WebSourceInfo::SourceKindAudio - : WebKit::WebSourceInfo::SourceKindVideo, - WebKit::WebString::fromUTF8(device.name), + ? blink::WebSourceInfo::SourceKindAudio + : blink::WebSourceInfo::SourceKindVideo, + blink::WebString::fromUTF8(device.name), video_facing); } request_it->second.requestSucceeded(sourceInfos); diff --git a/content/renderer/media/media_stream_center.h b/content/renderer/media/media_stream_center.h index cc94979..c3f2c36 100644 --- a/content/renderer/media/media_stream_center.h +++ b/content/renderer/media/media_stream_center.h @@ -17,7 +17,7 @@ #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" #include "third_party/WebKit/public/platform/WebMediaStreamTrackSourcesRequest.h" -namespace WebKit { +namespace blink { class WebMediaStreamCenterClient; } @@ -25,41 +25,41 @@ namespace content { class MediaStreamDependencyFactory; class CONTENT_EXPORT MediaStreamCenter - : NON_EXPORTED_BASE(public WebKit::WebMediaStreamCenter), + : NON_EXPORTED_BASE(public blink::WebMediaStreamCenter), public RenderProcessObserver { public: - MediaStreamCenter(WebKit::WebMediaStreamCenterClient* client, + MediaStreamCenter(blink::WebMediaStreamCenterClient* client, MediaStreamDependencyFactory* factory); virtual ~MediaStreamCenter(); private: virtual bool getMediaStreamTrackSources( - const WebKit::WebMediaStreamTrackSourcesRequest& request) OVERRIDE; + const blink::WebMediaStreamTrackSourcesRequest& request) OVERRIDE; virtual void didEnableMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& component) OVERRIDE; + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& component) OVERRIDE; virtual void didDisableMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& component) OVERRIDE; + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& component) OVERRIDE; virtual void didStopLocalMediaStream( - const WebKit::WebMediaStream& stream) OVERRIDE; + const blink::WebMediaStream& stream) OVERRIDE; virtual bool didStopMediaStreamTrack( - const WebKit::WebMediaStreamTrack& web_track) OVERRIDE; + const blink::WebMediaStreamTrack& web_track) OVERRIDE; virtual void didCreateMediaStream( - WebKit::WebMediaStream& stream) OVERRIDE; + blink::WebMediaStream& stream) OVERRIDE; virtual bool didAddMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track) OVERRIDE; + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track) OVERRIDE; virtual bool didRemoveMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track) OVERRIDE; + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track) OVERRIDE; // RenderProcessObserver implementation. virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; @@ -75,7 +75,7 @@ class CONTENT_EXPORT MediaStreamCenter // requests. int next_request_id_; - typedef std::map<int, WebKit::WebMediaStreamTrackSourcesRequest> RequestMap; + typedef std::map<int, blink::WebMediaStreamTrackSourcesRequest> RequestMap; // Maps request ids to request objects. RequestMap requests_; diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc index d1f6284..415f2bd 100644 --- a/content/renderer/media/media_stream_dependency_factory.cc +++ b/content/renderer/media/media_stream_dependency_factory.cc @@ -97,7 +97,7 @@ class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface { P2PSocketDispatcher* socket_dispatcher, talk_base::NetworkManager* network_manager, talk_base::PacketSocketFactory* socket_factory, - WebKit::WebFrame* web_frame) + blink::WebFrame* web_frame) : socket_dispatcher_(socket_dispatcher), network_manager_(network_manager), socket_factory_(socket_factory), @@ -146,14 +146,14 @@ class P2PPortAllocatorFactory : public webrtc::PortAllocatorFactoryInterface { talk_base::NetworkManager* network_manager_; talk_base::PacketSocketFactory* socket_factory_; // Raw ptr to the WebFrame that created the P2PPortAllocatorFactory. - WebKit::WebFrame* web_frame_; + blink::WebFrame* web_frame_; }; // SourceStateObserver is a help class used for observing the startup state // transition of webrtc media sources such as a camera or microphone. // An instance of the object deletes itself after use. // Usage: -// 1. Create an instance of the object with the WebKit::WebMediaStream +// 1. Create an instance of the object with the blink::WebMediaStream // the observed sources belongs to a callback. // 2. Add the sources to the observer using AddSource. // 3. Call StartObserving() @@ -163,7 +163,7 @@ class SourceStateObserver : public webrtc::ObserverInterface, public base::NonThreadSafe { public: SourceStateObserver( - WebKit::WebMediaStream* web_stream, + blink::WebMediaStream* web_stream, const MediaStreamDependencyFactory::MediaSourcesCreatedCallback& callback) : web_stream_(web_stream), ready_callback_(callback), @@ -217,7 +217,7 @@ class SourceStateObserver : public webrtc::ObserverInterface, } } - WebKit::WebMediaStream* web_stream_; + blink::WebMediaStream* web_stream_; MediaStreamDependencyFactory::MediaSourcesCreatedCallback ready_callback_; bool live_; typedef std::vector<scoped_refptr<webrtc::MediaSourceInterface> > @@ -243,9 +243,9 @@ MediaStreamDependencyFactory::~MediaStreamDependencyFactory() { CleanupPeerConnectionFactory(); } -WebKit::WebRTCPeerConnectionHandler* +blink::WebRTCPeerConnectionHandler* MediaStreamDependencyFactory::CreateRTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client) { + blink::WebRTCPeerConnectionHandlerClient* client) { // Save histogram data so we can see how much PeerConnetion is used. // The histogram counts the number of calls to the JS API // webKitRTCPeerConnection. @@ -259,9 +259,9 @@ MediaStreamDependencyFactory::CreateRTCPeerConnectionHandler( void MediaStreamDependencyFactory::CreateNativeMediaSources( int render_view_id, - const WebKit::WebMediaConstraints& audio_constraints, - const WebKit::WebMediaConstraints& video_constraints, - WebKit::WebMediaStream* web_stream, + const blink::WebMediaConstraints& audio_constraints, + const blink::WebMediaConstraints& video_constraints, + blink::WebMediaStream* web_stream, const MediaSourcesCreatedCallback& sources_created) { DVLOG(1) << "MediaStreamDependencyFactory::CreateNativeMediaSources()"; if (!EnsurePeerConnectionFactory()) { @@ -276,10 +276,10 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources( // Create local video sources. RTCMediaConstraints native_video_constraints(video_constraints); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; web_stream->videoTracks(video_tracks); for (size_t i = 0; i < video_tracks.size(); ++i) { - const WebKit::WebMediaStreamSource& source = video_tracks[i].source(); + const blink::WebMediaStreamSource& source = video_tracks[i].source(); MediaStreamSourceExtraData* source_data = static_cast<MediaStreamSourceExtraData*>(source.extraData()); @@ -303,10 +303,10 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources( // microphone or tab audio. RTCMediaConstraints native_audio_constraints(audio_constraints); ApplyFixedAudioConstraints(&native_audio_constraints); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; web_stream->audioTracks(audio_tracks); for (size_t i = 0; i < audio_tracks.size(); ++i) { - const WebKit::WebMediaStreamSource& source = audio_tracks[i].source(); + const blink::WebMediaStreamSource& source = audio_tracks[i].source(); MediaStreamSourceExtraData* source_data = static_cast<MediaStreamSourceExtraData*>(source.extraData()); @@ -344,7 +344,7 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources( } void MediaStreamDependencyFactory::CreateNativeLocalMediaStream( - WebKit::WebMediaStream* web_stream) { + blink::WebMediaStream* web_stream) { DVLOG(1) << "MediaStreamDependencyFactory::CreateNativeLocalMediaStream()"; if (!EnsurePeerConnectionFactory()) { DVLOG(1) << "EnsurePeerConnectionFactory() failed!"; @@ -359,14 +359,14 @@ void MediaStreamDependencyFactory::CreateNativeLocalMediaStream( web_stream->setExtraData(extra_data); // Add audio tracks. - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; web_stream->audioTracks(audio_tracks); for (size_t i = 0; i < audio_tracks.size(); ++i) { AddNativeMediaStreamTrack(*web_stream, audio_tracks[i]); } // Add video tracks. - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; web_stream->videoTracks(video_tracks); for (size_t i = 0; i < video_tracks.size(); ++i) { AddNativeMediaStreamTrack(*web_stream, video_tracks[i]); @@ -374,7 +374,7 @@ void MediaStreamDependencyFactory::CreateNativeLocalMediaStream( } void MediaStreamDependencyFactory::CreateNativeLocalMediaStream( - WebKit::WebMediaStream* web_stream, + blink::WebMediaStream* web_stream, const MediaStreamExtraData::StreamStopCallback& stream_stop) { CreateNativeLocalMediaStream(web_stream); @@ -384,14 +384,14 @@ void MediaStreamDependencyFactory::CreateNativeLocalMediaStream( } bool MediaStreamDependencyFactory::AddNativeMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track) { + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track) { MediaStreamExtraData* extra_data = static_cast<MediaStreamExtraData*>(stream.extraData()); webrtc::MediaStreamInterface* native_stream = extra_data->stream().get(); DCHECK(native_stream); - WebKit::WebMediaStreamSource source = track.source(); + blink::WebMediaStreamSource source = track.source(); MediaStreamSourceExtraData* source_data = static_cast<MediaStreamSourceExtraData*>(source.extraData()); @@ -399,11 +399,11 @@ bool MediaStreamDependencyFactory::AddNativeMediaStreamTrack( // right now they're on the source, so we fetch them from there. RTCMediaConstraints track_constraints(source.constraints()); - WebKit::WebMediaStreamSource::Type type = track.source().type(); - DCHECK(type == WebKit::WebMediaStreamSource::TypeAudio || - type == WebKit::WebMediaStreamSource::TypeVideo); + blink::WebMediaStreamSource::Type type = track.source().type(); + DCHECK(type == blink::WebMediaStreamSource::TypeAudio || + type == blink::WebMediaStreamSource::TypeVideo); - if (type == WebKit::WebMediaStreamSource::TypeAudio) { + if (type == blink::WebMediaStreamSource::TypeAudio) { // Apply default audio constraints that enable echo cancellation, // automatic gain control, noise suppression and high-pass filter. ApplyFixedAudioConstraints(&track_constraints); @@ -426,7 +426,7 @@ bool MediaStreamDependencyFactory::AddNativeMediaStreamTrack( } std::string track_id = UTF16ToUTF8(track.id()); - if (source.type() == WebKit::WebMediaStreamSource::TypeAudio) { + if (source.type() == blink::WebMediaStreamSource::TypeAudio) { scoped_refptr<WebRtcAudioCapturer> capturer; if (GetWebRtcAudioDevice()) capturer = GetWebRtcAudioDevice()->GetDefaultCapturer(); @@ -441,12 +441,12 @@ bool MediaStreamDependencyFactory::AddNativeMediaStreamTrack( audio_track->set_enabled(track.isEnabled()); if (capturer.get()) { - WebKit::WebMediaStreamTrack writable_track = track; + blink::WebMediaStreamTrack writable_track = track; writable_track.setSourceProvider(capturer->audio_source_provider()); } return native_stream->AddTrack(audio_track.get()); } else { - DCHECK(source.type() == WebKit::WebMediaStreamSource::TypeVideo); + DCHECK(source.type() == blink::WebMediaStreamSource::TypeVideo); scoped_refptr<webrtc::VideoTrackInterface> video_track( CreateLocalVideoTrack(track_id, source_data->video_source())); AddNativeTrackToBlinkTrack(video_track.get(), track); @@ -457,7 +457,7 @@ bool MediaStreamDependencyFactory::AddNativeMediaStreamTrack( bool MediaStreamDependencyFactory::AddNativeVideoMediaTrack( const std::string& track_id, - WebKit::WebMediaStream* stream, + blink::WebMediaStream* stream, cricket::VideoCapturer* capturer) { if (!stream) { LOG(ERROR) << "AddNativeVideoMediaTrack called with null WebMediaStream."; @@ -476,11 +476,11 @@ bool MediaStreamDependencyFactory::AddNativeVideoMediaTrack( native_stream->AddTrack(native_track.get()); // Create a new webkit video track. - WebKit::WebMediaStreamTrack webkit_track; - WebKit::WebMediaStreamSource webkit_source; - WebKit::WebString webkit_track_id(UTF8ToUTF16(track_id)); - WebKit::WebMediaStreamSource::Type type = - WebKit::WebMediaStreamSource::TypeVideo; + blink::WebMediaStreamTrack webkit_track; + blink::WebMediaStreamSource webkit_source; + blink::WebString webkit_track_id(UTF8ToUTF16(track_id)); + blink::WebMediaStreamSource::Type type = + blink::WebMediaStreamSource::TypeVideo; webkit_source.initialize(webkit_track_id, type, webkit_track_id); webkit_track.initialize(webkit_track_id, webkit_source); @@ -492,28 +492,28 @@ bool MediaStreamDependencyFactory::AddNativeVideoMediaTrack( } bool MediaStreamDependencyFactory::RemoveNativeMediaStreamTrack( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track) { + const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track) { MediaStreamExtraData* extra_data = static_cast<MediaStreamExtraData*>(stream.extraData()); webrtc::MediaStreamInterface* native_stream = extra_data->stream().get(); DCHECK(native_stream); - WebKit::WebMediaStreamSource::Type type = track.source().type(); - DCHECK(type == WebKit::WebMediaStreamSource::TypeAudio || - type == WebKit::WebMediaStreamSource::TypeVideo); + blink::WebMediaStreamSource::Type type = track.source().type(); + DCHECK(type == blink::WebMediaStreamSource::TypeAudio || + type == blink::WebMediaStreamSource::TypeVideo); - WebKit::WebMediaStreamTrack writable_track = track; + blink::WebMediaStreamTrack writable_track = track; writable_track.setExtraData(NULL); std::string track_id = UTF16ToUTF8(track.id()); - if (type == WebKit::WebMediaStreamSource::TypeAudio) { + if (type == blink::WebMediaStreamSource::TypeAudio) { // Remove the source provider as the track is going away. writable_track.setSourceProvider(NULL); return native_stream->RemoveTrack(native_stream->FindAudioTrack(track_id)); } - CHECK_EQ(type, WebKit::WebMediaStreamSource::TypeVideo); + CHECK_EQ(type, blink::WebMediaStreamSource::TypeVideo); return native_stream->RemoveTrack(native_stream->FindVideoTrack(track_id)); } @@ -578,7 +578,7 @@ scoped_refptr<webrtc::PeerConnectionInterface> MediaStreamDependencyFactory::CreatePeerConnection( const webrtc::PeerConnectionInterface::IceServers& ice_servers, const webrtc::MediaConstraintsInterface* constraints, - WebKit::WebFrame* web_frame, + blink::WebFrame* web_frame, webrtc::PeerConnectionObserver* observer) { CHECK(web_frame); CHECK(observer); @@ -631,7 +631,7 @@ MediaStreamDependencyFactory::CreateLocalVideoSource( scoped_refptr<WebAudioCapturerSource> MediaStreamDependencyFactory::CreateWebAudioSource( - WebKit::WebMediaStreamSource* source, + blink::WebMediaStreamSource* source, RTCMediaConstraints* constraints) { DVLOG(1) << "MediaStreamDependencyFactory::CreateWebAudioSource()"; DCHECK(GetWebRtcAudioDevice()); @@ -861,15 +861,15 @@ MediaStreamDependencyFactory::MaybeCreateAudioCapturer( void MediaStreamDependencyFactory::AddNativeTrackToBlinkTrack( webrtc::MediaStreamTrackInterface* native_track, - const WebKit::WebMediaStreamTrack& webkit_track) { + const blink::WebMediaStreamTrack& webkit_track) { DCHECK(!webkit_track.isNull() && !webkit_track.extraData()); - WebKit::WebMediaStreamTrack track = webkit_track; + blink::WebMediaStreamTrack track = webkit_track; track.setExtraData(new MediaStreamTrackExtraData(native_track)); } webrtc::MediaStreamInterface* MediaStreamDependencyFactory::GetNativeMediaStream( - const WebKit::WebMediaStream& stream) { + const blink::WebMediaStream& stream) { if (stream.isNull()) return NULL; MediaStreamExtraData* extra_data = @@ -879,7 +879,7 @@ MediaStreamDependencyFactory::GetNativeMediaStream( webrtc::MediaStreamTrackInterface* MediaStreamDependencyFactory::GetNativeMediaStreamTrack( - const WebKit::WebMediaStreamTrack& track) { + const blink::WebMediaStreamTrack& track) { if (track.isNull()) return NULL; MediaStreamTrackExtraData* extra_data = diff --git a/content/renderer/media/media_stream_dependency_factory.h b/content/renderer/media/media_stream_dependency_factory.h index f8420d3..bafeb75 100644 --- a/content/renderer/media/media_stream_dependency_factory.h +++ b/content/renderer/media/media_stream_dependency_factory.h @@ -30,7 +30,7 @@ namespace webrtc { class PeerConnection; } -namespace WebKit { +namespace blink { class WebFrame; class WebMediaConstraints; class WebMediaStream; @@ -60,7 +60,7 @@ class CONTENT_EXPORT MediaStreamDependencyFactory : NON_EXPORTED_BASE(public base::NonThreadSafe) { public: // MediaSourcesCreatedCallback is used in CreateNativeMediaSources. - typedef base::Callback<void(WebKit::WebMediaStream* web_stream, + typedef base::Callback<void(blink::WebMediaStream* web_stream, bool live)> MediaSourcesCreatedCallback; MediaStreamDependencyFactory( VideoCaptureImplManager* vc_manager, @@ -69,8 +69,8 @@ class CONTENT_EXPORT MediaStreamDependencyFactory // Create a RTCPeerConnectionHandler object that implements the // WebKit WebRTCPeerConnectionHandler interface. - WebKit::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client); + blink::WebRTCPeerConnectionHandler* CreateRTCPeerConnectionHandler( + blink::WebRTCPeerConnectionHandlerClient* client); // CreateNativeMediaSources creates libjingle representations of // the underlying sources to the tracks in |web_stream|. @@ -81,37 +81,37 @@ class CONTENT_EXPORT MediaStreamDependencyFactory // |audio_constraints| and |video_constraints| set parameters for the sources. void CreateNativeMediaSources( int render_view_id, - const WebKit::WebMediaConstraints& audio_constraints, - const WebKit::WebMediaConstraints& video_constraints, - WebKit::WebMediaStream* web_stream, + const blink::WebMediaConstraints& audio_constraints, + const blink::WebMediaConstraints& video_constraints, + blink::WebMediaStream* web_stream, const MediaSourcesCreatedCallback& sources_created); // Creates a libjingle representation of a MediaStream and stores // it in the extra data field of |web_stream|. void CreateNativeLocalMediaStream( - WebKit::WebMediaStream* web_stream); + blink::WebMediaStream* web_stream); // Creates a libjingle representation of a MediaStream and stores // it in the extra data field of |web_stream|. // |stream_stopped| is a callback that is run when a MediaStream have been // stopped. void CreateNativeLocalMediaStream( - WebKit::WebMediaStream* web_stream, + blink::WebMediaStream* web_stream, const MediaStreamExtraData::StreamStopCallback& stream_stop); // Adds a libjingle representation of a MediaStreamTrack to |stream| based // on the source of |track|. - bool AddNativeMediaStreamTrack(const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track); + bool AddNativeMediaStreamTrack(const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track); // Creates and adds libjingle representation of a MediaStreamTrack to |stream| // based on the desired |track_id| and |capturer|. bool AddNativeVideoMediaTrack(const std::string& track_id, - WebKit::WebMediaStream* stream, + blink::WebMediaStream* stream, cricket::VideoCapturer* capturer); - bool RemoveNativeMediaStreamTrack(const WebKit::WebMediaStream& stream, - const WebKit::WebMediaStreamTrack& track); + bool RemoveNativeMediaStreamTrack(const blink::WebMediaStream& stream, + const blink::WebMediaStreamTrack& track); // Asks the libjingle PeerConnection factory to create a libjingle // PeerConnection object. @@ -120,7 +120,7 @@ class CONTENT_EXPORT MediaStreamDependencyFactory CreatePeerConnection( const webrtc::PeerConnectionInterface::IceServers& ice_servers, const webrtc::MediaConstraintsInterface* constraints, - WebKit::WebFrame* web_frame, + blink::WebFrame* web_frame, webrtc::PeerConnectionObserver* observer); // Creates a libjingle representation of a Session description. Used by a @@ -144,13 +144,13 @@ class CONTENT_EXPORT MediaStreamDependencyFactory static void AddNativeTrackToBlinkTrack( webrtc::MediaStreamTrackInterface* native_track, - const WebKit::WebMediaStreamTrack& webkit_track); + const blink::WebMediaStreamTrack& webkit_track); static webrtc::MediaStreamInterface* GetNativeMediaStream( - const WebKit::WebMediaStream& stream); + const blink::WebMediaStream& stream); static webrtc::MediaStreamTrackInterface* GetNativeMediaStreamTrack( - const WebKit::WebMediaStreamTrack& track); + const blink::WebMediaStreamTrack& track); protected: // Asks the PeerConnection factory to create a Local MediaStream object. @@ -176,7 +176,7 @@ class CONTENT_EXPORT MediaStreamDependencyFactory // The |constraints| will be modified to include the default, mandatory // WebAudio constraints. virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( - WebKit::WebMediaStreamSource* source, RTCMediaConstraints* constraints); + blink::WebMediaStreamSource* source, RTCMediaConstraints* constraints); // Asks the PeerConnection factory to create a Local AudioTrack object. virtual scoped_refptr<webrtc::AudioTrackInterface> diff --git a/content/renderer/media/media_stream_dependency_factory_unittest.cc b/content/renderer/media/media_stream_dependency_factory_unittest.cc index 23ba8b3..352fa6e 100644 --- a/content/renderer/media/media_stream_dependency_factory_unittest.cc +++ b/content/renderer/media/media_stream_dependency_factory_unittest.cc @@ -27,20 +27,20 @@ class MediaSourceCreatedObserver { } void OnCreateNativeSourcesComplete( - WebKit::WebMediaStream* description, + blink::WebMediaStream* description, bool request_succeeded) { result_ = request_succeeded; description_ = description; } - WebKit::WebMediaStream* description() const { + blink::WebMediaStream* description() const { return description_; } bool result() const { return result_; } private: bool result_; - WebKit::WebMediaStream* description_; + blink::WebMediaStream* description_; }; class MediaStreamDependencyFactoryTest : public ::testing::Test { @@ -49,10 +49,10 @@ class MediaStreamDependencyFactoryTest : public ::testing::Test { dependency_factory_.reset(new MockMediaStreamDependencyFactory()); } - WebKit::WebMediaStream CreateWebKitMediaStream(bool audio, bool video) { - WebKit::WebVector<WebKit::WebMediaStreamSource> audio_sources( + blink::WebMediaStream CreateWebKitMediaStream(bool audio, bool video) { + blink::WebVector<blink::WebMediaStreamSource> audio_sources( audio ? static_cast<size_t>(1) : 0); - WebKit::WebVector<WebKit::WebMediaStreamSource> video_sources( + blink::WebVector<blink::WebMediaStreamSource> video_sources( video ? static_cast<size_t>(1) : 0); MediaStreamSourceExtraData::SourceStopCallback dummy_callback; @@ -62,7 +62,7 @@ class MediaStreamDependencyFactoryTest : public ::testing::Test { info.device.name = "audio"; info.session_id = 99; audio_sources[0].initialize("audio", - WebKit::WebMediaStreamSource::TypeAudio, + blink::WebMediaStreamSource::TypeAudio, "audio"); audio_sources[0].setExtraData( new MediaStreamSourceExtraData(info, dummy_callback)); @@ -74,21 +74,21 @@ class MediaStreamDependencyFactoryTest : public ::testing::Test { info.device.name = "video"; info.session_id = 98; video_sources[0].initialize("video", - WebKit::WebMediaStreamSource::TypeVideo, + blink::WebMediaStreamSource::TypeVideo, "video"); video_sources[0].setExtraData( new MediaStreamSourceExtraData(info, dummy_callback)); video_sources_.assign(video_sources); } - WebKit::WebMediaStream stream_desc; - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_track_vector( + blink::WebMediaStream stream_desc; + blink::WebVector<blink::WebMediaStreamTrack> audio_track_vector( audio_sources.size()); for (size_t i = 0; i < audio_track_vector.size(); ++i) { audio_track_vector[i].initialize(audio_sources[i].id(), audio_sources[i]); } - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_track_vector( + blink::WebVector<blink::WebMediaStreamTrack> video_track_vector( video_sources.size()); for (size_t i = 0; i < video_track_vector.size(); ++i) { video_track_vector[i].initialize(video_sources[i].id(), @@ -100,15 +100,15 @@ class MediaStreamDependencyFactoryTest : public ::testing::Test { return stream_desc; } - void CreateNativeSources(WebKit::WebMediaStream* descriptor) { + void CreateNativeSources(blink::WebMediaStream* descriptor) { static const int kRenderViewId = 1; MediaSourceCreatedObserver observer; - WebKit::WebMediaConstraints audio_constraints; + blink::WebMediaConstraints audio_constraints; dependency_factory_->CreateNativeMediaSources( kRenderViewId, - WebKit::WebMediaConstraints(), - WebKit::WebMediaConstraints(), + blink::WebMediaConstraints(), + blink::WebMediaConstraints(), descriptor, base::Bind( &MediaSourceCreatedObserver::OnCreateNativeSourcesComplete, @@ -125,7 +125,7 @@ class MediaStreamDependencyFactoryTest : public ::testing::Test { EXPECT_TRUE(observer.description() == descriptor); } - void VerifyMediaStream(const WebKit::WebMediaStream& stream_desc, + void VerifyMediaStream(const blink::WebMediaStream& stream_desc, size_t num_audio_tracks, size_t num_video_tracks) { content::MediaStreamExtraData* extra_data = @@ -138,19 +138,19 @@ class MediaStreamDependencyFactoryTest : public ::testing::Test { protected: scoped_ptr<MockMediaStreamDependencyFactory> dependency_factory_; - WebKit::WebVector<WebKit::WebMediaStreamSource> audio_sources_; - WebKit::WebVector<WebKit::WebMediaStreamSource> video_sources_; + blink::WebVector<blink::WebMediaStreamSource> audio_sources_; + blink::WebVector<blink::WebMediaStreamSource> video_sources_; }; TEST_F(MediaStreamDependencyFactoryTest, CreateRTCPeerConnectionHandler) { MockWebRTCPeerConnectionHandlerClient client_jsep; - scoped_ptr<WebKit::WebRTCPeerConnectionHandler> pc_handler( + scoped_ptr<blink::WebRTCPeerConnectionHandler> pc_handler( dependency_factory_->CreateRTCPeerConnectionHandler(&client_jsep)); EXPECT_TRUE(pc_handler.get() != NULL); } TEST_F(MediaStreamDependencyFactoryTest, CreateNativeMediaStream) { - WebKit::WebMediaStream stream_desc = CreateWebKitMediaStream(true, true); + blink::WebMediaStream stream_desc = CreateWebKitMediaStream(true, true); CreateNativeSources(&stream_desc); dependency_factory_->CreateNativeLocalMediaStream(&stream_desc); @@ -162,23 +162,23 @@ TEST_F(MediaStreamDependencyFactoryTest, CreateNativeMediaStream) { // remote tracks. TEST_F(MediaStreamDependencyFactoryTest, CreateNativeMediaStreamWithoutSource) { // Create a WebKit MediaStream description. - WebKit::WebMediaStreamSource audio_source; + blink::WebMediaStreamSource audio_source; audio_source.initialize("audio source", - WebKit::WebMediaStreamSource::TypeAudio, + blink::WebMediaStreamSource::TypeAudio, "something"); - WebKit::WebMediaStreamSource video_source; + blink::WebMediaStreamSource video_source; video_source.initialize("video source", - WebKit::WebMediaStreamSource::TypeVideo, + blink::WebMediaStreamSource::TypeVideo, "something"); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks( + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks( static_cast<size_t>(1)); audio_tracks[0].initialize(audio_source.id(), audio_source); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks( + blink::WebVector<blink::WebMediaStreamTrack> video_tracks( static_cast<size_t>(1)); video_tracks[0].initialize(video_source.id(), video_source); - WebKit::WebMediaStream stream_desc; + blink::WebMediaStream stream_desc; stream_desc.initialize("new stream", audio_tracks, video_tracks); EXPECT_TRUE(dependency_factory_->EnsurePeerConnectionFactory()); @@ -187,13 +187,13 @@ TEST_F(MediaStreamDependencyFactoryTest, CreateNativeMediaStreamWithoutSource) { } TEST_F(MediaStreamDependencyFactoryTest, AddAndRemoveNativeTrack) { - WebKit::WebMediaStream stream_desc = CreateWebKitMediaStream(true, true); + blink::WebMediaStream stream_desc = CreateWebKitMediaStream(true, true); CreateNativeSources(&stream_desc); dependency_factory_->CreateNativeLocalMediaStream(&stream_desc); VerifyMediaStream(stream_desc, 1, 1); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; stream_desc.audioTracks(audio_tracks); EXPECT_TRUE(dependency_factory_->RemoveNativeMediaStreamTrack( stream_desc, audio_tracks[0])); @@ -203,7 +203,7 @@ TEST_F(MediaStreamDependencyFactoryTest, AddAndRemoveNativeTrack) { stream_desc, audio_tracks[0])); VerifyMediaStream(stream_desc, 1, 1); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; stream_desc.videoTracks(video_tracks); EXPECT_TRUE(dependency_factory_->RemoveNativeMediaStreamTrack( stream_desc, video_tracks[0])); diff --git a/content/renderer/media/media_stream_extra_data.h b/content/renderer/media/media_stream_extra_data.h index afac9c3..63bfca4 100644 --- a/content/renderer/media/media_stream_extra_data.h +++ b/content/renderer/media/media_stream_extra_data.h @@ -18,7 +18,7 @@ class MediaStreamInterface; namespace content { class CONTENT_EXPORT MediaStreamExtraData - : NON_EXPORTED_BASE(public WebKit::WebMediaStream::ExtraData) { + : NON_EXPORTED_BASE(public blink::WebMediaStream::ExtraData) { public: typedef base::Callback<void(const std::string& label)> StreamStopCallback; diff --git a/content/renderer/media/media_stream_impl.cc b/content/renderer/media/media_stream_impl.cc index db5dc1e..52b3c9d 100644 --- a/content/renderer/media/media_stream_impl.cc +++ b/content/renderer/media/media_stream_impl.cc @@ -34,12 +34,12 @@ namespace content { namespace { std::string GetStreamConstraint( - const WebKit::WebMediaConstraints& constraints, const std::string& key, + const blink::WebMediaConstraints& constraints, const std::string& key, bool is_mandatory) { if (constraints.isNull()) return std::string(); - WebKit::WebString value; + blink::WebString value; if (is_mandatory) { constraints.getMandatoryConstraintValue(UTF8ToUTF16(key), value); } else { @@ -49,7 +49,7 @@ std::string GetStreamConstraint( } void UpdateRequestOptions( - const WebKit::WebUserMediaRequest& user_media_request, + const blink::WebUserMediaRequest& user_media_request, StreamOptions* options) { if (options->audio_type != content::MEDIA_NO_SERVICE) { std::string audio_stream_source = GetStreamConstraint( @@ -88,7 +88,7 @@ void UpdateRequestOptions( static int g_next_request_id = 0; webrtc::MediaStreamInterface* GetNativeMediaStream( - const WebKit::WebMediaStream& web_stream) { + const blink::WebMediaStream& web_stream) { content::MediaStreamExtraData* extra_data = static_cast<content::MediaStreamExtraData*>(web_stream.extraData()); if (!extra_data) @@ -105,9 +105,9 @@ void GetDefaultOutputDeviceParams( *output_buffer_size = hardware_config->GetOutputBufferSize(); } -void RemoveSource(const WebKit::WebMediaStreamSource& source, - std::vector<WebKit::WebMediaStreamSource>* sources) { - for (std::vector<WebKit::WebMediaStreamSource>::iterator it = +void RemoveSource(const blink::WebMediaStreamSource& source, + std::vector<blink::WebMediaStreamSource>* sources) { + for (std::vector<blink::WebMediaStreamSource>::iterator it = sources->begin(); it != sources->end(); ++it) { if (source.id() == it->id()) { @@ -132,7 +132,7 @@ MediaStreamImpl::~MediaStreamImpl() { } void MediaStreamImpl::requestUserMedia( - const WebKit::WebUserMediaRequest& user_media_request) { + const blink::WebUserMediaRequest& user_media_request) { // Save histogram data so we can see how much GetUserMedia is used. // The histogram counts the number of calls to the JS API // webGetUserMedia. @@ -140,7 +140,7 @@ void MediaStreamImpl::requestUserMedia( DCHECK(CalledOnValidThread()); int request_id = g_next_request_id++; StreamOptions options(MEDIA_NO_SERVICE, MEDIA_NO_SERVICE); - WebKit::WebFrame* frame = NULL; + blink::WebFrame* frame = NULL; GURL security_origin; bool enable_automatic_output_device_selection = false; @@ -200,7 +200,7 @@ void MediaStreamImpl::requestUserMedia( } void MediaStreamImpl::cancelUserMediaRequest( - const WebKit::WebUserMediaRequest& user_media_request) { + const blink::WebUserMediaRequest& user_media_request) { DCHECK(CalledOnValidThread()); UserMediaRequestInfo* request = FindUserMediaRequestInfo(user_media_request); if (request) { @@ -211,14 +211,14 @@ void MediaStreamImpl::cancelUserMediaRequest( } } -WebKit::WebMediaStream MediaStreamImpl::GetMediaStream( +blink::WebMediaStream MediaStreamImpl::GetMediaStream( const GURL& url) { - return WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor(url); + return blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(url); } bool MediaStreamImpl::IsMediaStream(const GURL& url) { - WebKit::WebMediaStream web_stream( - WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor(url)); + blink::WebMediaStream web_stream( + blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(url)); if (web_stream.isNull() || !web_stream.extraData()) return false; // This is not a valid stream. @@ -234,7 +234,7 @@ MediaStreamImpl::GetVideoFrameProvider( const base::Closure& error_cb, const VideoFrameProvider::RepaintCB& repaint_cb) { DCHECK(CalledOnValidThread()); - WebKit::WebMediaStream web_stream(GetMediaStream(url)); + blink::WebMediaStream web_stream(GetMediaStream(url)); if (web_stream.isNull() || !web_stream.extraData()) return NULL; // This is not a valid stream. @@ -252,7 +252,7 @@ MediaStreamImpl::GetVideoFrameProvider( scoped_refptr<MediaStreamAudioRenderer> MediaStreamImpl::GetAudioRenderer(const GURL& url) { DCHECK(CalledOnValidThread()); - WebKit::WebMediaStream web_stream(GetMediaStream(url)); + blink::WebMediaStream web_stream(GetMediaStream(url)); if (web_stream.isNull() || !web_stream.extraData()) return NULL; // This is not a valid stream. @@ -320,7 +320,7 @@ void MediaStreamImpl::OnStreamGenerated( } request_info->generated = true; - WebKit::WebVector<WebKit::WebMediaStreamSource> audio_source_vector( + blink::WebVector<blink::WebMediaStreamSource> audio_source_vector( audio_array.size()); StreamDeviceInfoArray overridden_audio_array = audio_array; @@ -335,28 +335,28 @@ void MediaStreamImpl::OnStreamGenerated( } } CreateWebKitSourceVector(label, overridden_audio_array, - WebKit::WebMediaStreamSource::TypeAudio, + blink::WebMediaStreamSource::TypeAudio, request_info->frame, audio_source_vector); - WebKit::WebVector<WebKit::WebMediaStreamSource> video_source_vector( + blink::WebVector<blink::WebMediaStreamSource> video_source_vector( video_array.size()); CreateWebKitSourceVector(label, video_array, - WebKit::WebMediaStreamSource::TypeVideo, + blink::WebMediaStreamSource::TypeVideo, request_info->frame, video_source_vector); - WebKit::WebUserMediaRequest* request = &(request_info->request); - WebKit::WebString webkit_id = UTF8ToUTF16(label); - WebKit::WebMediaStream* web_stream = &(request_info->web_stream); + blink::WebUserMediaRequest* request = &(request_info->request); + blink::WebString webkit_id = UTF8ToUTF16(label); + blink::WebMediaStream* web_stream = &(request_info->web_stream); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_track_vector( + blink::WebVector<blink::WebMediaStreamTrack> audio_track_vector( audio_array.size()); for (size_t i = 0; i < audio_track_vector.size(); ++i) { audio_track_vector[i].initialize(audio_source_vector[i]); request_info->sources.push_back(audio_source_vector[i]); } - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_track_vector( + blink::WebVector<blink::WebMediaStreamTrack> video_track_vector( video_array.size()); for (size_t i = 0; i < video_track_vector.size(); ++i) { video_track_vector[i].initialize(video_source_vector[i]); @@ -368,10 +368,10 @@ void MediaStreamImpl::OnStreamGenerated( // WebUserMediaRequest don't have an implementation in unit tests. // Therefore we need to check for isNull here. - WebKit::WebMediaConstraints audio_constraints = request->isNull() ? - WebKit::WebMediaConstraints() : request->audioConstraints(); - WebKit::WebMediaConstraints video_constraints = request->isNull() ? - WebKit::WebMediaConstraints() : request->videoConstraints(); + blink::WebMediaConstraints audio_constraints = request->isNull() ? + blink::WebMediaConstraints() : request->audioConstraints(); + blink::WebMediaConstraints video_constraints = request->isNull() ? + blink::WebMediaConstraints() : request->videoConstraints(); dependency_factory_->CreateNativeMediaSources( RenderViewObserver::routing_id(), @@ -414,18 +414,18 @@ void MediaStreamImpl::OnStopGeneratedStream(const std::string& label) { void MediaStreamImpl::CreateWebKitSourceVector( const std::string& label, const StreamDeviceInfoArray& devices, - WebKit::WebMediaStreamSource::Type type, - WebKit::WebFrame* frame, - WebKit::WebVector<WebKit::WebMediaStreamSource>& webkit_sources) { + blink::WebMediaStreamSource::Type type, + blink::WebFrame* frame, + blink::WebVector<blink::WebMediaStreamSource>& webkit_sources) { CHECK_EQ(devices.size(), webkit_sources.size()); for (size_t i = 0; i < devices.size(); ++i) { const char* track_type = - (type == WebKit::WebMediaStreamSource::TypeAudio) ? "a" : "v"; + (type == blink::WebMediaStreamSource::TypeAudio) ? "a" : "v"; std::string source_id = base::StringPrintf("%s%s%u", label.c_str(), track_type, static_cast<unsigned int>(i)); - const WebKit::WebMediaStreamSource* existing_source = + const blink::WebMediaStreamSource* existing_source = FindLocalSource(devices[i]); if (existing_source) { webkit_sources[i] = *existing_source; @@ -452,7 +452,7 @@ void MediaStreamImpl::CreateWebKitSourceVector( // Callback from MediaStreamDependencyFactory when the sources in |web_stream| // have been generated. void MediaStreamImpl::OnCreateNativeSourcesComplete( - WebKit::WebMediaStream* web_stream, + blink::WebMediaStream* web_stream, bool request_succeeded) { UserMediaRequestInfo* request_info = FindUserMediaRequestInfo(web_stream); if (!request_info) { @@ -511,8 +511,8 @@ void MediaStreamImpl::OnDeviceOpenFailed(int request_id) { } void MediaStreamImpl::CompleteGetUserMediaRequest( - const WebKit::WebMediaStream& stream, - WebKit::WebUserMediaRequest* request_info, + const blink::WebMediaStream& stream, + blink::WebUserMediaRequest* request_info, bool request_succeeded) { if (request_succeeded) { request_info->requestSucceeded(stream); @@ -521,7 +521,7 @@ void MediaStreamImpl::CompleteGetUserMediaRequest( } } -const WebKit::WebMediaStreamSource* MediaStreamImpl::FindLocalSource( +const blink::WebMediaStreamSource* MediaStreamImpl::FindLocalSource( const StreamDeviceInfo& device) const { for (LocalStreamSources::const_iterator it = local_sources_.begin(); it != local_sources_.end(); ++it) { @@ -538,12 +538,12 @@ const WebKit::WebMediaStreamSource* MediaStreamImpl::FindLocalSource( } bool MediaStreamImpl::FindSourceInRequests( - const WebKit::WebMediaStreamSource& source) const { + const blink::WebMediaStreamSource& source) const { for (UserMediaRequests::const_iterator req_it = user_media_requests_.begin(); req_it != user_media_requests_.end(); ++req_it) { - const std::vector<WebKit::WebMediaStreamSource>& sources = + const std::vector<blink::WebMediaStreamSource>& sources = (*req_it)->sources; - for (std::vector<WebKit::WebMediaStreamSource>::const_iterator source_it = + for (std::vector<blink::WebMediaStreamSource>::const_iterator source_it = sources.begin(); source_it != sources.end(); ++source_it) { if (source_it->id() == source.id()) { @@ -566,7 +566,7 @@ MediaStreamImpl::FindUserMediaRequestInfo(int request_id) { MediaStreamImpl::UserMediaRequestInfo* MediaStreamImpl::FindUserMediaRequestInfo( - const WebKit::WebUserMediaRequest& request) { + const blink::WebUserMediaRequest& request) { UserMediaRequests::iterator it = user_media_requests_.begin(); for (; it != user_media_requests_.end(); ++it) { if ((*it)->request == request) @@ -587,7 +587,7 @@ MediaStreamImpl::FindUserMediaRequestInfo(const std::string& label) { MediaStreamImpl::UserMediaRequestInfo* MediaStreamImpl::FindUserMediaRequestInfo( - WebKit::WebMediaStream* web_stream) { + blink::WebMediaStream* web_stream) { UserMediaRequests::iterator it = user_media_requests_.begin(); for (; it != user_media_requests_.end(); ++it) { if (&((*it)->web_stream) == web_stream) @@ -608,12 +608,12 @@ void MediaStreamImpl::DeleteUserMediaRequestInfo( NOTREACHED(); } -void MediaStreamImpl::FrameDetached(WebKit::WebFrame* frame) { +void MediaStreamImpl::FrameDetached(blink::WebFrame* frame) { // Do same thing as FrameWillClose. FrameWillClose(frame); } -void MediaStreamImpl::FrameWillClose(WebKit::WebFrame* frame) { +void MediaStreamImpl::FrameWillClose(blink::WebFrame* frame) { // Loop through all UserMediaRequests and find the requests that belong to the // frame that is being closed. UserMediaRequests::iterator request_it = user_media_requests_.begin(); @@ -660,7 +660,7 @@ void MediaStreamImpl::OnLocalMediaStreamStop( } void MediaStreamImpl::OnLocalSourceStop( - const WebKit::WebMediaStreamSource& source) { + const blink::WebMediaStreamSource& source) { DCHECK(CalledOnValidThread()); StopLocalSource(source, true); @@ -691,7 +691,7 @@ void MediaStreamImpl::OnLocalSourceStop( } void MediaStreamImpl::StopLocalSource( - const WebKit::WebMediaStreamSource& source, + const blink::WebMediaStreamSource& source, bool notify_dispatcher) { MediaStreamSourceExtraData* extra_data = static_cast<MediaStreamSourceExtraData*> (source.extraData()); @@ -699,7 +699,7 @@ void MediaStreamImpl::StopLocalSource( DVLOG(1) << "MediaStreamImpl::StopLocalSource(" << "{device_id = " << extra_data->device_info().device.id << "})"; - if (source.type() == WebKit::WebMediaStreamSource::TypeAudio) { + if (source.type() == blink::WebMediaStreamSource::TypeAudio) { if (extra_data->GetAudioCapturer()) { extra_data->GetAudioCapturer()->Stop(); } @@ -708,9 +708,9 @@ void MediaStreamImpl::StopLocalSource( if (notify_dispatcher) media_stream_dispatcher_->StopStreamDevice(extra_data->device_info()); - WebKit::WebMediaStreamSource writable_source(source); + blink::WebMediaStreamSource writable_source(source); writable_source.setReadyState( - WebKit::WebMediaStreamSource::ReadyStateEnded); + blink::WebMediaStreamSource::ReadyStateEnded); writable_source.setExtraData(NULL); } @@ -855,8 +855,8 @@ void MediaStreamExtraData::OnLocalStreamStop() { MediaStreamImpl::UserMediaRequestInfo::UserMediaRequestInfo( int request_id, - WebKit::WebFrame* frame, - const WebKit::WebUserMediaRequest& request, + blink::WebFrame* frame, + const blink::WebUserMediaRequest& request, bool enable_automatic_output_device_selection) : request_id(request_id), generated(false), diff --git a/content/renderer/media/media_stream_impl.h b/content/renderer/media/media_stream_impl.h index 6005611..c9737d7 100644 --- a/content/renderer/media/media_stream_impl.h +++ b/content/renderer/media/media_stream_impl.h @@ -42,7 +42,7 @@ class WebRtcLocalAudioRenderer; // MediaStreamImpl have weak pointers to a MediaStreamDispatcher. class CONTENT_EXPORT MediaStreamImpl : public RenderViewObserver, - NON_EXPORTED_BASE(public WebKit::WebUserMediaClient), + NON_EXPORTED_BASE(public blink::WebUserMediaClient), NON_EXPORTED_BASE(public MediaStreamClient), public MediaStreamDispatcherEventHandler, public base::SupportsWeakPtr<MediaStreamImpl>, @@ -54,11 +54,11 @@ class CONTENT_EXPORT MediaStreamImpl MediaStreamDependencyFactory* dependency_factory); virtual ~MediaStreamImpl(); - // WebKit::WebUserMediaClient implementation + // blink::WebUserMediaClient implementation virtual void requestUserMedia( - const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; + const blink::WebUserMediaRequest& user_media_request) OVERRIDE; virtual void cancelUserMediaRequest( - const WebKit::WebUserMediaRequest& user_media_request) OVERRIDE; + const blink::WebUserMediaRequest& user_media_request) OVERRIDE; // MediaStreamClient implementation. virtual bool IsMediaStream(const GURL& url) OVERRIDE; @@ -88,11 +88,11 @@ class CONTENT_EXPORT MediaStreamImpl virtual void OnDeviceOpenFailed(int request_id) OVERRIDE; // RenderViewObserver OVERRIDE - virtual void FrameDetached(WebKit::WebFrame* frame) OVERRIDE; - virtual void FrameWillClose(WebKit::WebFrame* frame) OVERRIDE; + virtual void FrameDetached(blink::WebFrame* frame) OVERRIDE; + virtual void FrameWillClose(blink::WebFrame* frame) OVERRIDE; protected: - void OnLocalSourceStop(const WebKit::WebMediaStreamSource& source); + void OnLocalSourceStop(const blink::WebMediaStreamSource& source); void OnLocalMediaStreamStop(const std::string& label); @@ -102,28 +102,28 @@ class CONTENT_EXPORT MediaStreamImpl // UserMediaRequests::web_stream for which the underlying sources have been // created. void OnCreateNativeSourcesComplete( - WebKit::WebMediaStream* web_stream, + blink::WebMediaStream* web_stream, bool request_succeeded); // This function is virtual for test purposes. A test can override this to // test requesting local media streams. The function notifies WebKit that the // |request| have completed and generated the MediaStream |stream|. virtual void CompleteGetUserMediaRequest( - const WebKit::WebMediaStream& stream, - WebKit::WebUserMediaRequest* request_info, + const blink::WebMediaStream& stream, + blink::WebUserMediaRequest* request_info, bool request_succeeded); // Returns the WebKit representation of a MediaStream given an URL. // This is virtual for test purposes. - virtual WebKit::WebMediaStream GetMediaStream(const GURL& url); + virtual blink::WebMediaStream GetMediaStream(const GURL& url); private: // Structure for storing information about a WebKit request to create a // MediaStream. struct UserMediaRequestInfo { UserMediaRequestInfo(int request_id, - WebKit::WebFrame* frame, - const WebKit::WebUserMediaRequest& request, + blink::WebFrame* frame, + const blink::WebUserMediaRequest& request, bool enable_automatic_output_device_selection); ~UserMediaRequestInfo(); int request_id; @@ -131,22 +131,22 @@ class CONTENT_EXPORT MediaStreamImpl // OnStreamGenerated. bool generated; const bool enable_automatic_output_device_selection; - WebKit::WebFrame* frame; // WebFrame that requested the MediaStream. - WebKit::WebMediaStream web_stream; - WebKit::WebUserMediaRequest request; - std::vector<WebKit::WebMediaStreamSource> sources; + blink::WebFrame* frame; // WebFrame that requested the MediaStream. + blink::WebMediaStream web_stream; + blink::WebUserMediaRequest request; + std::vector<blink::WebMediaStreamSource> sources; }; typedef ScopedVector<UserMediaRequestInfo> UserMediaRequests; struct LocalStreamSource { - LocalStreamSource(WebKit::WebFrame* frame, - const WebKit::WebMediaStreamSource& source) + LocalStreamSource(blink::WebFrame* frame, + const blink::WebMediaStreamSource& source) : frame(frame), source(source) { } // |frame| is the WebFrame that requested |source|. NULL in unit tests. // TODO(perkj): Change so that |frame| is not NULL in unit tests. - WebKit::WebFrame* frame; - WebKit::WebMediaStreamSource source; + blink::WebFrame* frame; + blink::WebMediaStreamSource source; }; typedef std::vector<LocalStreamSource> LocalStreamSources; @@ -155,27 +155,27 @@ class CONTENT_EXPORT MediaStreamImpl void CreateWebKitSourceVector( const std::string& label, const StreamDeviceInfoArray& devices, - WebKit::WebMediaStreamSource::Type type, - WebKit::WebFrame* frame, - WebKit::WebVector<WebKit::WebMediaStreamSource>& webkit_sources); + blink::WebMediaStreamSource::Type type, + blink::WebFrame* frame, + blink::WebVector<blink::WebMediaStreamSource>& webkit_sources); UserMediaRequestInfo* FindUserMediaRequestInfo(int request_id); UserMediaRequestInfo* FindUserMediaRequestInfo( - WebKit::WebMediaStream* web_stream); + blink::WebMediaStream* web_stream); UserMediaRequestInfo* FindUserMediaRequestInfo( - const WebKit::WebUserMediaRequest& request); + const blink::WebUserMediaRequest& request); UserMediaRequestInfo* FindUserMediaRequestInfo(const std::string& label); void DeleteUserMediaRequestInfo(UserMediaRequestInfo* request); // Returns the source that use a device with |device.session_id| // and |device.device.id|. NULL if such source doesn't exist. - const WebKit::WebMediaStreamSource* FindLocalSource( + const blink::WebMediaStreamSource* FindLocalSource( const StreamDeviceInfo& device) const; // Returns true if |source| exists in |user_media_requests_| - bool FindSourceInRequests(const WebKit::WebMediaStreamSource& source) const; + bool FindSourceInRequests(const blink::WebMediaStreamSource& source) const; - void StopLocalSource(const WebKit::WebMediaStreamSource& source, + void StopLocalSource(const blink::WebMediaStreamSource& source, bool notify_dispatcher); // Stops all local sources that don't exist in exist in // |user_media_requests_|. diff --git a/content/renderer/media/media_stream_impl_unittest.cc b/content/renderer/media/media_stream_impl_unittest.cc index ed87f7a..644f2cd 100644 --- a/content/renderer/media/media_stream_impl_unittest.cc +++ b/content/renderer/media/media_stream_impl_unittest.cc @@ -34,20 +34,20 @@ class MediaStreamImplUnderTest : public MediaStreamImpl { } void RequestUserMedia() { - WebKit::WebUserMediaRequest user_media_request; + blink::WebUserMediaRequest user_media_request; state_ = REQUEST_NOT_COMPLETE; requestUserMedia(user_media_request); } virtual void CompleteGetUserMediaRequest( - const WebKit::WebMediaStream& stream, - WebKit::WebUserMediaRequest* request_info, + const blink::WebMediaStream& stream, + blink::WebUserMediaRequest* request_info, bool request_succeeded) OVERRIDE { last_generated_stream_ = stream; state_ = request_succeeded ? REQUEST_SUCCEEDED : REQUEST_FAILED; } - virtual WebKit::WebMediaStream GetMediaStream( + virtual blink::WebMediaStream GetMediaStream( const GURL& url) OVERRIDE { return last_generated_stream_; } @@ -55,14 +55,14 @@ class MediaStreamImplUnderTest : public MediaStreamImpl { using MediaStreamImpl::OnLocalMediaStreamStop; using MediaStreamImpl::OnLocalSourceStop; - const WebKit::WebMediaStream& last_generated_stream() { + const blink::WebMediaStream& last_generated_stream() { return last_generated_stream_; } RequestState request_state() const { return state_; } private: - WebKit::WebMediaStream last_generated_stream_; + blink::WebMediaStream last_generated_stream_; RequestState state_; }; @@ -76,7 +76,7 @@ class MediaStreamImplTest : public ::testing::Test { dependency_factory_.get())); } - WebKit::WebMediaStream RequestLocalMediaStream() { + blink::WebMediaStream RequestLocalMediaStream() { ms_impl_->RequestUserMedia(); FakeMediaStreamDispatcherComplete(); ChangeVideoSourceStateToLive(); @@ -85,7 +85,7 @@ class MediaStreamImplTest : public ::testing::Test { EXPECT_EQ(MediaStreamImplUnderTest::REQUEST_SUCCEEDED, ms_impl_->request_state()); - WebKit::WebMediaStream desc = ms_impl_->last_generated_stream(); + blink::WebMediaStream desc = ms_impl_->last_generated_stream(); content::MediaStreamExtraData* extra_data = static_cast<content::MediaStreamExtraData*>(desc.extraData()); if (!extra_data || !extra_data->stream().get()) { @@ -139,18 +139,18 @@ class MediaStreamImplTest : public ::testing::Test { TEST_F(MediaStreamImplTest, GenerateMediaStream) { // Generate a stream with both audio and video. - WebKit::WebMediaStream mixed_desc = RequestLocalMediaStream(); + blink::WebMediaStream mixed_desc = RequestLocalMediaStream(); } // Test that the same source object is used if two MediaStreams are generated // using the same source. TEST_F(MediaStreamImplTest, GenerateTwoMediaStreamsWithSameSource) { - WebKit::WebMediaStream desc1 = RequestLocalMediaStream(); - WebKit::WebMediaStream desc2 = RequestLocalMediaStream(); + blink::WebMediaStream desc1 = RequestLocalMediaStream(); + blink::WebMediaStream desc2 = RequestLocalMediaStream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc1_video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc1_video_tracks; desc1.videoTracks(desc1_video_tracks); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc2_video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc2_video_tracks; desc2.videoTracks(desc2_video_tracks); EXPECT_EQ(desc1_video_tracks[0].source().id(), desc2_video_tracks[0].source().id()); @@ -158,9 +158,9 @@ TEST_F(MediaStreamImplTest, GenerateTwoMediaStreamsWithSameSource) { EXPECT_EQ(desc1_video_tracks[0].source().extraData(), desc2_video_tracks[0].source().extraData()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc1_audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc1_audio_tracks; desc1.audioTracks(desc1_audio_tracks); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc2_audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc2_audio_tracks; desc2.audioTracks(desc2_audio_tracks); EXPECT_EQ(desc1_audio_tracks[0].source().id(), desc2_audio_tracks[0].source().id()); @@ -172,15 +172,15 @@ TEST_F(MediaStreamImplTest, GenerateTwoMediaStreamsWithSameSource) { // Test that the same source object is not used if two MediaStreams are // generated using different sources. TEST_F(MediaStreamImplTest, GenerateTwoMediaStreamsWithDifferentSources) { - WebKit::WebMediaStream desc1 = RequestLocalMediaStream(); + blink::WebMediaStream desc1 = RequestLocalMediaStream(); // Make sure another device is selected (another |session_id|) in the next // gUM request. ms_dispatcher_->IncrementSessionId(); - WebKit::WebMediaStream desc2 = RequestLocalMediaStream(); + blink::WebMediaStream desc2 = RequestLocalMediaStream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc1_video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc1_video_tracks; desc1.videoTracks(desc1_video_tracks); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc2_video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc2_video_tracks; desc2.videoTracks(desc2_video_tracks); EXPECT_NE(desc1_video_tracks[0].source().id(), desc2_video_tracks[0].source().id()); @@ -188,9 +188,9 @@ TEST_F(MediaStreamImplTest, GenerateTwoMediaStreamsWithDifferentSources) { EXPECT_NE(desc1_video_tracks[0].source().extraData(), desc2_video_tracks[0].source().extraData()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc1_audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc1_audio_tracks; desc1.audioTracks(desc1_audio_tracks); - WebKit::WebVector<WebKit::WebMediaStreamTrack> desc2_audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> desc2_audio_tracks; desc2.audioTracks(desc2_audio_tracks); EXPECT_NE(desc1_audio_tracks[0].source().id(), desc2_audio_tracks[0].source().id()); @@ -201,7 +201,7 @@ TEST_F(MediaStreamImplTest, GenerateTwoMediaStreamsWithDifferentSources) { TEST_F(MediaStreamImplTest, StopLocalMediaStream) { // Generate a stream with both audio and video. - WebKit::WebMediaStream mixed_desc = RequestLocalMediaStream(); + blink::WebMediaStream mixed_desc = RequestLocalMediaStream(); // Stop generated local streams. ms_impl_->OnLocalMediaStreamStop(mixed_desc.id().utf8()); @@ -214,8 +214,8 @@ TEST_F(MediaStreamImplTest, StopLocalMediaStream) { // if there are no more MediaStreams using the device. TEST_F(MediaStreamImplTest, StopLocalMediaStreamWhenTwoStreamUseSameDevices) { // Generate a stream with both audio and video. - WebKit::WebMediaStream desc1 = RequestLocalMediaStream(); - WebKit::WebMediaStream desc2 = RequestLocalMediaStream(); + blink::WebMediaStream desc1 = RequestLocalMediaStream(); + blink::WebMediaStream desc2 = RequestLocalMediaStream(); ms_impl_->OnLocalMediaStreamStop(desc2.id().utf8()); EXPECT_EQ(0, ms_dispatcher_->stop_audio_device_counter()); @@ -230,18 +230,18 @@ TEST_F(MediaStreamImplTest, StopLocalMediaStreamWhenTwoStreamUseSameDevices) { // the same source. TEST_F(MediaStreamImplTest, StopSource) { // Generate a stream with both audio and video. - WebKit::WebMediaStream desc1 = RequestLocalMediaStream(); - WebKit::WebMediaStream desc2 = RequestLocalMediaStream(); + blink::WebMediaStream desc1 = RequestLocalMediaStream(); + blink::WebMediaStream desc2 = RequestLocalMediaStream(); // Stop the video source. - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; desc1.videoTracks(video_tracks); ms_impl_->OnLocalSourceStop(video_tracks[0].source()); EXPECT_EQ(0, ms_dispatcher_->stop_audio_device_counter()); EXPECT_EQ(1, ms_dispatcher_->stop_video_device_counter()); // Stop the audio source. - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; desc1.audioTracks(audio_tracks); ms_impl_->OnLocalSourceStop(audio_tracks[0].source()); EXPECT_EQ(1, ms_dispatcher_->stop_audio_device_counter()); @@ -252,7 +252,7 @@ TEST_F(MediaStreamImplTest, StopSource) { // In the unit test the owning frame is NULL. TEST_F(MediaStreamImplTest, FrameWillClose) { // Test a stream with both audio and video. - WebKit::WebMediaStream mixed_desc = RequestLocalMediaStream(); + blink::WebMediaStream mixed_desc = RequestLocalMediaStream(); // Test that the MediaStreams are deleted if the owning WebFrame is deleted. // In the unit test the owning frame is NULL. @@ -319,7 +319,7 @@ TEST_F(MediaStreamImplTest, ReloadFrameWhileGeneratingSources) { // This test what happens if stop is called on a stream after the frame has // been reloaded. TEST_F(MediaStreamImplTest, StopStreamAfterReload) { - WebKit::WebMediaStream mixed_desc = RequestLocalMediaStream(); + blink::WebMediaStream mixed_desc = RequestLocalMediaStream(); EXPECT_EQ(1, ms_dispatcher_->request_stream_counter()); ms_impl_->FrameWillClose(NULL); EXPECT_EQ(1, ms_dispatcher_->stop_audio_device_counter()); diff --git a/content/renderer/media/media_stream_registry_interface.h b/content/renderer/media/media_stream_registry_interface.h index af4c26a..ace11c5 100644 --- a/content/renderer/media/media_stream_registry_interface.h +++ b/content/renderer/media/media_stream_registry_interface.h @@ -14,7 +14,7 @@ namespace content { // Interface to get WebMediaStream from its url. class MediaStreamRegistryInterface { public: - virtual WebKit::WebMediaStream GetMediaStream(const std::string& url) = 0; + virtual blink::WebMediaStream GetMediaStream(const std::string& url) = 0; protected: virtual ~MediaStreamRegistryInterface() {} diff --git a/content/renderer/media/media_stream_source_extra_data.h b/content/renderer/media/media_stream_source_extra_data.h index 3b61809..4b88c14 100644 --- a/content/renderer/media/media_stream_source_extra_data.h +++ b/content/renderer/media/media_stream_source_extra_data.h @@ -17,9 +17,9 @@ namespace content { class CONTENT_EXPORT MediaStreamSourceExtraData - : NON_EXPORTED_BASE(public WebKit::WebMediaStreamSource::ExtraData) { + : NON_EXPORTED_BASE(public blink::WebMediaStreamSource::ExtraData) { public: - typedef base::Callback<void(const WebKit::WebMediaStreamSource& source)> + typedef base::Callback<void(const blink::WebMediaStreamSource& source)> SourceStopCallback; MediaStreamSourceExtraData(const StreamDeviceInfo& device_info, diff --git a/content/renderer/media/media_stream_source_observer.cc b/content/renderer/media/media_stream_source_observer.cc index 8a8cd0c..319327f 100644 --- a/content/renderer/media/media_stream_source_observer.cc +++ b/content/renderer/media/media_stream_source_observer.cc @@ -33,7 +33,7 @@ void MediaStreamSourceObserver::OnChanged() { if (state == state_) return; state_ = state; - WebKit::WebMediaStreamSource webkit_source(extra_data_->owner()); + blink::WebMediaStreamSource webkit_source(extra_data_->owner()); switch (state) { case webrtc::MediaSourceInterface::kInitializing: @@ -42,15 +42,15 @@ void MediaStreamSourceObserver::OnChanged() { break; case webrtc::MediaSourceInterface::kLive: webkit_source.setReadyState( - WebKit::WebMediaStreamSource::ReadyStateLive); + blink::WebMediaStreamSource::ReadyStateLive); break; case webrtc::MediaSourceInterface::kMuted: webkit_source.setReadyState( - WebKit::WebMediaStreamSource::ReadyStateMuted); + blink::WebMediaStreamSource::ReadyStateMuted); break; case webrtc::MediaSourceInterface::kEnded: webkit_source.setReadyState( - WebKit::WebMediaStreamSource::ReadyStateEnded); + blink::WebMediaStreamSource::ReadyStateEnded); webrtc_source_->UnregisterObserver(this); webrtc_source_ = NULL; break; diff --git a/content/renderer/media/media_stream_track_extra_data.h b/content/renderer/media/media_stream_track_extra_data.h index 4ab9cff..80c7a98 100644 --- a/content/renderer/media/media_stream_track_extra_data.h +++ b/content/renderer/media/media_stream_track_extra_data.h @@ -18,7 +18,7 @@ class MediaStreamTrackInterface; namespace content { class CONTENT_EXPORT MediaStreamTrackExtraData - : NON_EXPORTED_BASE(public WebKit::WebMediaStreamTrack::ExtraData) { + : NON_EXPORTED_BASE(public blink::WebMediaStreamTrack::ExtraData) { public: MediaStreamTrackExtraData(webrtc::MediaStreamTrackInterface* track); virtual ~MediaStreamTrackExtraData(); diff --git a/content/renderer/media/midi_dispatcher.cc b/content/renderer/media/midi_dispatcher.cc index b9aae33..e5dccf3 100644 --- a/content/renderer/media/midi_dispatcher.cc +++ b/content/renderer/media/midi_dispatcher.cc @@ -11,8 +11,8 @@ #include "third_party/WebKit/public/web/WebMIDIPermissionRequest.h" #include "third_party/WebKit/public/web/WebSecurityOrigin.h" -using WebKit::WebMIDIPermissionRequest; -using WebKit::WebSecurityOrigin; +using blink::WebMIDIPermissionRequest; +using blink::WebSecurityOrigin; namespace content { diff --git a/content/renderer/media/midi_dispatcher.h b/content/renderer/media/midi_dispatcher.h index 143d706..70f8125 100644 --- a/content/renderer/media/midi_dispatcher.h +++ b/content/renderer/media/midi_dispatcher.h @@ -9,7 +9,7 @@ #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebMIDIClient.h" -namespace WebKit { +namespace blink { class WebMIDIPermissionRequest; } @@ -23,7 +23,7 @@ class RenderViewImpl; // MIDIDispatcherHost owned by RenderViewHost since permissions are managed in // the browser process. class MIDIDispatcher : public RenderViewObserver, - public WebKit::WebMIDIClient { + public blink::WebMIDIClient { public: explicit MIDIDispatcher(RenderViewImpl* render_view); virtual ~MIDIDispatcher(); @@ -32,11 +32,11 @@ class MIDIDispatcher : public RenderViewObserver, // RenderView::Observer implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - // WebKit::WebMIDIClient implementation. + // blink::WebMIDIClient implementation. virtual void requestSysExPermission( - const WebKit::WebMIDIPermissionRequest& request) OVERRIDE; + const blink::WebMIDIPermissionRequest& request) OVERRIDE; virtual void cancelSysExPermissionRequest( - const WebKit::WebMIDIPermissionRequest& request) OVERRIDE; + const blink::WebMIDIPermissionRequest& request) OVERRIDE; // Permission for using system exclusive messages has been set. void OnSysExPermissionApproved(int client_id, bool is_allowed); @@ -44,7 +44,7 @@ class MIDIDispatcher : public RenderViewObserver, // Each WebMIDIPermissionRequest object is valid until // cancelSysExPermissionRequest() is called with the object, or used to call // WebMIDIPermissionRequest::setIsAllowed(). - IDMap<WebKit::WebMIDIPermissionRequest> requests_; + IDMap<blink::WebMIDIPermissionRequest> requests_; DISALLOW_COPY_AND_ASSIGN(MIDIDispatcher); }; diff --git a/content/renderer/media/midi_message_filter.cc b/content/renderer/media/midi_message_filter.cc index 32e8bdd..d114618 100644 --- a/content/renderer/media/midi_message_filter.cc +++ b/content/renderer/media/midi_message_filter.cc @@ -72,7 +72,7 @@ void MIDIMessageFilter::OnChannelClosing() { channel_ = NULL; } -void MIDIMessageFilter::StartSession(WebKit::WebMIDIAccessorClient* client) { +void MIDIMessageFilter::StartSession(blink::WebMIDIAccessorClient* client) { // Generate and keep track of a "client id" which is sent to the browser // to ask permission to talk to MIDI hardware. // This id is handed back when we receive the answer in OnAccessApproved(). @@ -90,7 +90,7 @@ void MIDIMessageFilter::StartSessionOnIOThread(int client_id) { Send(new MIDIHostMsg_StartSession(client_id)); } -void MIDIMessageFilter::RemoveClient(WebKit::WebMIDIAccessorClient* client) { +void MIDIMessageFilter::RemoveClient(blink::WebMIDIAccessorClient* client) { ClientsMap::iterator i = clients_.find(client); if (i != clients_.end()) clients_.erase(i); @@ -115,7 +115,7 @@ void MIDIMessageFilter::HandleSessionStarted( bool success, MIDIPortInfoList inputs, MIDIPortInfoList outputs) { - WebKit::WebMIDIAccessorClient* client = GetClientFromId(client_id); + blink::WebMIDIAccessorClient* client = GetClientFromId(client_id); if (!client) return; @@ -140,7 +140,7 @@ void MIDIMessageFilter::HandleSessionStarted( client->didStartSession(success); } -WebKit::WebMIDIAccessorClient* +blink::WebMIDIAccessorClient* MIDIMessageFilter::GetClientFromId(int client_id) { // Iterating like this seems inefficient, but in practice there generally // will be very few clients (usually one). Additionally, this lookup diff --git a/content/renderer/media/midi_message_filter.h b/content/renderer/media/midi_message_filter.h index 4b8481f..c2e66ae 100644 --- a/content/renderer/media/midi_message_filter.h +++ b/content/renderer/media/midi_message_filter.h @@ -31,8 +31,8 @@ class CONTENT_EXPORT MIDIMessageFilter // If permission is granted, then the client's // addInputPort() and addOutputPort() methods will be called, // giving the client access to receive and send data. - void StartSession(WebKit::WebMIDIAccessorClient* client); - void RemoveClient(WebKit::WebMIDIAccessorClient* client); + void StartSession(blink::WebMIDIAccessorClient* client); + void RemoveClient(blink::WebMIDIAccessorClient* client); // A client will only be able to call this method if it has a suitable // output port (from addOutputPort()). @@ -92,7 +92,7 @@ class CONTENT_EXPORT MIDIMessageFilter const std::vector<uint8>& data, double timestamp); - WebKit::WebMIDIAccessorClient* GetClientFromId(int client_id); + blink::WebMIDIAccessorClient* GetClientFromId(int client_id); // IPC channel for Send(); must only be accessed on |io_message_loop_|. IPC::Channel* channel_; @@ -107,7 +107,7 @@ class CONTENT_EXPORT MIDIMessageFilter // We map client to "client id" used to track permission. // When access has been approved, we add the input and output ports to // the client, allowing it to actually receive and send MIDI data. - typedef std::map<WebKit::WebMIDIAccessorClient*, int> ClientsMap; + typedef std::map<blink::WebMIDIAccessorClient*, int> ClientsMap; ClientsMap clients_; // Dishes out client ids. diff --git a/content/renderer/media/mock_media_stream_dependency_factory.cc b/content/renderer/media/mock_media_stream_dependency_factory.cc index ec513ba..8de0e2b 100644 --- a/content/renderer/media/mock_media_stream_dependency_factory.cc +++ b/content/renderer/media/mock_media_stream_dependency_factory.cc @@ -386,7 +386,7 @@ scoped_refptr<webrtc::PeerConnectionInterface> MockMediaStreamDependencyFactory::CreatePeerConnection( const webrtc::PeerConnectionInterface::IceServers& ice_servers, const webrtc::MediaConstraintsInterface* constraints, - WebKit::WebFrame* frame, + blink::WebFrame* frame, webrtc::PeerConnectionObserver* observer) { DCHECK(mock_pc_factory_created_); return new talk_base::RefCountedObject<MockPeerConnectionImpl>(this); @@ -411,7 +411,7 @@ MockMediaStreamDependencyFactory::CreateLocalVideoSource( scoped_refptr<WebAudioCapturerSource> MockMediaStreamDependencyFactory::CreateWebAudioSource( - WebKit::WebMediaStreamSource* source, + blink::WebMediaStreamSource* source, RTCMediaConstraints* constraints) { return NULL; } diff --git a/content/renderer/media/mock_media_stream_dependency_factory.h b/content/renderer/media/mock_media_stream_dependency_factory.h index 7152d11..bd73ec7 100644 --- a/content/renderer/media/mock_media_stream_dependency_factory.h +++ b/content/renderer/media/mock_media_stream_dependency_factory.h @@ -118,7 +118,7 @@ class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { virtual scoped_refptr<webrtc::PeerConnectionInterface> CreatePeerConnection( const webrtc::PeerConnectionInterface::IceServers& ice_servers, const webrtc::MediaConstraintsInterface* constraints, - WebKit::WebFrame* frame, + blink::WebFrame* frame, webrtc::PeerConnectionObserver* observer) OVERRIDE; virtual scoped_refptr<webrtc::AudioSourceInterface> CreateLocalAudioSource( @@ -129,7 +129,7 @@ class MockMediaStreamDependencyFactory : public MediaStreamDependencyFactory { bool is_screencast, const webrtc::MediaConstraintsInterface* constraints) OVERRIDE; virtual scoped_refptr<WebAudioCapturerSource> CreateWebAudioSource( - WebKit::WebMediaStreamSource* source, + blink::WebMediaStreamSource* source, RTCMediaConstraints* constraints) OVERRIDE; virtual scoped_refptr<webrtc::MediaStreamInterface> CreateLocalMediaStream(const std::string& label) OVERRIDE; diff --git a/content/renderer/media/mock_media_stream_registry.cc b/content/renderer/media/mock_media_stream_registry.cc index 0462123..cc29c05 100644 --- a/content/renderer/media/mock_media_stream_registry.cc +++ b/content/renderer/media/mock_media_stream_registry.cc @@ -26,9 +26,9 @@ void MockMediaStreamRegistry::Init(const std::string& stream_url) { stream_url_ = stream_url; scoped_refptr<webrtc::MediaStreamInterface> stream( factory_->CreateLocalMediaStream(kTestStreamLabel)); - WebKit::WebVector<WebKit::WebMediaStreamTrack> webkit_audio_tracks; - WebKit::WebVector<WebKit::WebMediaStreamTrack> webkit_video_tracks; - WebKit::WebString webkit_stream_label(UTF8ToUTF16(stream->label())); + blink::WebVector<blink::WebMediaStreamTrack> webkit_audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> webkit_video_tracks; + blink::WebString webkit_stream_label(UTF8ToUTF16(stream->label())); test_stream_.initialize(webkit_stream_label, webkit_audio_tracks, webkit_video_tracks); test_stream_.setExtraData(new MediaStreamExtraData(stream.get(), false)); @@ -39,15 +39,15 @@ bool MockMediaStreamRegistry::AddVideoTrack(const std::string& track_id) { return factory_->AddNativeVideoMediaTrack(track_id, &test_stream_, capturer); } -WebKit::WebMediaStream MockMediaStreamRegistry::GetMediaStream( +blink::WebMediaStream MockMediaStreamRegistry::GetMediaStream( const std::string& url) { if (url != stream_url_) { - return WebKit::WebMediaStream(); + return blink::WebMediaStream(); } return test_stream_; } -const WebKit::WebMediaStream MockMediaStreamRegistry::test_stream() const { +const blink::WebMediaStream MockMediaStreamRegistry::test_stream() const { return test_stream_; } diff --git a/content/renderer/media/mock_media_stream_registry.h b/content/renderer/media/mock_media_stream_registry.h index 4d77395..c0dba84 100644 --- a/content/renderer/media/mock_media_stream_registry.h +++ b/content/renderer/media/mock_media_stream_registry.h @@ -18,13 +18,13 @@ class MockMediaStreamRegistry : public MediaStreamRegistryInterface { void Init(const std::string& stream_label); bool AddVideoTrack(const std::string& track_id); - virtual WebKit::WebMediaStream GetMediaStream(const std::string& url) + virtual blink::WebMediaStream GetMediaStream(const std::string& url) OVERRIDE; - const WebKit::WebMediaStream test_stream() const; + const blink::WebMediaStream test_stream() const; private: MockMediaStreamDependencyFactory* factory_; - WebKit::WebMediaStream test_stream_; + blink::WebMediaStream test_stream_; std::string stream_url_; }; diff --git a/content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc b/content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc index 2eb8b08..a50525e 100644 --- a/content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc +++ b/content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc @@ -30,7 +30,7 @@ MockWebRTCPeerConnectionHandlerClient:: ~MockWebRTCPeerConnectionHandlerClient() {} void MockWebRTCPeerConnectionHandlerClient::didGenerateICECandidateWorker( - const WebKit::WebRTCICECandidate& candidate) { + const blink::WebRTCICECandidate& candidate) { if (!candidate.isNull()) { candidate_sdp_ = UTF16ToUTF8(candidate.candidate()); candidate_mline_index_ = candidate.sdpMLineIndex(); @@ -43,12 +43,12 @@ void MockWebRTCPeerConnectionHandlerClient::didGenerateICECandidateWorker( } void MockWebRTCPeerConnectionHandlerClient::didAddRemoteStreamWorker( - const WebKit::WebMediaStream& stream_descriptor) { + const blink::WebMediaStream& stream_descriptor) { remote_steam_ = stream_descriptor; } void MockWebRTCPeerConnectionHandlerClient::didRemoveRemoteStreamWorker( - const WebKit::WebMediaStream& stream_descriptor) { + const blink::WebMediaStream& stream_descriptor) { remote_steam_.reset(); } diff --git a/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h b/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h index 1bc5b2a..720a7cb 100644 --- a/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h +++ b/content/renderer/media/mock_web_rtc_peer_connection_handler_client.h @@ -17,7 +17,7 @@ namespace content { class MockWebRTCPeerConnectionHandlerClient - : public WebKit::WebRTCPeerConnectionHandlerClient { + : public blink::WebRTCPeerConnectionHandlerClient { public: MockWebRTCPeerConnectionHandlerClient(); virtual ~MockWebRTCPeerConnectionHandlerClient(); @@ -25,33 +25,33 @@ class MockWebRTCPeerConnectionHandlerClient // WebRTCPeerConnectionHandlerClient implementation. MOCK_METHOD0(negotiationNeeded, void()); MOCK_METHOD1(didGenerateICECandidate, - void(const WebKit::WebRTCICECandidate& candidate)); + void(const blink::WebRTCICECandidate& candidate)); MOCK_METHOD1(didChangeSignalingState, void(SignalingState state)); MOCK_METHOD1(didChangeICEGatheringState, void(ICEGatheringState state)); MOCK_METHOD1(didChangeICEConnectionState, void(ICEConnectionState state)); MOCK_METHOD1(didAddRemoteStream, - void(const WebKit::WebMediaStream& stream_descriptor)); + void(const blink::WebMediaStream& stream_descriptor)); MOCK_METHOD1(didRemoveRemoteStream, - void(const WebKit::WebMediaStream& stream_descriptor)); + void(const blink::WebMediaStream& stream_descriptor)); MOCK_METHOD1(didAddRemoteDataChannel, - void(WebKit::WebRTCDataChannelHandler*)); + void(blink::WebRTCDataChannelHandler*)); void didGenerateICECandidateWorker( - const WebKit::WebRTCICECandidate& candidate); + const blink::WebRTCICECandidate& candidate); void didAddRemoteStreamWorker( - const WebKit::WebMediaStream& stream_descriptor); + const blink::WebMediaStream& stream_descriptor); void didRemoveRemoteStreamWorker( - const WebKit::WebMediaStream& stream_descriptor); + const blink::WebMediaStream& stream_descriptor); const std::string& candidate_sdp() const { return candidate_sdp_; } int candidate_mlineindex() const { return candidate_mline_index_; } const std::string& candidate_mid() const { return candidate_mid_ ; } - const WebKit::WebMediaStream& remote_stream() const { return remote_steam_;} + const blink::WebMediaStream& remote_stream() const { return remote_steam_;} private: - WebKit::WebMediaStream remote_steam_; + blink::WebMediaStream remote_steam_; std::string candidate_sdp_; int candidate_mline_index_; std::string candidate_mid_; diff --git a/content/renderer/media/peer_connection_handler_base.cc b/content/renderer/media/peer_connection_handler_base.cc index b65a3aa..05e71a6 100644 --- a/content/renderer/media/peer_connection_handler_base.cc +++ b/content/renderer/media/peer_connection_handler_base.cc @@ -25,7 +25,7 @@ PeerConnectionHandlerBase::~PeerConnectionHandlerBase() { } bool PeerConnectionHandlerBase::AddStream( - const WebKit::WebMediaStream& stream, + const blink::WebMediaStream& stream, const webrtc::MediaConstraintsInterface* constraints) { webrtc::MediaStreamInterface* native_stream = MediaStreamDependencyFactory::GetNativeMediaStream(stream); @@ -35,7 +35,7 @@ bool PeerConnectionHandlerBase::AddStream( } void PeerConnectionHandlerBase::RemoveStream( - const WebKit::WebMediaStream& stream) { + const blink::WebMediaStream& stream) { webrtc::MediaStreamInterface* native_stream = MediaStreamDependencyFactory::GetNativeMediaStream(stream); if (native_stream) diff --git a/content/renderer/media/peer_connection_handler_base.h b/content/renderer/media/peer_connection_handler_base.h index 7c62b22..db6c040 100644 --- a/content/renderer/media/peer_connection_handler_base.h +++ b/content/renderer/media/peer_connection_handler_base.h @@ -32,10 +32,10 @@ class CONTENT_EXPORT PeerConnectionHandlerBase protected: virtual ~PeerConnectionHandlerBase(); - void AddStream(const WebKit::WebMediaStream& stream); - bool AddStream(const WebKit::WebMediaStream& stream, + void AddStream(const blink::WebMediaStream& stream); + bool AddStream(const blink::WebMediaStream& stream, const webrtc::MediaConstraintsInterface* constraints); - void RemoveStream(const WebKit::WebMediaStream& stream); + void RemoveStream(const blink::WebMediaStream& stream); // dependency_factory_ is a raw pointer, and is valid for the lifetime of // MediaStreamImpl. diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc index 597c645..b594ff8 100644 --- a/content/renderer/media/peer_connection_tracker.cc +++ b/content/renderer/media/peer_connection_tracker.cc @@ -18,7 +18,7 @@ using std::string; using webrtc::MediaConstraintsInterface; -using WebKit::WebRTCPeerConnectionHandlerClient; +using blink::WebRTCPeerConnectionHandlerClient; namespace content { @@ -63,16 +63,16 @@ static string SerializeMediaConstraints( } static string SerializeMediaStreamComponent( - const WebKit::WebMediaStreamTrack component) { + const blink::WebMediaStreamTrack component) { string id = UTF16ToUTF8(component.source().id()); return id; } static string SerializeMediaDescriptor( - const WebKit::WebMediaStream& stream) { + const blink::WebMediaStream& stream) { string label = UTF16ToUTF8(stream.id()); string result = "label: " + label; - WebKit::WebVector<WebKit::WebMediaStreamTrack> tracks; + blink::WebVector<blink::WebMediaStreamTrack> tracks; stream.audioTracks(tracks); if (!tracks.isEmpty()) { result += ", audio: ["; @@ -251,7 +251,7 @@ void PeerConnectionTracker::RegisterPeerConnection( RTCPeerConnectionHandler* pc_handler, const std::vector<webrtc::PeerConnectionInterface::IceServer>& servers, const RTCMediaConstraints& constraints, - const WebKit::WebFrame* frame) { + const blink::WebFrame* frame) { DVLOG(1) << "PeerConnectionTracker::RegisterPeerConnection()"; PeerConnectionInfo info; @@ -304,7 +304,7 @@ void PeerConnectionTracker::TrackCreateAnswer( void PeerConnectionTracker::TrackSetSessionDescription( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebRTCSessionDescription& desc, + const blink::WebRTCSessionDescription& desc, Source source) { string sdp = UTF16ToUTF8(desc.sdp()); string type = UTF16ToUTF8(desc.type()); @@ -330,7 +330,7 @@ void PeerConnectionTracker::TrackUpdateIce( void PeerConnectionTracker::TrackAddIceCandidate( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebRTCICECandidate& candidate, + const blink::WebRTCICECandidate& candidate, Source source) { string value = "mid: " + UTF16ToUTF8(candidate.sdpMid()) + ", " + "candidate: " + UTF16ToUTF8(candidate.candidate()); @@ -341,7 +341,7 @@ void PeerConnectionTracker::TrackAddIceCandidate( void PeerConnectionTracker::TrackAddStream( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStream& stream, + const blink::WebMediaStream& stream, Source source){ SendPeerConnectionUpdate( pc_handler, source == SOURCE_LOCAL ? "addStream" : "onAddStream", @@ -350,7 +350,7 @@ void PeerConnectionTracker::TrackAddStream( void PeerConnectionTracker::TrackRemoveStream( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStream& stream, + const blink::WebMediaStream& stream, Source source){ SendPeerConnectionUpdate( pc_handler, source == SOURCE_LOCAL ? "removeStream" : "onRemoveStream", @@ -429,7 +429,7 @@ void PeerConnectionTracker::TrackOnRenegotiationNeeded( void PeerConnectionTracker::TrackCreateDTMFSender( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStreamTrack& track) { + const blink::WebMediaStreamTrack& track) { SendPeerConnectionUpdate(pc_handler, "createDTMFSender", UTF16ToUTF8(track.id())); } diff --git a/content/renderer/media/peer_connection_tracker.h b/content/renderer/media/peer_connection_tracker.h index 41c78d8..3bcda39 100644 --- a/content/renderer/media/peer_connection_tracker.h +++ b/content/renderer/media/peer_connection_tracker.h @@ -14,12 +14,12 @@ #include "third_party/WebKit/public/platform/WebRTCSessionDescription.h" #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h" -namespace WebKit { +namespace blink { class WebFrame; class WebRTCICECandidate; class WebString; class WebRTCSessionDescription; -} // namespace WebKit +} // namespace blink namespace webrtc { class DataChannelInterface; @@ -70,7 +70,7 @@ class CONTENT_EXPORT PeerConnectionTracker : public RenderProcessObserver { RTCPeerConnectionHandler* pc_handler, const std::vector<webrtc::PeerConnectionInterface::IceServer>& servers, const RTCMediaConstraints& constraints, - const WebKit::WebFrame* frame); + const blink::WebFrame* frame); // Sends an update when a PeerConnection has been destroyed. virtual void UnregisterPeerConnection(RTCPeerConnectionHandler* pc_handler); @@ -86,7 +86,7 @@ class CONTENT_EXPORT PeerConnectionTracker : public RenderProcessObserver { // Sends an update when setLocalDescription or setRemoteDescription is called. virtual void TrackSetSessionDescription( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebRTCSessionDescription& desc, Source source); + const blink::WebRTCSessionDescription& desc, Source source); // Sends an update when Ice candidates are updated. virtual void TrackUpdateIce( @@ -97,17 +97,17 @@ class CONTENT_EXPORT PeerConnectionTracker : public RenderProcessObserver { // Sends an update when an Ice candidate is added. virtual void TrackAddIceCandidate( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebRTCICECandidate& candidate, Source source); + const blink::WebRTCICECandidate& candidate, Source source); // Sends an update when a media stream is added. virtual void TrackAddStream( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStream& stream, Source source); + const blink::WebMediaStream& stream, Source source); // Sends an update when a media stream is removed. virtual void TrackRemoveStream( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStream& stream, Source source); + const blink::WebMediaStream& stream, Source source); // Sends an update when a DataChannel is created. virtual void TrackCreateDataChannel( @@ -120,19 +120,19 @@ class CONTENT_EXPORT PeerConnectionTracker : public RenderProcessObserver { // Sends an update when the signaling state of a PeerConnection has changed. virtual void TrackSignalingStateChange( RTCPeerConnectionHandler* pc_handler, - WebKit::WebRTCPeerConnectionHandlerClient::SignalingState state); + blink::WebRTCPeerConnectionHandlerClient::SignalingState state); // Sends an update when the Ice connection state // of a PeerConnection has changed. virtual void TrackIceConnectionStateChange( RTCPeerConnectionHandler* pc_handler, - WebKit::WebRTCPeerConnectionHandlerClient::ICEConnectionState state); + blink::WebRTCPeerConnectionHandlerClient::ICEConnectionState state); // Sends an update when the Ice gathering state // of a PeerConnection has changed. virtual void TrackIceGatheringStateChange( RTCPeerConnectionHandler* pc_handler, - WebKit::WebRTCPeerConnectionHandlerClient::ICEGatheringState state); + blink::WebRTCPeerConnectionHandlerClient::ICEGatheringState state); // Sends an update when the SetSessionDescription or CreateOffer or // CreateAnswer callbacks are called. @@ -146,7 +146,7 @@ class CONTENT_EXPORT PeerConnectionTracker : public RenderProcessObserver { // Sends an update when a DTMFSender is created. virtual void TrackCreateDTMFSender( RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStreamTrack& track); + const blink::WebMediaStreamTrack& track); private: // Assign a local ID to a peer connection so that the browser process can diff --git a/content/renderer/media/remote_media_stream_impl.cc b/content/renderer/media/remote_media_stream_impl.cc index e55d84f..da68411 100644 --- a/content/renderer/media/remote_media_stream_impl.cc +++ b/content/renderer/media/remote_media_stream_impl.cc @@ -22,13 +22,13 @@ class RemoteMediaStreamTrackObserver public: RemoteMediaStreamTrackObserver( webrtc::MediaStreamTrackInterface* webrtc_track, - const WebKit::WebMediaStreamTrack& webkit_track); + const blink::WebMediaStreamTrack& webkit_track); virtual ~RemoteMediaStreamTrackObserver(); webrtc::MediaStreamTrackInterface* observered_track() { return webrtc_track_.get(); } - const WebKit::WebMediaStreamTrack& webkit_track() { return webkit_track_; } + const blink::WebMediaStreamTrack& webkit_track() { return webkit_track_; } private: // webrtc::ObserverInterface implementation. @@ -36,7 +36,7 @@ class RemoteMediaStreamTrackObserver webrtc::MediaStreamTrackInterface::TrackState state_; scoped_refptr<webrtc::MediaStreamTrackInterface> webrtc_track_; - WebKit::WebMediaStreamTrack webkit_track_; + blink::WebMediaStreamTrack webkit_track_; DISALLOW_COPY_AND_ASSIGN(RemoteMediaStreamTrackObserver); }; @@ -46,10 +46,10 @@ class RemoteMediaStreamTrackObserver namespace { void InitializeWebkitTrack(webrtc::MediaStreamTrackInterface* track, - WebKit::WebMediaStreamTrack* webkit_track, - WebKit::WebMediaStreamSource::Type type) { - WebKit::WebMediaStreamSource webkit_source; - WebKit::WebString webkit_track_id(UTF8ToUTF16(track->id())); + blink::WebMediaStreamTrack* webkit_track, + blink::WebMediaStreamSource::Type type) { + blink::WebMediaStreamSource webkit_source; + blink::WebString webkit_track_id(UTF8ToUTF16(track->id())); webkit_source.initialize(webkit_track_id, type, webkit_track_id); webkit_track->initialize(webkit_track_id, webkit_source); @@ -75,7 +75,7 @@ namespace content { RemoteMediaStreamTrackObserver::RemoteMediaStreamTrackObserver( webrtc::MediaStreamTrackInterface* webrtc_track, - const WebKit::WebMediaStreamTrack& webkit_track) + const blink::WebMediaStreamTrack& webkit_track) : state_(webrtc_track->state()), webrtc_track_(webrtc_track), webkit_track_(webkit_track) { @@ -101,11 +101,11 @@ void RemoteMediaStreamTrackObserver::OnChanged() { break; case webrtc::MediaStreamTrackInterface::kLive: webkit_track_.source().setReadyState( - WebKit::WebMediaStreamSource::ReadyStateLive); + blink::WebMediaStreamSource::ReadyStateLive); break; case webrtc::MediaStreamTrackInterface::kEnded: webkit_track_.source().setReadyState( - WebKit::WebMediaStreamSource::ReadyStateEnded); + blink::WebMediaStreamSource::ReadyStateEnded); break; default: NOTREACHED(); @@ -120,7 +120,7 @@ RemoteMediaStreamImpl::RemoteMediaStreamImpl( webrtc::AudioTrackVector webrtc_audio_tracks = webrtc_stream_->GetAudioTracks(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> webkit_audio_tracks( + blink::WebVector<blink::WebMediaStreamTrack> webkit_audio_tracks( webrtc_audio_tracks.size()); // Initialize WebKit audio tracks. @@ -129,7 +129,7 @@ RemoteMediaStreamImpl::RemoteMediaStreamImpl( webrtc::AudioTrackInterface* audio_track = webrtc_audio_tracks[i]; DCHECK(audio_track); InitializeWebkitTrack(audio_track, &webkit_audio_tracks[i], - WebKit::WebMediaStreamSource::TypeAudio); + blink::WebMediaStreamSource::TypeAudio); audio_track_observers_.push_back( new RemoteMediaStreamTrackObserver(audio_track, webkit_audio_tracks[i])); @@ -138,13 +138,13 @@ RemoteMediaStreamImpl::RemoteMediaStreamImpl( // Initialize WebKit video tracks. webrtc::VideoTrackVector webrtc_video_tracks = webrtc_stream_->GetVideoTracks(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> webkit_video_tracks( + blink::WebVector<blink::WebMediaStreamTrack> webkit_video_tracks( webrtc_video_tracks.size()); for (i = 0; i < webrtc_video_tracks.size(); ++i) { webrtc::VideoTrackInterface* video_track = webrtc_video_tracks[i]; DCHECK(video_track); InitializeWebkitTrack(video_track, &webkit_video_tracks[i], - WebKit::WebMediaStreamSource::TypeVideo); + blink::WebMediaStreamSource::TypeVideo); video_track_observers_.push_back( new RemoteMediaStreamTrackObserver(video_track, webkit_video_tracks[i])); @@ -192,9 +192,9 @@ void RemoteMediaStreamImpl::OnChanged() { for (webrtc::AudioTrackVector::iterator it = webrtc_audio_tracks.begin(); it != webrtc_audio_tracks.end(); ++it) { if (!FindTrackObserver(*it, audio_track_observers_)) { - WebKit::WebMediaStreamTrack new_track; + blink::WebMediaStreamTrack new_track; InitializeWebkitTrack(*it, &new_track, - WebKit::WebMediaStreamSource::TypeAudio); + blink::WebMediaStreamSource::TypeAudio); audio_track_observers_.push_back( new RemoteMediaStreamTrackObserver(*it, new_track)); webkit_stream_.addTrack(new_track); @@ -207,9 +207,9 @@ void RemoteMediaStreamImpl::OnChanged() { for (webrtc::VideoTrackVector::iterator it = webrtc_video_tracks.begin(); it != webrtc_video_tracks.end(); ++it) { if (!FindTrackObserver(*it, video_track_observers_)) { - WebKit::WebMediaStreamTrack new_track; + blink::WebMediaStreamTrack new_track; InitializeWebkitTrack(*it, &new_track, - WebKit::WebMediaStreamSource::TypeVideo); + blink::WebMediaStreamSource::TypeVideo); video_track_observers_.push_back( new RemoteMediaStreamTrackObserver(*it, new_track)); webkit_stream_.addTrack(new_track); diff --git a/content/renderer/media/remote_media_stream_impl.h b/content/renderer/media/remote_media_stream_impl.h index cc711e4..3263ed4 100644 --- a/content/renderer/media/remote_media_stream_impl.h +++ b/content/renderer/media/remote_media_stream_impl.h @@ -32,7 +32,7 @@ class CONTENT_EXPORT RemoteMediaStreamImpl webrtc::MediaStreamInterface* webrtc_stream); virtual ~RemoteMediaStreamImpl(); - const WebKit::WebMediaStream& webkit_stream() { return webkit_stream_; } + const blink::WebMediaStream& webkit_stream() { return webkit_stream_; } private: // webrtc::ObserverInterface implementation. @@ -41,7 +41,7 @@ class CONTENT_EXPORT RemoteMediaStreamImpl scoped_refptr<webrtc::MediaStreamInterface> webrtc_stream_; ScopedVector<RemoteMediaStreamTrackObserver> audio_track_observers_; ScopedVector<RemoteMediaStreamTrackObserver> video_track_observers_; - WebKit::WebMediaStream webkit_stream_; + blink::WebMediaStream webkit_stream_; DISALLOW_COPY_AND_ASSIGN(RemoteMediaStreamImpl); }; diff --git a/content/renderer/media/renderer_webaudiodevice_impl.cc b/content/renderer/media/renderer_webaudiodevice_impl.cc index 3d23a9c..ec38769 100644 --- a/content/renderer/media/renderer_webaudiodevice_impl.cc +++ b/content/renderer/media/renderer_webaudiodevice_impl.cc @@ -13,10 +13,10 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebAudioDevice; -using WebKit::WebFrame; -using WebKit::WebVector; -using WebKit::WebView; +using blink::WebAudioDevice; +using blink::WebFrame; +using blink::WebVector; +using blink::WebView; namespace content { diff --git a/content/renderer/media/renderer_webaudiodevice_impl.h b/content/renderer/media/renderer_webaudiodevice_impl.h index 5a8161f..962ec08 100644 --- a/content/renderer/media/renderer_webaudiodevice_impl.h +++ b/content/renderer/media/renderer_webaudiodevice_impl.h @@ -19,15 +19,15 @@ class AudioOutputDevice; namespace content { class RendererWebAudioDeviceImpl - : public WebKit::WebAudioDevice, + : public blink::WebAudioDevice, public media::AudioRendererSink::RenderCallback { public: RendererWebAudioDeviceImpl(const media::AudioParameters& params, - WebKit::WebAudioDevice::RenderCallback* callback, + blink::WebAudioDevice::RenderCallback* callback, int session_id); virtual ~RendererWebAudioDeviceImpl(); - // WebKit::WebAudioDevice implementation. + // blink::WebAudioDevice implementation. virtual void start(); virtual void stop(); virtual double sampleRate(); @@ -46,10 +46,10 @@ class RendererWebAudioDeviceImpl const media::AudioParameters params_; // Weak reference to the callback into WebKit code. - WebKit::WebAudioDevice::RenderCallback* const client_callback_; + blink::WebAudioDevice::RenderCallback* const client_callback_; // To avoid the need for locking, ensure the control methods of the - // WebKit::WebAudioDevice implementation are called on the same thread. + // blink::WebAudioDevice implementation are called on the same thread. base::ThreadChecker thread_checker_; // When non-NULL, we are started. When NULL, we are stopped. diff --git a/content/renderer/media/renderer_webmidiaccessor_impl.cc b/content/renderer/media/renderer_webmidiaccessor_impl.cc index de9db93..b121746 100644 --- a/content/renderer/media/renderer_webmidiaccessor_impl.cc +++ b/content/renderer/media/renderer_webmidiaccessor_impl.cc @@ -11,7 +11,7 @@ namespace content { RendererWebMIDIAccessorImpl::RendererWebMIDIAccessorImpl( - WebKit::WebMIDIAccessorClient* client) + blink::WebMIDIAccessorClient* client) : client_(client) { DCHECK(client_); } diff --git a/content/renderer/media/renderer_webmidiaccessor_impl.h b/content/renderer/media/renderer_webmidiaccessor_impl.h index 7032943..4ebaffd 100644 --- a/content/renderer/media/renderer_webmidiaccessor_impl.h +++ b/content/renderer/media/renderer_webmidiaccessor_impl.h @@ -15,13 +15,13 @@ namespace content { class MIDIMessageFilter; class RendererWebMIDIAccessorImpl - : public WebKit::WebMIDIAccessor { + : public blink::WebMIDIAccessor { public: explicit RendererWebMIDIAccessorImpl( - WebKit::WebMIDIAccessorClient* client); + blink::WebMIDIAccessorClient* client); virtual ~RendererWebMIDIAccessorImpl(); - // WebKit::WebMIDIAccessor implementation. + // blink::WebMIDIAccessor implementation. virtual void startSession(); virtual void sendMIDIData(unsigned port_index, const unsigned char* data, @@ -29,7 +29,7 @@ class RendererWebMIDIAccessorImpl double timestamp); private: - WebKit::WebMIDIAccessorClient* client_; + blink::WebMIDIAccessorClient* client_; MIDIMessageFilter* midi_message_filter(); diff --git a/content/renderer/media/rtc_data_channel_handler.cc b/content/renderer/media/rtc_data_channel_handler.cc index 713dc4c..3cd9a37 100644 --- a/content/renderer/media/rtc_data_channel_handler.cc +++ b/content/renderer/media/rtc_data_channel_handler.cc @@ -25,11 +25,11 @@ RtcDataChannelHandler::~RtcDataChannelHandler() { } void RtcDataChannelHandler::setClient( - WebKit::WebRTCDataChannelHandlerClient* client) { + blink::WebRTCDataChannelHandlerClient* client) { webkit_client_ = client; } -WebKit::WebString RtcDataChannelHandler::label() { +blink::WebString RtcDataChannelHandler::label() { return UTF8ToUTF16(channel_->label()); } @@ -49,7 +49,7 @@ unsigned short RtcDataChannelHandler::maxRetransmits() const { return channel_->maxRetransmits(); } -WebKit::WebString RtcDataChannelHandler::protocol() const { +blink::WebString RtcDataChannelHandler::protocol() const { return UTF8ToUTF16(channel_->protocol()); } @@ -65,7 +65,7 @@ unsigned long RtcDataChannelHandler::bufferedAmount() { return channel_->buffered_amount(); } -bool RtcDataChannelHandler::sendStringData(const WebKit::WebString& data) { +bool RtcDataChannelHandler::sendStringData(const blink::WebString& data) { std::string utf8_buffer = UTF16ToUTF8(data); talk_base::Buffer buffer(utf8_buffer.c_str(), utf8_buffer.length()); webrtc::DataBuffer data_buffer(buffer, false); @@ -91,19 +91,19 @@ void RtcDataChannelHandler::OnStateChange() { switch (channel_->state()) { case webrtc::DataChannelInterface::kConnecting: webkit_client_->didChangeReadyState( - WebKit::WebRTCDataChannelHandlerClient::ReadyStateConnecting); + blink::WebRTCDataChannelHandlerClient::ReadyStateConnecting); break; case webrtc::DataChannelInterface::kOpen: webkit_client_->didChangeReadyState( - WebKit::WebRTCDataChannelHandlerClient::ReadyStateOpen); + blink::WebRTCDataChannelHandlerClient::ReadyStateOpen); break; case webrtc::DataChannelInterface::kClosing: webkit_client_->didChangeReadyState( - WebKit::WebRTCDataChannelHandlerClient::ReadyStateClosing); + blink::WebRTCDataChannelHandlerClient::ReadyStateClosing); break; case webrtc::DataChannelInterface::kClosed: webkit_client_->didChangeReadyState( - WebKit::WebRTCDataChannelHandlerClient::ReadyStateClosed); + blink::WebRTCDataChannelHandlerClient::ReadyStateClosed); break; default: NOTREACHED(); diff --git a/content/renderer/media/rtc_data_channel_handler.h b/content/renderer/media/rtc_data_channel_handler.h index 8ec07e0..a552134 100644 --- a/content/renderer/media/rtc_data_channel_handler.h +++ b/content/renderer/media/rtc_data_channel_handler.h @@ -21,26 +21,26 @@ namespace content { // Callbacks to the webrtc::DataChannelObserver implementation also occur on // the main render thread. class CONTENT_EXPORT RtcDataChannelHandler - : NON_EXPORTED_BASE(public WebKit::WebRTCDataChannelHandler), + : NON_EXPORTED_BASE(public blink::WebRTCDataChannelHandler), NON_EXPORTED_BASE(public webrtc::DataChannelObserver), NON_EXPORTED_BASE(public base::NonThreadSafe) { public: explicit RtcDataChannelHandler(webrtc::DataChannelInterface* channel); virtual ~RtcDataChannelHandler(); - // WebKit::WebRTCDataChannelHandler implementation. + // blink::WebRTCDataChannelHandler implementation. virtual void setClient( - WebKit::WebRTCDataChannelHandlerClient* client) OVERRIDE; - virtual WebKit::WebString label() OVERRIDE; + blink::WebRTCDataChannelHandlerClient* client) OVERRIDE; + virtual blink::WebString label() OVERRIDE; virtual bool isReliable() OVERRIDE; virtual bool ordered() const OVERRIDE; virtual unsigned short maxRetransmitTime() const OVERRIDE; virtual unsigned short maxRetransmits() const OVERRIDE; - virtual WebKit::WebString protocol() const OVERRIDE; + virtual blink::WebString protocol() const OVERRIDE; virtual bool negotiated() const OVERRIDE; virtual unsigned short id() const OVERRIDE; virtual unsigned long bufferedAmount() OVERRIDE; - virtual bool sendStringData(const WebKit::WebString& data) OVERRIDE; + virtual bool sendStringData(const blink::WebString& data) OVERRIDE; virtual bool sendRawData(const char* data, size_t length) OVERRIDE; virtual void close() OVERRIDE; @@ -50,7 +50,7 @@ class CONTENT_EXPORT RtcDataChannelHandler private: scoped_refptr<webrtc::DataChannelInterface> channel_; - WebKit::WebRTCDataChannelHandlerClient* webkit_client_; + blink::WebRTCDataChannelHandlerClient* webkit_client_; }; } // namespace content diff --git a/content/renderer/media/rtc_dtmf_sender_handler.cc b/content/renderer/media/rtc_dtmf_sender_handler.cc index 72e75aa..3df592c 100644 --- a/content/renderer/media/rtc_dtmf_sender_handler.cc +++ b/content/renderer/media/rtc_dtmf_sender_handler.cc @@ -26,11 +26,11 @@ RtcDtmfSenderHandler::~RtcDtmfSenderHandler() { } void RtcDtmfSenderHandler::setClient( - WebKit::WebRTCDTMFSenderHandlerClient* client) { + blink::WebRTCDTMFSenderHandlerClient* client) { webkit_client_ = client; } -WebKit::WebString RtcDtmfSenderHandler::currentToneBuffer() { +blink::WebString RtcDtmfSenderHandler::currentToneBuffer() { return UTF8ToUTF16(dtmf_sender_->tones()); } @@ -38,7 +38,7 @@ bool RtcDtmfSenderHandler::canInsertDTMF() { return dtmf_sender_->CanInsertDtmf(); } -bool RtcDtmfSenderHandler::insertDTMF(const WebKit::WebString& tones, +bool RtcDtmfSenderHandler::insertDTMF(const blink::WebString& tones, long duration, long interToneGap) { std::string utf8_tones = UTF16ToUTF8(tones); diff --git a/content/renderer/media/rtc_dtmf_sender_handler.h b/content/renderer/media/rtc_dtmf_sender_handler.h index eeff5eb..3f77525 100644 --- a/content/renderer/media/rtc_dtmf_sender_handler.h +++ b/content/renderer/media/rtc_dtmf_sender_handler.h @@ -23,19 +23,19 @@ namespace content { // Callbacks to the webrtc::DtmfSenderObserverInterface implementation also // occur on the main render thread. class CONTENT_EXPORT RtcDtmfSenderHandler - : NON_EXPORTED_BASE(public WebKit::WebRTCDTMFSenderHandler), + : NON_EXPORTED_BASE(public blink::WebRTCDTMFSenderHandler), NON_EXPORTED_BASE(public webrtc::DtmfSenderObserverInterface), NON_EXPORTED_BASE(public base::NonThreadSafe) { public: explicit RtcDtmfSenderHandler(webrtc::DtmfSenderInterface* dtmf_sender); virtual ~RtcDtmfSenderHandler(); - // WebKit::WebRTCDTMFSenderHandler implementation. + // blink::WebRTCDTMFSenderHandler implementation. virtual void setClient( - WebKit::WebRTCDTMFSenderHandlerClient* client) OVERRIDE; - virtual WebKit::WebString currentToneBuffer() OVERRIDE; + blink::WebRTCDTMFSenderHandlerClient* client) OVERRIDE; + virtual blink::WebString currentToneBuffer() OVERRIDE; virtual bool canInsertDTMF() OVERRIDE; - virtual bool insertDTMF(const WebKit::WebString& tones, long duration, + virtual bool insertDTMF(const blink::WebString& tones, long duration, long interToneGap) OVERRIDE; // webrtc::DtmfSenderObserverInterface implementation. @@ -43,7 +43,7 @@ class CONTENT_EXPORT RtcDtmfSenderHandler private: scoped_refptr<webrtc::DtmfSenderInterface> dtmf_sender_; - WebKit::WebRTCDTMFSenderHandlerClient* webkit_client_; + blink::WebRTCDTMFSenderHandlerClient* webkit_client_; }; } // namespace content diff --git a/content/renderer/media/rtc_media_constraints.cc b/content/renderer/media/rtc_media_constraints.cc index 06d6715..235d9bd 100644 --- a/content/renderer/media/rtc_media_constraints.cc +++ b/content/renderer/media/rtc_media_constraints.cc @@ -16,7 +16,7 @@ namespace content { namespace { void GetNativeMediaConstraints( - const WebKit::WebVector<WebKit::WebMediaConstraint>& constraints, + const blink::WebVector<blink::WebMediaConstraint>& constraints, webrtc::MediaConstraintsInterface::Constraints* native_constraints) { DCHECK(native_constraints); for (size_t i = 0; i < constraints.size(); ++i) { @@ -48,13 +48,13 @@ void GetNativeMediaConstraints( RTCMediaConstraints::RTCMediaConstraints() {} RTCMediaConstraints::RTCMediaConstraints( - const WebKit::WebMediaConstraints& constraints) { + const blink::WebMediaConstraints& constraints) { if (constraints.isNull()) return; // Will happen in unit tests. - WebKit::WebVector<WebKit::WebMediaConstraint> mandatory; + blink::WebVector<blink::WebMediaConstraint> mandatory; constraints.getMandatoryConstraints(mandatory); GetNativeMediaConstraints(mandatory, &mandatory_); - WebKit::WebVector<WebKit::WebMediaConstraint> optional; + blink::WebVector<blink::WebMediaConstraint> optional; constraints.getOptionalConstraints(optional); GetNativeMediaConstraints(optional, &optional_); } diff --git a/content/renderer/media/rtc_media_constraints.h b/content/renderer/media/rtc_media_constraints.h index 58f8486..fd55e34 100644 --- a/content/renderer/media/rtc_media_constraints.h +++ b/content/renderer/media/rtc_media_constraints.h @@ -9,7 +9,7 @@ #include "content/common/content_export.h" #include "third_party/libjingle/source/talk/app/webrtc/mediaconstraintsinterface.h" -namespace WebKit { +namespace blink { class WebMediaConstraints; } @@ -23,7 +23,7 @@ class CONTENT_EXPORT RTCMediaConstraints public: RTCMediaConstraints(); explicit RTCMediaConstraints( - const WebKit::WebMediaConstraints& constraints); + const blink::WebMediaConstraints& constraints); virtual ~RTCMediaConstraints(); virtual const Constraints& GetMandatory() const OVERRIDE; virtual const Constraints& GetOptional() const OVERRIDE; diff --git a/content/renderer/media/rtc_peer_connection_handler.cc b/content/renderer/media/rtc_peer_connection_handler.cc index b5590f8..3342b676 100644 --- a/content/renderer/media/rtc_peer_connection_handler.cc +++ b/content/renderer/media/rtc_peer_connection_handler.cc @@ -41,10 +41,10 @@ namespace content { // Converter functions from libjingle types to WebKit types. -WebKit::WebRTCPeerConnectionHandlerClient::ICEGatheringState +blink::WebRTCPeerConnectionHandlerClient::ICEGatheringState GetWebKitIceGatheringState( webrtc::PeerConnectionInterface::IceGatheringState state) { - using WebKit::WebRTCPeerConnectionHandlerClient; + using blink::WebRTCPeerConnectionHandlerClient; switch (state) { case webrtc::PeerConnectionInterface::kIceGatheringNew: return WebRTCPeerConnectionHandlerClient::ICEGatheringStateNew; @@ -58,10 +58,10 @@ GetWebKitIceGatheringState( } } -static WebKit::WebRTCPeerConnectionHandlerClient::ICEConnectionState +static blink::WebRTCPeerConnectionHandlerClient::ICEConnectionState GetWebKitIceConnectionState( webrtc::PeerConnectionInterface::IceConnectionState ice_state) { - using WebKit::WebRTCPeerConnectionHandlerClient; + using blink::WebRTCPeerConnectionHandlerClient; switch (ice_state) { case webrtc::PeerConnectionInterface::kIceConnectionNew: return WebRTCPeerConnectionHandlerClient::ICEConnectionStateStarting; @@ -83,9 +83,9 @@ GetWebKitIceConnectionState( } } -static WebKit::WebRTCPeerConnectionHandlerClient::SignalingState +static blink::WebRTCPeerConnectionHandlerClient::SignalingState GetWebKitSignalingState(webrtc::PeerConnectionInterface::SignalingState state) { - using WebKit::WebRTCPeerConnectionHandlerClient; + using blink::WebRTCPeerConnectionHandlerClient; switch (state) { case webrtc::PeerConnectionInterface::kStable: return WebRTCPeerConnectionHandlerClient::SignalingStateStable; @@ -106,10 +106,10 @@ GetWebKitSignalingState(webrtc::PeerConnectionInterface::SignalingState state) { } } -static WebKit::WebRTCSessionDescription +static blink::WebRTCSessionDescription CreateWebKitSessionDescription( const webrtc::SessionDescriptionInterface* native_desc) { - WebKit::WebRTCSessionDescription description; + blink::WebRTCSessionDescription description; if (!native_desc) { LOG(ERROR) << "Native session description is null."; return description; @@ -128,13 +128,13 @@ CreateWebKitSessionDescription( // Converter functions from WebKit types to libjingle types. static void GetNativeIceServers( - const WebKit::WebRTCConfiguration& server_configuration, + const blink::WebRTCConfiguration& server_configuration, webrtc::PeerConnectionInterface::IceServers* servers) { if (server_configuration.isNull() || !servers) return; for (size_t i = 0; i < server_configuration.numberOfServers(); ++i) { webrtc::PeerConnectionInterface::IceServer server; - const WebKit::WebRTCICEServer& webkit_server = + const blink::WebRTCICEServer& webkit_server = server_configuration.server(i); server.username = UTF16ToUTF8(webkit_server.username()); server.password = UTF16ToUTF8(webkit_server.credential()); @@ -172,12 +172,12 @@ class SessionDescriptionRequestTracker { }; // Class mapping responses from calls to libjingle CreateOffer/Answer and -// the WebKit::WebRTCSessionDescriptionRequest. +// the blink::WebRTCSessionDescriptionRequest. class CreateSessionDescriptionRequest : public webrtc::CreateSessionDescriptionObserver { public: explicit CreateSessionDescriptionRequest( - const WebKit::WebRTCSessionDescriptionRequest& request, + const blink::WebRTCSessionDescriptionRequest& request, RTCPeerConnectionHandler* handler, PeerConnectionTracker::Action action) : webkit_request_(request), tracker_(handler, action) {} @@ -195,17 +195,17 @@ class CreateSessionDescriptionRequest virtual ~CreateSessionDescriptionRequest() {} private: - WebKit::WebRTCSessionDescriptionRequest webkit_request_; + blink::WebRTCSessionDescriptionRequest webkit_request_; SessionDescriptionRequestTracker tracker_; }; // Class mapping responses from calls to libjingle -// SetLocalDescription/SetRemoteDescription and a WebKit::WebRTCVoidRequest. +// SetLocalDescription/SetRemoteDescription and a blink::WebRTCVoidRequest. class SetSessionDescriptionRequest : public webrtc::SetSessionDescriptionObserver { public: explicit SetSessionDescriptionRequest( - const WebKit::WebRTCVoidRequest& request, + const blink::WebRTCVoidRequest& request, RTCPeerConnectionHandler* handler, PeerConnectionTracker::Action action) : webkit_request_(request), tracker_(handler, action) {} @@ -223,12 +223,12 @@ class SetSessionDescriptionRequest virtual ~SetSessionDescriptionRequest() {} private: - WebKit::WebRTCVoidRequest webkit_request_; + blink::WebRTCVoidRequest webkit_request_; SessionDescriptionRequestTracker tracker_; }; // Class mapping responses from calls to libjingle -// GetStats into a WebKit::WebRTCStatsCallback. +// GetStats into a blink::WebRTCStatsCallback. class StatsResponse : public webrtc::StatsObserver { public: explicit StatsResponse(const scoped_refptr<LocalRTCStatsRequest>& request) @@ -247,8 +247,8 @@ class StatsResponse : public webrtc::StatsObserver { private: void AddReport(const webrtc::StatsReport& report) { - int idx = response_->addReport(WebKit::WebString::fromUTF8(report.id), - WebKit::WebString::fromUTF8(report.type), + int idx = response_->addReport(blink::WebString::fromUTF8(report.id), + blink::WebString::fromUTF8(report.type), report.timestamp); for (webrtc::StatsReport::Values::const_iterator value_it = report.values.begin(); @@ -260,8 +260,8 @@ class StatsResponse : public webrtc::StatsObserver { void AddStatistic(int idx, const std::string& name, const std::string& value) { response_->addStatistic(idx, - WebKit::WebString::fromUTF8(name), - WebKit::WebString::fromUTF8(value)); + blink::WebString::fromUTF8(name), + blink::WebString::fromUTF8(value)); } talk_base::scoped_refptr<LocalRTCStatsRequest> request_; @@ -269,7 +269,7 @@ class StatsResponse : public webrtc::StatsObserver { }; // Implementation of LocalRTCStatsRequest. -LocalRTCStatsRequest::LocalRTCStatsRequest(WebKit::WebRTCStatsRequest impl) +LocalRTCStatsRequest::LocalRTCStatsRequest(blink::WebRTCStatsRequest impl) : impl_(impl), response_(NULL) { } @@ -281,7 +281,7 @@ bool LocalRTCStatsRequest::hasSelector() const { return impl_.hasSelector(); } -WebKit::WebMediaStreamTrack LocalRTCStatsRequest::component() const { +blink::WebMediaStreamTrack LocalRTCStatsRequest::component() const { return impl_.component(); } @@ -298,24 +298,24 @@ void LocalRTCStatsRequest::requestSucceeded( } // Implementation of LocalRTCStatsResponse. -WebKit::WebRTCStatsResponse LocalRTCStatsResponse::webKitStatsResponse() const { +blink::WebRTCStatsResponse LocalRTCStatsResponse::webKitStatsResponse() const { return impl_; } -size_t LocalRTCStatsResponse::addReport(WebKit::WebString type, - WebKit::WebString id, +size_t LocalRTCStatsResponse::addReport(blink::WebString type, + blink::WebString id, double timestamp) { return impl_.addReport(type, id, timestamp); } void LocalRTCStatsResponse::addStatistic(size_t report, - WebKit::WebString name, - WebKit::WebString value) { + blink::WebString name, + blink::WebString value) { impl_.addStatistic(report, name, value); } RTCPeerConnectionHandler::RTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client, + blink::WebRTCPeerConnectionHandlerClient* client, MediaStreamDependencyFactory* dependency_factory) : PeerConnectionHandlerBase(dependency_factory), client_(client), @@ -329,14 +329,14 @@ RTCPeerConnectionHandler::~RTCPeerConnectionHandler() { STLDeleteValues(&remote_streams_); } -void RTCPeerConnectionHandler::associateWithFrame(WebKit::WebFrame* frame) { +void RTCPeerConnectionHandler::associateWithFrame(blink::WebFrame* frame) { DCHECK(frame); frame_ = frame; } bool RTCPeerConnectionHandler::initialize( - const WebKit::WebRTCConfiguration& server_configuration, - const WebKit::WebMediaConstraints& options) { + const blink::WebRTCConfiguration& server_configuration, + const blink::WebMediaConstraints& options) { DCHECK(frame_); peer_connection_tracker_ = @@ -362,8 +362,8 @@ bool RTCPeerConnectionHandler::initialize( } bool RTCPeerConnectionHandler::InitializeForTest( - const WebKit::WebRTCConfiguration& server_configuration, - const WebKit::WebMediaConstraints& options, + const blink::WebRTCConfiguration& server_configuration, + const blink::WebMediaConstraints& options, PeerConnectionTracker* peer_connection_tracker) { webrtc::PeerConnectionInterface::IceServers servers; GetNativeIceServers(server_configuration, &servers); @@ -381,8 +381,8 @@ bool RTCPeerConnectionHandler::InitializeForTest( } void RTCPeerConnectionHandler::createOffer( - const WebKit::WebRTCSessionDescriptionRequest& request, - const WebKit::WebMediaConstraints& options) { + const blink::WebRTCSessionDescriptionRequest& request, + const blink::WebMediaConstraints& options) { scoped_refptr<CreateSessionDescriptionRequest> description_request( new talk_base::RefCountedObject<CreateSessionDescriptionRequest>( request, this, PeerConnectionTracker::ACTION_CREATE_OFFER)); @@ -394,8 +394,8 @@ void RTCPeerConnectionHandler::createOffer( } void RTCPeerConnectionHandler::createAnswer( - const WebKit::WebRTCSessionDescriptionRequest& request, - const WebKit::WebMediaConstraints& options) { + const blink::WebRTCSessionDescriptionRequest& request, + const blink::WebMediaConstraints& options) { scoped_refptr<CreateSessionDescriptionRequest> description_request( new talk_base::RefCountedObject<CreateSessionDescriptionRequest>( request, this, PeerConnectionTracker::ACTION_CREATE_ANSWER)); @@ -408,8 +408,8 @@ void RTCPeerConnectionHandler::createAnswer( } void RTCPeerConnectionHandler::setLocalDescription( - const WebKit::WebRTCVoidRequest& request, - const WebKit::WebRTCSessionDescription& description) { + const blink::WebRTCVoidRequest& request, + const blink::WebRTCSessionDescription& description) { webrtc::SdpParseError error; webrtc::SessionDescriptionInterface* native_desc = CreateNativeSessionDescription(description, &error); @@ -419,7 +419,7 @@ void RTCPeerConnectionHandler::setLocalDescription( reason_str.append(" "); reason_str.append(error.description); LOG(ERROR) << reason_str; - request.requestFailed(WebKit::WebString::fromUTF8(reason_str)); + request.requestFailed(blink::WebString::fromUTF8(reason_str)); return; } if (peer_connection_tracker_) @@ -433,8 +433,8 @@ void RTCPeerConnectionHandler::setLocalDescription( } void RTCPeerConnectionHandler::setRemoteDescription( - const WebKit::WebRTCVoidRequest& request, - const WebKit::WebRTCSessionDescription& description) { + const blink::WebRTCVoidRequest& request, + const blink::WebRTCSessionDescription& description) { webrtc::SdpParseError error; webrtc::SessionDescriptionInterface* native_desc = CreateNativeSessionDescription(description, &error); @@ -444,7 +444,7 @@ void RTCPeerConnectionHandler::setRemoteDescription( reason_str.append(" "); reason_str.append(error.description); LOG(ERROR) << reason_str; - request.requestFailed(WebKit::WebString::fromUTF8(reason_str)); + request.requestFailed(blink::WebString::fromUTF8(reason_str)); return; } if (peer_connection_tracker_) @@ -457,27 +457,27 @@ void RTCPeerConnectionHandler::setRemoteDescription( native_peer_connection_->SetRemoteDescription(set_request.get(), native_desc); } -WebKit::WebRTCSessionDescription +blink::WebRTCSessionDescription RTCPeerConnectionHandler::localDescription() { const webrtc::SessionDescriptionInterface* native_desc = native_peer_connection_->local_description(); - WebKit::WebRTCSessionDescription description = + blink::WebRTCSessionDescription description = CreateWebKitSessionDescription(native_desc); return description; } -WebKit::WebRTCSessionDescription +blink::WebRTCSessionDescription RTCPeerConnectionHandler::remoteDescription() { const webrtc::SessionDescriptionInterface* native_desc = native_peer_connection_->remote_description(); - WebKit::WebRTCSessionDescription description = + blink::WebRTCSessionDescription description = CreateWebKitSessionDescription(native_desc); return description; } bool RTCPeerConnectionHandler::updateICE( - const WebKit::WebRTCConfiguration& server_configuration, - const WebKit::WebMediaConstraints& options) { + const blink::WebRTCConfiguration& server_configuration, + const blink::WebMediaConstraints& options) { webrtc::PeerConnectionInterface::IceServers servers; GetNativeIceServers(server_configuration, &servers); RTCMediaConstraints constraints(options); @@ -490,7 +490,7 @@ bool RTCPeerConnectionHandler::updateICE( } bool RTCPeerConnectionHandler::addICECandidate( - const WebKit::WebRTCICECandidate& candidate) { + const blink::WebRTCICECandidate& candidate) { scoped_ptr<webrtc::IceCandidateInterface> native_candidate( dependency_factory_->CreateIceCandidate( UTF16ToUTF8(candidate.sdpMid()), @@ -513,8 +513,8 @@ bool RTCPeerConnectionHandler::addICECandidate( } bool RTCPeerConnectionHandler::addStream( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaConstraints& options) { + const blink::WebMediaStream& stream, + const blink::WebMediaConstraints& options) { RTCMediaConstraints constraints(options); if (peer_connection_tracker_) @@ -535,7 +535,7 @@ bool RTCPeerConnectionHandler::addStream( } void RTCPeerConnectionHandler::removeStream( - const WebKit::WebMediaStream& stream) { + const blink::WebMediaStream& stream) { RemoveStream(stream); if (peer_connection_tracker_) peer_connection_tracker_->TrackRemoveStream( @@ -543,7 +543,7 @@ void RTCPeerConnectionHandler::removeStream( } void RTCPeerConnectionHandler::getStats( - const WebKit::WebRTCStatsRequest& request) { + const blink::WebRTCStatsRequest& request) { scoped_refptr<LocalRTCStatsRequest> inner_request( new talk_base::RefCountedObject<LocalRTCStatsRequest>(request)); getStats(inner_request.get()); @@ -579,8 +579,8 @@ void RTCPeerConnectionHandler::GetStats( } } -WebKit::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( - const WebKit::WebString& label, const WebKit::WebRTCDataChannelInit& init) { +blink::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( + const blink::WebString& label, const blink::WebRTCDataChannelInit& init) { DVLOG(1) << "createDataChannel label " << UTF16ToUTF8(label); webrtc::DataChannelInit config; @@ -607,11 +607,11 @@ WebKit::WebRTCDataChannelHandler* RTCPeerConnectionHandler::createDataChannel( return new RtcDataChannelHandler(webrtc_channel); } -WebKit::WebRTCDTMFSenderHandler* RTCPeerConnectionHandler::createDTMFSender( - const WebKit::WebMediaStreamTrack& track) { +blink::WebRTCDTMFSenderHandler* RTCPeerConnectionHandler::createDTMFSender( + const blink::WebMediaStreamTrack& track) { DVLOG(1) << "createDTMFSender."; - if (track.source().type() != WebKit::WebMediaStreamSource::TypeAudio) { + if (track.source().type() != blink::WebMediaStreamSource::TypeAudio) { DLOG(ERROR) << "Could not create DTMF sender from a non-audio track."; return NULL; } @@ -647,7 +647,7 @@ void RTCPeerConnectionHandler::OnError() { void RTCPeerConnectionHandler::OnSignalingChange( webrtc::PeerConnectionInterface::SignalingState new_state) { - WebKit::WebRTCPeerConnectionHandlerClient::SignalingState state = + blink::WebRTCPeerConnectionHandlerClient::SignalingState state = GetWebKitSignalingState(new_state); if (peer_connection_tracker_) peer_connection_tracker_->TrackSignalingStateChange(this, state); @@ -657,7 +657,7 @@ void RTCPeerConnectionHandler::OnSignalingChange( // Called any time the IceConnectionState changes void RTCPeerConnectionHandler::OnIceConnectionChange( webrtc::PeerConnectionInterface::IceConnectionState new_state) { - WebKit::WebRTCPeerConnectionHandlerClient::ICEConnectionState state = + blink::WebRTCPeerConnectionHandlerClient::ICEConnectionState state = GetWebKitIceConnectionState(new_state); if (peer_connection_tracker_) peer_connection_tracker_->TrackIceConnectionStateChange(this, state); @@ -670,11 +670,11 @@ void RTCPeerConnectionHandler::OnIceGatheringChange( if (new_state == webrtc::PeerConnectionInterface::kIceGatheringComplete) { // If ICE gathering is completed, generate a NULL ICE candidate, // to signal end of candidates. - WebKit::WebRTCICECandidate null_candidate; + blink::WebRTCICECandidate null_candidate; client_->didGenerateICECandidate(null_candidate); } - WebKit::WebRTCPeerConnectionHandlerClient::ICEGatheringState state = + blink::WebRTCPeerConnectionHandlerClient::ICEGatheringState state = GetWebKitIceGatheringState(new_state); if (peer_connection_tracker_) peer_connection_tracker_->TrackIceGatheringStateChange(this, state); @@ -710,7 +710,7 @@ void RTCPeerConnectionHandler::OnRemoveStream( } scoped_ptr<RemoteMediaStreamImpl> remote_stream(it->second); - const WebKit::WebMediaStream& webkit_stream = remote_stream->webkit_stream(); + const blink::WebMediaStream& webkit_stream = remote_stream->webkit_stream(); DCHECK(!webkit_stream.isNull()); remote_streams_.erase(it); @@ -729,7 +729,7 @@ void RTCPeerConnectionHandler::OnIceCandidate( NOTREACHED() << "OnIceCandidate: Could not get SDP string."; return; } - WebKit::WebRTCICECandidate web_candidate; + blink::WebRTCICECandidate web_candidate; web_candidate.initialize(UTF8ToUTF16(sdp), UTF8ToUTF16(candidate->sdp_mid()), candidate->sdp_mline_index()); @@ -763,7 +763,7 @@ PeerConnectionTracker* RTCPeerConnectionHandler::peer_connection_tracker() { webrtc::SessionDescriptionInterface* RTCPeerConnectionHandler::CreateNativeSessionDescription( - const WebKit::WebRTCSessionDescription& description, + const blink::WebRTCSessionDescription& description, webrtc::SdpParseError* error) { std::string sdp = UTF16ToUTF8(description.sdp()); std::string type = UTF16ToUTF8(description.type()); diff --git a/content/renderer/media/rtc_peer_connection_handler.h b/content/renderer/media/rtc_peer_connection_handler.h index c1f70cb..fb8d2ca 100644 --- a/content/renderer/media/rtc_peer_connection_handler.h +++ b/content/renderer/media/rtc_peer_connection_handler.h @@ -13,7 +13,7 @@ #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" -namespace WebKit { +namespace blink { class WebFrame; class WebRTCDataChannelHandler; } @@ -22,19 +22,19 @@ namespace content { class PeerConnectionTracker; -// Mockable wrapper for WebKit::WebRTCStatsResponse +// Mockable wrapper for blink::WebRTCStatsResponse class CONTENT_EXPORT LocalRTCStatsResponse : public NON_EXPORTED_BASE(talk_base::RefCountInterface) { public: - explicit LocalRTCStatsResponse(const WebKit::WebRTCStatsResponse& impl) + explicit LocalRTCStatsResponse(const blink::WebRTCStatsResponse& impl) : impl_(impl) { } - virtual WebKit::WebRTCStatsResponse webKitStatsResponse() const; - virtual size_t addReport(WebKit::WebString type, WebKit::WebString id, + virtual blink::WebRTCStatsResponse webKitStatsResponse() const; + virtual size_t addReport(blink::WebString type, blink::WebString id, double timestamp); virtual void addStatistic(size_t report, - WebKit::WebString name, WebKit::WebString value); + blink::WebString name, blink::WebString value); protected: virtual ~LocalRTCStatsResponse() {} @@ -42,19 +42,19 @@ class CONTENT_EXPORT LocalRTCStatsResponse LocalRTCStatsResponse() {} private: - WebKit::WebRTCStatsResponse impl_; + blink::WebRTCStatsResponse impl_; }; -// Mockable wrapper for WebKit::WebRTCStatsRequest +// Mockable wrapper for blink::WebRTCStatsRequest class CONTENT_EXPORT LocalRTCStatsRequest : public NON_EXPORTED_BASE(talk_base::RefCountInterface) { public: - explicit LocalRTCStatsRequest(WebKit::WebRTCStatsRequest impl); + explicit LocalRTCStatsRequest(blink::WebRTCStatsRequest impl); // Constructor for testing. LocalRTCStatsRequest(); virtual bool hasSelector() const; - virtual WebKit::WebMediaStreamTrack component() const; + virtual blink::WebMediaStreamTrack component() const; virtual void requestSucceeded(const LocalRTCStatsResponse* response); virtual scoped_refptr<LocalRTCStatsResponse> createResponse(); @@ -62,7 +62,7 @@ class CONTENT_EXPORT LocalRTCStatsRequest virtual ~LocalRTCStatsRequest(); private: - WebKit::WebRTCStatsRequest impl_; + blink::WebRTCStatsRequest impl_; talk_base::scoped_refptr<LocalRTCStatsResponse> response_; }; @@ -74,62 +74,62 @@ class CONTENT_EXPORT LocalRTCStatsRequest // the main render thread. class CONTENT_EXPORT RTCPeerConnectionHandler : public PeerConnectionHandlerBase, - NON_EXPORTED_BASE(public WebKit::WebRTCPeerConnectionHandler) { + NON_EXPORTED_BASE(public blink::WebRTCPeerConnectionHandler) { public: RTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client, + blink::WebRTCPeerConnectionHandlerClient* client, MediaStreamDependencyFactory* dependency_factory); virtual ~RTCPeerConnectionHandler(); - void associateWithFrame(WebKit::WebFrame* frame); + void associateWithFrame(blink::WebFrame* frame); // Initialize method only used for unit test. bool InitializeForTest( - const WebKit::WebRTCConfiguration& server_configuration, - const WebKit::WebMediaConstraints& options, + const blink::WebRTCConfiguration& server_configuration, + const blink::WebMediaConstraints& options, PeerConnectionTracker* peer_connection_tracker); - // WebKit::WebRTCPeerConnectionHandler implementation + // blink::WebRTCPeerConnectionHandler implementation virtual bool initialize( - const WebKit::WebRTCConfiguration& server_configuration, - const WebKit::WebMediaConstraints& options) OVERRIDE; + const blink::WebRTCConfiguration& server_configuration, + const blink::WebMediaConstraints& options) OVERRIDE; virtual void createOffer( - const WebKit::WebRTCSessionDescriptionRequest& request, - const WebKit::WebMediaConstraints& options) OVERRIDE; + const blink::WebRTCSessionDescriptionRequest& request, + const blink::WebMediaConstraints& options) OVERRIDE; virtual void createAnswer( - const WebKit::WebRTCSessionDescriptionRequest& request, - const WebKit::WebMediaConstraints& options) OVERRIDE; + const blink::WebRTCSessionDescriptionRequest& request, + const blink::WebMediaConstraints& options) OVERRIDE; virtual void setLocalDescription( - const WebKit::WebRTCVoidRequest& request, - const WebKit::WebRTCSessionDescription& description) OVERRIDE; + const blink::WebRTCVoidRequest& request, + const blink::WebRTCSessionDescription& description) OVERRIDE; virtual void setRemoteDescription( - const WebKit::WebRTCVoidRequest& request, - const WebKit::WebRTCSessionDescription& description) OVERRIDE; + const blink::WebRTCVoidRequest& request, + const blink::WebRTCSessionDescription& description) OVERRIDE; - virtual WebKit::WebRTCSessionDescription localDescription() + virtual blink::WebRTCSessionDescription localDescription() OVERRIDE; - virtual WebKit::WebRTCSessionDescription remoteDescription() + virtual blink::WebRTCSessionDescription remoteDescription() OVERRIDE; virtual bool updateICE( - const WebKit::WebRTCConfiguration& server_configuration, - const WebKit::WebMediaConstraints& options) OVERRIDE; + const blink::WebRTCConfiguration& server_configuration, + const blink::WebMediaConstraints& options) OVERRIDE; virtual bool addICECandidate( - const WebKit::WebRTCICECandidate& candidate) OVERRIDE; + const blink::WebRTCICECandidate& candidate) OVERRIDE; virtual bool addStream( - const WebKit::WebMediaStream& stream, - const WebKit::WebMediaConstraints& options) OVERRIDE; + const blink::WebMediaStream& stream, + const blink::WebMediaConstraints& options) OVERRIDE; virtual void removeStream( - const WebKit::WebMediaStream& stream) OVERRIDE; + const blink::WebMediaStream& stream) OVERRIDE; virtual void getStats( - const WebKit::WebRTCStatsRequest& request) OVERRIDE; - virtual WebKit::WebRTCDataChannelHandler* createDataChannel( - const WebKit::WebString& label, - const WebKit::WebRTCDataChannelInit& init) OVERRIDE; - virtual WebKit::WebRTCDTMFSenderHandler* createDTMFSender( - const WebKit::WebMediaStreamTrack& track) OVERRIDE; + const blink::WebRTCStatsRequest& request) OVERRIDE; + virtual blink::WebRTCDataChannelHandler* createDataChannel( + const blink::WebString& label, + const blink::WebRTCDataChannelInit& init) OVERRIDE; + virtual blink::WebRTCDTMFSenderHandler* createDTMFSender( + const blink::WebMediaStreamTrack& track) OVERRIDE; virtual void stop() OVERRIDE; // webrtc::PeerConnectionObserver implementation @@ -162,13 +162,13 @@ class CONTENT_EXPORT RTCPeerConnectionHandler private: webrtc::SessionDescriptionInterface* CreateNativeSessionDescription( - const WebKit::WebRTCSessionDescription& description, + const blink::WebRTCSessionDescription& description, webrtc::SdpParseError* error); // |client_| is a weak pointer, and is valid until stop() has returned. - WebKit::WebRTCPeerConnectionHandlerClient* client_; + blink::WebRTCPeerConnectionHandlerClient* client_; - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; PeerConnectionTracker* peer_connection_tracker_; diff --git a/content/renderer/media/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/rtc_peer_connection_handler_unittest.cc index ff4e7e5..e0f6885 100644 --- a/content/renderer/media/rtc_peer_connection_handler_unittest.cc +++ b/content/renderer/media/rtc_peer_connection_handler_unittest.cc @@ -38,7 +38,7 @@ static const char kDummySdp[] = "dummy sdp"; static const char kDummySdpType[] = "dummy type"; -using WebKit::WebRTCPeerConnectionHandlerClient; +using blink::WebRTCPeerConnectionHandlerClient; using testing::NiceMock; using testing::_; using testing::Ref; @@ -52,15 +52,15 @@ class MockRTCStatsResponse : public LocalRTCStatsResponse { statistic_count_(0) { } - virtual size_t addReport(WebKit::WebString type, - WebKit::WebString id, + virtual size_t addReport(blink::WebString type, + blink::WebString id, double timestamp) OVERRIDE { ++report_count_; return report_count_; } virtual void addStatistic(size_t report, - WebKit::WebString name, WebKit::WebString value) + blink::WebString name, blink::WebString value) OVERRIDE { ++statistic_count_; } @@ -71,7 +71,7 @@ class MockRTCStatsResponse : public LocalRTCStatsResponse { int statistic_count_; }; -// Mocked wrapper for WebKit::WebRTCStatsRequest +// Mocked wrapper for blink::WebRTCStatsRequest class MockRTCStatsRequest : public LocalRTCStatsRequest { public: MockRTCStatsRequest() @@ -81,7 +81,7 @@ class MockRTCStatsRequest : public LocalRTCStatsRequest { virtual bool hasSelector() const OVERRIDE { return has_selector_; } - virtual WebKit::WebMediaStreamTrack component() const OVERRIDE { + virtual blink::WebMediaStreamTrack component() const OVERRIDE { return component_; } virtual scoped_refptr<LocalRTCStatsResponse> createResponse() OVERRIDE { @@ -97,7 +97,7 @@ class MockRTCStatsRequest : public LocalRTCStatsRequest { } // Function for setting whether or not a selector is available. - void setSelector(const WebKit::WebMediaStreamTrack& component) { + void setSelector(const blink::WebMediaStreamTrack& component) { has_selector_ = true; component_ = component; } @@ -113,7 +113,7 @@ class MockRTCStatsRequest : public LocalRTCStatsRequest { private: bool has_selector_; - WebKit::WebMediaStreamTrack component_; + blink::WebMediaStreamTrack component_; scoped_refptr<MockRTCStatsResponse> response_; bool request_succeeded_called_; }; @@ -131,7 +131,7 @@ class MockPeerConnectionTracker : public PeerConnectionTracker { const RTCMediaConstraints& constraints)); MOCK_METHOD3(TrackSetSessionDescription, void(RTCPeerConnectionHandler* pc_handler, - const WebKit::WebRTCSessionDescription& desc, + const blink::WebRTCSessionDescription& desc, Source source)); MOCK_METHOD3( TrackUpdateIce, @@ -141,15 +141,15 @@ class MockPeerConnectionTracker : public PeerConnectionTracker { const RTCMediaConstraints& options)); MOCK_METHOD3(TrackAddIceCandidate, void(RTCPeerConnectionHandler* pc_handler, - const WebKit::WebRTCICECandidate& candidate, + const blink::WebRTCICECandidate& candidate, Source source)); MOCK_METHOD3(TrackAddStream, void(RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStream& stream, + const blink::WebMediaStream& stream, Source source)); MOCK_METHOD3(TrackRemoveStream, void(RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStream& stream, + const blink::WebMediaStream& stream, Source source)); MOCK_METHOD1(TrackOnIceComplete, void(RTCPeerConnectionHandler* pc_handler)); @@ -173,7 +173,7 @@ class MockPeerConnectionTracker : public PeerConnectionTracker { void(RTCPeerConnectionHandler* pc_handler)); MOCK_METHOD2(TrackCreateDTMFSender, void(RTCPeerConnectionHandler* pc_handler, - const WebKit::WebMediaStreamTrack& track)); + const blink::WebMediaStreamTrack& track)); }; class RTCPeerConnectionHandlerUnderTest : public RTCPeerConnectionHandler { @@ -202,8 +202,8 @@ class RTCPeerConnectionHandlerTest : public ::testing::Test { new RTCPeerConnectionHandlerUnderTest(mock_client_.get(), mock_dependency_factory_.get())); mock_tracker_.reset(new NiceMock<MockPeerConnectionTracker>()); - WebKit::WebRTCConfiguration config; - WebKit::WebMediaConstraints constraints; + blink::WebRTCConfiguration config; + blink::WebMediaConstraints constraints; EXPECT_TRUE(pc_handler_->InitializeForTest(config, constraints, mock_tracker_.get())); @@ -212,28 +212,28 @@ class RTCPeerConnectionHandlerTest : public ::testing::Test { } // Creates a WebKit local MediaStream. - WebKit::WebMediaStream CreateLocalMediaStream( + blink::WebMediaStream CreateLocalMediaStream( const std::string& stream_label) { std::string video_track_label("video-label"); std::string audio_track_label("audio-label"); - WebKit::WebMediaStreamSource audio_source; - audio_source.initialize(WebKit::WebString::fromUTF8(audio_track_label), - WebKit::WebMediaStreamSource::TypeAudio, - WebKit::WebString::fromUTF8("audio_track")); - WebKit::WebMediaStreamSource video_source; - video_source.initialize(WebKit::WebString::fromUTF8(video_track_label), - WebKit::WebMediaStreamSource::TypeVideo, - WebKit::WebString::fromUTF8("video_track")); + blink::WebMediaStreamSource audio_source; + audio_source.initialize(blink::WebString::fromUTF8(audio_track_label), + blink::WebMediaStreamSource::TypeAudio, + blink::WebString::fromUTF8("audio_track")); + blink::WebMediaStreamSource video_source; + video_source.initialize(blink::WebString::fromUTF8(video_track_label), + blink::WebMediaStreamSource::TypeVideo, + blink::WebString::fromUTF8("video_track")); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks( + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks( static_cast<size_t>(1)); audio_tracks[0].initialize(audio_source.id(), audio_source); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks( + blink::WebVector<blink::WebMediaStreamTrack> video_tracks( static_cast<size_t>(1)); video_tracks[0].initialize(video_source.id(), video_source); - WebKit::WebMediaStream local_stream; + blink::WebMediaStream local_stream; local_stream.initialize(UTF8ToUTF16(stream_label), audio_tracks, video_tracks); @@ -312,11 +312,11 @@ TEST_F(RTCPeerConnectionHandlerTest, Destruct) { } TEST_F(RTCPeerConnectionHandlerTest, CreateOffer) { - WebKit::WebRTCSessionDescriptionRequest request; - WebKit::WebMediaConstraints options; + blink::WebRTCSessionDescriptionRequest request; + blink::WebMediaConstraints options; EXPECT_CALL(*mock_tracker_.get(), TrackCreateOffer(pc_handler_.get(), _)); - // TODO(perkj): Can WebKit::WebRTCSessionDescriptionRequest be changed so + // TODO(perkj): Can blink::WebRTCSessionDescriptionRequest be changed so // the |reqest| requestSucceeded can be tested? Currently the |request| object // can not be initialized from a unit test. EXPECT_FALSE(mock_peer_connection_->created_session_description() != NULL); @@ -325,10 +325,10 @@ TEST_F(RTCPeerConnectionHandlerTest, CreateOffer) { } TEST_F(RTCPeerConnectionHandlerTest, CreateAnswer) { - WebKit::WebRTCSessionDescriptionRequest request; - WebKit::WebMediaConstraints options; + blink::WebRTCSessionDescriptionRequest request; + blink::WebMediaConstraints options; EXPECT_CALL(*mock_tracker_.get(), TrackCreateAnswer(pc_handler_.get(), _)); - // TODO(perkj): Can WebKit::WebRTCSessionDescriptionRequest be changed so + // TODO(perkj): Can blink::WebRTCSessionDescriptionRequest be changed so // the |reqest| requestSucceeded can be tested? Currently the |request| object // can not be initialized from a unit test. EXPECT_FALSE(mock_peer_connection_->created_session_description() != NULL); @@ -337,8 +337,8 @@ TEST_F(RTCPeerConnectionHandlerTest, CreateAnswer) { } TEST_F(RTCPeerConnectionHandlerTest, setLocalDescription) { - WebKit::WebRTCVoidRequest request; - WebKit::WebRTCSessionDescription description; + blink::WebRTCVoidRequest request; + blink::WebRTCSessionDescription description; description.initialize(kDummySdpType, kDummySdp); // PeerConnectionTracker::TrackSetSessionDescription is expected to be called // before |mock_peer_connection| is called. @@ -360,8 +360,8 @@ TEST_F(RTCPeerConnectionHandlerTest, setLocalDescription) { } TEST_F(RTCPeerConnectionHandlerTest, setRemoteDescription) { - WebKit::WebRTCVoidRequest request; - WebKit::WebRTCSessionDescription description; + blink::WebRTCVoidRequest request; + blink::WebRTCSessionDescription description; description.initialize(kDummySdpType, kDummySdp); // PeerConnectionTracker::TrackSetSessionDescription is expected to be called @@ -384,8 +384,8 @@ TEST_F(RTCPeerConnectionHandlerTest, setRemoteDescription) { } TEST_F(RTCPeerConnectionHandlerTest, updateICE) { - WebKit::WebRTCConfiguration config; - WebKit::WebMediaConstraints constraints; + blink::WebRTCConfiguration config; + blink::WebMediaConstraints constraints; EXPECT_CALL(*mock_tracker_.get(), TrackUpdateIce(pc_handler_.get(), _, _)); // TODO(perkj): Test that the parameters in |config| can be translated when a @@ -395,7 +395,7 @@ TEST_F(RTCPeerConnectionHandlerTest, updateICE) { } TEST_F(RTCPeerConnectionHandlerTest, addICECandidate) { - WebKit::WebRTCICECandidate candidate; + blink::WebRTCICECandidate candidate; candidate.initialize(kDummySdp, "mid", 1); EXPECT_CALL(*mock_tracker_.get(), @@ -410,9 +410,9 @@ TEST_F(RTCPeerConnectionHandlerTest, addICECandidate) { TEST_F(RTCPeerConnectionHandlerTest, addAndRemoveStream) { std::string stream_label = "local_stream"; - WebKit::WebMediaStream local_stream( + blink::WebMediaStream local_stream( CreateLocalMediaStream(stream_label)); - WebKit::WebMediaConstraints constraints; + blink::WebMediaConstraints constraints; EXPECT_CALL(*mock_tracker_.get(), TrackAddStream(pc_handler_.get(), @@ -453,11 +453,11 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsAfterClose) { } TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithLocalSelector) { - WebKit::WebMediaStream local_stream( + blink::WebMediaStream local_stream( CreateLocalMediaStream("local_stream")); - WebKit::WebMediaConstraints constraints; + blink::WebMediaConstraints constraints; pc_handler_->addStream(local_stream, constraints); - WebKit::WebVector<WebKit::WebMediaStreamTrack> tracks; + blink::WebVector<blink::WebMediaStreamTrack> tracks; local_stream.audioTracks(tracks); ASSERT_LE(1ul, tracks.size()); @@ -472,9 +472,9 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithRemoteSelector) { scoped_refptr<webrtc::MediaStreamInterface> stream( AddRemoteMockMediaStream("remote_stream", "video", "audio")); pc_handler_->OnAddStream(stream.get()); - const WebKit::WebMediaStream& remote_stream = mock_client_->remote_stream(); + const blink::WebMediaStream& remote_stream = mock_client_->remote_stream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> tracks; + blink::WebVector<blink::WebMediaStreamTrack> tracks; remote_stream.audioTracks(tracks); ASSERT_LE(1ul, tracks.size()); @@ -488,13 +488,13 @@ TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithRemoteSelector) { TEST_F(RTCPeerConnectionHandlerTest, GetStatsWithBadSelector) { // The setup is the same as GetStatsWithLocalSelector, but the stream is not // added to the PeerConnection. - WebKit::WebMediaStream local_stream( + blink::WebMediaStream local_stream( CreateLocalMediaStream("local_stream_2")); - WebKit::WebMediaConstraints constraints; - WebKit::WebVector<WebKit::WebMediaStreamTrack> tracks; + blink::WebMediaConstraints constraints; + blink::WebVector<blink::WebMediaStreamTrack> tracks; local_stream.audioTracks(tracks); - WebKit::WebMediaStreamTrack component = tracks[0]; + blink::WebMediaStreamTrack component = tracks[0]; mock_peer_connection_->SetGetStatsResult(false); scoped_refptr<MockRTCStatsRequest> request( @@ -652,20 +652,20 @@ TEST_F(RTCPeerConnectionHandlerTest, OnAddAndOnRemoveStream) { testing::InSequence sequence; EXPECT_CALL(*mock_tracker_.get(), TrackAddStream( pc_handler_.get(), - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)), PeerConnectionTracker::SOURCE_REMOTE)); EXPECT_CALL(*mock_client_.get(), didAddRemoteStream( - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)))); EXPECT_CALL(*mock_tracker_.get(), TrackRemoveStream( pc_handler_.get(), - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)), PeerConnectionTracker::SOURCE_REMOTE)); EXPECT_CALL(*mock_client_.get(), didRemoveRemoteStream( - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)))); pc_handler_->OnAddStream(remote_stream.get()); @@ -680,29 +680,29 @@ TEST_F(RTCPeerConnectionHandlerTest, RemoteTrackState) { testing::InSequence sequence; EXPECT_CALL(*mock_client_.get(), didAddRemoteStream( - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)))); pc_handler_->OnAddStream(remote_stream.get()); - const WebKit::WebMediaStream& webkit_stream = mock_client_->remote_stream(); + const blink::WebMediaStream& webkit_stream = mock_client_->remote_stream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; webkit_stream.audioTracks(audio_tracks); - EXPECT_EQ(WebKit::WebMediaStreamSource::ReadyStateLive, + EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateLive, audio_tracks[0].source().readyState()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; webkit_stream.videoTracks(video_tracks); - EXPECT_EQ(WebKit::WebMediaStreamSource::ReadyStateLive, + EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateLive, video_tracks[0].source().readyState()); remote_stream->GetAudioTracks()[0]->set_state( webrtc::MediaStreamTrackInterface::kEnded); - EXPECT_EQ(WebKit::WebMediaStreamSource::ReadyStateEnded, + EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, audio_tracks[0].source().readyState()); remote_stream->GetVideoTracks()[0]->set_state( webrtc::MediaStreamTrackInterface::kEnded); - EXPECT_EQ(WebKit::WebMediaStreamSource::ReadyStateEnded, + EXPECT_EQ(blink::WebMediaStreamSource::ReadyStateEnded, video_tracks[0].source().readyState()); } @@ -712,12 +712,12 @@ TEST_F(RTCPeerConnectionHandlerTest, RemoveAndAddAudioTrackFromRemoteStream) { AddRemoteMockMediaStream(remote_stream_label, "video", "audio")); EXPECT_CALL(*mock_client_.get(), didAddRemoteStream( - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)))); pc_handler_->OnAddStream(remote_stream.get()); - const WebKit::WebMediaStream& webkit_stream = mock_client_->remote_stream(); + const blink::WebMediaStream& webkit_stream = mock_client_->remote_stream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; + blink::WebVector<blink::WebMediaStreamTrack> audio_tracks; webkit_stream.audioTracks(audio_tracks); EXPECT_EQ(1u, audio_tracks.size()); @@ -725,13 +725,13 @@ TEST_F(RTCPeerConnectionHandlerTest, RemoveAndAddAudioTrackFromRemoteStream) { scoped_refptr<webrtc::AudioTrackInterface> webrtc_track = remote_stream->GetAudioTracks()[0].get(); remote_stream->RemoveTrack(webrtc_track.get()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> modified_audio_tracks1; + blink::WebVector<blink::WebMediaStreamTrack> modified_audio_tracks1; webkit_stream.audioTracks(modified_audio_tracks1); EXPECT_EQ(0u, modified_audio_tracks1.size()); // Add the WebRtc audio track again. remote_stream->AddTrack(webrtc_track.get()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> modified_audio_tracks2; + blink::WebVector<blink::WebMediaStreamTrack> modified_audio_tracks2; webkit_stream.audioTracks(modified_audio_tracks2); EXPECT_EQ(1u, modified_audio_tracks2.size()); } @@ -742,12 +742,12 @@ TEST_F(RTCPeerConnectionHandlerTest, RemoveAndAddVideoTrackFromRemoteStream) { AddRemoteMockMediaStream(remote_stream_label, "video", "video")); EXPECT_CALL(*mock_client_.get(), didAddRemoteStream( - testing::Property(&WebKit::WebMediaStream::id, + testing::Property(&blink::WebMediaStream::id, UTF8ToUTF16(remote_stream_label)))); pc_handler_->OnAddStream(remote_stream.get()); - const WebKit::WebMediaStream& webkit_stream = mock_client_->remote_stream(); + const blink::WebMediaStream& webkit_stream = mock_client_->remote_stream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; webkit_stream.videoTracks(video_tracks); EXPECT_EQ(1u, video_tracks.size()); @@ -755,13 +755,13 @@ TEST_F(RTCPeerConnectionHandlerTest, RemoveAndAddVideoTrackFromRemoteStream) { scoped_refptr<webrtc::VideoTrackInterface> webrtc_track = remote_stream->GetVideoTracks()[0].get(); remote_stream->RemoveTrack(webrtc_track.get()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> modified_video_tracks1; + blink::WebVector<blink::WebMediaStreamTrack> modified_video_tracks1; webkit_stream.videoTracks(modified_video_tracks1); EXPECT_EQ(0u, modified_video_tracks1.size()); // Add the WebRtc video track again. remote_stream->AddTrack(webrtc_track.get()); - WebKit::WebVector<WebKit::WebMediaStreamTrack> modified_video_tracks2; + blink::WebVector<blink::WebMediaStreamTrack> modified_video_tracks2; webkit_stream.videoTracks(modified_video_tracks2); EXPECT_EQ(1u, modified_video_tracks2.size()); } @@ -790,24 +790,24 @@ TEST_F(RTCPeerConnectionHandlerTest, OnRenegotiationNeeded) { } TEST_F(RTCPeerConnectionHandlerTest, CreateDataChannel) { - WebKit::WebString label = "d1"; + blink::WebString label = "d1"; EXPECT_CALL(*mock_tracker_.get(), TrackCreateDataChannel(pc_handler_.get(), testing::NotNull(), PeerConnectionTracker::SOURCE_LOCAL)); - scoped_ptr<WebKit::WebRTCDataChannelHandler> channel( - pc_handler_->createDataChannel("d1", WebKit::WebRTCDataChannelInit())); + scoped_ptr<blink::WebRTCDataChannelHandler> channel( + pc_handler_->createDataChannel("d1", blink::WebRTCDataChannelInit())); EXPECT_TRUE(channel.get() != NULL); EXPECT_EQ(label, channel->label()); } TEST_F(RTCPeerConnectionHandlerTest, CreateDtmfSender) { std::string stream_label = "local_stream"; - WebKit::WebMediaStream local_stream(CreateLocalMediaStream(stream_label)); - WebKit::WebMediaConstraints constraints; + blink::WebMediaStream local_stream(CreateLocalMediaStream(stream_label)); + blink::WebMediaConstraints constraints; pc_handler_->addStream(local_stream, constraints); - WebKit::WebVector<WebKit::WebMediaStreamTrack> tracks; + blink::WebVector<blink::WebMediaStreamTrack> tracks; local_stream.videoTracks(tracks); ASSERT_LE(1ul, tracks.size()); @@ -820,7 +820,7 @@ TEST_F(RTCPeerConnectionHandlerTest, CreateDtmfSender) { TrackCreateDTMFSender(pc_handler_.get(), testing::Ref(tracks[0]))); - scoped_ptr<WebKit::WebRTCDTMFSenderHandler> sender( + scoped_ptr<blink::WebRTCDTMFSenderHandler> sender( pc_handler_->createDTMFSender(tracks[0])); EXPECT_TRUE(sender.get()); } diff --git a/content/renderer/media/test_response_generator.cc b/content/renderer/media/test_response_generator.cc index 1ced131..64f82e7 100644 --- a/content/renderer/media/test_response_generator.cc +++ b/content/renderer/media/test_response_generator.cc @@ -11,9 +11,9 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -using WebKit::WebString; -using WebKit::WebURLError; -using WebKit::WebURLResponse; +using blink::WebString; +using blink::WebURLError; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/media/test_response_generator.h b/content/renderer/media/test_response_generator.h index d8f1d5e..dcbcc05 100644 --- a/content/renderer/media/test_response_generator.h +++ b/content/renderer/media/test_response_generator.h @@ -28,29 +28,29 @@ class TestResponseGenerator { TestResponseGenerator(const GURL& gurl, int64 content_length); // Generates a WebURLError object. - WebKit::WebURLError GenerateError(); + blink::WebURLError GenerateError(); // Generates a regular HTTP 200 response. - WebKit::WebURLResponse Generate200(); + blink::WebURLResponse Generate200(); // Generates a regular HTTP 206 response starting from |first_byte_offset| // until the end of the resource. - WebKit::WebURLResponse Generate206(int64 first_byte_offset); + blink::WebURLResponse Generate206(int64 first_byte_offset); // Generates a custom HTTP 206 response starting from |first_byte_offset| // until the end of the resource. You can tweak what gets included in the // headers via |flags|. - WebKit::WebURLResponse Generate206(int64 first_byte_offset, Flags flags); + blink::WebURLResponse Generate206(int64 first_byte_offset, Flags flags); // Generates a regular HTTP 404 response. - WebKit::WebURLResponse Generate404(); + blink::WebURLResponse Generate404(); // Generates a file:// response starting from |first_byte_offset| until the // end of the resource. // // If |first_byte_offset| is negative a response containing no content length // will be returned. - WebKit::WebURLResponse GenerateFileResponse(int64 first_byte_offset); + blink::WebURLResponse GenerateFileResponse(int64 first_byte_offset); int64 content_length() { return content_length_; } diff --git a/content/renderer/media/texttrack_impl.cc b/content/renderer/media/texttrack_impl.cc index 7acf39a..8e30594 100644 --- a/content/renderer/media/texttrack_impl.cc +++ b/content/renderer/media/texttrack_impl.cc @@ -10,7 +10,7 @@ namespace content { -TextTrackImpl::TextTrackImpl(WebKit::WebMediaPlayerClient* client, +TextTrackImpl::TextTrackImpl(blink::WebMediaPlayerClient* client, WebInbandTextTrackImpl* text_track) : client_(client), text_track_(text_track) { client_->addTextTrack(text_track_.get()); @@ -26,12 +26,12 @@ void TextTrackImpl::addWebVTTCue(const base::TimeDelta& start, const std::string& id, const std::string& content, const std::string& settings) { - if (WebKit::WebInbandTextTrackClient* client = text_track_->client()) + if (blink::WebInbandTextTrackClient* client = text_track_->client()) client->addWebVTTCue(start.InSecondsF(), end.InSecondsF(), - WebKit::WebString::fromUTF8(id), - WebKit::WebString::fromUTF8(content), - WebKit::WebString::fromUTF8(settings)); + blink::WebString::fromUTF8(id), + blink::WebString::fromUTF8(content), + blink::WebString::fromUTF8(settings)); } } // namespace content diff --git a/content/renderer/media/texttrack_impl.h b/content/renderer/media/texttrack_impl.h index 09007c6..d7b5961 100644 --- a/content/renderer/media/texttrack_impl.h +++ b/content/renderer/media/texttrack_impl.h @@ -11,7 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/text_track.h" -namespace WebKit { +namespace blink { class WebMediaPlayerClient; } @@ -22,7 +22,7 @@ class WebInbandTextTrackImpl; class TextTrackImpl : public media::TextTrack { public: // Constructor assumes ownership of the |text_track| object. - TextTrackImpl(WebKit::WebMediaPlayerClient* client, + TextTrackImpl(blink::WebMediaPlayerClient* client, WebInbandTextTrackImpl* text_track); virtual ~TextTrackImpl(); @@ -34,7 +34,7 @@ class TextTrackImpl : public media::TextTrack { const std::string& settings) OVERRIDE; private: - WebKit::WebMediaPlayerClient* client_; + blink::WebMediaPlayerClient* client_; scoped_ptr<WebInbandTextTrackImpl> text_track_; DISALLOW_COPY_AND_ASSIGN(TextTrackImpl); }; diff --git a/content/renderer/media/video_destination_handler.cc b/content/renderer/media/video_destination_handler.cc index 7438c49..692efef 100644 --- a/content/renderer/media/video_destination_handler.cc +++ b/content/renderer/media/video_destination_handler.cc @@ -168,12 +168,12 @@ bool VideoDestinationHandler::Open( factory = RenderThreadImpl::current()->GetMediaStreamDependencyFactory(); DCHECK(factory != NULL); } - WebKit::WebMediaStream stream; + blink::WebMediaStream stream; if (registry) { stream = registry->GetMediaStream(url); } else { stream = - WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); + blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); } if (stream.isNull() || !stream.extraData()) { LOG(ERROR) << "VideoDestinationHandler::Open - invalid url: " << url; diff --git a/content/renderer/media/video_destination_handler.h b/content/renderer/media/video_destination_handler.h index 087d3ac..578fe22 100644 --- a/content/renderer/media/video_destination_handler.h +++ b/content/renderer/media/video_destination_handler.h @@ -75,7 +75,7 @@ class CONTENT_EXPORT VideoDestinationHandler { // |frame_writer|. // If |factory| is NULL the MediaStreamDependencyFactory owned by // RenderThreadImpl::current() will be used. - // If |registry| is NULL the global WebKit::WebMediaStreamRegistry will be + // If |registry| is NULL the global blink::WebMediaStreamRegistry will be // used to look up the media stream. // The caller of the function takes the ownership of |frame_writer|. // Returns true on success and false on failure. diff --git a/content/renderer/media/video_destination_handler_unittest.cc b/content/renderer/media/video_destination_handler_unittest.cc index 110e115..a89ad61 100644 --- a/content/renderer/media/video_destination_handler_unittest.cc +++ b/content/renderer/media/video_destination_handler_unittest.cc @@ -106,8 +106,8 @@ TEST_F(VideoDestinationHandlerTest, Open) { EXPECT_TRUE(frame_writer); // Verify the video track has been added. - const WebKit::WebMediaStream test_stream = registry_.test_stream(); - WebKit::WebVector<WebKit::WebMediaStreamTrack> video_tracks; + const blink::WebMediaStream test_stream = registry_.test_stream(); + blink::WebVector<blink::WebMediaStreamTrack> video_tracks; test_stream.videoTracks(video_tracks); EXPECT_EQ(1u, video_tracks.size()); diff --git a/content/renderer/media/video_source_handler.cc b/content/renderer/media/video_source_handler.cc index c0577fc..69b8355 100644 --- a/content/renderer/media/video_source_handler.cc +++ b/content/renderer/media/video_source_handler.cc @@ -103,12 +103,12 @@ bool VideoSourceHandler::Close(const std::string& url, scoped_refptr<VideoSourceInterface> VideoSourceHandler::GetFirstVideoSource( const std::string& url) { scoped_refptr<webrtc::VideoSourceInterface> source; - WebKit::WebMediaStream stream; + blink::WebMediaStream stream; if (registry_) { stream = registry_->GetMediaStream(url); } else { stream = - WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); + blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(GURL(url)); } if (stream.isNull() || !stream.extraData()) { LOG(ERROR) << "GetFirstVideoSource - invalid url: " << url; diff --git a/content/renderer/media/video_source_handler.h b/content/renderer/media/video_source_handler.h index 3d3b4df..7025d92 100644 --- a/content/renderer/media/video_source_handler.h +++ b/content/renderer/media/video_source_handler.h @@ -40,7 +40,7 @@ class CONTENT_EXPORT FrameReaderInterface { class CONTENT_EXPORT VideoSourceHandler { public: // |registry| is used to look up the media stream by url. If a NULL |registry| - // is given, the global WebKit::WebMediaStreamRegistry will be used. + // is given, the global blink::WebMediaStreamRegistry will be used. explicit VideoSourceHandler(MediaStreamRegistryInterface* registry); virtual ~VideoSourceHandler(); // Connects to the first video track in the MediaStream specified by |url| and diff --git a/content/renderer/media/webaudio_capturer_source.cc b/content/renderer/media/webaudio_capturer_source.cc index f9bf084..9919b7f 100644 --- a/content/renderer/media/webaudio_capturer_source.cc +++ b/content/renderer/media/webaudio_capturer_source.cc @@ -85,7 +85,7 @@ void WebAudioCapturerSource::Stop() { } void WebAudioCapturerSource::consumeAudio( - const WebKit::WebVector<const float*>& audio_data, + const blink::WebVector<const float*>& audio_data, size_t number_of_frames) { base::AutoLock auto_lock(lock_); if (!track_) diff --git a/content/renderer/media/webaudio_capturer_source.h b/content/renderer/media/webaudio_capturer_source.h index b438a40..09a1911 100644 --- a/content/renderer/media/webaudio_capturer_source.h +++ b/content/renderer/media/webaudio_capturer_source.h @@ -28,7 +28,7 @@ class WebRtcLocalAudioSourceProvider; // audio stream to the WebRtcLocalAudioTrack::Capture() method. class WebAudioCapturerSource : public base::RefCountedThreadSafe<WebAudioCapturerSource>, - public WebKit::WebAudioDestinationConsumer { + public blink::WebAudioDestinationConsumer { public: WebAudioCapturerSource(); @@ -37,7 +37,7 @@ class WebAudioCapturerSource virtual void setFormat(size_t number_of_channels, float sample_rate) OVERRIDE; // MediaStreamAudioDestinationNode periodically calls consumeAudio(). // Called on the WebAudio audio thread. - virtual void consumeAudio(const WebKit::WebVector<const float*>& audio_data, + virtual void consumeAudio(const blink::WebVector<const float*>& audio_data, size_t number_of_frames) OVERRIDE; // Called when the WebAudioCapturerSource is hooking to a media audio track. diff --git a/content/renderer/media/webaudiosourceprovider_impl.cc b/content/renderer/media/webaudiosourceprovider_impl.cc index b722a33..29d7f4b 100644 --- a/content/renderer/media/webaudiosourceprovider_impl.cc +++ b/content/renderer/media/webaudiosourceprovider_impl.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "third_party/WebKit/public/web/WebAudioSourceProviderClient.h" -using WebKit::WebVector; +using blink::WebVector; namespace content { @@ -57,7 +57,7 @@ WebAudioSourceProviderImpl::WebAudioSourceProviderImpl( WebAudioSourceProviderImpl::~WebAudioSourceProviderImpl() {} void WebAudioSourceProviderImpl::setClient( - WebKit::WebAudioSourceProviderClient* client) { + blink::WebAudioSourceProviderClient* client) { base::AutoLock auto_lock(sink_lock_); if (client && client != client_) { // Detach the audio renderer from normal playback. diff --git a/content/renderer/media/webaudiosourceprovider_impl.h b/content/renderer/media/webaudiosourceprovider_impl.h index 8205ad2..4e93487 100644 --- a/content/renderer/media/webaudiosourceprovider_impl.h +++ b/content/renderer/media/webaudiosourceprovider_impl.h @@ -11,14 +11,14 @@ #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" #include "third_party/WebKit/public/platform/WebVector.h" -namespace WebKit { +namespace blink { class WebAudioSourceProviderClient; } namespace content { // WebAudioSourceProviderImpl provides a bridge between classes: -// WebKit::WebAudioSourceProvider <---> media::AudioRendererSink +// blink::WebAudioSourceProvider <---> media::AudioRendererSink // // WebAudioSourceProviderImpl wraps an existing audio sink that is used unless // WebKit has set a client via setClient(). While a client is set WebKit will @@ -27,15 +27,15 @@ namespace content { // // All calls are protected by a lock. class CONTENT_EXPORT WebAudioSourceProviderImpl - : NON_EXPORTED_BASE(public WebKit::WebAudioSourceProvider), + : NON_EXPORTED_BASE(public blink::WebAudioSourceProvider), NON_EXPORTED_BASE(public media::AudioRendererSink) { public: explicit WebAudioSourceProviderImpl( const scoped_refptr<media::AudioRendererSink>& sink); - // WebKit::WebAudioSourceProvider implementation. - virtual void setClient(WebKit::WebAudioSourceProviderClient* client); - virtual void provideInput(const WebKit::WebVector<float*>& audio_data, + // blink::WebAudioSourceProvider implementation. + virtual void setClient(blink::WebAudioSourceProviderClient* client); + virtual void provideInput(const blink::WebVector<float*>& audio_data, size_t number_of_frames); // media::AudioRendererSink implementation. @@ -64,7 +64,7 @@ class CONTENT_EXPORT WebAudioSourceProviderImpl media::AudioRendererSink::RenderCallback* renderer_; // When set via setClient() it overrides |sink_| for consuming audio. - WebKit::WebAudioSourceProviderClient* client_; + blink::WebAudioSourceProviderClient* client_; // Where audio ends up unless overridden by |client_|. base::Lock sink_lock_; diff --git a/content/renderer/media/webaudiosourceprovider_impl_unittest.cc b/content/renderer/media/webaudiosourceprovider_impl_unittest.cc index 9b893c7..9fc3b11 100644 --- a/content/renderer/media/webaudiosourceprovider_impl_unittest.cc +++ b/content/renderer/media/webaudiosourceprovider_impl_unittest.cc @@ -18,7 +18,7 @@ const float kTestVolume = 0.25; class WebAudioSourceProviderImplTest : public testing::Test, - public WebKit::WebAudioSourceProviderClient { + public blink::WebAudioSourceProviderClient { public: WebAudioSourceProviderImplTest() : params_(media::AudioParameters::AUDIO_PCM_LINEAR, @@ -51,7 +51,7 @@ class WebAudioSourceProviderImplTest testing::Mock::VerifyAndClear(mock_sink_.get()); } - void SetClient(WebKit::WebAudioSourceProviderClient* client) { + void SetClient(blink::WebAudioSourceProviderClient* client) { testing::InSequence s; if (client) { @@ -76,7 +76,7 @@ class WebAudioSourceProviderImplTest return true; } - // WebKit::WebAudioSourceProviderClient implementation. + // blink::WebAudioSourceProviderClient implementation. MOCK_METHOD2(setFormat, void(size_t numberOfChannels, float sampleRate)); protected: @@ -153,7 +153,7 @@ TEST_F(WebAudioSourceProviderImplTest, ProvideInput) { scoped_ptr<media::AudioBus> bus2 = media::AudioBus::Create(params_); // Point the WebVector into memory owned by |bus1|. - WebKit::WebVector<float*> audio_data(static_cast<size_t>(bus1->channels())); + blink::WebVector<float*> audio_data(static_cast<size_t>(bus1->channels())); for (size_t i = 0; i < audio_data.size(); ++i) audio_data[i] = bus1->channel(i); diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.cc b/content/renderer/media/webcontentdecryptionmodule_impl.cc index a70ad2a..a46b5ee 100644 --- a/content/renderer/media/webcontentdecryptionmodule_impl.cc +++ b/content/renderer/media/webcontentdecryptionmodule_impl.cc @@ -170,9 +170,9 @@ WebContentDecryptionModuleImpl::~WebContentDecryptionModuleImpl() { } // The caller owns the created session. -WebKit::WebContentDecryptionModuleSession* +blink::WebContentDecryptionModuleSession* WebContentDecryptionModuleImpl::createSession( - WebKit::WebContentDecryptionModuleSession::Client* client) { + blink::WebContentDecryptionModuleSession::Client* client) { DCHECK(media_keys_); WebContentDecryptionModuleSessionImpl* session = new WebContentDecryptionModuleSessionImpl( diff --git a/content/renderer/media/webcontentdecryptionmodule_impl.h b/content/renderer/media/webcontentdecryptionmodule_impl.h index d2aa01f..442b657 100644 --- a/content/renderer/media/webcontentdecryptionmodule_impl.h +++ b/content/renderer/media/webcontentdecryptionmodule_impl.h @@ -21,15 +21,15 @@ class WebContentDecryptionModuleSessionImpl; class SessionIdAdapter; class WebContentDecryptionModuleImpl - : public WebKit::WebContentDecryptionModule { + : public blink::WebContentDecryptionModule { public: static WebContentDecryptionModuleImpl* Create(const string16& key_system); virtual ~WebContentDecryptionModuleImpl(); - // WebKit::WebContentDecryptionModule implementation. - virtual WebKit::WebContentDecryptionModuleSession* createSession( - WebKit::WebContentDecryptionModuleSession::Client* client); + // blink::WebContentDecryptionModule implementation. + virtual blink::WebContentDecryptionModuleSession* createSession( + blink::WebContentDecryptionModuleSession::Client* client); private: // Takes ownership of |media_keys| and |adapter|. diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc index b1dea74..b991ad1 100644 --- a/content/renderer/media/webcontentdecryptionmodulesession_impl.cc +++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.cc @@ -26,12 +26,12 @@ WebContentDecryptionModuleSessionImpl:: ~WebContentDecryptionModuleSessionImpl() { } -WebKit::WebString WebContentDecryptionModuleSessionImpl::sessionId() const { - return WebKit::WebString::fromUTF8(session_id_); +blink::WebString WebContentDecryptionModuleSessionImpl::sessionId() const { + return blink::WebString::fromUTF8(session_id_); } void WebContentDecryptionModuleSessionImpl::generateKeyRequest( - const WebKit::WebString& mime_type, + const blink::WebString& mime_type, const uint8* init_data, size_t init_data_length) { // TODO(ddorwin): Guard against this in supported types check and remove this. // Chromium only supports ASCII MIME types. diff --git a/content/renderer/media/webcontentdecryptionmodulesession_impl.h b/content/renderer/media/webcontentdecryptionmodulesession_impl.h index df76f08..126c232 100644 --- a/content/renderer/media/webcontentdecryptionmodulesession_impl.h +++ b/content/renderer/media/webcontentdecryptionmodulesession_impl.h @@ -21,7 +21,7 @@ class MediaKeys; namespace content { class WebContentDecryptionModuleSessionImpl - : public WebKit::WebContentDecryptionModuleSession { + : public blink::WebContentDecryptionModuleSession { public: typedef base::Callback<void(const std::string& session_id)> SessionClosedCB; @@ -31,9 +31,9 @@ class WebContentDecryptionModuleSessionImpl const SessionClosedCB& session_closed_cb); virtual ~WebContentDecryptionModuleSessionImpl(); - // WebKit::WebContentDecryptionModuleSession implementation. - virtual WebKit::WebString sessionId() const OVERRIDE; - virtual void generateKeyRequest(const WebKit::WebString& mime_type, + // blink::WebContentDecryptionModuleSession implementation. + virtual blink::WebString sessionId() const OVERRIDE; + virtual void generateKeyRequest(const blink::WebString& mime_type, const uint8* init_data, size_t init_data_length) OVERRIDE; virtual void update(const uint8* key, size_t key_length) OVERRIDE; diff --git a/content/renderer/media/webinbandtexttrack_impl.cc b/content/renderer/media/webinbandtexttrack_impl.cc index 6d1de26..3d80286 100644 --- a/content/renderer/media/webinbandtexttrack_impl.cc +++ b/content/renderer/media/webinbandtexttrack_impl.cc @@ -10,8 +10,8 @@ namespace content { WebInbandTextTrackImpl::WebInbandTextTrackImpl( Kind kind, - const WebKit::WebString& label, - const WebKit::WebString& language, + const blink::WebString& label, + const blink::WebString& language, int index) : client_(NULL), mode_(ModeDisabled), @@ -26,11 +26,11 @@ WebInbandTextTrackImpl::~WebInbandTextTrackImpl() { } void WebInbandTextTrackImpl::setClient( - WebKit::WebInbandTextTrackClient* client) { + blink::WebInbandTextTrackClient* client) { client_ = client; } -WebKit::WebInbandTextTrackClient* WebInbandTextTrackImpl::client() { +blink::WebInbandTextTrackClient* WebInbandTextTrackImpl::client() { return client_; } @@ -57,11 +57,11 @@ bool WebInbandTextTrackImpl::isClosedCaptions() const { } } -WebKit::WebString WebInbandTextTrackImpl::label() const { +blink::WebString WebInbandTextTrackImpl::label() const { return label_; } -WebKit::WebString WebInbandTextTrackImpl::language() const { +blink::WebString WebInbandTextTrackImpl::language() const { return language_; } diff --git a/content/renderer/media/webinbandtexttrack_impl.h b/content/renderer/media/webinbandtexttrack_impl.h index 82b94ad..c9083b5 100644 --- a/content/renderer/media/webinbandtexttrack_impl.h +++ b/content/renderer/media/webinbandtexttrack_impl.h @@ -10,16 +10,16 @@ namespace content { -class WebInbandTextTrackImpl : public WebKit::WebInbandTextTrack { +class WebInbandTextTrackImpl : public blink::WebInbandTextTrack { public: WebInbandTextTrackImpl(Kind kind, - const WebKit::WebString& label, - const WebKit::WebString& language, + const blink::WebString& label, + const blink::WebString& language, int index); virtual ~WebInbandTextTrackImpl(); - virtual void setClient(WebKit::WebInbandTextTrackClient* client); - virtual WebKit::WebInbandTextTrackClient* client(); + virtual void setClient(blink::WebInbandTextTrackClient* client); + virtual blink::WebInbandTextTrackClient* client(); virtual void setMode(Mode mode); virtual Mode mode() const; @@ -27,18 +27,18 @@ class WebInbandTextTrackImpl : public WebKit::WebInbandTextTrack { virtual Kind kind() const; virtual bool isClosedCaptions() const; - virtual WebKit::WebString label() const; - virtual WebKit::WebString language() const; + virtual blink::WebString label() const; + virtual blink::WebString language() const; virtual bool isDefault() const; virtual int textTrackIndex() const; private: - WebKit::WebInbandTextTrackClient* client_; + blink::WebInbandTextTrackClient* client_; Mode mode_; Kind kind_; - WebKit::WebString label_; - WebKit::WebString language_; + blink::WebString label_; + blink::WebString language_; int index_; DISALLOW_COPY_AND_ASSIGN(WebInbandTextTrackImpl); }; diff --git a/content/renderer/media/webmediaplayer_delegate.h b/content/renderer/media/webmediaplayer_delegate.h index 63492f8..868abce 100644 --- a/content/renderer/media/webmediaplayer_delegate.h +++ b/content/renderer/media/webmediaplayer_delegate.h @@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_DELEGATE_H_ #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_DELEGATE_H_ -namespace WebKit { +namespace blink { class WebMediaPlayer; } namespace content { @@ -17,13 +17,13 @@ class WebMediaPlayerDelegate { WebMediaPlayerDelegate() {} // The specified player started playing media. - virtual void DidPlay(WebKit::WebMediaPlayer* player) = 0; + virtual void DidPlay(blink::WebMediaPlayer* player) = 0; // The specified player stopped playing media. - virtual void DidPause(WebKit::WebMediaPlayer* player) = 0; + virtual void DidPause(blink::WebMediaPlayer* player) = 0; // The specified player was destroyed. Do not call any methods on it. - virtual void PlayerGone(WebKit::WebMediaPlayer* player) = 0; + virtual void PlayerGone(blink::WebMediaPlayer* player) = 0; protected: virtual ~WebMediaPlayerDelegate() {} diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc index f6c347c..85561a4 100644 --- a/content/renderer/media/webmediaplayer_impl.cc +++ b/content/renderer/media/webmediaplayer_impl.cc @@ -60,11 +60,11 @@ #include "v8/include/v8.h" #include "webkit/renderer/compositor_bindings/web_layer_impl.h" -using WebKit::WebCanvas; -using WebKit::WebMediaPlayer; -using WebKit::WebRect; -using WebKit::WebSize; -using WebKit::WebString; +using blink::WebCanvas; +using blink::WebMediaPlayer; +using blink::WebRect; +using blink::WebSize; +using blink::WebString; using media::PipelineStatus; namespace { @@ -129,8 +129,8 @@ static void LogMediaSourceError(const scoped_refptr<media::MediaLog>& media_log, } WebMediaPlayerImpl::WebMediaPlayerImpl( - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, + blink::WebFrame* frame, + blink::WebMediaPlayerClient* client, base::WeakPtr<WebMediaPlayerDelegate> delegate, const WebMediaPlayerParams& params) : frame_(frame), @@ -184,7 +184,7 @@ WebMediaPlayerImpl::WebMediaPlayerImpl( // Also we want to be notified of |main_loop_| destruction. base::MessageLoop::current()->AddDestructionObserver(this); - if (WebKit::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()) { + if (blink::WebRuntimeFeatures::isPrefixedEncryptedMediaEnabled()) { decryptor_.reset(new ProxyDecryptor( #if defined(ENABLE_PEPPER_CDMS) client, @@ -255,7 +255,7 @@ URLSchemeForHistogram URLScheme(const GURL& url) { } // anonymous namespace -void WebMediaPlayerImpl::load(LoadType load_type, const WebKit::WebURL& url, +void WebMediaPlayerImpl::load(LoadType load_type, const blink::WebURL& url, CORSMode cors_mode) { if (!defer_load_cb_.is_null()) { defer_load_cb_.Run(base::Bind( @@ -266,7 +266,7 @@ void WebMediaPlayerImpl::load(LoadType load_type, const WebKit::WebURL& url, } void WebMediaPlayerImpl::DoLoad(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode) { DCHECK(main_loop_->BelongsToCurrentThread()); @@ -435,12 +435,12 @@ bool WebMediaPlayerImpl::hasAudio() const { return pipeline_->HasAudio(); } -WebKit::WebSize WebMediaPlayerImpl::naturalSize() const { +blink::WebSize WebMediaPlayerImpl::naturalSize() const { DCHECK(main_loop_->BelongsToCurrentThread()); gfx::Size size; pipeline_->GetNaturalVideoSize(&size); - return WebKit::WebSize(size); + return blink::WebSize(size); } bool WebMediaPlayerImpl::paused() const { @@ -482,9 +482,9 @@ WebMediaPlayer::ReadyState WebMediaPlayerImpl::readyState() const { return ready_state_; } -const WebKit::WebTimeRanges& WebMediaPlayerImpl::buffered() { +const blink::WebTimeRanges& WebMediaPlayerImpl::buffered() { DCHECK(main_loop_->BelongsToCurrentThread()); - WebKit::WebTimeRanges web_ranges( + blink::WebTimeRanges web_ranges( ConvertToWebTimeRanges(pipeline_->GetBufferedTimeRanges())); buffered_.swap(web_ranges); return buffered_; @@ -614,7 +614,7 @@ void WebMediaPlayerImpl::PutCurrentFrame( } bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( - WebKit::WebGraphicsContext3D* web_graphics_context, + blink::WebGraphicsContext3D* web_graphics_context, unsigned int texture, unsigned int level, unsigned int internal_format, @@ -693,7 +693,7 @@ bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( // UMA_HISTOGRAM_COUNTS. The reason that we cannot use those macros directly is // that UMA_* macros require the names to be constant throughout the process' // lifetime. -static void EmeUMAHistogramEnumeration(const WebKit::WebString& key_system, +static void EmeUMAHistogramEnumeration(const blink::WebString& key_system, const std::string& method, int sample, int boundary_value) { @@ -703,7 +703,7 @@ static void EmeUMAHistogramEnumeration(const WebKit::WebString& key_system, base::Histogram::kUmaTargetedHistogramFlag)->Add(sample); } -static void EmeUMAHistogramCounts(const WebKit::WebString& key_system, +static void EmeUMAHistogramCounts(const blink::WebString& key_system, const std::string& method, int sample) { // Use the same parameters as UMA_HISTOGRAM_COUNTS. @@ -999,8 +999,8 @@ WebMediaPlayerImpl::OnTextTrack(media::TextKind kind, const std::string& language) { typedef WebInbandTextTrackImpl::Kind webkind_t; const webkind_t webkind = static_cast<webkind_t>(kind); - const WebKit::WebString weblabel = WebKit::WebString::fromUTF8(label); - const WebKit::WebString weblanguage = WebKit::WebString::fromUTF8(language); + const blink::WebString weblabel = blink::WebString::fromUTF8(label); + const blink::WebString weblanguage = blink::WebString::fromUTF8(language); WebInbandTextTrackImpl* const text_track = new WebInbandTextTrackImpl(webkind, weblabel, weblanguage, @@ -1021,7 +1021,7 @@ void WebMediaPlayerImpl::OnKeyError(const std::string& session_id, GetClient()->keyError( current_key_system_, WebString::fromUTF8(session_id), - static_cast<WebKit::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), + static_cast<blink::WebMediaPlayerClient::MediaKeyErrorCode>(error_code), system_code); } @@ -1239,13 +1239,13 @@ void WebMediaPlayerImpl::Destroy() { data_source_.reset(); } -WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { +blink::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { DCHECK(main_loop_->BelongsToCurrentThread()); DCHECK(client_); return client_; } -WebKit::WebAudioSourceProvider* WebMediaPlayerImpl::audioSourceProvider() { +blink::WebAudioSourceProvider* WebMediaPlayerImpl::audioSourceProvider() { return audio_source_provider_.get(); } diff --git a/content/renderer/media/webmediaplayer_impl.h b/content/renderer/media/webmediaplayer_impl.h index a174393..c1de8f0 100644 --- a/content/renderer/media/webmediaplayer_impl.h +++ b/content/renderer/media/webmediaplayer_impl.h @@ -45,7 +45,7 @@ class RenderAudioSourceProvider; -namespace WebKit { +namespace blink { class WebFrame; } @@ -72,7 +72,7 @@ class WebMediaPlayerParams; class WebTextTrackImpl; class WebMediaPlayerImpl - : public WebKit::WebMediaPlayer, + : public blink::WebMediaPlayer, public cc::VideoFrameProvider, public base::MessageLoop::DestructionObserver, public base::SupportsWeakPtr<WebMediaPlayerImpl> { @@ -81,14 +81,14 @@ class WebMediaPlayerImpl // // |delegate| may be null. WebMediaPlayerImpl( - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, + blink::WebFrame* frame, + blink::WebMediaPlayerClient* client, base::WeakPtr<WebMediaPlayerDelegate> delegate, const WebMediaPlayerParams& params); virtual ~WebMediaPlayerImpl(); virtual void load(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode) OVERRIDE; // Playback controls. @@ -99,13 +99,13 @@ class WebMediaPlayerImpl virtual void seek(double seconds); virtual void setRate(double rate); virtual void setVolume(double volume); - virtual void setPreload(WebKit::WebMediaPlayer::Preload preload); - virtual const WebKit::WebTimeRanges& buffered(); + virtual void setPreload(blink::WebMediaPlayer::Preload preload); + virtual const blink::WebTimeRanges& buffered(); virtual double maxTimeSeekable() const; // Methods for painting. - virtual void paint(WebKit::WebCanvas* canvas, - const WebKit::WebRect& rect, + virtual void paint(blink::WebCanvas* canvas, + const blink::WebRect& rect, unsigned char alpha); // True if the loaded media has a playable video/audio track. @@ -113,7 +113,7 @@ class WebMediaPlayerImpl virtual bool hasAudio() const; // Dimensions of the video. - virtual WebKit::WebSize naturalSize() const; + virtual blink::WebSize naturalSize() const; // Getters of playback state. virtual bool paused() const; @@ -124,8 +124,8 @@ class WebMediaPlayerImpl // Internal states of loading and network. // TODO(hclam): Ask the pipeline about the state rather than having reading // them from members which would cause race conditions. - virtual WebKit::WebMediaPlayer::NetworkState networkState() const; - virtual WebKit::WebMediaPlayer::ReadyState readyState() const; + virtual blink::WebMediaPlayer::NetworkState networkState() const; + virtual blink::WebMediaPlayer::ReadyState readyState() const; virtual bool didLoadingProgress() const; @@ -147,7 +147,7 @@ class WebMediaPlayerImpl OVERRIDE; virtual bool copyVideoTextureToPlatformTexture( - WebKit::WebGraphicsContext3D* web_graphics_context, + blink::WebGraphicsContext3D* web_graphics_context, unsigned int texture, unsigned int level, unsigned int internal_format, @@ -155,23 +155,23 @@ class WebMediaPlayerImpl bool premultiply_alpha, bool flip_y); - virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); + virtual blink::WebAudioSourceProvider* audioSourceProvider(); virtual MediaKeyException generateKeyRequest( - const WebKit::WebString& key_system, + const blink::WebString& key_system, const unsigned char* init_data, unsigned init_data_length); - virtual MediaKeyException addKey(const WebKit::WebString& key_system, + virtual MediaKeyException addKey(const blink::WebString& key_system, const unsigned char* key, unsigned key_length, const unsigned char* init_data, unsigned init_data_length, - const WebKit::WebString& session_id); + const blink::WebString& session_id); virtual MediaKeyException cancelKeyRequest( - const WebKit::WebString& key_system, - const WebKit::WebString& session_id); + const blink::WebString& key_system, + const blink::WebString& session_id); // As we are closing the tab or even the browser, |main_loop_| is destroyed // even before this object gets destructed, so we need to know when @@ -205,7 +205,7 @@ class WebMediaPlayerImpl // Called after |defer_load_cb_| has decided to allow the load. If // |defer_load_cb_| is null this is called immediately. void DoLoad(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode); // Called after asynchronous initialization of a data source completed. @@ -219,14 +219,14 @@ class WebMediaPlayerImpl // Helpers that set the network/ready state and notifies the client if // they've changed. - void SetNetworkState(WebKit::WebMediaPlayer::NetworkState state); - void SetReadyState(WebKit::WebMediaPlayer::ReadyState state); + void SetNetworkState(blink::WebMediaPlayer::NetworkState state); + void SetReadyState(blink::WebMediaPlayer::ReadyState state); // Destroy resources held. void Destroy(); // Getter method to |client_|. - WebKit::WebMediaPlayerClient* GetClient(); + blink::WebMediaPlayerClient* GetClient(); // Lets V8 know that player uses extra resources not managed by V8. void IncrementExternallyAllocatedMemory(); @@ -234,18 +234,18 @@ class WebMediaPlayerImpl // Actually do the work for generateKeyRequest/addKey so they can easily // report results to UMA. MediaKeyException GenerateKeyRequestInternal( - const WebKit::WebString& key_system, + const blink::WebString& key_system, const unsigned char* init_data, unsigned init_data_length); - MediaKeyException AddKeyInternal(const WebKit::WebString& key_system, + MediaKeyException AddKeyInternal(const blink::WebString& key_system, const unsigned char* key, unsigned key_length, const unsigned char* init_data, unsigned init_data_length, - const WebKit::WebString& session_id); + const blink::WebString& session_id); MediaKeyException CancelKeyRequestInternal( - const WebKit::WebString& key_system, - const WebKit::WebString& session_id); + const blink::WebString& key_system, + const blink::WebString& session_id); // Gets the duration value reported by the pipeline. double GetPipelineDuration() const; @@ -263,14 +263,14 @@ class WebMediaPlayerImpl // False indicates |current_frame_| is being replaced with a new frame. void DoneWaitingForPaint(bool painting_frame); - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; // TODO(hclam): get rid of these members and read from the pipeline directly. - WebKit::WebMediaPlayer::NetworkState network_state_; - WebKit::WebMediaPlayer::ReadyState ready_state_; + blink::WebMediaPlayer::NetworkState network_state_; + blink::WebMediaPlayer::ReadyState ready_state_; // Keep a list of buffered time ranges. - WebKit::WebTimeRanges buffered_; + blink::WebTimeRanges buffered_; // Message loops for posting tasks on Chrome's main thread. Also used // for DCHECKs so methods calls won't execute in the wrong thread. @@ -281,7 +281,7 @@ class WebMediaPlayerImpl // The currently selected key system. Empty string means that no key system // has been selected. - WebKit::WebString current_key_system_; + blink::WebString current_key_system_; // The LoadType passed in the |load_type| parameter of the load() call. LoadType load_type_; @@ -308,7 +308,7 @@ class WebMediaPlayerImpl bool pending_seek_; double pending_seek_seconds_; - WebKit::WebMediaPlayerClient* client_; + blink::WebMediaPlayerClient* client_; base::WeakPtr<WebMediaPlayerDelegate> delegate_; diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc index eb28f7b..e372317 100644 --- a/content/renderer/media/webmediaplayer_ms.cc +++ b/content/renderer/media/webmediaplayer_ms.cc @@ -26,16 +26,16 @@ #include "third_party/WebKit/public/web/WebView.h" #include "webkit/renderer/compositor_bindings/web_layer_impl.h" -using WebKit::WebCanvas; -using WebKit::WebMediaPlayer; -using WebKit::WebRect; -using WebKit::WebSize; +using blink::WebCanvas; +using blink::WebMediaPlayer; +using blink::WebRect; +using blink::WebSize; namespace content { WebMediaPlayerMS::WebMediaPlayerMS( - WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, + blink::WebFrame* frame, + blink::WebMediaPlayerClient* client, base::WeakPtr<WebMediaPlayerDelegate> delegate, MediaStreamClient* media_stream_client, media::MediaLog* media_log) @@ -82,7 +82,7 @@ WebMediaPlayerMS::~WebMediaPlayerMS() { } void WebMediaPlayerMS::load(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode) { DVLOG(1) << "WebMediaPlayerMS::load"; DCHECK(thread_checker_.CalledOnValidThread()); @@ -204,14 +204,14 @@ bool WebMediaPlayerMS::hasAudio() const { return (audio_renderer_.get() != NULL); } -WebKit::WebSize WebMediaPlayerMS::naturalSize() const { +blink::WebSize WebMediaPlayerMS::naturalSize() const { DCHECK(thread_checker_.CalledOnValidThread()); gfx::Size size; if (current_frame_.get()) size = current_frame_->natural_size(); DVLOG(3) << "WebMediaPlayerMS::naturalSize, " << size.ToString(); - return WebKit::WebSize(size); + return blink::WebSize(size); } bool WebMediaPlayerMS::paused() const { @@ -251,7 +251,7 @@ WebMediaPlayer::ReadyState WebMediaPlayerMS::readyState() const { return ready_state_; } -const WebKit::WebTimeRanges& WebMediaPlayerMS::buffered() { +const blink::WebTimeRanges& WebMediaPlayerMS::buffered() { DCHECK(thread_checker_.CalledOnValidThread()); return buffered_; } @@ -423,7 +423,7 @@ void WebMediaPlayerMS::SetReadyState(WebMediaPlayer::ReadyState state) { GetClient()->readyStateChanged(); } -WebKit::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { +blink::WebMediaPlayerClient* WebMediaPlayerMS::GetClient() { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(client_); return client_; diff --git a/content/renderer/media/webmediaplayer_ms.h b/content/renderer/media/webmediaplayer_ms.h index 1ed75a3..23185a3 100644 --- a/content/renderer/media/webmediaplayer_ms.h +++ b/content/renderer/media/webmediaplayer_ms.h @@ -16,7 +16,7 @@ #include "third_party/WebKit/public/web/WebMediaPlayer.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebFrame; class WebMediaPlayerClient; } @@ -47,24 +47,24 @@ class WebMediaPlayerDelegate; // AudioPlayer // plays audio streams. // -// WebKit::WebMediaPlayerClient +// blink::WebMediaPlayerClient // WebKit client of this media player object. class WebMediaPlayerMS - : public WebKit::WebMediaPlayer, + : public blink::WebMediaPlayer, public cc::VideoFrameProvider, public base::SupportsWeakPtr<WebMediaPlayerMS> { public: // Construct a WebMediaPlayerMS with reference to the client, and // a MediaStreamClient which provides VideoFrameProvider. - WebMediaPlayerMS(WebKit::WebFrame* frame, - WebKit::WebMediaPlayerClient* client, + WebMediaPlayerMS(blink::WebFrame* frame, + blink::WebMediaPlayerClient* client, base::WeakPtr<WebMediaPlayerDelegate> delegate, MediaStreamClient* media_stream_client, media::MediaLog* media_log); virtual ~WebMediaPlayerMS(); virtual void load(LoadType load_type, - const WebKit::WebURL& url, + const blink::WebURL& url, CORSMode cors_mode) OVERRIDE; // Playback controls. @@ -75,13 +75,13 @@ class WebMediaPlayerMS virtual void seek(double seconds); virtual void setRate(double rate); virtual void setVolume(double volume); - virtual void setPreload(WebKit::WebMediaPlayer::Preload preload) OVERRIDE; - virtual const WebKit::WebTimeRanges& buffered() OVERRIDE; + virtual void setPreload(blink::WebMediaPlayer::Preload preload) OVERRIDE; + virtual const blink::WebTimeRanges& buffered() OVERRIDE; virtual double maxTimeSeekable() const; // Methods for painting. - virtual void paint(WebKit::WebCanvas* canvas, - const WebKit::WebRect& rect, + virtual void paint(blink::WebCanvas* canvas, + const blink::WebRect& rect, unsigned char alpha) OVERRIDE; // True if the loaded media has a playable video/audio track. @@ -89,7 +89,7 @@ class WebMediaPlayerMS virtual bool hasAudio() const OVERRIDE; // Dimensions of the video. - virtual WebKit::WebSize naturalSize() const OVERRIDE; + virtual blink::WebSize naturalSize() const OVERRIDE; // Getters of playback state. virtual bool paused() const OVERRIDE; @@ -98,8 +98,8 @@ class WebMediaPlayerMS virtual double currentTime() const; // Internal states of loading and network. - virtual WebKit::WebMediaPlayer::NetworkState networkState() const OVERRIDE; - virtual WebKit::WebMediaPlayer::ReadyState readyState() const OVERRIDE; + virtual blink::WebMediaPlayer::NetworkState networkState() const OVERRIDE; + virtual blink::WebMediaPlayer::ReadyState readyState() const OVERRIDE; virtual bool didLoadingProgress() const OVERRIDE; @@ -131,23 +131,23 @@ class WebMediaPlayerMS // Helpers that set the network/ready state and notifies the client if // they've changed. - void SetNetworkState(WebKit::WebMediaPlayer::NetworkState state); - void SetReadyState(WebKit::WebMediaPlayer::ReadyState state); + void SetNetworkState(blink::WebMediaPlayer::NetworkState state); + void SetReadyState(blink::WebMediaPlayer::ReadyState state); // Getter method to |client_|. - WebKit::WebMediaPlayerClient* GetClient(); + blink::WebMediaPlayerClient* GetClient(); - WebKit::WebFrame* frame_; + blink::WebFrame* frame_; - WebKit::WebMediaPlayer::NetworkState network_state_; - WebKit::WebMediaPlayer::ReadyState ready_state_; + blink::WebMediaPlayer::NetworkState network_state_; + blink::WebMediaPlayer::ReadyState ready_state_; - WebKit::WebTimeRanges buffered_; + blink::WebTimeRanges buffered_; // Used for DCHECKs to ensure methods calls executed in the correct thread. base::ThreadChecker thread_checker_; - WebKit::WebMediaPlayerClient* client_; + blink::WebMediaPlayerClient* client_; base::WeakPtr<WebMediaPlayerDelegate> delegate_; diff --git a/content/renderer/media/webmediaplayer_util.cc b/content/renderer/media/webmediaplayer_util.cc index 741239a..ef2dc67 100644 --- a/content/renderer/media/webmediaplayer_util.cc +++ b/content/renderer/media/webmediaplayer_util.cc @@ -15,7 +15,7 @@ namespace content { #define COMPILE_ASSERT_MATCHING_ENUM(name) \ COMPILE_ASSERT( \ - static_cast<int>(WebKit::WebMediaPlayerClient::MediaKeyErrorCode ## name) == \ + static_cast<int>(blink::WebMediaPlayerClient::MediaKeyErrorCode ## name) == \ static_cast<int>(media::MediaKeys::k ## name ## Error), \ mismatching_enums) COMPILE_ASSERT_MATCHING_ENUM(Unknown); @@ -28,9 +28,9 @@ base::TimeDelta ConvertSecondsToTimestamp(double seconds) { microseconds > 0 ? microseconds + 0.5 : ceil(microseconds - 0.5)); } -WebKit::WebTimeRanges ConvertToWebTimeRanges( +blink::WebTimeRanges ConvertToWebTimeRanges( const media::Ranges<base::TimeDelta>& ranges) { - WebKit::WebTimeRanges result(ranges.size()); + blink::WebTimeRanges result(ranges.size()); for (size_t i = 0; i < ranges.size(); i++) { result[i].start = ranges.start(i).InSecondsF(); result[i].end = ranges.end(i).InSecondsF(); @@ -38,14 +38,14 @@ WebKit::WebTimeRanges ConvertToWebTimeRanges( return result; } -WebKit::WebMediaPlayer::NetworkState PipelineErrorToNetworkState( +blink::WebMediaPlayer::NetworkState PipelineErrorToNetworkState( media::PipelineStatus error) { DCHECK_NE(error, media::PIPELINE_OK); switch (error) { case media::PIPELINE_ERROR_NETWORK: case media::PIPELINE_ERROR_READ: - return WebKit::WebMediaPlayer::NetworkStateNetworkError; + return blink::WebMediaPlayer::NetworkStateNetworkError; // TODO(vrk): Because OnPipelineInitialize() directly reports the // NetworkStateFormatError instead of calling OnPipelineError(), I believe @@ -57,24 +57,24 @@ WebKit::WebMediaPlayer::NetworkState PipelineErrorToNetworkState( case media::DEMUXER_ERROR_COULD_NOT_PARSE: case media::DEMUXER_ERROR_NO_SUPPORTED_STREAMS: case media::DECODER_ERROR_NOT_SUPPORTED: - return WebKit::WebMediaPlayer::NetworkStateFormatError; + return blink::WebMediaPlayer::NetworkStateFormatError; case media::PIPELINE_ERROR_DECODE: case media::PIPELINE_ERROR_ABORT: case media::PIPELINE_ERROR_OPERATION_PENDING: case media::PIPELINE_ERROR_INVALID_STATE: - return WebKit::WebMediaPlayer::NetworkStateDecodeError; + return blink::WebMediaPlayer::NetworkStateDecodeError; case media::PIPELINE_ERROR_DECRYPT: // TODO(xhwang): Change to use NetworkStateDecryptError once it's added in // Webkit (see http://crbug.com/124486). - return WebKit::WebMediaPlayer::NetworkStateDecodeError; + return blink::WebMediaPlayer::NetworkStateDecodeError; case media::PIPELINE_OK: case media::PIPELINE_STATUS_MAX: NOTREACHED() << "Unexpected status! " << error; } - return WebKit::WebMediaPlayer::NetworkStateFormatError; + return blink::WebMediaPlayer::NetworkStateFormatError; } } // namespace content diff --git a/content/renderer/media/webmediaplayer_util.h b/content/renderer/media/webmediaplayer_util.h index 007980c..c774e7d 100644 --- a/content/renderer/media/webmediaplayer_util.h +++ b/content/renderer/media/webmediaplayer_util.h @@ -19,10 +19,10 @@ namespace content { // Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details. base::TimeDelta ConvertSecondsToTimestamp(double seconds); -WebKit::WebTimeRanges ConvertToWebTimeRanges( +blink::WebTimeRanges ConvertToWebTimeRanges( const media::Ranges<base::TimeDelta>& ranges); -WebKit::WebMediaPlayer::NetworkState PipelineErrorToNetworkState( +blink::WebMediaPlayer::NetworkState PipelineErrorToNetworkState( media::PipelineStatus error); } // namespace content diff --git a/content/renderer/media/webmediasource_impl.cc b/content/renderer/media/webmediasource_impl.cc index a420f9d..d1a2dfb 100644 --- a/content/renderer/media/webmediasource_impl.cc +++ b/content/renderer/media/webmediasource_impl.cc @@ -10,8 +10,8 @@ #include "third_party/WebKit/public/platform/WebCString.h" #include "third_party/WebKit/public/platform/WebString.h" -using ::WebKit::WebString; -using ::WebKit::WebMediaSource; +using ::blink::WebString; +using ::blink::WebMediaSource; namespace content { @@ -34,9 +34,9 @@ WebMediaSourceImpl::WebMediaSourceImpl( WebMediaSourceImpl::~WebMediaSourceImpl() {} WebMediaSource::AddStatus WebMediaSourceImpl::addSourceBuffer( - const WebKit::WebString& type, - const WebKit::WebVector<WebKit::WebString>& codecs, - WebKit::WebSourceBuffer** source_buffer) { + const blink::WebString& type, + const blink::WebVector<blink::WebString>& codecs, + blink::WebSourceBuffer** source_buffer) { std::string id = base::GenerateGUID(); std::vector<std::string> new_codecs(codecs.size()); for (size_t i = 0; i < codecs.size(); ++i) diff --git a/content/renderer/media/webmediasource_impl.h b/content/renderer/media/webmediasource_impl.h index 8d67994..42d5eef9 100644 --- a/content/renderer/media/webmediasource_impl.h +++ b/content/renderer/media/webmediasource_impl.h @@ -17,16 +17,16 @@ class ChunkDemuxer; namespace content { -class WebMediaSourceImpl : public WebKit::WebMediaSource { +class WebMediaSourceImpl : public blink::WebMediaSource { public: WebMediaSourceImpl(media::ChunkDemuxer* demuxer, media::LogCB log_cb); virtual ~WebMediaSourceImpl(); - // WebKit::WebMediaSource implementation. + // blink::WebMediaSource implementation. virtual AddStatus addSourceBuffer( - const WebKit::WebString& type, - const WebKit::WebVector<WebKit::WebString>& codecs, - WebKit::WebSourceBuffer** source_buffer) OVERRIDE; + const blink::WebString& type, + const blink::WebVector<blink::WebString>& codecs, + blink::WebSourceBuffer** source_buffer) OVERRIDE; virtual double duration() OVERRIDE; virtual void setDuration(double duration) OVERRIDE; virtual void markEndOfStream(EndOfStreamStatus status) OVERRIDE; diff --git a/content/renderer/media/webrtc_audio_capturer.h b/content/renderer/media/webrtc_audio_capturer.h index cf9b83e..1e835c5 100644 --- a/content/renderer/media/webrtc_audio_capturer.h +++ b/content/renderer/media/webrtc_audio_capturer.h @@ -107,7 +107,7 @@ class CONTENT_EXPORT WebRtcAudioCapturer const std::string& device_id() const { return device_id_; } int session_id() const { return session_id_; } - WebKit::WebAudioSourceProvider* audio_source_provider() const { + blink::WebAudioSourceProvider* audio_source_provider() const { return source_provider_.get(); } diff --git a/content/renderer/media/webrtc_local_audio_source_provider.cc b/content/renderer/media/webrtc_local_audio_source_provider.cc index cc70c78..c1e4eae 100644 --- a/content/renderer/media/webrtc_local_audio_source_provider.cc +++ b/content/renderer/media/webrtc_local_audio_source_provider.cc @@ -11,7 +11,7 @@ #include "media/base/audio_hardware_config.h" #include "third_party/WebKit/public/web/WebAudioSourceProviderClient.h" -using WebKit::WebVector; +using blink::WebVector; namespace content { @@ -107,7 +107,7 @@ void WebRtcLocalAudioSourceProvider::GetAudioProcessingParams( } void WebRtcLocalAudioSourceProvider::setClient( - WebKit::WebAudioSourceProviderClient* client) { + blink::WebAudioSourceProviderClient* client) { NOTREACHED(); } diff --git a/content/renderer/media/webrtc_local_audio_source_provider.h b/content/renderer/media/webrtc_local_audio_source_provider.h index 1d600b7..cbb7331 100644 --- a/content/renderer/media/webrtc_local_audio_source_provider.h +++ b/content/renderer/media/webrtc_local_audio_source_provider.h @@ -21,14 +21,14 @@ class AudioFifo; class AudioParameters; } -namespace WebKit { +namespace blink { class WebAudioSourceProviderClient; } namespace content { // WebRtcLocalAudioSourceProvider provides a bridge between classes: -// WebRtcAudioCapturer ---> WebKit::WebAudioSourceProvider +// WebRtcAudioCapturer ---> blink::WebAudioSourceProvider // // WebRtcLocalAudioSourceProvider works as a sink to the WebRtcAudiocapturer // and store the capture data to a FIFO. When the media stream is connected to @@ -38,7 +38,7 @@ namespace content { // All calls are protected by a lock. class CONTENT_EXPORT WebRtcLocalAudioSourceProvider : NON_EXPORTED_BASE(public media::AudioConverter::InputCallback), - NON_EXPORTED_BASE(public WebKit::WebAudioSourceProvider) { + NON_EXPORTED_BASE(public blink::WebAudioSourceProvider) { public: static const size_t kWebAudioRenderBufferSize; @@ -61,9 +61,9 @@ class CONTENT_EXPORT WebRtcLocalAudioSourceProvider // so it has been under the protection of |lock_|. void GetAudioProcessingParams(int* delay_ms, int* volume, bool* key_pressed); - // WebKit::WebAudioSourceProvider implementation. - virtual void setClient(WebKit::WebAudioSourceProviderClient* client) OVERRIDE; - virtual void provideInput(const WebKit::WebVector<float*>& audio_data, + // blink::WebAudioSourceProvider implementation. + virtual void setClient(blink::WebAudioSourceProviderClient* client) OVERRIDE; + virtual void provideInput(const blink::WebVector<float*>& audio_data, size_t number_of_frames) OVERRIDE; // media::AudioConverter::Inputcallback implementation. diff --git a/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc b/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc index c23ce0e..6ee052b 100644 --- a/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc +++ b/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc @@ -35,7 +35,7 @@ class WebRtcLocalAudioSourceProviderTest : public testing::Test { TEST_F(WebRtcLocalAudioSourceProviderTest, VerifyDataFlow) { // Point the WebVector into memory owned by |sink_bus_|. - WebKit::WebVector<float*> audio_data( + blink::WebVector<float*> audio_data( static_cast<size_t>(sink_bus_->channels())); for (size_t i = 0; i < audio_data.size(); ++i) audio_data[i] = sink_bus_->channel(i); @@ -85,7 +85,7 @@ TEST_F(WebRtcLocalAudioSourceProviderTest, VerifyDataFlow) { TEST_F(WebRtcLocalAudioSourceProviderTest, VerifyAudioProcessingParams) { // Point the WebVector into memory owned by |sink_bus_|. - WebKit::WebVector<float*> audio_data( + blink::WebVector<float*> audio_data( static_cast<size_t>(sink_bus_->channels())); for (size_t i = 0; i < audio_data.size(); ++i) audio_data[i] = sink_bus_->channel(i); diff --git a/content/renderer/media/websourcebuffer_impl.cc b/content/renderer/media/websourcebuffer_impl.cc index dc56857..c942977 100644 --- a/content/renderer/media/websourcebuffer_impl.cc +++ b/content/renderer/media/websourcebuffer_impl.cc @@ -36,9 +36,9 @@ WebSourceBufferImpl::~WebSourceBufferImpl() { DCHECK(!demuxer_) << "Object destroyed w/o removedFromMediaSource() call"; } -WebKit::WebTimeRanges WebSourceBufferImpl::buffered() { +blink::WebTimeRanges WebSourceBufferImpl::buffered() { media::Ranges<base::TimeDelta> ranges = demuxer_->GetBufferedRanges(id_); - WebKit::WebTimeRanges result(ranges.size()); + blink::WebTimeRanges result(ranges.size()); for (size_t i = 0; i < ranges.size(); i++) { result[i].start = ranges.start(i).InSecondsF(); result[i].end = ranges.end(i).InSecondsF(); diff --git a/content/renderer/media/websourcebuffer_impl.h b/content/renderer/media/websourcebuffer_impl.h index 1f05f3b..894fb64 100644 --- a/content/renderer/media/websourcebuffer_impl.h +++ b/content/renderer/media/websourcebuffer_impl.h @@ -17,13 +17,13 @@ class ChunkDemuxer; namespace content { -class WebSourceBufferImpl : public WebKit::WebSourceBuffer { +class WebSourceBufferImpl : public blink::WebSourceBuffer { public: WebSourceBufferImpl(const std::string& id, media::ChunkDemuxer* demuxer); virtual ~WebSourceBufferImpl(); - // WebKit::WebSourceBuffer implementation. - virtual WebKit::WebTimeRanges buffered() OVERRIDE; + // blink::WebSourceBuffer implementation. + virtual blink::WebTimeRanges buffered() OVERRIDE; virtual void append(const unsigned char* data, unsigned length) OVERRIDE; virtual void abort() OVERRIDE; // TODO(acolwell): Add OVERRIDE when Blink-side changes land. diff --git a/content/renderer/menu_item_builder.cc b/content/renderer/menu_item_builder.cc index 5946c41..0bbd5d8 100644 --- a/content/renderer/menu_item_builder.cc +++ b/content/renderer/menu_item_builder.cc @@ -8,14 +8,14 @@ namespace content { -MenuItem MenuItemBuilder::Build(const WebKit::WebMenuItemInfo& item) { +MenuItem MenuItemBuilder::Build(const blink::WebMenuItemInfo& item) { MenuItem result; result.label = item.label; result.tool_tip = item.toolTip; result.type = static_cast<MenuItem::Type>(item.type); result.action = item.action; - result.rtl = (item.textDirection == WebKit::WebTextDirectionRightToLeft); + result.rtl = (item.textDirection == blink::WebTextDirectionRightToLeft); result.has_directional_override = item.hasTextDirectionOverride; result.enabled = item.enabled; result.checked = item.checked; diff --git a/content/renderer/menu_item_builder.h b/content/renderer/menu_item_builder.h index 8f007bd..f82a458 100644 --- a/content/renderer/menu_item_builder.h +++ b/content/renderer/menu_item_builder.h @@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_MENU_ITEM_BUILDER_H_ #define CONTENT_RENDERER_MENU_ITEM_BUILDER_H_ -namespace WebKit { +namespace blink { struct WebMenuItemInfo; } @@ -14,7 +14,7 @@ struct MenuItem; class MenuItemBuilder { public: - static MenuItem Build(const WebKit::WebMenuItemInfo& item); + static MenuItem Build(const blink::WebMenuItemInfo& item); }; } // namespace content diff --git a/content/renderer/mhtml_generator.cc b/content/renderer/mhtml_generator.cc index 0a1c785..9530044 100644 --- a/content/renderer/mhtml_generator.cc +++ b/content/renderer/mhtml_generator.cc @@ -48,8 +48,8 @@ void MHTMLGenerator::NotifyBrowser(int job_id, int64 data_size) { // TODO(jcivelli): write the chunks in deferred tasks to give a chance to the // message loop to process other events. int64 MHTMLGenerator::GenerateMHTML() { - WebKit::WebCString mhtml = - WebKit::WebPageSerializer::serializeToMHTML(render_view()->GetWebView()); + blink::WebCString mhtml = + blink::WebPageSerializer::serializeToMHTML(render_view()->GetWebView()); const size_t chunk_size = 1024; const char* data = mhtml.data(); size_t total_bytes_written = 0; diff --git a/content/renderer/mouse_lock_dispatcher.cc b/content/renderer/mouse_lock_dispatcher.cc index 56ec66d..f72e1e0 100644 --- a/content/renderer/mouse_lock_dispatcher.cc +++ b/content/renderer/mouse_lock_dispatcher.cc @@ -58,7 +58,7 @@ bool MouseLockDispatcher::IsMouseLockedTo(LockTarget* target) { } bool MouseLockDispatcher::WillHandleMouseEvent( - const WebKit::WebMouseEvent& event) { + const blink::WebMouseEvent& event) { if (mouse_locked_ && target_) return target_->HandleMouseLockedInputEvent(event); return false; diff --git a/content/renderer/mouse_lock_dispatcher.h b/content/renderer/mouse_lock_dispatcher.h index 6423b7d..29b8e4f 100644 --- a/content/renderer/mouse_lock_dispatcher.h +++ b/content/renderer/mouse_lock_dispatcher.h @@ -8,9 +8,9 @@ #include "base/basictypes.h" #include "content/common/content_export.h" -namespace WebKit { +namespace blink { class WebMouseEvent; -} // namespace WebKit +} // namespace blink namespace content { @@ -28,7 +28,7 @@ class CONTENT_EXPORT MouseLockDispatcher { virtual void OnMouseLockLost() = 0; // A mouse lock is enabled and mouse events are being delievered. virtual bool HandleMouseLockedInputEvent( - const WebKit::WebMouseEvent& event) = 0; + const blink::WebMouseEvent& event) = 0; }; // Locks the mouse to the |target|. If true is returned, an asynchronous @@ -43,7 +43,7 @@ class CONTENT_EXPORT MouseLockDispatcher { bool IsMouseLockedTo(LockTarget* target); // Allow lock target to consumed a mouse event, if it does return true. - bool WillHandleMouseEvent(const WebKit::WebMouseEvent& event); + bool WillHandleMouseEvent(const blink::WebMouseEvent& event); // Subclasses or users have to call these methods to report mouse lock events // from the browser. diff --git a/content/renderer/mouse_lock_dispatcher_browsertest.cc b/content/renderer/mouse_lock_dispatcher_browsertest.cc index f9c44c2..ef18331 100644 --- a/content/renderer/mouse_lock_dispatcher_browsertest.cc +++ b/content/renderer/mouse_lock_dispatcher_browsertest.cc @@ -21,7 +21,7 @@ class MockLockTarget : public MouseLockDispatcher::LockTarget { MOCK_METHOD1(OnLockMouseACK, void(bool)); MOCK_METHOD0(OnMouseLockLost, void()); MOCK_METHOD1(HandleMouseLockedInputEvent, - bool(const WebKit::WebMouseEvent&)); + bool(const blink::WebMouseEvent&)); }; // MouseLockDispatcher is a RenderViewObserver, and we test it by creating a @@ -90,7 +90,7 @@ TEST_F(MouseLockDispatcherTest, BasicMockLockTarget) { EXPECT_TRUE(dispatcher()->IsMouseLockedTo(target_)); // Receive mouse event. - dispatcher()->WillHandleMouseEvent(WebKit::WebMouseEvent()); + dispatcher()->WillHandleMouseEvent(blink::WebMouseEvent()); // Unlock. dispatcher()->UnlockMouse(target_); @@ -120,7 +120,7 @@ TEST_F(MouseLockDispatcherTest, DeleteAndUnlock) { dispatcher()->OnLockTargetDestroyed(target_); delete target_; target_ = NULL; - dispatcher()->WillHandleMouseEvent(WebKit::WebMouseEvent()); + dispatcher()->WillHandleMouseEvent(blink::WebMouseEvent()); view()->OnMessageReceived(ViewMsg_MouseLockLost(route_id_)); EXPECT_FALSE(dispatcher()->IsMouseLockedTo(target_)); } @@ -171,7 +171,7 @@ TEST_F(MouseLockDispatcherTest, MouseEventsNotReceived) { EXPECT_CALL(*target_, HandleMouseLockedInputEvent(_)).Times(0); // (Don't) receive mouse event. - dispatcher()->WillHandleMouseEvent(WebKit::WebMouseEvent()); + dispatcher()->WillHandleMouseEvent(blink::WebMouseEvent()); // Lock. EXPECT_TRUE(dispatcher()->LockMouse(target_)); @@ -179,7 +179,7 @@ TEST_F(MouseLockDispatcherTest, MouseEventsNotReceived) { EXPECT_TRUE(dispatcher()->IsMouseLockedTo(target_)); // Receive mouse event. - dispatcher()->WillHandleMouseEvent(WebKit::WebMouseEvent()); + dispatcher()->WillHandleMouseEvent(blink::WebMouseEvent()); // Unlock. dispatcher()->UnlockMouse(target_); @@ -187,7 +187,7 @@ TEST_F(MouseLockDispatcherTest, MouseEventsNotReceived) { EXPECT_FALSE(dispatcher()->IsMouseLockedTo(target_)); // (Don't) receive mouse event. - dispatcher()->WillHandleMouseEvent(WebKit::WebMouseEvent()); + dispatcher()->WillHandleMouseEvent(blink::WebMouseEvent()); } // Test multiple targets @@ -216,7 +216,7 @@ TEST_F(MouseLockDispatcherTest, MultipleTargets) { EXPECT_FALSE(dispatcher()->LockMouse(alternate_target_)); // Receive mouse event to only one target. - dispatcher()->WillHandleMouseEvent(WebKit::WebMouseEvent()); + dispatcher()->WillHandleMouseEvent(blink::WebMouseEvent()); // Unlock alternate target has no effect. dispatcher()->UnlockMouse(alternate_target_); diff --git a/content/renderer/notification_provider.cc b/content/renderer/notification_provider.cc index fc75042..03bd13f 100644 --- a/content/renderer/notification_provider.cc +++ b/content/renderer/notification_provider.cc @@ -15,14 +15,14 @@ #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebDocument; -using WebKit::WebNotification; -using WebKit::WebNotificationPresenter; -using WebKit::WebNotificationPermissionCallback; -using WebKit::WebSecurityOrigin; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebUserGestureIndicator; +using blink::WebDocument; +using blink::WebNotification; +using blink::WebNotificationPresenter; +using blink::WebNotificationPermissionCallback; +using blink::WebSecurityOrigin; +using blink::WebString; +using blink::WebURL; +using blink::WebUserGestureIndicator; namespace content { diff --git a/content/renderer/notification_provider.h b/content/renderer/notification_provider.h index ababece..e2c99ce 100644 --- a/content/renderer/notification_provider.h +++ b/content/renderer/notification_provider.h @@ -10,7 +10,7 @@ #include "third_party/WebKit/public/web/WebNotification.h" #include "third_party/WebKit/public/web/WebNotificationPresenter.h" -namespace WebKit { +namespace blink { class WebNotificationPermissionCallback; } @@ -20,7 +20,7 @@ class RenderViewImpl; // NotificationProvider class is owned by the RenderView. Only // to be used on the main thread. class NotificationProvider : public RenderViewObserver, - public WebKit::WebNotificationPresenter { + public blink::WebNotificationPresenter { public: explicit NotificationProvider(RenderViewImpl* render_view); virtual ~NotificationProvider(); @@ -29,22 +29,22 @@ class NotificationProvider : public RenderViewObserver, // RenderView::Observer implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - // WebKit::WebNotificationPresenter interface. - virtual bool show(const WebKit::WebNotification& proxy); - virtual void cancel(const WebKit::WebNotification& proxy); - virtual void objectDestroyed(const WebKit::WebNotification& proxy); - virtual WebKit::WebNotificationPresenter::Permission checkPermission( - const WebKit::WebSecurityOrigin& origin); - virtual void requestPermission(const WebKit::WebSecurityOrigin& origin, - WebKit::WebNotificationPermissionCallback* callback); + // blink::WebNotificationPresenter interface. + virtual bool show(const blink::WebNotification& proxy); + virtual void cancel(const blink::WebNotification& proxy); + virtual void objectDestroyed(const blink::WebNotification& proxy); + virtual blink::WebNotificationPresenter::Permission checkPermission( + const blink::WebSecurityOrigin& origin); + virtual void requestPermission(const blink::WebSecurityOrigin& origin, + blink::WebNotificationPermissionCallback* callback); // Internal methods used to show notifications. - bool ShowHTML(const WebKit::WebNotification& notification, int id); - bool ShowText(const WebKit::WebNotification& notification, int id); + bool ShowHTML(const blink::WebNotification& notification, int id); + bool ShowText(const blink::WebNotification& notification, int id); // IPC handlers. void OnDisplay(int id); - void OnError(int id, const WebKit::WebString& message); + void OnError(int id, const blink::WebString& message); void OnClose(int id, bool by_user); void OnClick(int id); void OnPermissionRequestComplete(int id); diff --git a/content/renderer/npapi/plugin_channel_host.cc b/content/renderer/npapi/plugin_channel_host.cc index c276d33..679288f5 100644 --- a/content/renderer/npapi/plugin_channel_host.cc +++ b/content/renderer/npapi/plugin_channel_host.cc @@ -127,7 +127,7 @@ bool PluginChannelHost::OnControlMessageReceived(const IPC::Message& message) { } void PluginChannelHost::OnSetException(const std::string& message) { - WebKit::WebBindings::setException(NULL, message.c_str()); + blink::WebBindings::setException(NULL, message.c_str()); } void PluginChannelHost::OnPluginShuttingDown() { diff --git a/content/renderer/npapi/webplugin_delegate_proxy.cc b/content/renderer/npapi/webplugin_delegate_proxy.cc index 80cb2ea..7d5bf54 100644 --- a/content/renderer/npapi/webplugin_delegate_proxy.cc +++ b/content/renderer/npapi/webplugin_delegate_proxy.cc @@ -67,12 +67,12 @@ #include "content/public/common/sandbox_init.h" #endif -using WebKit::WebBindings; -using WebKit::WebCursorInfo; -using WebKit::WebDragData; -using WebKit::WebInputEvent; -using WebKit::WebString; -using WebKit::WebView; +using blink::WebBindings; +using blink::WebCursorInfo; +using blink::WebDragData; +using blink::WebInputEvent; +using blink::WebString; +using blink::WebView; namespace content { @@ -848,7 +848,7 @@ void WebPluginDelegateProxy::SetContainerVisibility(bool is_visible) { if (is_visible) { gfx::Rect window_frame = render_view_->rootWindowRect(); gfx::Rect view_frame = render_view_->windowRect(); - WebKit::WebView* webview = render_view_->webview(); + blink::WebView* webview = render_view_->webview(); msg = new PluginMsg_ContainerShown(instance_id_, window_frame, view_frame, webview && webview->isActive()); } else { @@ -935,7 +935,7 @@ void WebPluginDelegateProxy::OnNotifyIMEStatus(int input_type, ViewHostMsg_SelectionBounds_Params bounds_params; bounds_params.anchor_rect = bounds_params.focus_rect = caret_rect; bounds_params.anchor_dir = bounds_params.focus_dir = - WebKit::WebTextDirectionLeftToRight; + blink::WebTextDirectionLeftToRight; bounds_params.is_anchor_first = true; render_view_->Send(new ViewHostMsg_SelectionBoundsChanged( render_view_->routing_id(), diff --git a/content/renderer/npapi/webplugin_delegate_proxy.h b/content/renderer/npapi/webplugin_delegate_proxy.h index 542986f..679bc6d 100644 --- a/content/renderer/npapi/webplugin_delegate_proxy.h +++ b/content/renderer/npapi/webplugin_delegate_proxy.h @@ -68,7 +68,7 @@ class WebPluginDelegateProxy virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, int notify_id) OVERRIDE; virtual void SetFocus(bool focused) OVERRIDE; - virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, + virtual bool HandleInputEvent(const blink::WebInputEvent& event, WebCursor::CursorInfo* cursor) OVERRIDE; virtual int GetProcessId() OVERRIDE; diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc index 5d97e4e..79541b6 100644 --- a/content/renderer/npapi/webplugin_impl.cc +++ b/content/renderer/npapi/webplugin_impl.cc @@ -57,32 +57,32 @@ #include "webkit/child/multipart_response_delegate.h" #include "webkit/renderer/compositor_bindings/web_layer_impl.h" -using WebKit::WebCanvas; -using WebKit::WebConsoleMessage; -using WebKit::WebCookieJar; -using WebKit::WebCString; -using WebKit::WebCursorInfo; -using WebKit::WebData; -using WebKit::WebDataSource; -using WebKit::WebFrame; -using WebKit::WebHTTPBody; -using WebKit::WebHTTPHeaderVisitor; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebPluginContainer; -using WebKit::WebPluginParams; -using WebKit::WebRect; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLLoaderClient; -using WebKit::WebURLLoaderOptions; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; -using WebKit::WebVector; -using WebKit::WebView; +using blink::WebCanvas; +using blink::WebConsoleMessage; +using blink::WebCookieJar; +using blink::WebCString; +using blink::WebCursorInfo; +using blink::WebData; +using blink::WebDataSource; +using blink::WebFrame; +using blink::WebHTTPBody; +using blink::WebHTTPHeaderVisitor; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebPluginContainer; +using blink::WebPluginParams; +using blink::WebRect; +using blink::WebString; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLLoaderClient; +using blink::WebURLLoaderOptions; +using blink::WebURLRequest; +using blink::WebURLResponse; +using blink::WebVector; +using blink::WebView; using webkit_glue::MultipartResponseDelegate; namespace content { @@ -212,14 +212,14 @@ void GetResponseInfo(const WebURLResponse& response, } // namespace -// WebKit::WebPlugin ---------------------------------------------------------- +// blink::WebPlugin ---------------------------------------------------------- struct WebPluginImpl::ClientInfo { unsigned long id; WebPluginResourceClient* client; - WebKit::WebURLRequest request; + blink::WebURLRequest request; bool pending_failure_notification; - linked_ptr<WebKit::WebURLLoader> loader; + linked_ptr<blink::WebURLLoader> loader; bool notify_redirects; bool is_plugin_src_load; int64 data_offset; @@ -249,7 +249,7 @@ bool WebPluginImpl::initialize(WebPluginContainer* container) { if (!ok) { plugin_delegate->PluginDestroyed(); - WebKit::WebPlugin* replacement_plugin = + blink::WebPlugin* replacement_plugin = GetContentClient()->renderer()->CreatePluginReplacement( render_view_.get(), file_path_); if (!replacement_plugin) @@ -286,7 +286,7 @@ NPP WebPluginImpl::pluginNPP() { return npp_; } -bool WebPluginImpl::getFormValue(WebKit::WebString& value) { +bool WebPluginImpl::getFormValue(blink::WebString& value) { if (!delegate_) return false; base::string16 form_value; @@ -1487,7 +1487,7 @@ void WebPluginImpl::TearDownPluginInstance( weak_factory_.InvalidateWeakPtrs(); } -void WebPluginImpl::SetReferrer(WebKit::WebURLRequest* request, +void WebPluginImpl::SetReferrer(blink::WebURLRequest* request, Referrer referrer_flag) { switch (referrer_flag) { case DOCUMENT_URL: diff --git a/content/renderer/npapi/webplugin_impl.h b/content/renderer/npapi/webplugin_impl.h index 9c7bf01..4d8bd40 100644 --- a/content/renderer/npapi/webplugin_impl.h +++ b/content/renderer/npapi/webplugin_impl.h @@ -29,7 +29,7 @@ namespace cc { class IOSurfaceLayer; } -namespace WebKit { +namespace blink { class WebFrame; class WebLayer; class WebPluginContainer; @@ -51,50 +51,50 @@ class WebPluginDelegate; // after changing out of WebCore types, to a delegate. The delegate may // be in a different process. class WebPluginImpl : public WebPlugin, - public WebKit::WebPlugin, - public WebKit::WebURLLoaderClient { + public blink::WebPlugin, + public blink::WebURLLoaderClient { public: WebPluginImpl( - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, + blink::WebFrame* frame, + const blink::WebPluginParams& params, const base::FilePath& file_path, const base::WeakPtr<RenderViewImpl>& render_view); virtual ~WebPluginImpl(); // Helper function for sorting post data. - CONTENT_EXPORT static bool SetPostData(WebKit::WebURLRequest* request, + CONTENT_EXPORT static bool SetPostData(blink::WebURLRequest* request, const char* buf, uint32 length); - WebKit::WebFrame* webframe() { return webframe_; } + blink::WebFrame* webframe() { return webframe_; } WebPluginDelegate* delegate() { return delegate_; } - // WebKit::WebPlugin methods: + // blink::WebPlugin methods: virtual bool initialize( - WebKit::WebPluginContainer* container); + blink::WebPluginContainer* container); virtual void destroy(); virtual NPObject* scriptableObject(); virtual struct _NPP* pluginNPP(); - virtual bool getFormValue(WebKit::WebString& value); + virtual bool getFormValue(blink::WebString& value); virtual void paint( - WebKit::WebCanvas* canvas, const WebKit::WebRect& paint_rect); + blink::WebCanvas* canvas, const blink::WebRect& paint_rect); virtual void updateGeometry( - const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect, - const WebKit::WebVector<WebKit::WebRect>& cut_outs, bool is_visible); + const blink::WebRect& frame_rect, const blink::WebRect& clip_rect, + const blink::WebVector<blink::WebRect>& cut_outs, bool is_visible); virtual void updateFocus(bool focused); virtual void updateVisibility(bool visible); virtual bool acceptsInputEvents(); virtual bool handleInputEvent( - const WebKit::WebInputEvent& event, WebKit::WebCursorInfo& cursor_info); - virtual void didReceiveResponse(const WebKit::WebURLResponse& response); + const blink::WebInputEvent& event, blink::WebCursorInfo& cursor_info); + virtual void didReceiveResponse(const blink::WebURLResponse& response); virtual void didReceiveData(const char* data, int data_length); virtual void didFinishLoading(); - virtual void didFailLoading(const WebKit::WebURLError& error); + virtual void didFailLoading(const blink::WebURLError& error); virtual void didFinishLoadingFrameRequest( - const WebKit::WebURL& url, void* notify_data); + const blink::WebURL& url, void* notify_data); virtual void didFailLoadingFrameRequest( - const WebKit::WebURL& url, void* notify_data, - const WebKit::WebURLError& error); + const blink::WebURL& url, void* notify_data, + const blink::WebURLError& error); virtual bool isPlaceholder() OVERRIDE; // WebPlugin implementation: @@ -200,31 +200,31 @@ class WebPluginImpl : public WebPlugin, gfx::Rect GetWindowClipRect(const gfx::Rect& rect); // Sets the actual Widget for the plugin. - void SetContainer(WebKit::WebPluginContainer* container); + void SetContainer(blink::WebPluginContainer* container); // Destroys the plugin instance. // The response_handle_to_ignore parameter if not NULL indicates the // resource handle to be left valid during plugin shutdown. - void TearDownPluginInstance(WebKit::WebURLLoader* loader_to_ignore); + void TearDownPluginInstance(blink::WebURLLoader* loader_to_ignore); // WebURLLoaderClient implementation. We implement this interface in the // renderer process, and then use the simple WebPluginResourceClient interface // to relay the callbacks to the plugin. - virtual void willSendRequest(WebKit::WebURLLoader* loader, - WebKit::WebURLRequest& request, - const WebKit::WebURLResponse& response); - virtual void didSendData(WebKit::WebURLLoader* loader, + virtual void willSendRequest(blink::WebURLLoader* loader, + blink::WebURLRequest& request, + const blink::WebURLResponse& response); + virtual void didSendData(blink::WebURLLoader* loader, unsigned long long bytes_sent, unsigned long long total_bytes_to_be_sent); - virtual void didReceiveResponse(WebKit::WebURLLoader* loader, - const WebKit::WebURLResponse& response); + virtual void didReceiveResponse(blink::WebURLLoader* loader, + const blink::WebURLResponse& response); - virtual void didReceiveData(WebKit::WebURLLoader* loader, const char *buffer, + virtual void didReceiveData(blink::WebURLLoader* loader, const char *buffer, int data_length, int encoded_data_length); - virtual void didFinishLoading(WebKit::WebURLLoader* loader, + virtual void didFinishLoading(blink::WebURLLoader* loader, double finishTime); - virtual void didFail(WebKit::WebURLLoader* loader, - const WebKit::WebURLError& error); + virtual void didFail(blink::WebURLLoader* loader, + const blink::WebURLError& error); // Helper function to remove the stored information about a resource // request given its index in m_clients. @@ -232,13 +232,13 @@ class WebPluginImpl : public WebPlugin, // Helper function to remove the stored information about a resource // request given a handle. - void RemoveClient(WebKit::WebURLLoader* loader); + void RemoveClient(blink::WebURLLoader* loader); // Handles HTTP multipart responses, i.e. responses received with a HTTP // status code of 206. // Returns false if response is not multipart (may be if we requested // single range). - bool HandleHttpMultipartResponse(const WebKit::WebURLResponse& response, + bool HandleHttpMultipartResponse(const blink::WebURLResponse& response, WebPluginResourceClient* client); void HandleURLRequestInternal(const char* url, @@ -254,7 +254,7 @@ class WebPluginImpl : public WebPlugin, // Tears down the existing plugin instance and creates a new plugin instance // to handle the response identified by the loader parameter. - bool ReinitializePluginForResponse(WebKit::WebURLLoader* loader); + bool ReinitializePluginForResponse(blink::WebURLLoader* loader); // Delayed task for downloading the plugin source URL. void OnDownloadPluginSrcUrl(); @@ -262,11 +262,11 @@ class WebPluginImpl : public WebPlugin, struct ClientInfo; // Helper functions - WebPluginResourceClient* GetClientFromLoader(WebKit::WebURLLoader* loader); - ClientInfo* GetClientInfoFromLoader(WebKit::WebURLLoader* loader); + WebPluginResourceClient* GetClientFromLoader(blink::WebURLLoader* loader); + ClientInfo* GetClientInfoFromLoader(blink::WebURLLoader* loader); // Helper function to set the referrer on the request passed in. - void SetReferrer(WebKit::WebURLRequest* request, Referrer referrer_flag); + void SetReferrer(blink::WebURLRequest* request, Referrer referrer_flag); // Check for invalid chars like @, ;, \ before the first / (in path). bool IsValidUrl(const GURL& url, Referrer referrer_flag); @@ -283,16 +283,16 @@ class WebPluginImpl : public WebPlugin, int32 next_io_surface_height_; uint32 next_io_surface_id_; scoped_refptr<cc::IOSurfaceLayer> io_surface_layer_; - scoped_ptr<WebKit::WebLayer> web_layer_; + scoped_ptr<blink::WebLayer> web_layer_; #endif bool accepts_input_events_; base::WeakPtr<RenderViewImpl> render_view_; - WebKit::WebFrame* webframe_; + blink::WebFrame* webframe_; WebPluginDelegate* delegate_; // This is just a weak reference. - WebKit::WebPluginContainer* container_; + blink::WebPluginContainer* container_; // Unique identifier for this plugin, used to track script objects. struct _NPP* npp_; diff --git a/content/renderer/npapi/webplugin_impl_unittest.cc b/content/renderer/npapi/webplugin_impl_unittest.cc index df1371c..dd3b83e 100644 --- a/content/renderer/npapi/webplugin_impl_unittest.cc +++ b/content/renderer/npapi/webplugin_impl_unittest.cc @@ -9,9 +9,9 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" -using WebKit::WebHTTPBody; -using WebKit::WebString; -using WebKit::WebURLRequest; +using blink::WebHTTPBody; +using blink::WebString; +using blink::WebURLRequest; namespace content { diff --git a/content/renderer/p2p/port_allocator.cc b/content/renderer/p2p/port_allocator.cc index 2c5b8e4..280e04d 100644 --- a/content/renderer/p2p/port_allocator.cc +++ b/content/renderer/p2p/port_allocator.cc @@ -21,12 +21,12 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebURLLoaderOptions.h" -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLLoader; -using WebKit::WebURLLoaderOptions; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebString; +using blink::WebURL; +using blink::WebURLLoader; +using blink::WebURLLoaderOptions; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { @@ -69,7 +69,7 @@ P2PPortAllocator::Config::RelayServerConfig::~RelayServerConfig() { } P2PPortAllocator::P2PPortAllocator( - WebKit::WebFrame* web_frame, + blink::WebFrame* web_frame, P2PSocketDispatcher* socket_dispatcher, talk_base::NetworkManager* network_manager, talk_base::PacketSocketFactory* socket_factory, @@ -153,8 +153,8 @@ void P2PPortAllocatorSession::didFinishLoading(WebURLLoader* loader, ParseRelayResponse(); } -void P2PPortAllocatorSession::didFail(WebKit::WebURLLoader* loader, - const WebKit::WebURLError& error) { +void P2PPortAllocatorSession::didFail(blink::WebURLLoader* loader, + const blink::WebURLError& error) { DCHECK_EQ(loader, relay_session_request_.get()); DCHECK_NE(error.reason, 0); diff --git a/content/renderer/p2p/port_allocator.h b/content/renderer/p2p/port_allocator.h index 5c0a4fc..eb50aef 100644 --- a/content/renderer/p2p/port_allocator.h +++ b/content/renderer/p2p/port_allocator.h @@ -11,10 +11,10 @@ #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" #include "third_party/libjingle/source/talk/p2p/client/basicportallocator.h" -namespace WebKit { +namespace blink { class WebFrame; class WebURLLoader; -} // namespace WebKit +} // namespace blink namespace content { @@ -54,7 +54,7 @@ class P2PPortAllocator : public cricket::BasicPortAllocator { bool disable_tcp_transport; }; - P2PPortAllocator(WebKit::WebFrame* web_frame, + P2PPortAllocator(blink::WebFrame* web_frame, P2PSocketDispatcher* socket_dispatcher, talk_base::NetworkManager* network_manager, talk_base::PacketSocketFactory* socket_factory, @@ -70,7 +70,7 @@ class P2PPortAllocator : public cricket::BasicPortAllocator { private: friend class P2PPortAllocatorSession; - WebKit::WebFrame* web_frame_; + blink::WebFrame* web_frame_; P2PSocketDispatcher* socket_dispatcher_; Config config_; @@ -78,7 +78,7 @@ class P2PPortAllocator : public cricket::BasicPortAllocator { }; class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession, - public WebKit::WebURLLoaderClient { + public blink::WebURLLoaderClient { public: P2PPortAllocatorSession( P2PPortAllocator* allocator, @@ -88,15 +88,15 @@ class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession, const std::string& ice_password); virtual ~P2PPortAllocatorSession(); - // WebKit::WebURLLoaderClient overrides. - virtual void didReceiveData(WebKit::WebURLLoader* loader, + // blink::WebURLLoaderClient overrides. + virtual void didReceiveData(blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length) OVERRIDE; - virtual void didFinishLoading(WebKit::WebURLLoader* loader, + virtual void didFinishLoading(blink::WebURLLoader* loader, double finish_time) OVERRIDE; - virtual void didFail(WebKit::WebURLLoader* loader, - const WebKit::WebURLError& error) OVERRIDE; + virtual void didFail(blink::WebURLLoader* loader, + const blink::WebURLError& error) OVERRIDE; protected: // Overrides for cricket::BasicPortAllocatorSession. @@ -134,7 +134,7 @@ class P2PPortAllocatorSession : public cricket::BasicPortAllocatorSession, std::vector<RelayServer> relay_info_; - scoped_ptr<WebKit::WebURLLoader> relay_session_request_; + scoped_ptr<blink::WebURLLoader> relay_session_request_; int relay_session_attempts_; std::string relay_session_response_; talk_base::SocketAddress relay_ip_; diff --git a/content/renderer/pepper/content_renderer_pepper_host_factory.cc b/content/renderer/pepper/content_renderer_pepper_host_factory.cc index 0b59503..5877439 100644 --- a/content/renderer/pepper/content_renderer_pepper_host_factory.cc +++ b/content/renderer/pepper/content_renderer_pepper_host_factory.cc @@ -39,7 +39,7 @@ namespace { bool CanUseMediaStreamAPI(const RendererPpapiHost* host, PP_Instance instance) { - WebKit::WebPluginContainer* container = + blink::WebPluginContainer* container = host->GetContainerForInstance(instance); if (!container) return false; diff --git a/content/renderer/pepper/event_conversion.cc b/content/renderer/pepper/event_conversion.cc index 0df4895..b7c0601 100644 --- a/content/renderer/pepper/event_conversion.cc +++ b/content/renderer/pepper/event_conversion.cc @@ -26,14 +26,14 @@ using ppapi::EventTimeToPPTimeTicks; using ppapi::InputEventData; using ppapi::PPTimeTicksToEventTime; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebString; -using WebKit::WebTouchEvent; -using WebKit::WebTouchPoint; -using WebKit::WebUChar; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebString; +using blink::WebTouchEvent; +using blink::WebTouchPoint; +using blink::WebUChar; namespace content { diff --git a/content/renderer/pepper/event_conversion.h b/content/renderer/pepper/event_conversion.h index edaa730..81aa6b3 100644 --- a/content/renderer/pepper/event_conversion.h +++ b/content/renderer/pepper/event_conversion.h @@ -17,7 +17,7 @@ namespace ppapi { struct InputEventData; } -namespace WebKit { +namespace blink { class WebGamepads; class WebInputEvent; } @@ -27,24 +27,24 @@ namespace content { // Converts the given WebKit event to one or possibly multiple PP_InputEvents. // The generated events will be filled into the given vector. On failure, no // events will ge generated and the vector will be empty. -void CreateInputEventData(const WebKit::WebInputEvent& event, +void CreateInputEventData(const blink::WebInputEvent& event, std::vector<ppapi::InputEventData >* pp_events); // Creates a WebInputEvent from the given PP_InputEvent. If it fails, returns // NULL. The caller owns the created object on success. -WebKit::WebInputEvent* CreateWebInputEvent(const ppapi::InputEventData& event); +blink::WebInputEvent* CreateWebInputEvent(const ppapi::InputEventData& event); // Creates an array of WebInputEvents to make the given event look like a user // input event on all platforms. |plugin_x| and |plugin_y| should be the // coordinates of a point within the plugin's area on the page. -std::vector<linked_ptr<WebKit::WebInputEvent> > CreateSimulatedWebInputEvents( +std::vector<linked_ptr<blink::WebInputEvent> > CreateSimulatedWebInputEvents( const ppapi::InputEventData& event, int plugin_x, int plugin_y); // Returns the PPAPI event class for the given WebKit event type. The given // type should not be "Undefined" since there's no corresponding PPAPI class. -PP_InputEvent_Class ClassifyInputEvent(WebKit::WebInputEvent::Type type); +PP_InputEvent_Class ClassifyInputEvent(blink::WebInputEvent::Type type); } // namespace content diff --git a/content/renderer/pepper/fullscreen_container.h b/content/renderer/pepper/fullscreen_container.h index 81ee53d..d91cc66 100644 --- a/content/renderer/pepper/fullscreen_container.h +++ b/content/renderer/pepper/fullscreen_container.h @@ -5,11 +5,11 @@ #ifndef CONTENT_RENDERER_PEPPER_PPB_FULLSCREEN_CONTAINER_IMPL_H_ #define CONTENT_RENDERER_PEPPER_PPB_FULLSCREEN_CONTAINER_IMPL_H_ -namespace WebKit { +namespace blink { class WebLayer; struct WebCursorInfo; struct WebRect; -} // namespace WebKit +} // namespace blink namespace content { @@ -21,19 +21,19 @@ class FullscreenContainer { virtual void Invalidate() = 0; // Invalidates a partial region of the plugin. - virtual void InvalidateRect(const WebKit::WebRect&) = 0; + virtual void InvalidateRect(const blink::WebRect&) = 0; // Scrolls a partial region of the plugin in the given direction. - virtual void ScrollRect(int dx, int dy, const WebKit::WebRect&) = 0; + virtual void ScrollRect(int dx, int dy, const blink::WebRect&) = 0; // Destroys the fullscreen window. This also destroys the FullscreenContainer // instance. virtual void Destroy() = 0; // Notifies the container that the mouse cursor has changed. - virtual void DidChangeCursor(const WebKit::WebCursorInfo& cursor) = 0; + virtual void DidChangeCursor(const blink::WebCursorInfo& cursor) = 0; - virtual void SetLayer(WebKit::WebLayer* layer) = 0; + virtual void SetLayer(blink::WebLayer* layer) = 0; protected: virtual ~FullscreenContainer() {} diff --git a/content/renderer/pepper/host_array_buffer_var.cc b/content/renderer/pepper/host_array_buffer_var.cc index b6b719d..d8d4cec 100644 --- a/content/renderer/pepper/host_array_buffer_var.cc +++ b/content/renderer/pepper/host_array_buffer_var.cc @@ -18,7 +18,7 @@ #include "ppapi/c/pp_instance.h" using ppapi::ArrayBufferVar; -using WebKit::WebArrayBuffer; +using blink::WebArrayBuffer; namespace content { diff --git a/content/renderer/pepper/host_array_buffer_var.h b/content/renderer/pepper/host_array_buffer_var.h index 9ba1d7c..13bd806 100644 --- a/content/renderer/pepper/host_array_buffer_var.h +++ b/content/renderer/pepper/host_array_buffer_var.h @@ -17,7 +17,7 @@ namespace content { class HostArrayBufferVar : public ppapi::ArrayBufferVar { public: explicit HostArrayBufferVar(uint32 size_in_bytes); - explicit HostArrayBufferVar(const WebKit::WebArrayBuffer& buffer); + explicit HostArrayBufferVar(const blink::WebArrayBuffer& buffer); explicit HostArrayBufferVar(uint32 size_in_bytes, base::SharedMemoryHandle handle); @@ -30,12 +30,12 @@ class HostArrayBufferVar : public ppapi::ArrayBufferVar { int* host_shm_handle_id, base::SharedMemoryHandle* plugin_shm_handle) OVERRIDE; - WebKit::WebArrayBuffer& webkit_buffer() { return buffer_; } + blink::WebArrayBuffer& webkit_buffer() { return buffer_; } private: virtual ~HostArrayBufferVar(); - WebKit::WebArrayBuffer buffer_; + blink::WebArrayBuffer buffer_; // Tracks whether the data in the buffer is valid. bool valid_; diff --git a/content/renderer/pepper/host_globals.cc b/content/renderer/pepper/host_globals.cc index 1fbbaf8..31c5f0b 100644 --- a/content/renderer/pepper/host_globals.cc +++ b/content/renderer/pepper/host_globals.cc @@ -29,14 +29,14 @@ using ppapi::CheckIdType; using ppapi::MakeTypedId; using ppapi::PPIdType; using ppapi::ResourceTracker; -using WebKit::WebConsoleMessage; -using WebKit::WebString; +using blink::WebConsoleMessage; +using blink::WebString; namespace content { namespace { -typedef std::set<WebKit::WebPluginContainer*> ContainerSet; +typedef std::set<blink::WebPluginContainer*> ContainerSet; // Adds all WebPluginContainers associated with the given module to the set. void GetAllContainersForModule(PluginModule* module, diff --git a/content/renderer/pepper/host_var_tracker_unittest.cc b/content/renderer/pepper/host_var_tracker_unittest.cc index 24932db..0486805 100644 --- a/content/renderer/pepper/host_var_tracker_unittest.cc +++ b/content/renderer/pepper/host_var_tracker_unittest.cc @@ -59,7 +59,7 @@ NPObject* NewTrackedNPObject() { class ReleaseNPObject { public: void operator()(NPObject* o) const { - WebKit::WebBindings::releaseObject(o); + blink::WebBindings::releaseObject(o); } }; diff --git a/content/renderer/pepper/message_channel.cc b/content/renderer/pepper/message_channel.cc index 32f21a4..8516777 100644 --- a/content/renderer/pepper/message_channel.cc +++ b/content/renderer/pepper/message_channel.cc @@ -32,12 +32,12 @@ using ppapi::ArrayBufferVar; using ppapi::PpapiGlobals; using ppapi::StringVar; -using WebKit::WebBindings; -using WebKit::WebElement; -using WebKit::WebDOMEvent; -using WebKit::WebDOMMessageEvent; -using WebKit::WebPluginContainer; -using WebKit::WebSerializedScriptValue; +using blink::WebBindings; +using blink::WebElement; +using blink::WebDOMEvent; +using blink::WebDOMMessageEvent; +using blink::WebPluginContainer; +using blink::WebSerializedScriptValue; namespace content { diff --git a/content/renderer/pepper/message_channel.h b/content/renderer/pepper/message_channel.h index f577224..c7eb215 100644 --- a/content/renderer/pepper/message_channel.h +++ b/content/renderer/pepper/message_channel.h @@ -111,7 +111,7 @@ class MessageChannel { // Post a message to the onmessage handler for this channel's instance // synchronously. This is used by PostMessageToJavaScript. void PostMessageToJavaScriptImpl( - const WebKit::WebSerializedScriptValue& message_data); + const blink::WebSerializedScriptValue& message_data); // Post a message to the PPP_Instance HandleMessage function for this // channel's instance. This is used by PostMessageToNative. void PostMessageToNativeImpl(PP_Var message_data); @@ -120,7 +120,7 @@ class MessageChannel { // TODO(teravest): Remove all the tricky DRAIN_CANCELLED logic once // PluginInstance::ResetAsProxied() is gone. - std::deque<WebKit::WebSerializedScriptValue> early_message_queue_; + std::deque<blink::WebSerializedScriptValue> early_message_queue_; enum EarlyMessageQueueState { QUEUE_MESSAGES, // Queue JS messages. SEND_DIRECTLY, // Post JS messages directly. diff --git a/content/renderer/pepper/mock_renderer_ppapi_host.cc b/content/renderer/pepper/mock_renderer_ppapi_host.cc index 76231778..69a4e80 100644 --- a/content/renderer/pepper/mock_renderer_ppapi_host.cc +++ b/content/renderer/pepper/mock_renderer_ppapi_host.cc @@ -41,7 +41,7 @@ RenderView* MockRendererPpapiHost::GetRenderViewForInstance( return NULL; } -WebKit::WebPluginContainer* MockRendererPpapiHost::GetContainerForInstance( +blink::WebPluginContainer* MockRendererPpapiHost::GetContainerForInstance( PP_Instance instance) const { NOTIMPLEMENTED(); return NULL; diff --git a/content/renderer/pepper/mock_renderer_ppapi_host.h b/content/renderer/pepper/mock_renderer_ppapi_host.h index 5a85a1b..2d534787 100644 --- a/content/renderer/pepper/mock_renderer_ppapi_host.h +++ b/content/renderer/pepper/mock_renderer_ppapi_host.h @@ -37,7 +37,7 @@ class MockRendererPpapiHost : public RendererPpapiHost { PP_Instance instance) const OVERRIDE; virtual RenderView* GetRenderViewForInstance( PP_Instance instance) const OVERRIDE; - virtual WebKit::WebPluginContainer* GetContainerForInstance( + virtual blink::WebPluginContainer* GetContainerForInstance( PP_Instance instance) const OVERRIDE; virtual base::ProcessId GetPluginPID() const OVERRIDE; virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; diff --git a/content/renderer/pepper/npapi_glue.cc b/content/renderer/pepper/npapi_glue.cc index 678a410..8489c4d 100644 --- a/content/renderer/pepper/npapi_glue.cc +++ b/content/renderer/pepper/npapi_glue.cc @@ -28,10 +28,10 @@ using ppapi::NPObjectVar; using ppapi::PpapiGlobals; using ppapi::StringVar; using ppapi::Var; -using WebKit::WebArrayBuffer; -using WebKit::WebBindings; -using WebKit::WebFrame; -using WebKit::WebPluginContainer; +using blink::WebArrayBuffer; +using blink::WebBindings; +using blink::WebFrame; +using blink::WebPluginContainer; namespace content { diff --git a/content/renderer/pepper/npobject_var.cc b/content/renderer/pepper/npobject_var.cc index 690dd22..c45d0d2 100644 --- a/content/renderer/pepper/npobject_var.cc +++ b/content/renderer/pepper/npobject_var.cc @@ -10,7 +10,7 @@ #include "ppapi/c/pp_var.h" #include "third_party/WebKit/public/web/WebBindings.h" -using WebKit::WebBindings; +using blink::WebBindings; namespace ppapi { diff --git a/content/renderer/pepper/pepper_file_chooser_host.cc b/content/renderer/pepper/pepper_file_chooser_host.cc index e73694a..ca13f5a 100644 --- a/content/renderer/pepper/pepper_file_chooser_host.cc +++ b/content/renderer/pepper/pepper_file_chooser_host.cc @@ -22,7 +22,7 @@ namespace content { class PepperFileChooserHost::CompletionHandler - : public WebKit::WebFileChooserCompletion { + : public blink::WebFileChooserCompletion { public: CompletionHandler(const base::WeakPtr<PepperFileChooserHost>& host) : host_(host) { @@ -31,7 +31,7 @@ class PepperFileChooserHost::CompletionHandler virtual ~CompletionHandler() {} virtual void didChooseFile( - const WebKit::WebVector<WebKit::WebString>& file_names) { + const blink::WebVector<blink::WebString>& file_names) { if (host_.get()) { std::vector<PepperFileChooserHost::ChosenFileInfo> files; for (size_t i = 0; i < file_names.size(); i++) { @@ -45,7 +45,7 @@ class PepperFileChooserHost::CompletionHandler delete this; } virtual void didChooseFile( - const WebKit::WebVector<SelectedFileInfo>& file_names) { + const blink::WebVector<SelectedFileInfo>& file_names) { if (host_.get()) { std::vector<PepperFileChooserHost::ChosenFileInfo> files; for (size_t i = 0; i < file_names.size(); i++) { @@ -145,17 +145,17 @@ int32_t PepperFileChooserHost::OnShow( return PP_ERROR_NO_USER_GESTURE; } - WebKit::WebFileChooserParams params; + blink::WebFileChooserParams params; if (save_as) { params.saveAs = true; - params.initialValue = WebKit::WebString::fromUTF8( + params.initialValue = blink::WebString::fromUTF8( suggested_file_name.data(), suggested_file_name.size()); } else { params.multiSelect = open_multiple; } - std::vector<WebKit::WebString> mine_types(accept_mime_types.size()); + std::vector<blink::WebString> mine_types(accept_mime_types.size()); for (size_t i = 0; i < accept_mime_types.size(); i++) { - mine_types[i] = WebKit::WebString::fromUTF8( + mine_types[i] = blink::WebString::fromUTF8( accept_mime_types[i].data(), accept_mime_types[i].size()); } params.acceptTypes = mine_types; diff --git a/content/renderer/pepper/pepper_graphics_2d_host.cc b/content/renderer/pepper/pepper_graphics_2d_host.cc index c13931d..fc108c7 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.cc +++ b/content/renderer/pepper/pepper_graphics_2d_host.cc @@ -322,7 +322,7 @@ bool PepperGraphics2DHost::BindToInstance( // The |backing_bitmap| must be clipped to the |plugin_rect| to avoid painting // outside the plugin area. This can happen if the plugin has been resized since // PaintImageData verified the image is within the plugin size. -void PepperGraphics2DHost::Paint(WebKit::WebCanvas* canvas, +void PepperGraphics2DHost::Paint(blink::WebCanvas* canvas, const gfx::Rect& plugin_rect, const gfx::Rect& paint_rect) { TRACE_EVENT0("pepper", "PepperGraphics2DHost::Paint"); diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h index eff359d..0ad0594 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.h +++ b/content/renderer/pepper/pepper_graphics_2d_host.h @@ -58,7 +58,7 @@ class CONTENT_EXPORT PepperGraphics2DHost // is already bound to a different instance, and nothing will happen. bool BindToInstance(PepperPluginInstanceImpl* new_instance); // Paints the current backing store to the web page. - void Paint(WebKit::WebCanvas* canvas, + void Paint(blink::WebCanvas* canvas, const gfx::Rect& plugin_rect, const gfx::Rect& paint_rect); diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index 056a356..4793ab1 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -152,27 +152,27 @@ using ppapi::thunk::PPB_ImageData_API; using ppapi::Var; using ppapi::ArrayBufferVar; using ppapi::ViewData; -using WebKit::WebBindings; -using WebKit::WebCanvas; -using WebKit::WebCursorInfo; -using WebKit::WebDocument; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebInputEvent; -using WebKit::WebPlugin; -using WebKit::WebPluginContainer; -using WebKit::WebPrintParams; -using WebKit::WebPrintScalingOption; -using WebKit::WebScopedUserGesture; -using WebKit::WebString; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLLoaderClient; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; -using WebKit::WebUserGestureIndicator; -using WebKit::WebUserGestureToken; -using WebKit::WebView; +using blink::WebBindings; +using blink::WebCanvas; +using blink::WebCursorInfo; +using blink::WebDocument; +using blink::WebElement; +using blink::WebFrame; +using blink::WebInputEvent; +using blink::WebPlugin; +using blink::WebPluginContainer; +using blink::WebPrintParams; +using blink::WebPrintScalingOption; +using blink::WebScopedUserGesture; +using blink::WebString; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLLoaderClient; +using blink::WebURLRequest; +using blink::WebURLResponse; +using blink::WebUserGestureIndicator; +using blink::WebUserGestureToken; +using blink::WebView; namespace content { @@ -302,20 +302,20 @@ COMPILE_ASSERT_MATCHING_ENUM(TypeGrabbing, PP_MOUSECURSOR_TYPE_GRABBING); // Do not assert WebCursorInfo::TypeCustom == PP_CURSORTYPE_CUSTOM; // PP_CURSORTYPE_CUSTOM is pinned to allow new cursor types. -COMPILE_ASSERT_PRINT_SCALING_MATCHING_ENUM(WebKit::WebPrintScalingOptionNone, +COMPILE_ASSERT_PRINT_SCALING_MATCHING_ENUM(blink::WebPrintScalingOptionNone, PP_PRINTSCALINGOPTION_NONE); COMPILE_ASSERT_PRINT_SCALING_MATCHING_ENUM( - WebKit::WebPrintScalingOptionFitToPrintableArea, + blink::WebPrintScalingOptionFitToPrintableArea, PP_PRINTSCALINGOPTION_FIT_TO_PRINTABLE_AREA); COMPILE_ASSERT_PRINT_SCALING_MATCHING_ENUM( - WebKit::WebPrintScalingOptionSourceSize, PP_PRINTSCALINGOPTION_SOURCE_SIZE); + blink::WebPrintScalingOptionSourceSize, PP_PRINTSCALINGOPTION_SOURCE_SIZE); // Sets |*security_origin| to be the WebKit security origin associated with the // document containing the given plugin instance. On success, returns true. If // the instance is invalid, returns false and |*security_origin| will be // unchanged. bool SecurityOriginForInstance(PP_Instance instance_id, - WebKit::WebSecurityOrigin* security_origin) { + blink::WebSecurityOrigin* security_origin) { PepperPluginInstanceImpl* instance = HostGlobals::Get()->GetInstance(instance_id); if (!instance) @@ -341,13 +341,13 @@ scoped_ptr<const char*[]> StringVectorToArgArray( // a plugin. Some poorly behaving plugins (like Flash) incorrectly report that // they handle all keys sent to them. This can prevent keystrokes from working // for things like screen brightness and volume control. -bool IsReservedSystemInputEvent(const WebKit::WebInputEvent& event) { +bool IsReservedSystemInputEvent(const blink::WebInputEvent& event) { #if defined(OS_CHROMEOS) if (event.type != WebInputEvent::KeyDown && event.type != WebInputEvent::KeyUp) return false; - const WebKit::WebKeyboardEvent& key_event = - static_cast<const WebKit::WebKeyboardEvent&>(event); + const blink::WebKeyboardEvent& key_event = + static_cast<const blink::WebKeyboardEvent&>(event); switch (key_event.windowsKeyCode) { case ui::VKEY_BRIGHTNESS_DOWN: case ui::VKEY_BRIGHTNESS_UP: @@ -378,7 +378,7 @@ class PluginInstanceLockTarget : public MouseLockDispatcher::LockTarget { } virtual bool HandleMouseLockedInputEvent( - const WebKit::WebMouseEvent &event) OVERRIDE { + const blink::WebMouseEvent &event) OVERRIDE { plugin_->HandleMouseLockedInputEvent(event); return true; } @@ -466,7 +466,7 @@ PPB_Gamepad_API* PepperPluginInstanceImpl::GamepadImpl::AsPPB_Gamepad_API() { void PepperPluginInstanceImpl::GamepadImpl::Sample( PP_Instance instance, PP_GamepadsSampleData* data) { - WebKit::WebGamepads webkit_data; + blink::WebGamepads webkit_data; RenderThreadImpl::current()->SampleGamepads(&webkit_data); ConvertWebKitGamepadData( bit_cast<ppapi::WebKitGamepads>(webkit_data), data); @@ -769,7 +769,7 @@ bool PepperPluginInstanceImpl::Initialize( } bool PepperPluginInstanceImpl::HandleDocumentLoad( - const WebKit::WebURLResponse& response) { + const blink::WebURLResponse& response) { DCHECK(!document_loader_); if (external_document_load_) { // The external proxy isn't available, so save the response and record @@ -825,7 +825,7 @@ bool PepperPluginInstanceImpl::HandleDocumentLoad( bool PepperPluginInstanceImpl::SendCompositionEventToPlugin( PP_InputEvent_Type type, const base::string16& text) { - std::vector<WebKit::WebCompositionUnderline> empty; + std::vector<blink::WebCompositionUnderline> empty; return SendCompositionEventWithUnderlineInformationToPlugin( type, text, empty, static_cast<int>(text.size()), static_cast<int>(text.size())); @@ -835,7 +835,7 @@ bool PepperPluginInstanceImpl:: SendCompositionEventWithUnderlineInformationToPlugin( PP_InputEvent_Type type, const base::string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { // Keep a reference on the stack. See NOTE above. @@ -924,7 +924,7 @@ bool PepperPluginInstanceImpl::HandleCompositionStart( bool PepperPluginInstanceImpl::HandleCompositionUpdate( const base::string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { return SendCompositionEventWithUnderlineInformationToPlugin( @@ -979,7 +979,7 @@ gfx::Rect PepperPluginInstanceImpl::GetCaretBounds() const { } bool PepperPluginInstanceImpl::HandleInputEvent( - const WebKit::WebInputEvent& event, + const blink::WebInputEvent& event, WebCursorInfo* cursor_info) { TRACE_EVENT0("ppapi", "PepperPluginInstanceImpl::HandleInputEvent"); @@ -1448,8 +1448,8 @@ void PepperPluginInstanceImpl::UpdateTouchEventRequest() { bool raw_touch = (filtered_input_event_mask_ & PP_INPUTEVENT_CLASS_TOUCH) || (input_event_mask_ & PP_INPUTEVENT_CLASS_TOUCH); container_->requestTouchEventType(raw_touch ? - WebKit::WebPluginContainer::TouchEventRequestTypeRaw : - WebKit::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse); + blink::WebPluginContainer::TouchEventRequestTypeRaw : + blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse); } bool PepperPluginInstanceImpl::IsAcceptingWheelEvents() const { @@ -1575,7 +1575,7 @@ int PepperPluginInstanceImpl::PrintBegin(const WebPrintParams& print_params) { } bool PepperPluginInstanceImpl::PrintPage(int page_number, - WebKit::WebCanvas* canvas) { + blink::WebCanvas* canvas) { #if defined(ENABLE_FULL_PRINTING) DCHECK(plugin_print_interface_); PP_PrintPageNumberRange_Dev page_range; @@ -1601,7 +1601,7 @@ bool PepperPluginInstanceImpl::PrintPage(int page_number, bool PepperPluginInstanceImpl::PrintPageHelper( PP_PrintPageNumberRange_Dev* page_ranges, int num_ranges, - WebKit::WebCanvas* canvas) { + blink::WebCanvas* canvas) { // Keep a reference on the stack. See NOTE above. scoped_refptr<PepperPluginInstanceImpl> ref(this); DCHECK(plugin_print_interface_); @@ -1755,7 +1755,7 @@ bool PepperPluginInstanceImpl::IsViewAccelerated() { } bool PepperPluginInstanceImpl::PrintPDFOutput(PP_Resource print_output, - WebKit::WebCanvas* canvas) { + blink::WebCanvas* canvas) { #if defined(ENABLE_FULL_PRINTING) ppapi::thunk::EnterResourceNoLock<PPB_Buffer_API> enter(print_output, true); if (enter.failed()) @@ -1959,9 +1959,9 @@ void PepperPluginInstanceImpl::OnMouseLockLost() { } void PepperPluginInstanceImpl::HandleMouseLockedInputEvent( - const WebKit::WebMouseEvent& event) { + const blink::WebMouseEvent& event) { // |cursor_info| is ignored since it is hidden when the mouse is locked. - WebKit::WebCursorInfo cursor_info; + blink::WebCursorInfo cursor_info; HandleInputEvent(event, &cursor_info); } @@ -2021,9 +2021,9 @@ void PepperPluginInstanceImpl::SimulateImeSetCompositionEvent( base::string16 utf16_text = base::UTF8ToUTF16AndAdjustOffsets(input_event.character_text, &offsets); - std::vector<WebKit::WebCompositionUnderline> underlines; + std::vector<blink::WebCompositionUnderline> underlines; for (size_t i = 2; i + 1 < offsets.size(); ++i) { - WebKit::WebCompositionUnderline underline; + blink::WebCompositionUnderline underline; underline.startOffset = offsets[i]; underline.endOffset = offsets[i + 1]; if (input_event.composition_target_segment == static_cast<int32_t>(i - 2)) @@ -2175,7 +2175,7 @@ PP_Var PepperPluginInstanceImpl::ExecuteScript(PP_Instance instance, NPVariant result; bool ok = false; if (IsProcessingUserGesture()) { - WebKit::WebScopedUserGesture user_gesture(CurrentUserGestureToken()); + blink::WebScopedUserGesture user_gesture(CurrentUserGestureToken()); ok = WebBindings::evaluate(NULL, frame->windowObject(), &np_script, &result); } else { @@ -2299,7 +2299,7 @@ void PepperPluginInstanceImpl::SelectedFindResultChanged(PP_Instance instance, int32_t index) { DCHECK_NE(find_identifier_, -1); render_view_->reportFindInPageSelection( - find_identifier_, index + 1, WebKit::WebRect()); + find_identifier_, index + 1, blink::WebRect()); } PP_Bool PepperPluginInstanceImpl::IsFullscreen(PP_Instance instance) { @@ -2313,7 +2313,7 @@ PP_Bool PepperPluginInstanceImpl::SetFullscreen(PP_Instance instance, PP_Bool PepperPluginInstanceImpl::GetScreenSize(PP_Instance instance, PP_Size* size) { - WebKit::WebScreenInfo info = render_view_->screenInfo(); + blink::WebScreenInfo info = render_view_->screenInfo(); *size = PP_MakeSize(info.rect.width, info.rect.height); return PP_TRUE; } @@ -2537,7 +2537,7 @@ PP_Bool PepperPluginInstanceImpl::DocumentCanRequest(PP_Instance instance, if (!url_string) return PP_FALSE; - WebKit::WebSecurityOrigin security_origin; + blink::WebSecurityOrigin security_origin; if (!SecurityOriginForInstance(instance, &security_origin)) return PP_FALSE; @@ -2551,11 +2551,11 @@ PP_Bool PepperPluginInstanceImpl::DocumentCanRequest(PP_Instance instance, PP_Bool PepperPluginInstanceImpl::DocumentCanAccessDocument( PP_Instance instance, PP_Instance target) { - WebKit::WebSecurityOrigin our_origin; + blink::WebSecurityOrigin our_origin; if (!SecurityOriginForInstance(instance, &our_origin)) return PP_FALSE; - WebKit::WebSecurityOrigin target_origin; + blink::WebSecurityOrigin target_origin; if (!SecurityOriginForInstance(instance, &target_origin)) return PP_FALSE; @@ -2565,7 +2565,7 @@ PP_Bool PepperPluginInstanceImpl::DocumentCanAccessDocument( PP_Var PepperPluginInstanceImpl::GetDocumentURL( PP_Instance instance, PP_URLComponents_Dev* components) { - WebKit::WebDocument document = container()->element().document(); + blink::WebDocument document = container()->element().document(); return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(document.url(), components); } @@ -2580,7 +2580,7 @@ PP_Var PepperPluginInstanceImpl::GetPluginInstanceURL( PP_Var PepperPluginInstanceImpl::GetPluginReferrerURL( PP_Instance instance, PP_URLComponents_Dev* components) { - WebKit::WebDocument document = container()->element().document(); + blink::WebDocument document = container()->element().document(); if (!full_frame_) return ppapi::PPB_URLUtil_Shared::GenerateURLReturn(document.url(), components); @@ -2657,7 +2657,7 @@ PP_ExternalPluginResult PepperPluginInstanceImpl::ResetAsProxied( document_loader_ = NULL; // Pass the response to the new proxy. HandleDocumentLoad(external_document_response_); - external_document_response_ = WebKit::WebURLResponse(); + external_document_response_ = blink::WebURLResponse(); // Replay any document load events we've received to the real loader. external_document_loader_->ReplayReceivedData(document_loader_); external_document_loader_.reset(NULL); @@ -2684,7 +2684,7 @@ RenderView* PepperPluginInstanceImpl::GetRenderView() { return render_view_; } -WebKit::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() { +blink::WebPluginContainer* PepperPluginInstanceImpl::GetContainer() { return container_; } @@ -2889,14 +2889,14 @@ int PepperPluginInstanceImpl::MakePendingFileRefRendererHost( bool PepperPluginInstanceImpl::CanAccessMainFrame() const { if (!container_) return false; - WebKit::WebDocument containing_document = container_->element().document(); + blink::WebDocument containing_document = container_->element().document(); if (!containing_document.frame() || !containing_document.frame()->view() || !containing_document.frame()->view()->mainFrame()) { return false; } - WebKit::WebDocument main_document = + blink::WebDocument main_document = containing_document.frame()->view()->mainFrame()->document(); return containing_document.securityOrigin().canAccess( @@ -2914,7 +2914,7 @@ void PepperPluginInstanceImpl::KeepSizeAttributesBeforeFullscreen() { } void PepperPluginInstanceImpl::SetSizeAttributesForFullscreen() { - WebKit::WebScreenInfo info = render_view_->screenInfo(); + blink::WebScreenInfo info = render_view_->screenInfo(); screen_size_for_fullscreen_ = gfx::Size(info.rect.width, info.rect.height); std::string width = StringPrintf("%d", screen_size_for_fullscreen_.width()); std::string height = StringPrintf("%d", screen_size_for_fullscreen_.height()); @@ -2981,7 +2981,7 @@ void PepperPluginInstanceImpl::UnSetAndDeleteLockTargetAdapter() { } void PepperPluginInstanceImpl::DidDataFromWebURLResponse( - const WebKit::WebURLResponse& response, + const blink::WebURLResponse& response, int pending_host_id, const ppapi::URLResponseInfoData& data) { RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host(); diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h index 7fd13bc..cd41917 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.h +++ b/content/renderer/pepper/pepper_plugin_instance_impl.h @@ -63,7 +63,7 @@ struct _NPP; class SkBitmap; class TransportDIB; -namespace WebKit { +namespace blink { class WebInputEvent; class WebLayer; class WebMouseEvent; @@ -125,13 +125,13 @@ class CONTENT_EXPORT PepperPluginInstanceImpl static PepperPluginInstanceImpl* Create( RenderViewImpl* render_view, PluginModule* module, - WebKit::WebPluginContainer* container, + blink::WebPluginContainer* container, const GURL& plugin_url); RenderViewImpl* render_view() const { return render_view_; } PluginModule* module() const { return module_.get(); } MessageChannel& message_channel() { return *message_channel_; } - WebKit::WebPluginContainer* container() const { return container_; } + blink::WebPluginContainer* container() const { return container_; } // Returns the PP_Instance uniquely identifying this instance. Guaranteed // nonzero. @@ -148,7 +148,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl void Delete(); // Paints the current backing store to the web page. - void Paint(WebKit::WebCanvas* canvas, + void Paint(blink::WebCanvas* canvas, const gfx::Rect& plugin_rect, const gfx::Rect& paint_rect); @@ -178,9 +178,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl bool Initialize(const std::vector<std::string>& arg_names, const std::vector<std::string>& arg_values, bool full_frame); - bool HandleDocumentLoad(const WebKit::WebURLResponse& response); - bool HandleInputEvent(const WebKit::WebInputEvent& event, - WebKit::WebCursorInfo* cursor_info); + bool HandleDocumentLoad(const blink::WebURLResponse& response); + bool HandleInputEvent(const blink::WebInputEvent& event, + blink::WebCursorInfo* cursor_info); PP_Var GetInstanceObject(); void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip, const std::vector<gfx::Rect>& cut_outs_rects); @@ -189,7 +189,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl bool HandleCompositionStart(const base::string16& text); bool HandleCompositionUpdate( const base::string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); bool HandleCompositionEnd(const base::string16& text); @@ -241,12 +241,12 @@ class CONTENT_EXPORT PepperPluginInstanceImpl bool SupportsPrintInterface(); bool IsPrintScalingDisabled(); - int PrintBegin(const WebKit::WebPrintParams& print_params); - bool PrintPage(int page_number, WebKit::WebCanvas* canvas); + int PrintBegin(const blink::WebPrintParams& print_params); + bool PrintPage(int page_number, blink::WebCanvas* canvas); void PrintEnd(); bool CanRotateView(); - void RotateView(WebKit::WebPlugin::RotationType type); + void RotateView(blink::WebPlugin::RotationType type); // There are 2 implementations of the fullscreen interface // PPB_FlashFullscreen is used by Pepper Flash. @@ -310,14 +310,14 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // Returns the user gesture token to use for creating a WebScopedUserGesture, // if IsProcessingUserGesture returned true. - WebKit::WebUserGestureToken CurrentUserGestureToken(); + blink::WebUserGestureToken CurrentUserGestureToken(); // A mouse lock request was pending and this reports success or failure. void OnLockMouseACK(bool succeeded); // A mouse lock was in place, but has been lost. void OnMouseLockLost(); // A mouse lock is enabled and mouse events are being delivered. - void HandleMouseLockedInputEvent(const WebKit::WebMouseEvent& event); + void HandleMouseLockedInputEvent(const blink::WebMouseEvent& event); // Simulates an input event to the plugin by passing it down to WebKit, // which sends it back up to the plugin as if it came from the user. @@ -333,10 +333,10 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // case is non-NULL as long as the corresponding loader resource is alive. // This pointer is non-owning, so the loader must use set_document_loader to // clear itself when it is destroyed. - WebKit::WebURLLoaderClient* document_loader() const { + blink::WebURLLoaderClient* document_loader() const { return document_loader_; } - void set_document_loader(WebKit::WebURLLoaderClient* loader) { + void set_document_loader(blink::WebURLLoaderClient* loader) { document_loader_ = loader; } @@ -344,7 +344,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // PluginInstance implementation virtual RenderView* GetRenderView() OVERRIDE; - virtual WebKit::WebPluginContainer* GetContainer() OVERRIDE; + virtual blink::WebPluginContainer* GetContainer() OVERRIDE; virtual v8::Isolate* GetIsolate() const OVERRIDE; virtual ppapi::VarTracker* GetVarTracker() OVERRIDE; virtual const GURL& GetPluginURL() OVERRIDE; @@ -510,27 +510,27 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // Class to record document load notifications and play them back once the // real document loader becomes available. Used only by external instances. - class ExternalDocumentLoader : public WebKit::WebURLLoaderClient { + class ExternalDocumentLoader : public blink::WebURLLoaderClient { public: ExternalDocumentLoader(); virtual ~ExternalDocumentLoader(); void ReplayReceivedData(WebURLLoaderClient* document_loader); - // WebKit::WebURLLoaderClient implementation. - virtual void didReceiveData(WebKit::WebURLLoader* loader, + // blink::WebURLLoaderClient implementation. + virtual void didReceiveData(blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length); - virtual void didFinishLoading(WebKit::WebURLLoader* loader, + virtual void didFinishLoading(blink::WebURLLoader* loader, double finish_time); - virtual void didFail(WebKit::WebURLLoader* loader, - const WebKit::WebURLError& error); + virtual void didFail(blink::WebURLLoader* loader, + const blink::WebURLError& error); private: std::list<std::string> data_; bool finished_loading_; - scoped_ptr<WebKit::WebURLError> error_; + scoped_ptr<blink::WebURLError> error_; }; // Implements PPB_Gamepad_API. This is just to avoid having an excessive @@ -554,7 +554,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl PepperPluginInstanceImpl(RenderViewImpl* render_view, PluginModule* module, ppapi::PPP_Instance_Combined* instance_interface, - WebKit::WebPluginContainer* container, + blink::WebPluginContainer* container, const GURL& plugin_url); bool LoadFindInterface(); @@ -590,7 +590,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // best format to use. Returns false if the plugin does not support any // print format that we can handle (we can handle only PDF). bool GetPreferredPrintOutputFormat(PP_PrintOutputFormat_Dev* format); - bool PrintPDFOutput(PP_Resource print_output, WebKit::WebCanvas* canvas); + bool PrintPDFOutput(PP_Resource print_output, blink::WebCanvas* canvas); // Updates the layer for compositing. This creates a layer and attaches to the // container if: @@ -604,9 +604,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // Internal helper function for PrintPage(). bool PrintPageHelper(PP_PrintPageNumberRange_Dev* page_ranges, int num_ranges, - WebKit::WebCanvas* canvas); + blink::WebCanvas* canvas); - void DoSetCursor(WebKit::WebCursorInfo* cursor); + void DoSetCursor(blink::WebCursorInfo* cursor); // Internal helper functions for HandleCompositionXXX(). bool SendCompositionEventToPlugin( @@ -615,7 +615,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl bool SendCompositionEventWithUnderlineInformationToPlugin( PP_InputEvent_Type type, const base::string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); @@ -643,7 +643,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl void UnSetAndDeleteLockTargetAdapter(); void DidDataFromWebURLResponse( - const WebKit::WebURLResponse& response, + const blink::WebURLResponse& response, int pending_host_id, const ppapi::URLResponseInfoData& data); @@ -659,9 +659,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl PP_Instance pp_instance_; // NULL until we have been initialized. - WebKit::WebPluginContainer* container_; + blink::WebPluginContainer* container_; scoped_refptr<cc::TextureLayer> texture_layer_; - scoped_ptr<WebKit::WebLayer> web_layer_; + scoped_ptr<blink::WebLayer> web_layer_; bool layer_bound_to_fullscreen_; bool layer_is_hardware_; @@ -737,7 +737,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // to generate the entire PDF given the variables below: // // The most recently used WebCanvas, guaranteed to be valid. - skia::RefPtr<WebKit::WebCanvas> canvas_; + skia::RefPtr<blink::WebCanvas> canvas_; // An array of page ranges. std::vector<PP_PrintPageNumberRange_Dev> ranges_; @@ -750,7 +750,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl const PPP_Graphics3D* plugin_graphics_3d_interface_; // Contains the cursor if it's set by the plugin. - scoped_ptr<WebKit::WebCursorInfo> cursor_; + scoped_ptr<blink::WebCursorInfo> cursor_; // Set to true if this plugin thinks it will always be on top. This allows us // to use a more optimized painting path in some cases. @@ -783,10 +783,10 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // WebKit does not resize the plugin when going into fullscreen mode, so we do // this here by modifying the various plugin attributes and then restoring // them on exit. - WebKit::WebString width_before_fullscreen_; - WebKit::WebString height_before_fullscreen_; - WebKit::WebString border_before_fullscreen_; - WebKit::WebString style_before_fullscreen_; + blink::WebString width_before_fullscreen_; + blink::WebString height_before_fullscreen_; + blink::WebString border_before_fullscreen_; + blink::WebString style_before_fullscreen_; gfx::Size screen_size_for_fullscreen_; // The MessageChannel used to implement bidirectional postMessage for the @@ -820,7 +820,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl // Track pending user gestures so out-of-process plugins can respond to // a user gesture after it has been processed. PP_TimeTicks pending_user_gesture_; - WebKit::WebUserGestureToken pending_user_gesture_token_; + blink::WebUserGestureToken pending_user_gesture_token_; // We store the arguments so we can re-send them if we are reset to talk to // NaCl via the IPC NaCl proxy. @@ -828,9 +828,9 @@ class CONTENT_EXPORT PepperPluginInstanceImpl std::vector<std::string> argv_; // Non-owning pointer to the document loader, if any. - WebKit::WebURLLoaderClient* document_loader_; + blink::WebURLLoaderClient* document_loader_; // State for deferring document loads. Used only by external instances. - WebKit::WebURLResponse external_document_response_; + blink::WebURLResponse external_document_response_; scoped_ptr<ExternalDocumentLoader> external_document_loader_; bool external_document_load_; diff --git a/content/renderer/pepper/pepper_url_loader_host.cc b/content/renderer/pepper/pepper_url_loader_host.cc index 3f0dbc9..178548e 100644 --- a/content/renderer/pepper/pepper_url_loader_host.cc +++ b/content/renderer/pepper/pepper_url_loader_host.cc @@ -27,14 +27,14 @@ #include "third_party/WebKit/public/web/WebSecurityOrigin.h" #include "third_party/WebKit/public/web/WebURLLoaderOptions.h" -using WebKit::WebFrame; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLLoaderOptions; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebString; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLLoaderOptions; +using blink::WebURLRequest; +using blink::WebURLResponse; #ifdef _MSC_VER // Do not warn about use of std::copy with raw pointers. @@ -98,7 +98,7 @@ PepperURLLoaderHost::~PepperURLLoaderHost() { // re-entering the scoped_ptr destructor with the same scoped_ptr object // via loader_.reset(). Be sure that loader_ is first NULL then destroy // the scoped_ptr. See http://crbug.com/159429. - scoped_ptr<WebKit::WebURLLoader> for_destruction_only(loader_.release()); + scoped_ptr<blink::WebURLLoader> for_destruction_only(loader_.release()); } int32_t PepperURLLoaderHost::OnResourceMessageReceived( @@ -367,7 +367,7 @@ void PepperURLLoaderHost::Close() { GetFrame()->stopLoading(); } -WebKit::WebFrame* PepperURLLoaderHost::GetFrame() { +blink::WebFrame* PepperURLLoaderHost::GetFrame() { PepperPluginInstance* instance_object = renderer_ppapi_host_->GetPluginInstance(pp_instance()); if (!instance_object) diff --git a/content/renderer/pepper/pepper_url_loader_host.h b/content/renderer/pepper/pepper_url_loader_host.h index e515174..2790c78 100644 --- a/content/renderer/pepper/pepper_url_loader_host.h +++ b/content/renderer/pepper/pepper_url_loader_host.h @@ -16,7 +16,7 @@ #include "ppapi/shared_impl/url_response_info_data.h" #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" -namespace WebKit { +namespace blink { class WebFrame; class WebURLLoader; } @@ -27,7 +27,7 @@ class RendererPpapiHostImpl; class PepperURLLoaderHost : public ppapi::host::ResourceHost, - public WebKit::WebURLLoaderClient { + public blink::WebURLLoaderClient { public: // If main_document_loader is true, PP_Resource must be 0 since it will be // pending until the plugin resource attaches to it. @@ -42,26 +42,26 @@ class PepperURLLoaderHost const IPC::Message& msg, ppapi::host::HostMessageContext* context) OVERRIDE; - // WebKit::WebURLLoaderClient implementation. - virtual void willSendRequest(WebKit::WebURLLoader* loader, - WebKit::WebURLRequest& new_request, - const WebKit::WebURLResponse& redir_response); - virtual void didSendData(WebKit::WebURLLoader* loader, + // blink::WebURLLoaderClient implementation. + virtual void willSendRequest(blink::WebURLLoader* loader, + blink::WebURLRequest& new_request, + const blink::WebURLResponse& redir_response); + virtual void didSendData(blink::WebURLLoader* loader, unsigned long long bytes_sent, unsigned long long total_bytes_to_be_sent); - virtual void didReceiveResponse(WebKit::WebURLLoader* loader, - const WebKit::WebURLResponse& response); - virtual void didDownloadData(WebKit::WebURLLoader* loader, + virtual void didReceiveResponse(blink::WebURLLoader* loader, + const blink::WebURLResponse& response); + virtual void didDownloadData(blink::WebURLLoader* loader, int data_length, int encoded_data_length); - virtual void didReceiveData(WebKit::WebURLLoader* loader, + virtual void didReceiveData(blink::WebURLLoader* loader, const char* data, int data_length, int encoded_data_length); - virtual void didFinishLoading(WebKit::WebURLLoader* loader, + virtual void didFinishLoading(blink::WebURLLoader* loader, double finish_time); - virtual void didFail(WebKit::WebURLLoader* loader, - const WebKit::WebURLError& error); + virtual void didFail(blink::WebURLLoader* loader, + const blink::WebURLError& error); private: // ResourceHost protected overrides. @@ -96,14 +96,14 @@ class PepperURLLoaderHost void Close(); // Returns the frame for the current request. - WebKit::WebFrame* GetFrame(); + blink::WebFrame* GetFrame(); // Calls SetDefersLoading on the current load. This encapsulates the logic // differences between document loads and regular ones. void SetDefersLoading(bool defers_loading); // Converts a WebURLResponse to a URLResponseInfo and saves it. - void SaveResponse(const WebKit::WebURLResponse& response); + void SaveResponse(const blink::WebURLResponse& response); void DidDataFromWebURLResponse(const ppapi::URLResponseInfoData& data); // Sends the UpdateProgress message (if necessary) to the plugin. @@ -129,7 +129,7 @@ class PepperURLLoaderHost // always NULL check this value before using it. In the case of a main // document load, you would call the functions on the document to cancel the // load, etc. since there is no loader. - scoped_ptr<WebKit::WebURLLoader> loader_; + scoped_ptr<blink::WebURLLoader> loader_; int64_t bytes_sent_; int64_t total_bytes_to_be_sent_; diff --git a/content/renderer/pepper/pepper_url_request_unittest.cc b/content/renderer/pepper/pepper_url_request_unittest.cc index 00a2c6b..4f171ff 100644 --- a/content/renderer/pepper/pepper_url_request_unittest.cc +++ b/content/renderer/pepper/pepper_url_request_unittest.cc @@ -24,13 +24,13 @@ // test it by making sure the conversion routines actually work at the same // time. -using WebKit::WebCString; -using WebKit::WebFrame; -using WebKit::WebFrameClient; -using WebKit::WebString; -using WebKit::WebView; -using WebKit::WebURL; -using WebKit::WebURLRequest; +using blink::WebCString; +using blink::WebFrame; +using blink::WebFrameClient; +using blink::WebString; +using blink::WebView; +using blink::WebURL; +using blink::WebURLRequest; namespace { diff --git a/content/renderer/pepper/pepper_webplugin_impl.cc b/content/renderer/pepper/pepper_webplugin_impl.cc index acbe838..a1a39c3 100644 --- a/content/renderer/pepper/pepper_webplugin_impl.cc +++ b/content/renderer/pepper/pepper_webplugin_impl.cc @@ -32,17 +32,17 @@ #include "url/gurl.h" using ppapi::NPObjectVar; -using WebKit::WebCanvas; -using WebKit::WebPlugin; -using WebKit::WebPluginContainer; -using WebKit::WebPluginParams; -using WebKit::WebPoint; -using WebKit::WebPrintParams; -using WebKit::WebRect; -using WebKit::WebSize; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebCanvas; +using blink::WebPlugin; +using blink::WebPluginContainer; +using blink::WebPluginParams; +using blink::WebPoint; +using blink::WebPrintParams; +using blink::WebRect; +using blink::WebSize; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; namespace content { @@ -78,7 +78,7 @@ PepperWebPluginImpl::PepperWebPluginImpl( PepperWebPluginImpl::~PepperWebPluginImpl() { } -WebKit::WebPluginContainer* PepperWebPluginImpl::container() const { +blink::WebPluginContainer* PepperWebPluginImpl::container() const { return container_; } @@ -99,7 +99,7 @@ bool PepperWebPluginImpl::initialize(WebPluginContainer* container) { instance_->Delete(); instance_ = NULL; - WebKit::WebPlugin* replacement_plugin = + blink::WebPlugin* replacement_plugin = GetContentClient()->renderer()->CreatePluginReplacement( init_data_->render_view.get(), init_data_->module->path()); if (!replacement_plugin || !replacement_plugin->initialize(container)) @@ -147,7 +147,7 @@ NPObject* PepperWebPluginImpl::scriptableObject() { } NPObject* message_channel_np_object(instance_->message_channel().np_object()); // The object is expected to be retained before it is returned. - WebKit::WebBindings::retainObject(message_channel_np_object); + blink::WebBindings::retainObject(message_channel_np_object); return message_channel_np_object; } @@ -189,46 +189,46 @@ bool PepperWebPluginImpl::acceptsInputEvents() { return true; } -bool PepperWebPluginImpl::handleInputEvent(const WebKit::WebInputEvent& event, - WebKit::WebCursorInfo& cursor_info) { +bool PepperWebPluginImpl::handleInputEvent(const blink::WebInputEvent& event, + blink::WebCursorInfo& cursor_info) { if (instance_->FlashIsFullscreenOrPending()) return false; return instance_->HandleInputEvent(event, &cursor_info); } void PepperWebPluginImpl::didReceiveResponse( - const WebKit::WebURLResponse& response) { + const blink::WebURLResponse& response) { DCHECK(!instance_->document_loader()); instance_->HandleDocumentLoad(response); } void PepperWebPluginImpl::didReceiveData(const char* data, int data_length) { - WebKit::WebURLLoaderClient* document_loader = instance_->document_loader(); + blink::WebURLLoaderClient* document_loader = instance_->document_loader(); if (document_loader) document_loader->didReceiveData(NULL, data, data_length, 0); } void PepperWebPluginImpl::didFinishLoading() { - WebKit::WebURLLoaderClient* document_loader = instance_->document_loader(); + blink::WebURLLoaderClient* document_loader = instance_->document_loader(); if (document_loader) document_loader->didFinishLoading(NULL, 0.0); } -void PepperWebPluginImpl::didFailLoading(const WebKit::WebURLError& error) { - WebKit::WebURLLoaderClient* document_loader = instance_->document_loader(); +void PepperWebPluginImpl::didFailLoading(const blink::WebURLError& error) { + blink::WebURLLoaderClient* document_loader = instance_->document_loader(); if (document_loader) document_loader->didFail(NULL, error); } void PepperWebPluginImpl::didFinishLoadingFrameRequest( - const WebKit::WebURL& url, + const blink::WebURL& url, void* notify_data) { } void PepperWebPluginImpl::didFailLoadingFrameRequest( - const WebKit::WebURL& url, + const blink::WebURL& url, void* notify_data, - const WebKit::WebURLError& error) { + const blink::WebURLError& error) { } bool PepperWebPluginImpl::hasSelection() const { @@ -251,7 +251,7 @@ void PepperWebPluginImpl::setZoomLevel(double level, bool text_only) { instance_->Zoom(content::ZoomLevelToZoomFactor(level), text_only); } -bool PepperWebPluginImpl::startFind(const WebKit::WebString& search_text, +bool PepperWebPluginImpl::startFind(const blink::WebString& search_text, bool case_sensitive, int identifier) { return instance_->StartFind(search_text, case_sensitive, identifier); @@ -278,7 +278,7 @@ int PepperWebPluginImpl::printBegin(const WebPrintParams& print_params) { } bool PepperWebPluginImpl::printPage(int page_number, - WebKit::WebCanvas* canvas) { + blink::WebCanvas* canvas) { return instance_->PrintPage(page_number, canvas); } diff --git a/content/renderer/pepper/pepper_webplugin_impl.h b/content/renderer/pepper/pepper_webplugin_impl.h index c96b44e..77208f5 100644 --- a/content/renderer/pepper/pepper_webplugin_impl.h +++ b/content/renderer/pepper/pepper_webplugin_impl.h @@ -17,7 +17,7 @@ struct _NPP; -namespace WebKit { +namespace blink { struct WebPluginParams; struct WebPrintParams; } @@ -29,47 +29,47 @@ class PluginModule; class PPB_URLLoader_Impl; class RenderViewImpl; -class PepperWebPluginImpl : public WebKit::WebPlugin { +class PepperWebPluginImpl : public blink::WebPlugin { public: PepperWebPluginImpl(PluginModule* module, - const WebKit::WebPluginParams& params, + const blink::WebPluginParams& params, const base::WeakPtr<RenderViewImpl>& render_view); PepperPluginInstanceImpl* instance() { return instance_.get(); } - // WebKit::WebPlugin implementation. - virtual WebKit::WebPluginContainer* container() const; - virtual bool initialize(WebKit::WebPluginContainer* container); + // blink::WebPlugin implementation. + virtual blink::WebPluginContainer* container() const; + virtual bool initialize(blink::WebPluginContainer* container); virtual void destroy(); virtual NPObject* scriptableObject(); virtual struct _NPP* pluginNPP(); - virtual bool getFormValue(WebKit::WebString& value); - virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); + virtual bool getFormValue(blink::WebString& value); + virtual void paint(blink::WebCanvas* canvas, const blink::WebRect& rect); virtual void updateGeometry( - const WebKit::WebRect& frame_rect, - const WebKit::WebRect& clip_rect, - const WebKit::WebVector<WebKit::WebRect>& cut_outs_rects, + const blink::WebRect& frame_rect, + const blink::WebRect& clip_rect, + const blink::WebVector<blink::WebRect>& cut_outs_rects, bool is_visible); virtual void updateFocus(bool focused); virtual void updateVisibility(bool visible); virtual bool acceptsInputEvents(); - virtual bool handleInputEvent(const WebKit::WebInputEvent& event, - WebKit::WebCursorInfo& cursor_info); - virtual void didReceiveResponse(const WebKit::WebURLResponse& response); + virtual bool handleInputEvent(const blink::WebInputEvent& event, + blink::WebCursorInfo& cursor_info); + virtual void didReceiveResponse(const blink::WebURLResponse& response); virtual void didReceiveData(const char* data, int data_length); virtual void didFinishLoading(); - virtual void didFailLoading(const WebKit::WebURLError&); - virtual void didFinishLoadingFrameRequest(const WebKit::WebURL& url, + virtual void didFailLoading(const blink::WebURLError&); + virtual void didFinishLoadingFrameRequest(const blink::WebURL& url, void* notify_data); - virtual void didFailLoadingFrameRequest(const WebKit::WebURL& url, + virtual void didFailLoadingFrameRequest(const blink::WebURL& url, void* notify_data, - const WebKit::WebURLError& error); + const blink::WebURLError& error); virtual bool hasSelection() const; - virtual WebKit::WebString selectionAsText() const; - virtual WebKit::WebString selectionAsMarkup() const; - virtual WebKit::WebURL linkAtPosition(const WebKit::WebPoint& position) const; + virtual blink::WebString selectionAsText() const; + virtual blink::WebString selectionAsMarkup() const; + virtual blink::WebURL linkAtPosition(const blink::WebPoint& position) const; virtual void setZoomLevel(double level, bool text_only); - virtual bool startFind(const WebKit::WebString& search_text, + virtual bool startFind(const blink::WebString& search_text, bool case_sensitive, int identifier); virtual void selectFindResult(bool forward); @@ -77,8 +77,8 @@ class PepperWebPluginImpl : public WebKit::WebPlugin { virtual bool supportsPaginatedPrint() OVERRIDE; virtual bool isPrintScalingDisabled() OVERRIDE; - virtual int printBegin(const WebKit::WebPrintParams& print_params) OVERRIDE; - virtual bool printPage(int page_number, WebKit::WebCanvas* canvas) OVERRIDE; + virtual int printBegin(const blink::WebPrintParams& print_params) OVERRIDE; + virtual bool printPage(int page_number, blink::WebCanvas* canvas) OVERRIDE; virtual void printEnd() OVERRIDE; virtual bool canRotateView() OVERRIDE; @@ -98,7 +98,7 @@ class PepperWebPluginImpl : public WebKit::WebPlugin { scoped_refptr<PepperPluginInstanceImpl> instance_; gfx::Rect plugin_rect_; PP_Var instance_object_; - WebKit::WebPluginContainer* container_; + blink::WebPluginContainer* container_; DISALLOW_COPY_AND_ASSIGN(PepperWebPluginImpl); }; diff --git a/content/renderer/pepper/pepper_websocket_host.cc b/content/renderer/pepper/pepper_websocket_host.cc index 78870ef..a88fdb5 100644 --- a/content/renderer/pepper/pepper_websocket_host.cc +++ b/content/renderer/pepper/pepper_websocket_host.cc @@ -22,11 +22,11 @@ #include "third_party/WebKit/public/web/WebPluginContainer.h" #include "third_party/WebKit/public/web/WebSocket.h" -using WebKit::WebArrayBuffer; -using WebKit::WebDocument; -using WebKit::WebString; -using WebKit::WebSocket; -using WebKit::WebURL; +using blink::WebArrayBuffer; +using blink::WebDocument; +using blink::WebString; +using blink::WebSocket; +using blink::WebURL; namespace content { @@ -77,7 +77,7 @@ void PepperWebSocketHost::didConnect() { protocol)); } -void PepperWebSocketHost::didReceiveMessage(const WebKit::WebString& message) { +void PepperWebSocketHost::didReceiveMessage(const blink::WebString& message) { // Dispose packets after receiving an error. if (error_was_received_) return; @@ -90,7 +90,7 @@ void PepperWebSocketHost::didReceiveMessage(const WebKit::WebString& message) { } void PepperWebSocketHost::didReceiveArrayBuffer( - const WebKit::WebArrayBuffer& binaryData) { + const blink::WebArrayBuffer& binaryData) { // Dispose packets after receiving an error. if (error_was_received_) return; @@ -135,7 +135,7 @@ void PepperWebSocketHost::didStartClosingHandshake() { void PepperWebSocketHost::didClose(unsigned long unhandled_buffered_amount, ClosingHandshakeCompletionStatus status, unsigned short code, - const WebKit::WebString& reason) { + const blink::WebString& reason) { if (connecting_) { connecting_ = false; connect_reply_.params.set_result(PP_ERROR_FAILED); @@ -224,8 +224,8 @@ int32_t PepperWebSocketHost::OnHostMsgConnect( // Convert protocols to WebString. WebString web_protocols = WebString::fromUTF8(protocol_string); - // Create WebKit::WebSocket object and connect. - WebKit::WebPluginContainer* container = + // Create blink::WebSocket object and connect. + blink::WebPluginContainer* container = renderer_ppapi_host_->GetContainerForInstance(pp_instance()); if (!container) return PP_ERROR_BADARGUMENT; diff --git a/content/renderer/pepper/pepper_websocket_host.h b/content/renderer/pepper/pepper_websocket_host.h index 7c8d5b2..3447fcf 100644 --- a/content/renderer/pepper/pepper_websocket_host.h +++ b/content/renderer/pepper/pepper_websocket_host.h @@ -27,7 +27,7 @@ class RendererPpapiHost; class CONTENT_EXPORT PepperWebSocketHost : public ppapi::host::ResourceHost, - public NON_EXPORTED_BASE(::WebKit::WebSocketClient) { + public NON_EXPORTED_BASE(::blink::WebSocketClient) { public: explicit PepperWebSocketHost(RendererPpapiHost* host, PP_Instance instance, @@ -40,15 +40,15 @@ class CONTENT_EXPORT PepperWebSocketHost // WebSocketClient implementation. virtual void didConnect(); - virtual void didReceiveMessage(const WebKit::WebString& message); - virtual void didReceiveArrayBuffer(const WebKit::WebArrayBuffer& binaryData); + virtual void didReceiveMessage(const blink::WebString& message); + virtual void didReceiveArrayBuffer(const blink::WebArrayBuffer& binaryData); virtual void didReceiveMessageError(); virtual void didUpdateBufferedAmount(unsigned long buffered_amount); virtual void didStartClosingHandshake(); virtual void didClose(unsigned long unhandled_buffered_amount, ClosingHandshakeCompletionStatus status, unsigned short code, - const WebKit::WebString& reason); + const blink::WebString& reason); private: // IPC message handlers. int32_t OnHostMsgConnect(ppapi::host::HostMessageContext* context, @@ -89,7 +89,7 @@ class CONTENT_EXPORT PepperWebSocketHost // Keeps the WebKit side WebSocket object. This is used for calling WebKit // side functions via WebKit API. - scoped_ptr<WebKit::WebSocket> websocket_; + scoped_ptr<blink::WebSocket> websocket_; DISALLOW_COPY_AND_ASSIGN(PepperWebSocketHost); }; diff --git a/content/renderer/pepper/plugin_module.cc b/content/renderer/pepper/plugin_module.cc index 1835e0c..bdc6d15 100644 --- a/content/renderer/pepper/plugin_module.cc +++ b/content/renderer/pepper/plugin_module.cc @@ -553,7 +553,7 @@ bool PluginModule::SupportsInterface(const char* name) { PepperPluginInstanceImpl* PluginModule::CreateInstance( RenderViewImpl* render_view, - WebKit::WebPluginContainer* container, + blink::WebPluginContainer* container, const GURL& plugin_url) { PepperPluginInstanceImpl* instance = PepperPluginInstanceImpl::Create( render_view, this, container, plugin_url); diff --git a/content/renderer/pepper/plugin_module.h b/content/renderer/pepper/plugin_module.h index daadf3c..a782e3f 100644 --- a/content/renderer/pepper/plugin_module.h +++ b/content/renderer/pepper/plugin_module.h @@ -41,9 +41,9 @@ namespace IPC { struct ChannelHandle; } -namespace WebKit { +namespace blink { class WebPluginContainer; -} // namespace WebKit +} // namespace blink namespace content { class HostDispatcherWrapper; @@ -140,7 +140,7 @@ class CONTENT_EXPORT PluginModule : PepperPluginInstanceImpl* CreateInstance( RenderViewImpl* render_view, - WebKit::WebPluginContainer* container, + blink::WebPluginContainer* container, const GURL& plugin_url); // Returns "some" plugin instance associated with this module. This is not diff --git a/content/renderer/pepper/plugin_object.cc b/content/renderer/pepper/plugin_object.cc index 7746846..55e4c6c 100644 --- a/content/renderer/pepper/plugin_object.cc +++ b/content/renderer/pepper/plugin_object.cc @@ -27,7 +27,7 @@ using ppapi::PpapiGlobals; using ppapi::StringVar; using ppapi::Var; -using WebKit::WebBindings; +using blink::WebBindings; namespace content { diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index 252e013..1d614dd 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc @@ -27,10 +27,10 @@ using ppapi::thunk::EnterResourceNoLock; using ppapi::thunk::PPB_Graphics3D_API; -using WebKit::WebConsoleMessage; -using WebKit::WebFrame; -using WebKit::WebPluginContainer; -using WebKit::WebString; +using blink::WebConsoleMessage; +using blink::WebFrame; +using blink::WebPluginContainer; +using blink::WebString; namespace content { diff --git a/content/renderer/pepper/ppb_scrollbar_impl.cc b/content/renderer/pepper/ppb_scrollbar_impl.cc index fb01c59..326c700 100644 --- a/content/renderer/pepper/ppb_scrollbar_impl.cc +++ b/content/renderer/pepper/ppb_scrollbar_impl.cc @@ -27,10 +27,10 @@ #endif using ppapi::thunk::PPB_Scrollbar_API; -using WebKit::WebInputEvent; -using WebKit::WebRect; -using WebKit::WebScrollbar; -using WebKit::WebPluginScrollbar; +using blink::WebInputEvent; +using blink::WebRect; +using blink::WebScrollbar; +using blink::WebPluginScrollbar; namespace content { @@ -59,7 +59,7 @@ void PPB_Scrollbar_Impl::Init(bool vertical) { scrollbar_.reset(WebPluginScrollbar::createForPlugin( vertical ? WebScrollbar::Vertical : WebScrollbar::Horizontal, plugin_instance->container(), - static_cast<WebKit::WebPluginScrollbarClient*>(this))); + static_cast<blink::WebPluginScrollbarClient*>(this))); } PPB_Scrollbar_API* PPB_Scrollbar_Impl::AsPPB_Scrollbar_API() { @@ -168,7 +168,7 @@ void PPB_Scrollbar_Impl::SetLocationInternal(const PP_Rect* location) { location->size.height)); } -void PPB_Scrollbar_Impl::valueChanged(WebKit::WebPluginScrollbar* scrollbar) { +void PPB_Scrollbar_Impl::valueChanged(blink::WebPluginScrollbar* scrollbar) { PluginModule* plugin_module = HostGlobals::Get()->GetInstance(pp_instance())->module(); if (!plugin_module) @@ -206,8 +206,8 @@ void PPB_Scrollbar_Impl::overlayChanged(WebPluginScrollbar* scrollbar) { } void PPB_Scrollbar_Impl::invalidateScrollbarRect( - WebKit::WebPluginScrollbar* scrollbar, - const WebKit::WebRect& rect) { + blink::WebPluginScrollbar* scrollbar, + const blink::WebRect& rect) { gfx::Rect gfx_rect(rect.x, rect.y, rect.width, @@ -217,8 +217,8 @@ void PPB_Scrollbar_Impl::invalidateScrollbarRect( // since the PPB_Scrollbar_Impl code is still in the middle of updating its // internal state. // Note: we use a WeakPtrFactory here so that a lingering callback can not - // modify the lifetime of this object. Otherwise, WebKit::WebPluginScrollbar - // could outlive WebKit::WebPluginContainer, which is against its contract. + // modify the lifetime of this object. Otherwise, blink::WebPluginScrollbar + // could outlive blink::WebPluginContainer, which is against its contract. base::MessageLoop::current()->PostTask( FROM_HERE, base::Bind(&PPB_Scrollbar_Impl::NotifyInvalidate, @@ -226,8 +226,8 @@ void PPB_Scrollbar_Impl::invalidateScrollbarRect( } void PPB_Scrollbar_Impl::getTickmarks( - WebKit::WebPluginScrollbar* scrollbar, - WebKit::WebVector<WebKit::WebRect>* tick_marks) const { + blink::WebPluginScrollbar* scrollbar, + blink::WebVector<blink::WebRect>* tick_marks) const { if (tickmarks_.empty()) { WebRect* rects = NULL; tick_marks->assign(rects, 0); diff --git a/content/renderer/pepper/ppb_scrollbar_impl.h b/content/renderer/pepper/ppb_scrollbar_impl.h index eb7906b..f649c81 100644 --- a/content/renderer/pepper/ppb_scrollbar_impl.h +++ b/content/renderer/pepper/ppb_scrollbar_impl.h @@ -20,7 +20,7 @@ namespace content { class PPB_Scrollbar_Impl : public PPB_Widget_Impl, public ppapi::thunk::PPB_Scrollbar_API, - public WebKit::WebPluginScrollbarClient { + public blink::WebPluginScrollbarClient { public: static PP_Resource Create(PP_Instance instance, bool vertical); @@ -50,20 +50,20 @@ class PPB_Scrollbar_Impl : public PPB_Widget_Impl, const ppapi::InputEventData& data) OVERRIDE; virtual void SetLocationInternal(const PP_Rect* location) OVERRIDE; - // WebKit::WebPluginScrollbarClient implementation. - virtual void valueChanged(WebKit::WebPluginScrollbar* scrollbar) OVERRIDE; - virtual void overlayChanged(WebKit::WebPluginScrollbar* scrollbar) OVERRIDE; - virtual void invalidateScrollbarRect(WebKit::WebPluginScrollbar* scrollbar, - const WebKit::WebRect& rect) OVERRIDE; + // blink::WebPluginScrollbarClient implementation. + virtual void valueChanged(blink::WebPluginScrollbar* scrollbar) OVERRIDE; + virtual void overlayChanged(blink::WebPluginScrollbar* scrollbar) OVERRIDE; + virtual void invalidateScrollbarRect(blink::WebPluginScrollbar* scrollbar, + const blink::WebRect& rect) OVERRIDE; virtual void getTickmarks( - WebKit::WebPluginScrollbar* scrollbar, - WebKit::WebVector<WebKit::WebRect>* tick_marks) const OVERRIDE; + blink::WebPluginScrollbar* scrollbar, + blink::WebVector<blink::WebRect>* tick_marks) const OVERRIDE; void NotifyInvalidate(); gfx::Rect dirty_; - std::vector<WebKit::WebRect> tickmarks_; - scoped_ptr<WebKit::WebPluginScrollbar> scrollbar_; + std::vector<blink::WebRect> tickmarks_; + scoped_ptr<blink::WebPluginScrollbar> scrollbar_; // Used so that the post task for Invalidate doesn't keep an extra reference. base::WeakPtrFactory<PPB_Scrollbar_Impl> weak_ptr_factory_; diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc index 23472fa..6f12733 100644 --- a/content/renderer/pepper/ppb_var_deprecated_impl.cc +++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc @@ -24,7 +24,7 @@ using ppapi::NPObjectVar; using ppapi::PpapiGlobals; using ppapi::StringVar; using ppapi::Var; -using WebKit::WebBindings; +using blink::WebBindings; namespace content { @@ -333,7 +333,7 @@ PP_Var CallDeprecated(PP_Var var, return PP_MakeUndefined(); PepperPluginInstanceImpl* plugin = accessor.GetPluginInstance(); if (plugin && plugin->IsProcessingUserGesture()) { - WebKit::WebScopedUserGesture user_gesture( + blink::WebScopedUserGesture user_gesture( plugin->CurrentUserGestureToken()); return InternalCallDeprecated(&accessor, method_name, argc, argv, exception); diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc index 2b8193b..65061cf 100644 --- a/content/renderer/pepper/renderer_ppapi_host_impl.cc +++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc @@ -152,7 +152,7 @@ PepperPluginInstance* RendererPpapiHostImpl::GetPluginInstance( return GetAndValidateInstance(instance); } -WebKit::WebPluginContainer* RendererPpapiHostImpl::GetContainerForInstance( +blink::WebPluginContainer* RendererPpapiHostImpl::GetContainerForInstance( PP_Instance instance) const { PepperPluginInstanceImpl* instance_object = GetAndValidateInstance(instance); if (!instance_object) @@ -199,8 +199,8 @@ gfx::Point RendererPpapiHostImpl::PluginPointToRenderView( GetRenderViewForInstance(instance)); if (plugin_instance->view_data().is_fullscreen || plugin_instance->flash_fullscreen()) { - WebKit::WebRect window_rect = render_view->windowRect(); - WebKit::WebRect screen_rect = render_view->screenInfo().rect; + blink::WebRect window_rect = render_view->windowRect(); + blink::WebRect screen_rect = render_view->screenInfo().rect; return gfx::Point(pt.x() - window_rect.x + screen_rect.x, pt.y() - window_rect.y + screen_rect.y); } diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.h b/content/renderer/pepper/renderer_ppapi_host_impl.h index 07f56a0..4735e7f 100644 --- a/content/renderer/pepper/renderer_ppapi_host_impl.h +++ b/content/renderer/pepper/renderer_ppapi_host_impl.h @@ -80,7 +80,7 @@ class RendererPpapiHostImpl : public RendererPpapiHost { PP_Instance instance) const OVERRIDE; virtual RenderView* GetRenderViewForInstance( PP_Instance instance) const OVERRIDE; - virtual WebKit::WebPluginContainer* GetContainerForInstance( + virtual blink::WebPluginContainer* GetContainerForInstance( PP_Instance instance) const OVERRIDE; virtual base::ProcessId GetPluginPID() const OVERRIDE; virtual bool HasUserGesture(PP_Instance instance) const OVERRIDE; diff --git a/content/renderer/pepper/resource_converter.cc b/content/renderer/pepper/resource_converter.cc index e9a0c77..5054c2d 100644 --- a/content/renderer/pepper/resource_converter.cc +++ b/content/renderer/pepper/resource_converter.cc @@ -30,16 +30,16 @@ void FlushComplete( callback.Run(true); } -// Converts a WebKit::WebFileSystem::Type to a PP_FileSystemType. -PP_FileSystemType WebFileSystemTypeToPPAPI(WebKit::WebFileSystem::Type type) { +// Converts a blink::WebFileSystem::Type to a PP_FileSystemType. +PP_FileSystemType WebFileSystemTypeToPPAPI(blink::WebFileSystem::Type type) { switch (type) { - case WebKit::WebFileSystem::TypeTemporary: + case blink::WebFileSystem::TypeTemporary: return PP_FILESYSTEMTYPE_LOCALTEMPORARY; - case WebKit::WebFileSystem::TypePersistent: + case blink::WebFileSystem::TypePersistent: return PP_FILESYSTEMTYPE_LOCALPERSISTENT; - case WebKit::WebFileSystem::TypeIsolated: + case blink::WebFileSystem::TypeIsolated: return PP_FILESYSTEMTYPE_ISOLATED; - case WebKit::WebFileSystem::TypeExternal: + case blink::WebFileSystem::TypeExternal: return PP_FILESYSTEMTYPE_EXTERNAL; default: NOTREACHED(); @@ -53,7 +53,7 @@ PP_FileSystemType WebFileSystemTypeToPPAPI(WebKit::WebFileSystem::Type type) { bool DOMFileSystemToResource( PP_Instance instance, content::RendererPpapiHost* host, - const WebKit::WebDOMFileSystem& dom_file_system, + const blink::WebDOMFileSystem& dom_file_system, int* pending_renderer_id, scoped_ptr<IPC::Message>* create_message, scoped_ptr<IPC::Message>* browser_host_create_message) { @@ -112,8 +112,8 @@ bool ResourceConverterImpl::FromV8Value(v8::Handle<v8::Object> val, *was_resource = false; - WebKit::WebDOMFileSystem dom_file_system = - WebKit::WebDOMFileSystem::fromV8Value(val); + blink::WebDOMFileSystem dom_file_system = + blink::WebDOMFileSystem::fromV8Value(val); if (!dom_file_system.isNull()) { int pending_renderer_id; scoped_ptr<IPC::Message> create_message; diff --git a/content/renderer/pepper/url_request_info_util.cc b/content/renderer/pepper/url_request_info_util.cc index 92ecdfb..500b7bd 100644 --- a/content/renderer/pepper/url_request_info_util.cc +++ b/content/renderer/pepper/url_request_info_util.cc @@ -32,12 +32,12 @@ using ppapi::Resource; using ppapi::URLRequestInfoData; using ppapi::thunk::EnterResourceNoLock; -using WebKit::WebData; -using WebKit::WebHTTPBody; -using WebKit::WebString; -using WebKit::WebFrame; -using WebKit::WebURL; -using WebKit::WebURLRequest; +using blink::WebData; +using blink::WebHTTPBody; +using blink::WebString; +using blink::WebFrame; +using blink::WebURL; +using blink::WebURLRequest; namespace content { @@ -177,7 +177,7 @@ bool CreateWebURLRequest(PP_Instance instance, if (data->has_custom_user_agent) { bool was_after_preconnect_request = false; dest->setExtraData(new webkit_glue::WebURLRequestExtraDataImpl( - WebKit::WebReferrerPolicyDefault, // Ignored. + blink::WebReferrerPolicyDefault, // Ignored. WebString::fromUTF8(data->custom_user_agent), was_after_preconnect_request)); } diff --git a/content/renderer/pepper/url_request_info_util.h b/content/renderer/pepper/url_request_info_util.h index 2fb40e6..aaafb23 100644 --- a/content/renderer/pepper/url_request_info_util.h +++ b/content/renderer/pepper/url_request_info_util.h @@ -13,7 +13,7 @@ namespace ppapi { struct URLRequestInfoData; } -namespace WebKit { +namespace blink { class WebFrame; class WebURLRequest; } @@ -26,8 +26,8 @@ namespace content { // pointers) will be populated by this function on success. CONTENT_EXPORT bool CreateWebURLRequest(PP_Instance instance, ppapi::URLRequestInfoData* data, - WebKit::WebFrame* frame, - WebKit::WebURLRequest* dest); + blink::WebFrame* frame, + blink::WebURLRequest* dest); // Returns true if universal access is required to use the given request. CONTENT_EXPORT bool URLRequestRequiresUniversalAccess( diff --git a/content/renderer/pepper/url_response_info_util.cc b/content/renderer/pepper/url_response_info_util.cc index eda54d4..6349226 100644 --- a/content/renderer/pepper/url_response_info_util.cc +++ b/content/renderer/pepper/url_response_info_util.cc @@ -19,9 +19,9 @@ #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -using WebKit::WebHTTPHeaderVisitor; -using WebKit::WebString; -using WebKit::WebURLResponse; +using blink::WebHTTPHeaderVisitor; +using blink::WebString; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/pepper/url_response_info_util.h b/content/renderer/pepper/url_response_info_util.h index ee0c2383..d757062 100644 --- a/content/renderer/pepper/url_response_info_util.h +++ b/content/renderer/pepper/url_response_info_util.h @@ -9,7 +9,7 @@ #include "ppapi/c/pp_instance.h" #include "ppapi/shared_impl/url_response_info_data.h" -namespace WebKit { +namespace blink { class WebURLResponse; } @@ -24,7 +24,7 @@ typedef base::Callback<void(const ppapi::URLResponseInfoData&)> // passed to the plugin. void DataFromWebURLResponse(RendererPpapiHostImpl* host_impl, PP_Instance pp_instance, - const WebKit::WebURLResponse& response, + const blink::WebURLResponse& response, const DataFromWebURLResponseCallback& callback); } // namespace content diff --git a/content/renderer/pepper/usb_key_code_conversion.cc b/content/renderer/pepper/usb_key_code_conversion.cc index a166593..129e663 100644 --- a/content/renderer/pepper/usb_key_code_conversion.cc +++ b/content/renderer/pepper/usb_key_code_conversion.cc @@ -6,7 +6,7 @@ #include "build/build_config.h" -using WebKit::WebKeyboardEvent; +using blink::WebKeyboardEvent; namespace content { diff --git a/content/renderer/pepper/usb_key_code_conversion.h b/content/renderer/pepper/usb_key_code_conversion.h index 1fcd04a..9554c572 100644 --- a/content/renderer/pepper/usb_key_code_conversion.h +++ b/content/renderer/pepper/usb_key_code_conversion.h @@ -7,9 +7,9 @@ #include "ppapi/c/pp_stdint.h" -namespace WebKit { +namespace blink { class WebKeyboardEvent; -} // namespace WebKit +} // namespace blink namespace content { @@ -18,11 +18,11 @@ namespace content { // The code consists of the USB Page (in the high-order 16-bit word) and // USB Usage Id of the key. If no translation can be performed then zero // is returned. -uint32_t UsbKeyCodeForKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); +uint32_t UsbKeyCodeForKeyboardEvent(const blink::WebKeyboardEvent& key_event); // Returns a string that represents the UI Event |code| parameter as specified // in http://www.w3.org/TR/uievents/ -const char* CodeForKeyboardEvent(const WebKit::WebKeyboardEvent& key_event); +const char* CodeForKeyboardEvent(const blink::WebKeyboardEvent& key_event); } // namespace content diff --git a/content/renderer/pepper/usb_key_code_conversion_linux.cc b/content/renderer/pepper/usb_key_code_conversion_linux.cc index c50fe4e..7c12b61 100644 --- a/content/renderer/pepper/usb_key_code_conversion_linux.cc +++ b/content/renderer/pepper/usb_key_code_conversion_linux.cc @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/base/keycodes/keycode_converter.h" -using WebKit::WebKeyboardEvent; +using blink::WebKeyboardEvent; namespace content { diff --git a/content/renderer/pepper/usb_key_code_conversion_mac.cc b/content/renderer/pepper/usb_key_code_conversion_mac.cc index bcead0e..4a02d7b 100644 --- a/content/renderer/pepper/usb_key_code_conversion_mac.cc +++ b/content/renderer/pepper/usb_key_code_conversion_mac.cc @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/base/keycodes/keycode_converter.h" -using WebKit::WebKeyboardEvent; +using blink::WebKeyboardEvent; namespace content { diff --git a/content/renderer/pepper/usb_key_code_conversion_win.cc b/content/renderer/pepper/usb_key_code_conversion_win.cc index b04cd73..17cad77 100644 --- a/content/renderer/pepper/usb_key_code_conversion_win.cc +++ b/content/renderer/pepper/usb_key_code_conversion_win.cc @@ -8,7 +8,7 @@ #include "third_party/WebKit/public/web/WebInputEvent.h" #include "ui/base/keycodes/keycode_converter.h" -using WebKit::WebKeyboardEvent; +using blink::WebKeyboardEvent; namespace content { diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc index db4690a..4d57553 100644 --- a/content/renderer/pepper/v8_var_converter.cc +++ b/content/renderer/pepper/v8_var_converter.cc @@ -206,8 +206,8 @@ bool GetOrCreateVar(v8::Handle<v8::Value> val, } else if (val->IsArray()) { *result = (new ArrayVar())->GetPPVar(); } else if (val->IsObject()) { - scoped_ptr<WebKit::WebArrayBuffer> web_array_buffer( - WebKit::WebArrayBuffer::createFromV8Value(val)); + scoped_ptr<blink::WebArrayBuffer> web_array_buffer( + blink::WebArrayBuffer::createFromV8Value(val)); if (web_array_buffer.get()) { scoped_refptr<HostArrayBufferVar> buffer_var(new HostArrayBufferVar( *web_array_buffer)); diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index f3a78fa..48da615 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc @@ -56,24 +56,24 @@ #include "content/renderer/media/rtc_peer_connection_handler.h" #endif -using WebKit::WebDataSource; -using WebKit::WebDocument; -using WebKit::WebFrame; -using WebKit::WebNavigationPolicy; -using WebKit::WebPluginParams; -using WebKit::WebReferrerPolicy; -using WebKit::WebSearchableFormData; -using WebKit::WebSecurityOrigin; -using WebKit::WebServiceWorkerProvider; -using WebKit::WebStorageQuotaCallbacks; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; -using WebKit::WebUserGestureIndicator; -using WebKit::WebVector; -using WebKit::WebView; +using blink::WebDataSource; +using blink::WebDocument; +using blink::WebFrame; +using blink::WebNavigationPolicy; +using blink::WebPluginParams; +using blink::WebReferrerPolicy; +using blink::WebSearchableFormData; +using blink::WebSecurityOrigin; +using blink::WebServiceWorkerProvider; +using blink::WebStorageQuotaCallbacks; +using blink::WebString; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLRequest; +using blink::WebURLResponse; +using blink::WebUserGestureIndicator; +using blink::WebVector; +using blink::WebView; using base::Time; using base::TimeDelta; using webkit_glue::WebURLResponseExtraDataImpl; @@ -82,7 +82,7 @@ namespace content { namespace { -typedef std::map<WebKit::WebFrame*, RenderFrameImpl*> FrameMap; +typedef std::map<blink::WebFrame*, RenderFrameImpl*> FrameMap; base::LazyInstance<FrameMap> g_child_frame_map = LAZY_INSTANCE_INITIALIZER; } // namespace @@ -140,12 +140,12 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { return false; } -// WebKit::WebFrameClient implementation ------------------------------------- +// blink::WebFrameClient implementation ------------------------------------- -WebKit::WebPlugin* RenderFrameImpl::createPlugin( - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params) { - WebKit::WebPlugin* plugin = NULL; +blink::WebPlugin* RenderFrameImpl::createPlugin( + blink::WebFrame* frame, + const blink::WebPluginParams& params) { + blink::WebPlugin* plugin = NULL; if (GetContentClient()->renderer()->OverrideCreatePlugin( render_view_, frame, params, &plugin)) { return plugin; @@ -173,19 +173,19 @@ WebKit::WebPlugin* RenderFrameImpl::createPlugin( #endif // defined(ENABLE_PLUGINS) } -WebKit::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( - WebKit::WebFrame* frame, - const WebKit::WebURL& url, - WebKit::WebMediaPlayerClient* client) { +blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( + blink::WebFrame* frame, + const blink::WebURL& url, + blink::WebMediaPlayerClient* client) { // TODO(nasko): Moving the implementation here involves moving a few media // related client objects here or referencing them in the RenderView. Needs // more work to understand where the proper place for those objects is. return render_view_->createMediaPlayer(frame, url, client); } -WebKit::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( - WebKit::WebFrame* frame, - WebKit::WebApplicationCacheHostClient* client) { +blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( + blink::WebFrame* frame, + blink::WebApplicationCacheHostClient* client) { if (!frame || !frame->view()) return NULL; return new RendererWebApplicationCacheHostImpl( @@ -193,7 +193,7 @@ WebKit::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); } -WebKit::WebWorkerPermissionClientProxy* +blink::WebWorkerPermissionClientProxy* RenderFrameImpl::createWorkerPermissionClientProxy(WebFrame* frame) { if (!frame || !frame->view()) return NULL; @@ -201,13 +201,13 @@ RenderFrameImpl::createWorkerPermissionClientProxy(WebFrame* frame) { RenderViewImpl::FromWebView(frame->view()), frame); } -WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { +blink::WebCookieJar* RenderFrameImpl::cookieJar(blink::WebFrame* frame) { return render_view_->cookieJar(frame); } -WebKit::WebServiceWorkerProvider* RenderFrameImpl::createServiceWorkerProvider( - WebKit::WebFrame* frame, - WebKit::WebServiceWorkerProviderClient* client) { +blink::WebServiceWorkerProvider* RenderFrameImpl::createServiceWorkerProvider( + blink::WebFrame* frame, + blink::WebServiceWorkerProviderClient* client) { return new WebServiceWorkerProviderImpl( ChildThread::current()->thread_safe_sender(), ChildThread::current()->service_worker_message_filter(), @@ -215,13 +215,13 @@ WebKit::WebServiceWorkerProvider* RenderFrameImpl::createServiceWorkerProvider( make_scoped_ptr(client)); } -void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { +void RenderFrameImpl::didAccessInitialDocument(blink::WebFrame* frame) { render_view_->didAccessInitialDocument(frame); } -WebKit::WebFrame* RenderFrameImpl::createChildFrame( - WebKit::WebFrame* parent, - const WebKit::WebString& name) { +blink::WebFrame* RenderFrameImpl::createChildFrame( + blink::WebFrame* parent, + const blink::WebString& name) { RenderFrameImpl* child_render_frame = this; long long child_frame_identifier = WebFrame::generateEmbedderIdentifier(); if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { @@ -236,7 +236,7 @@ WebKit::WebFrame* RenderFrameImpl::createChildFrame( child_render_frame = RenderFrameImpl::Create(render_view_, routing_id); } - WebKit::WebFrame* web_frame = WebFrame::create(child_render_frame, + blink::WebFrame* web_frame = WebFrame::create(child_render_frame, child_frame_identifier); if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { @@ -247,11 +247,11 @@ WebKit::WebFrame* RenderFrameImpl::createChildFrame( return web_frame; } -void RenderFrameImpl::didDisownOpener(WebKit::WebFrame* frame) { +void RenderFrameImpl::didDisownOpener(blink::WebFrame* frame) { render_view_->didDisownOpener(frame); } -void RenderFrameImpl::frameDetached(WebKit::WebFrame* frame) { +void RenderFrameImpl::frameDetached(blink::WebFrame* frame) { // Currently multiple WebCore::Frames can send frameDetached to a single // RenderFrameImpl. This is legacy behavior from when RenderViewImpl served // as a shared WebFrameClient for multiple Webcore::Frame objects. It also @@ -286,14 +286,14 @@ void RenderFrameImpl::frameDetached(WebKit::WebFrame* frame) { frame->close(); } -void RenderFrameImpl::willClose(WebKit::WebFrame* frame) { +void RenderFrameImpl::willClose(blink::WebFrame* frame) { // Call back to RenderViewImpl for observers to be notified. // TODO(nasko): Remove once we have RenderFrameObserver. render_view_->willClose(frame); } -void RenderFrameImpl::didChangeName(WebKit::WebFrame* frame, - const WebKit::WebString& name) { +void RenderFrameImpl::didChangeName(blink::WebFrame* frame, + const blink::WebString& name) { if (!render_view_->renderer_preferences_.report_frame_name_changes) return; @@ -305,26 +305,26 @@ void RenderFrameImpl::didChangeName(WebKit::WebFrame* frame, } void RenderFrameImpl::didMatchCSS( - WebKit::WebFrame* frame, - const WebKit::WebVector<WebKit::WebString>& newly_matching_selectors, - const WebKit::WebVector<WebKit::WebString>& stopped_matching_selectors) { + blink::WebFrame* frame, + const blink::WebVector<blink::WebString>& newly_matching_selectors, + const blink::WebVector<blink::WebString>& stopped_matching_selectors) { render_view_->didMatchCSS( frame, newly_matching_selectors, stopped_matching_selectors); } -void RenderFrameImpl::loadURLExternally(WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy) { +void RenderFrameImpl::loadURLExternally(blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy) { loadURLExternally(frame, request, policy, WebString()); } void RenderFrameImpl::loadURLExternally( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy, - const WebKit::WebString& suggested_name) { + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy, + const blink::WebString& suggested_name) { Referrer referrer(RenderViewImpl::GetReferrerFromRequest(frame, request)); - if (policy == WebKit::WebNavigationPolicyDownload) { + if (policy == blink::WebNavigationPolicyDownload) { render_view_->Send(new ViewHostMsg_DownloadUrl(render_view_->GetRoutingID(), request.url(), referrer, suggested_name)); @@ -333,36 +333,36 @@ void RenderFrameImpl::loadURLExternally( } } -WebKit::WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( - WebKit::WebFrame* frame, - WebKit::WebDataSource::ExtraData* extra_data, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, +blink::WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( + blink::WebFrame* frame, + blink::WebDataSource::ExtraData* extra_data, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect) { return render_view_->decidePolicyForNavigation( frame, extra_data, request, type, default_policy, is_redirect); } -WebKit::WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, +blink::WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect) { return render_view_->decidePolicyForNavigation( frame, request, type, default_policy, is_redirect); } -void RenderFrameImpl::willSendSubmitEvent(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form) { +void RenderFrameImpl::willSendSubmitEvent(blink::WebFrame* frame, + const blink::WebFormElement& form) { // Call back to RenderViewImpl for observers to be notified. // TODO(nasko): Remove once we have RenderFrameObserver. render_view_->willSendSubmitEvent(frame, form); } -void RenderFrameImpl::willSubmitForm(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form) { +void RenderFrameImpl::willSubmitForm(blink::WebFrame* frame, + const blink::WebFormElement& form) { DocumentState* document_state = DocumentState::FromDataSource(frame->provisionalDataSource()); NavigationState* navigation_state = document_state->navigation_state(); @@ -385,8 +385,8 @@ void RenderFrameImpl::willSubmitForm(WebKit::WebFrame* frame, render_view_->willSubmitForm(frame, form); } -void RenderFrameImpl::didCreateDataSource(WebKit::WebFrame* frame, - WebKit::WebDataSource* datasource) { +void RenderFrameImpl::didCreateDataSource(blink::WebFrame* frame, + blink::WebDataSource* datasource) { // TODO(nasko): Move implementation here. Needed state: // * pending_navigation_params_ // * webview @@ -396,7 +396,7 @@ void RenderFrameImpl::didCreateDataSource(WebKit::WebFrame* frame, render_view_->didCreateDataSource(frame, datasource); } -void RenderFrameImpl::didStartProvisionalLoad(WebKit::WebFrame* frame) { +void RenderFrameImpl::didStartProvisionalLoad(blink::WebFrame* frame) { WebDataSource* ds = frame->provisionalDataSource(); // In fast/loader/stop-provisional-loads.html, we abort the load before this @@ -445,15 +445,15 @@ void RenderFrameImpl::didStartProvisionalLoad(WebKit::WebFrame* frame) { } void RenderFrameImpl::didReceiveServerRedirectForProvisionalLoad( - WebKit::WebFrame* frame) { + blink::WebFrame* frame) { // TODO(nasko): Move implementation here. Needed state: // * page_id_ render_view_->didReceiveServerRedirectForProvisionalLoad(frame); } void RenderFrameImpl::didFailProvisionalLoad( - WebKit::WebFrame* frame, - const WebKit::WebURLError& error) { + blink::WebFrame* frame, + const blink::WebURLError& error) { // TODO(nasko): Move implementation here. Needed state: // * page_id_ // * pending_navigation_params_ @@ -463,7 +463,7 @@ void RenderFrameImpl::didFailProvisionalLoad( render_view_->didFailProvisionalLoad(frame, error); } -void RenderFrameImpl::didCommitProvisionalLoad(WebKit::WebFrame* frame, +void RenderFrameImpl::didCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation) { // TODO(nasko): Move implementation here. Needed state: // * page_id_ @@ -478,7 +478,7 @@ void RenderFrameImpl::didCommitProvisionalLoad(WebKit::WebFrame* frame, render_view_->didCommitProvisionalLoad(frame, is_new_navigation); } -void RenderFrameImpl::didClearWindowObject(WebKit::WebFrame* frame) { +void RenderFrameImpl::didClearWindowObject(blink::WebFrame* frame) { // TODO(nasko): Move implementation here. Needed state: // * enabled_bindings_ // * dom_automation_controller_ @@ -486,7 +486,7 @@ void RenderFrameImpl::didClearWindowObject(WebKit::WebFrame* frame) { render_view_->didClearWindowObject(frame); } -void RenderFrameImpl::didCreateDocumentElement(WebKit::WebFrame* frame) { +void RenderFrameImpl::didCreateDocumentElement(blink::WebFrame* frame) { // Notify the browser about non-blank documents loading in the top frame. GURL url = frame->document().url(); if (url.is_valid() && url.spec() != kAboutBlankURL) { @@ -503,60 +503,60 @@ void RenderFrameImpl::didCreateDocumentElement(WebKit::WebFrame* frame) { render_view_->didCreateDocumentElement(frame); } -void RenderFrameImpl::didReceiveTitle(WebKit::WebFrame* frame, - const WebKit::WebString& title, - WebKit::WebTextDirection direction) { +void RenderFrameImpl::didReceiveTitle(blink::WebFrame* frame, + const blink::WebString& title, + blink::WebTextDirection direction) { // TODO(nasko): Investigate wheather implementation should move here. render_view_->didReceiveTitle(frame, title, direction); } -void RenderFrameImpl::didChangeIcon(WebKit::WebFrame* frame, - WebKit::WebIconURL::Type icon_type) { +void RenderFrameImpl::didChangeIcon(blink::WebFrame* frame, + blink::WebIconURL::Type icon_type) { // TODO(nasko): Investigate wheather implementation should move here. render_view_->didChangeIcon(frame, icon_type); } -void RenderFrameImpl::didFinishDocumentLoad(WebKit::WebFrame* frame) { +void RenderFrameImpl::didFinishDocumentLoad(blink::WebFrame* frame) { // TODO(nasko): Move implementation here. No state needed, just observers // notification in before updating encoding. render_view_->didFinishDocumentLoad(frame); } -void RenderFrameImpl::didHandleOnloadEvents(WebKit::WebFrame* frame) { +void RenderFrameImpl::didHandleOnloadEvents(blink::WebFrame* frame) { // TODO(nasko): Move implementation here. Needed state: // * page_id_ render_view_->didHandleOnloadEvents(frame); } -void RenderFrameImpl::didFailLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error) { +void RenderFrameImpl::didFailLoad(blink::WebFrame* frame, + const blink::WebURLError& error) { // TODO(nasko): Move implementation here. No state needed. render_view_->didFailLoad(frame, error); } -void RenderFrameImpl::didFinishLoad(WebKit::WebFrame* frame) { +void RenderFrameImpl::didFinishLoad(blink::WebFrame* frame) { // TODO(nasko): Move implementation here. No state needed, just observers // notification before sending message to the browser process. render_view_->didFinishLoad(frame); } -void RenderFrameImpl::didNavigateWithinPage(WebKit::WebFrame* frame, +void RenderFrameImpl::didNavigateWithinPage(blink::WebFrame* frame, bool is_new_navigation) { // TODO(nasko): Move implementation here. No state needed, just observers // notification before sending message to the browser process. render_view_->didNavigateWithinPage(frame, is_new_navigation); } -void RenderFrameImpl::didUpdateCurrentHistoryItem(WebKit::WebFrame* frame) { +void RenderFrameImpl::didUpdateCurrentHistoryItem(blink::WebFrame* frame) { // TODO(nasko): Move implementation here. Needed methods: // * StartNavStateSyncTimerIfNecessary render_view_->didUpdateCurrentHistoryItem(frame); } void RenderFrameImpl::willRequestAfterPreconnect( - WebKit::WebFrame* frame, - WebKit::WebURLRequest& request) { - WebKit::WebReferrerPolicy referrer_policy = WebKit::WebReferrerPolicyDefault; + blink::WebFrame* frame, + blink::WebURLRequest& request) { + blink::WebReferrerPolicy referrer_policy = blink::WebReferrerPolicyDefault; WebString custom_user_agent; if (request.extraData()) { @@ -578,10 +578,10 @@ void RenderFrameImpl::willRequestAfterPreconnect( } void RenderFrameImpl::willSendRequest( - WebKit::WebFrame* frame, + blink::WebFrame* frame, unsigned identifier, - WebKit::WebURLRequest& request, - const WebKit::WebURLResponse& redirect_response) { + blink::WebURLRequest& request, + const blink::WebURLResponse& redirect_response) { // The request my be empty during tests. if (request.url().isEmpty()) return; @@ -616,7 +616,7 @@ void RenderFrameImpl::willSendRequest( if (internal_data->is_cache_policy_override_set()) request.setCachePolicy(internal_data->cache_policy_override()); - WebKit::WebReferrerPolicy referrer_policy; + blink::WebReferrerPolicy referrer_policy; if (internal_data->is_referrer_policy_set()) { referrer_policy = internal_data->referrer_policy(); internal_data->clear_referrer_policy(); @@ -693,9 +693,9 @@ void RenderFrameImpl::willSendRequest( } void RenderFrameImpl::didReceiveResponse( - WebKit::WebFrame* frame, + blink::WebFrame* frame, unsigned identifier, - const WebKit::WebURLResponse& response) { + const blink::WebURLResponse& response) { // Only do this for responses that correspond to a provisional data source // of the top-most frame. If we have a provisional data source, then we // can't have any sub-resources yet, so we know that this response must @@ -738,7 +738,7 @@ void RenderFrameImpl::didReceiveResponse( internal_data->set_use_error_page(true); } -void RenderFrameImpl::didFinishResourceLoad(WebKit::WebFrame* frame, +void RenderFrameImpl::didFinishResourceLoad(blink::WebFrame* frame, unsigned identifier) { // TODO(nasko): Move implementation here. Needed state: // * devtools_agent_ @@ -748,9 +748,9 @@ void RenderFrameImpl::didFinishResourceLoad(WebKit::WebFrame* frame, } void RenderFrameImpl::didLoadResourceFromMemoryCache( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - const WebKit::WebURLResponse& response) { + blink::WebFrame* frame, + const blink::WebURLRequest& request, + const blink::WebURLResponse& response) { // The recipients of this message have no use for data: URLs: they don't // affect the page's insecure content list and are not in the disk cache. To // prevent large (1M+) data: URLs from crashing in the IPC system, we simply @@ -770,22 +770,22 @@ void RenderFrameImpl::didLoadResourceFromMemoryCache( ResourceType::FromTargetType(request.targetType()))); } -void RenderFrameImpl::didDisplayInsecureContent(WebKit::WebFrame* frame) { +void RenderFrameImpl::didDisplayInsecureContent(blink::WebFrame* frame) { render_view_->Send(new ViewHostMsg_DidDisplayInsecureContent( render_view_->GetRoutingID())); } void RenderFrameImpl::didRunInsecureContent( - WebKit::WebFrame* frame, - const WebKit::WebSecurityOrigin& origin, - const WebKit::WebURL& target) { + blink::WebFrame* frame, + const blink::WebSecurityOrigin& origin, + const blink::WebURL& target) { render_view_->Send(new ViewHostMsg_DidRunInsecureContent( render_view_->GetRoutingID(), origin.toString().utf8(), target)); } -void RenderFrameImpl::didAbortLoading(WebKit::WebFrame* frame) { +void RenderFrameImpl::didAbortLoading(blink::WebFrame* frame) { #if defined(ENABLE_PLUGINS) if (frame != render_view_->webview()->mainFrame()) return; @@ -795,12 +795,12 @@ void RenderFrameImpl::didAbortLoading(WebKit::WebFrame* frame) { } void RenderFrameImpl::didExhaustMemoryAvailableForScript( - WebKit::WebFrame* frame) { + blink::WebFrame* frame) { render_view_->Send(new ViewHostMsg_JSOutOfMemory( render_view_->GetRoutingID())); } -void RenderFrameImpl::didCreateScriptContext(WebKit::WebFrame* frame, +void RenderFrameImpl::didCreateScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context> context, int extension_group, int world_id) { @@ -808,32 +808,32 @@ void RenderFrameImpl::didCreateScriptContext(WebKit::WebFrame* frame, frame, context, extension_group, world_id); } -void RenderFrameImpl::willReleaseScriptContext(WebKit::WebFrame* frame, +void RenderFrameImpl::willReleaseScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context> context, int world_id) { GetContentClient()->renderer()->WillReleaseScriptContext( frame, context, world_id); } -void RenderFrameImpl::didFirstVisuallyNonEmptyLayout(WebKit::WebFrame* frame) { +void RenderFrameImpl::didFirstVisuallyNonEmptyLayout(blink::WebFrame* frame) { render_view_->didFirstVisuallyNonEmptyLayout(frame); } -void RenderFrameImpl::didChangeContentsSize(WebKit::WebFrame* frame, - const WebKit::WebSize& size) { +void RenderFrameImpl::didChangeContentsSize(blink::WebFrame* frame, + const blink::WebSize& size) { // TODO(nasko): Move implementation here. Needed state: // * cached_has_main_frame_horizontal_scrollbar_ // * cached_has_main_frame_vertical_scrollbar_ render_view_->didChangeContentsSize(frame, size); } -void RenderFrameImpl::didChangeScrollOffset(WebKit::WebFrame* frame) { +void RenderFrameImpl::didChangeScrollOffset(blink::WebFrame* frame) { // TODO(nasko): Move implementation here. Needed methods: // * StartNavStateSyncTimerIfNecessary render_view_->didChangeScrollOffset(frame); } -void RenderFrameImpl::willInsertBody(WebKit::WebFrame* frame) { +void RenderFrameImpl::willInsertBody(blink::WebFrame* frame) { if (!frame->parent()) { render_view_->Send(new ViewHostMsg_WillInsertBody( render_view_->GetRoutingID())); @@ -855,22 +855,22 @@ void RenderFrameImpl::reportFindInPageMatchCount(int request_id, void RenderFrameImpl::reportFindInPageSelection( int request_id, int active_match_ordinal, - const WebKit::WebRect& selection_rect) { + const blink::WebRect& selection_rect) { render_view_->Send(new ViewHostMsg_Find_Reply( render_view_->GetRoutingID(), request_id, -1, selection_rect, active_match_ordinal, false)); } void RenderFrameImpl::requestStorageQuota( - WebKit::WebFrame* frame, - WebKit::WebStorageQuotaType type, + blink::WebFrame* frame, + blink::WebStorageQuotaType type, unsigned long long requested_size, - WebKit::WebStorageQuotaCallbacks* callbacks) { + blink::WebStorageQuotaCallbacks* callbacks) { DCHECK(frame); WebSecurityOrigin origin = frame->document().securityOrigin(); if (origin.isUnique()) { // Unique origins cannot store persistent state. - callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); + callbacks->didFail(blink::WebStorageQuotaErrorAbort); return; } ChildThread::current()->quota_dispatcher()->RequestStorageQuota( @@ -880,35 +880,35 @@ void RenderFrameImpl::requestStorageQuota( } void RenderFrameImpl::willOpenSocketStream( - WebKit::WebSocketStreamHandle* handle) { + blink::WebSocketStreamHandle* handle) { SocketStreamHandleData::AddToHandle(handle, render_view_->GetRoutingID()); } void RenderFrameImpl::willStartUsingPeerConnectionHandler( - WebKit::WebFrame* frame, - WebKit::WebRTCPeerConnectionHandler* handler) { + blink::WebFrame* frame, + blink::WebRTCPeerConnectionHandler* handler) { #if defined(ENABLE_WEBRTC) static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame); #endif } bool RenderFrameImpl::willCheckAndDispatchMessageEvent( - WebKit::WebFrame* sourceFrame, - WebKit::WebFrame* targetFrame, - WebKit::WebSecurityOrigin targetOrigin, - WebKit::WebDOMMessageEvent event) { + blink::WebFrame* sourceFrame, + blink::WebFrame* targetFrame, + blink::WebSecurityOrigin targetOrigin, + blink::WebDOMMessageEvent event) { // TODO(nasko): Move implementation here. Needed state: // * is_swapped_out_ return render_view_->willCheckAndDispatchMessageEvent( sourceFrame, targetFrame, targetOrigin, event); } -WebKit::WebString RenderFrameImpl::userAgentOverride( - WebKit::WebFrame* frame, - const WebKit::WebURL& url) { +blink::WebString RenderFrameImpl::userAgentOverride( + blink::WebFrame* frame, + const blink::WebURL& url) { if (!render_view_->webview() || !render_view_->webview()->mainFrame() || render_view_->renderer_preferences_.user_agent_override.empty()) { - return WebKit::WebString(); + return blink::WebString(); } // If we're in the middle of committing a load, the data source we need @@ -925,16 +925,16 @@ WebKit::WebString RenderFrameImpl::userAgentOverride( if (internal_data && internal_data->is_overriding_user_agent()) return WebString::fromUTF8( render_view_->renderer_preferences_.user_agent_override); - return WebKit::WebString(); + return blink::WebString(); } -WebKit::WebString RenderFrameImpl::doNotTrackValue(WebKit::WebFrame* frame) { +blink::WebString RenderFrameImpl::doNotTrackValue(blink::WebFrame* frame) { if (render_view_->renderer_preferences_.enable_do_not_track) return WebString::fromUTF8("1"); return WebString(); } -bool RenderFrameImpl::allowWebGL(WebKit::WebFrame* frame, bool default_value) { +bool RenderFrameImpl::allowWebGL(blink::WebFrame* frame, bool default_value) { if (!default_value) return false; @@ -947,7 +947,7 @@ bool RenderFrameImpl::allowWebGL(WebKit::WebFrame* frame, bool default_value) { return !blocked; } -void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, +void RenderFrameImpl::didLoseWebGLContext(blink::WebFrame* frame, int arb_robustness_status_code) { render_view_->Send(new ViewHostMsg_DidLose3DContext( GURL(frame->top()->document().securityOrigin().toString()), diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 7239b0c..5c81cd1 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h @@ -17,7 +17,7 @@ class RenderViewImpl; class CONTENT_EXPORT RenderFrameImpl : public RenderFrame, - NON_EXPORTED_BASE(public WebKit::WebFrameClient) { + NON_EXPORTED_BASE(public blink::WebFrameClient) { public: // Creates a new RenderFrame. |render_view| is the RenderView object that this // frame belongs to. @@ -36,149 +36,149 @@ class CONTENT_EXPORT RenderFrameImpl // IPC::Listener virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - // WebKit::WebFrameClient implementation ------------------------------------- - virtual WebKit::WebPlugin* createPlugin( - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params); - virtual WebKit::WebMediaPlayer* createMediaPlayer( - WebKit::WebFrame* frame, - const WebKit::WebURL& url, - WebKit::WebMediaPlayerClient* client); - virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( - WebKit::WebFrame* frame, - WebKit::WebApplicationCacheHostClient* client); - virtual WebKit::WebWorkerPermissionClientProxy* - createWorkerPermissionClientProxy(WebKit::WebFrame* frame); - virtual WebKit::WebCookieJar* cookieJar(WebKit::WebFrame* frame); - virtual WebKit::WebServiceWorkerProvider* createServiceWorkerProvider( - WebKit::WebFrame* frame, - WebKit::WebServiceWorkerProviderClient*); - virtual void didAccessInitialDocument(WebKit::WebFrame* frame); - virtual WebKit::WebFrame* createChildFrame(WebKit::WebFrame* parent, - const WebKit::WebString& name); - virtual void didDisownOpener(WebKit::WebFrame* frame); - virtual void frameDetached(WebKit::WebFrame* frame); - virtual void willClose(WebKit::WebFrame* frame); - virtual void didChangeName(WebKit::WebFrame* frame, - const WebKit::WebString& name); + // blink::WebFrameClient implementation ------------------------------------- + virtual blink::WebPlugin* createPlugin( + blink::WebFrame* frame, + const blink::WebPluginParams& params); + virtual blink::WebMediaPlayer* createMediaPlayer( + blink::WebFrame* frame, + const blink::WebURL& url, + blink::WebMediaPlayerClient* client); + virtual blink::WebApplicationCacheHost* createApplicationCacheHost( + blink::WebFrame* frame, + blink::WebApplicationCacheHostClient* client); + virtual blink::WebWorkerPermissionClientProxy* + createWorkerPermissionClientProxy(blink::WebFrame* frame); + virtual blink::WebCookieJar* cookieJar(blink::WebFrame* frame); + virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( + blink::WebFrame* frame, + blink::WebServiceWorkerProviderClient*); + virtual void didAccessInitialDocument(blink::WebFrame* frame); + virtual blink::WebFrame* createChildFrame(blink::WebFrame* parent, + const blink::WebString& name); + virtual void didDisownOpener(blink::WebFrame* frame); + virtual void frameDetached(blink::WebFrame* frame); + virtual void willClose(blink::WebFrame* frame); + virtual void didChangeName(blink::WebFrame* frame, + const blink::WebString& name); virtual void didMatchCSS( - WebKit::WebFrame* frame, - const WebKit::WebVector<WebKit::WebString>& newly_matching_selectors, - const WebKit::WebVector<WebKit::WebString>& stopped_matching_selectors); - virtual void loadURLExternally(WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy); + blink::WebFrame* frame, + const blink::WebVector<blink::WebString>& newly_matching_selectors, + const blink::WebVector<blink::WebString>& stopped_matching_selectors); + virtual void loadURLExternally(blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy); virtual void loadURLExternally( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy, - const WebKit::WebString& suggested_name); - virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( - WebKit::WebFrame* frame, - WebKit::WebDataSource::ExtraData* extra_data, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy, + const blink::WebString& suggested_name); + virtual blink::WebNavigationPolicy decidePolicyForNavigation( + blink::WebFrame* frame, + blink::WebDataSource::ExtraData* extra_data, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect); // DEPRECATED - virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, + virtual blink::WebNavigationPolicy decidePolicyForNavigation( + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect); - virtual void willSendSubmitEvent(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form); - virtual void willSubmitForm(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form); - virtual void didCreateDataSource(WebKit::WebFrame* frame, - WebKit::WebDataSource* datasource); - virtual void didStartProvisionalLoad(WebKit::WebFrame* frame); + virtual void willSendSubmitEvent(blink::WebFrame* frame, + const blink::WebFormElement& form); + virtual void willSubmitForm(blink::WebFrame* frame, + const blink::WebFormElement& form); + virtual void didCreateDataSource(blink::WebFrame* frame, + blink::WebDataSource* datasource); + virtual void didStartProvisionalLoad(blink::WebFrame* frame); virtual void didReceiveServerRedirectForProvisionalLoad( - WebKit::WebFrame* frame); + blink::WebFrame* frame); virtual void didFailProvisionalLoad( - WebKit::WebFrame* frame, - const WebKit::WebURLError& error); - virtual void didCommitProvisionalLoad(WebKit::WebFrame* frame, + blink::WebFrame* frame, + const blink::WebURLError& error); + virtual void didCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation); - virtual void didClearWindowObject(WebKit::WebFrame* frame); - virtual void didCreateDocumentElement(WebKit::WebFrame* frame); - virtual void didReceiveTitle(WebKit::WebFrame* frame, - const WebKit::WebString& title, - WebKit::WebTextDirection direction); - virtual void didChangeIcon(WebKit::WebFrame* frame, - WebKit::WebIconURL::Type icon_type); - virtual void didFinishDocumentLoad(WebKit::WebFrame* frame); - virtual void didHandleOnloadEvents(WebKit::WebFrame* frame); - virtual void didFailLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error); - virtual void didFinishLoad(WebKit::WebFrame* frame); - virtual void didNavigateWithinPage(WebKit::WebFrame* frame, + virtual void didClearWindowObject(blink::WebFrame* frame); + virtual void didCreateDocumentElement(blink::WebFrame* frame); + virtual void didReceiveTitle(blink::WebFrame* frame, + const blink::WebString& title, + blink::WebTextDirection direction); + virtual void didChangeIcon(blink::WebFrame* frame, + blink::WebIconURL::Type icon_type); + virtual void didFinishDocumentLoad(blink::WebFrame* frame); + virtual void didHandleOnloadEvents(blink::WebFrame* frame); + virtual void didFailLoad(blink::WebFrame* frame, + const blink::WebURLError& error); + virtual void didFinishLoad(blink::WebFrame* frame); + virtual void didNavigateWithinPage(blink::WebFrame* frame, bool is_new_navigation); - virtual void didUpdateCurrentHistoryItem(WebKit::WebFrame* frame); - virtual void willRequestAfterPreconnect(WebKit::WebFrame* frame, - WebKit::WebURLRequest& request); + virtual void didUpdateCurrentHistoryItem(blink::WebFrame* frame); + virtual void willRequestAfterPreconnect(blink::WebFrame* frame, + blink::WebURLRequest& request); virtual void willSendRequest( - WebKit::WebFrame* frame, + blink::WebFrame* frame, unsigned identifier, - WebKit::WebURLRequest& request, - const WebKit::WebURLResponse& redirect_response); + blink::WebURLRequest& request, + const blink::WebURLResponse& redirect_response); virtual void didReceiveResponse( - WebKit::WebFrame* frame, + blink::WebFrame* frame, unsigned identifier, - const WebKit::WebURLResponse& response); - virtual void didFinishResourceLoad(WebKit::WebFrame* frame, + const blink::WebURLResponse& response); + virtual void didFinishResourceLoad(blink::WebFrame* frame, unsigned identifier); virtual void didLoadResourceFromMemoryCache( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - const WebKit::WebURLResponse& response); - virtual void didDisplayInsecureContent(WebKit::WebFrame* frame); - virtual void didRunInsecureContent(WebKit::WebFrame* frame, - const WebKit::WebSecurityOrigin& origin, - const WebKit::WebURL& target); - virtual void didAbortLoading(WebKit::WebFrame* frame); + blink::WebFrame* frame, + const blink::WebURLRequest& request, + const blink::WebURLResponse& response); + virtual void didDisplayInsecureContent(blink::WebFrame* frame); + virtual void didRunInsecureContent(blink::WebFrame* frame, + const blink::WebSecurityOrigin& origin, + const blink::WebURL& target); + virtual void didAbortLoading(blink::WebFrame* frame); virtual void didExhaustMemoryAvailableForScript( - WebKit::WebFrame* frame); - virtual void didCreateScriptContext(WebKit::WebFrame* frame, + blink::WebFrame* frame); + virtual void didCreateScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context> context, int extension_group, int world_id); - virtual void willReleaseScriptContext(WebKit::WebFrame* frame, + virtual void willReleaseScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context> context, int world_id); - virtual void didFirstVisuallyNonEmptyLayout(WebKit::WebFrame* frame); - virtual void didChangeContentsSize(WebKit::WebFrame* frame, - const WebKit::WebSize& size); - virtual void didChangeScrollOffset(WebKit::WebFrame* frame); - virtual void willInsertBody(WebKit::WebFrame* frame); + virtual void didFirstVisuallyNonEmptyLayout(blink::WebFrame* frame); + virtual void didChangeContentsSize(blink::WebFrame* frame, + const blink::WebSize& size); + virtual void didChangeScrollOffset(blink::WebFrame* frame); + virtual void willInsertBody(blink::WebFrame* frame); virtual void reportFindInPageMatchCount(int request_id, int count, bool final_update); virtual void reportFindInPageSelection(int request_id, int active_match_ordinal, - const WebKit::WebRect& sel); + const blink::WebRect& sel); virtual void requestStorageQuota( - WebKit::WebFrame* frame, - WebKit::WebStorageQuotaType type, + blink::WebFrame* frame, + blink::WebStorageQuotaType type, unsigned long long requested_size, - WebKit::WebStorageQuotaCallbacks* callbacks); + blink::WebStorageQuotaCallbacks* callbacks); virtual void willOpenSocketStream( - WebKit::WebSocketStreamHandle* handle); + blink::WebSocketStreamHandle* handle); virtual void willStartUsingPeerConnectionHandler( - WebKit::WebFrame* frame, - WebKit::WebRTCPeerConnectionHandler* handler); + blink::WebFrame* frame, + blink::WebRTCPeerConnectionHandler* handler); virtual bool willCheckAndDispatchMessageEvent( - WebKit::WebFrame* sourceFrame, - WebKit::WebFrame* targetFrame, - WebKit::WebSecurityOrigin targetOrigin, - WebKit::WebDOMMessageEvent event); - virtual WebKit::WebString userAgentOverride( - WebKit::WebFrame* frame, - const WebKit::WebURL& url); - virtual WebKit::WebString doNotTrackValue(WebKit::WebFrame* frame); - virtual bool allowWebGL(WebKit::WebFrame* frame, bool default_value); - virtual void didLoseWebGLContext(WebKit::WebFrame* frame, + blink::WebFrame* sourceFrame, + blink::WebFrame* targetFrame, + blink::WebSecurityOrigin targetOrigin, + blink::WebDOMMessageEvent event); + virtual blink::WebString userAgentOverride( + blink::WebFrame* frame, + const blink::WebURL& url); + virtual blink::WebString doNotTrackValue(blink::WebFrame* frame); + virtual bool allowWebGL(blink::WebFrame* frame, bool default_value); + virtual void didLoseWebGLContext(blink::WebFrame* frame, int arb_robustness_status_code); protected: diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc index bf972b1..4bce329 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc @@ -90,7 +90,7 @@ RenderProcessImpl::RenderProcessImpl() RenderProcessImpl::~RenderProcessImpl() { #ifndef NDEBUG - int count = WebKit::WebFrame::instanceCount(); + int count = blink::WebFrame::instanceCount(); if (count) DLOG(ERROR) << "WebFrame LEAKED " << count << " TIMES"; #endif diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 646bf18..a8ef56d 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -137,14 +137,14 @@ #endif using base::ThreadRestrictions; -using WebKit::WebDocument; -using WebKit::WebFrame; -using WebKit::WebNetworkStateNotifier; -using WebKit::WebRuntimeFeatures; -using WebKit::WebScriptController; -using WebKit::WebSecurityPolicy; -using WebKit::WebString; -using WebKit::WebView; +using blink::WebDocument; +using blink::WebFrame; +using blink::WebNetworkStateNotifier; +using blink::WebRuntimeFeatures; +using blink::WebScriptController; +using blink::WebSecurityPolicy; +using blink::WebString; +using blink::WebView; namespace content { @@ -236,7 +236,7 @@ void EnableWebCoreLogChannels(const std::string& channels) { return; base::StringTokenizer t(channels, ", "); while (t.GetNext()) - WebKit::enableLogChannel(t.token().c_str()); + blink::enableLogChannel(t.token().c_str()); } } // namespace @@ -312,7 +312,7 @@ void RenderThreadImpl::Init() { #if defined(OS_MACOSX) || defined(OS_ANDROID) // On Mac and Android, the select popups are rendered by the browser. - WebKit::WebView::setUseExternalPopupMenus(true); + blink::WebView::setUseExternalPopupMenus(true); #endif lazy_tls.Pointer()->Set(this); @@ -455,7 +455,7 @@ void RenderThreadImpl::Shutdown() { main_thread_indexed_db_dispatcher_.reset(); if (webkit_platform_support_) - WebKit::shutdown(); + blink::shutdown(); lazy_tls.Pointer()->Set(NULL); @@ -640,7 +640,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() { return; webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); - WebKit::initialize(webkit_platform_support_.get()); + blink::initialize(webkit_platform_support_.get()); const CommandLine& command_line = *CommandLine::ForCurrentProcess(); @@ -703,7 +703,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() { web_database_observer_impl_.reset( new WebDatabaseObserverImpl(sync_message_filter())); - WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); + blink::WebDatabase::setObserver(web_database_observer_impl_.get()); SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); @@ -886,7 +886,7 @@ RenderThreadImpl::GetGpuFactories() { make_scoped_ptr( WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( gpu_channel_host.get(), - WebKit::WebGraphicsContext3D::Attributes(), + blink::WebGraphicsContext3D::Attributes(), GURL("chrome://gpu/RenderThreadImpl::GetGpuVDAContext3D"))), "GPU-VideoAccelerator-Offscreen"); } @@ -900,7 +900,7 @@ RenderThreadImpl::GetGpuFactories() { scoped_ptr<WebGraphicsContext3DCommandBufferImpl> RenderThreadImpl::CreateOffscreenContext3d() { - WebKit::WebGraphicsContext3D::Attributes attributes; + blink::WebGraphicsContext3D::Attributes attributes; attributes.shareResources = true; attributes.depth = false; attributes.stencil = false; @@ -1212,8 +1212,8 @@ GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync( return gpu_channel_.get(); } -WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( - WebKit::WebMediaStreamCenterClient* client) { +blink::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( + blink::WebMediaStreamCenterClient* client) { #if defined(OS_ANDROID) if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableWebRTC)) @@ -1263,7 +1263,7 @@ void RenderThreadImpl::OnPurgePluginListCache(bool reload_pages) { // refresh temporarily to prevent each renderer process causing the list to be // regenerated. webkit_platform_support_->set_plugin_refresh_allowed(false); - WebKit::resetPluginCache(reload_pages); + blink::resetPluginCache(reload_pages); webkit_platform_support_->set_plugin_refresh_allowed(true); FOR_EACH_OBSERVER(RenderProcessObserver, observers_, PluginListChanged()); @@ -1296,7 +1296,7 @@ void RenderThreadImpl::OnMemoryPressure( // Trigger full v8 garbage collection on critical memory notification. v8::V8::LowMemoryNotification(); // Clear the image cache. - WebKit::WebImageCache::clear(); + blink::WebImageCache::clear(); // Purge Skia font cache, by setting it to 0 and then again to the previous // limit. size_t font_cache_limit = SkGraphics::SetFontCacheLimit(0); @@ -1341,7 +1341,7 @@ void RenderThreadImpl::SetFlingCurveParameters( } -void RenderThreadImpl::SampleGamepads(WebKit::WebGamepads* data) { +void RenderThreadImpl::SampleGamepads(blink::WebGamepads* data) { if (!gamepad_shared_memory_reader_) gamepad_shared_memory_reader_.reset(new GamepadSharedMemoryReader); gamepad_shared_memory_reader_->SampleGamepads(*data); diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index b0c0317..7492b92 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -27,7 +27,7 @@ class GrContext; class SkBitmap; struct ViewMsg_New_Params; -namespace WebKit { +namespace blink { class WebGamepads; class WebGraphicsContext3D; class WebMediaStreamCenter; @@ -224,8 +224,8 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread, // Creates the embedder implementation of WebMediaStreamCenter. // The resulting object is owned by WebKit and deleted by WebKit at tear-down. - WebKit::WebMediaStreamCenter* CreateMediaStreamCenter( - WebKit::WebMediaStreamCenterClient* client); + blink::WebMediaStreamCenter* CreateMediaStreamCenter( + blink::WebMediaStreamCenterClient* client); // Returns a factory used for creating RTC PeerConnection objects. MediaStreamDependencyFactory* GetMediaStreamDependencyFactory(); @@ -337,7 +337,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread, const std::vector<float>& new_touchscreen); // Retrieve current gamepad data. - void SampleGamepads(WebKit::WebGamepads* data); + void SampleGamepads(blink::WebGamepads* data); // Get the browser process's notion of the renderer process's ID. // This is the first argument to RenderWidgetHost::FromID. Ideally @@ -395,7 +395,7 @@ class CONTENT_EXPORT RenderThreadImpl : public RenderThread, scoped_ptr<RendererWebKitPlatformSupportImpl> webkit_platform_support_; // Used on the render thread and deleted by WebKit at shutdown. - WebKit::WebMediaStreamCenter* media_stream_center_; + blink::WebMediaStreamCenter* media_stream_center_; // Used on the renderer and IPC threads. scoped_refptr<DBMessageFilter> db_message_filter_; diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index b7afb5f..cd65e4f 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc @@ -57,13 +57,13 @@ #include "ui/events/x/events_x_utils.h" #endif -using WebKit::WebFrame; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebRuntimeFeatures; -using WebKit::WebString; -using WebKit::WebTextDirection; -using WebKit::WebURLError; +using blink::WebFrame; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebRuntimeFeatures; +using blink::WebString; +using blink::WebTextDirection; +using blink::WebURLError; namespace content { @@ -247,9 +247,9 @@ class RenderViewImplTest : public RenderViewTest { SendNativeKeyEvent(webkit_event); // Need to add a char event after the key down. - if (webkit_event.type == WebKit::WebInputEvent::RawKeyDown) { + if (webkit_event.type == blink::WebInputEvent::RawKeyDown) { NativeWebKeyboardEvent char_event = webkit_event; - char_event.type = WebKit::WebInputEvent::Char; + char_event.type = blink::WebInputEvent::Char; char_event.skip_in_browser = true; SendNativeKeyEvent(char_event); } @@ -322,13 +322,13 @@ TEST_F(RenderViewImplTest, OnNavigationHttpPost) { // Check post data sent to browser matches EXPECT_TRUE(host_nav_params.a.page_state.IsValid()); - const WebKit::WebHistoryItem item = PageStateToHistoryItem( + const blink::WebHistoryItem item = PageStateToHistoryItem( host_nav_params.a.page_state); - WebKit::WebHTTPBody body = item.httpBody(); - WebKit::WebHTTPBody::Element element; + blink::WebHTTPBody body = item.httpBody(); + blink::WebHTTPBody::Element element; bool successful = body.elementAt(0, element); EXPECT_TRUE(successful); - EXPECT_EQ(WebKit::WebHTTPBody::Element::TypeData, element.type); + EXPECT_EQ(blink::WebHTTPBody::Element::TypeData, element.type); EXPECT_EQ(length, element.data.size()); EXPECT_EQ(0, memcmp(raw_data, element.data.data(), length)); } @@ -341,38 +341,38 @@ TEST_F(RenderViewImplTest, DecideNavigationPolicy) { state.set_navigation_state(NavigationState::CreateContentInitiated()); // Navigations to normal HTTP URLs can be handled locally. - WebKit::WebURLRequest request(GURL("http://foo.com")); - WebKit::WebNavigationPolicy policy = view()->decidePolicyForNavigation( + blink::WebURLRequest request(GURL("http://foo.com")); + blink::WebNavigationPolicy policy = view()->decidePolicyForNavigation( GetMainFrame(), &state, request, - WebKit::WebNavigationTypeLinkClicked, - WebKit::WebNavigationPolicyCurrentTab, + blink::WebNavigationTypeLinkClicked, + blink::WebNavigationPolicyCurrentTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyCurrentTab, policy); + EXPECT_EQ(blink::WebNavigationPolicyCurrentTab, policy); // Verify that form posts to WebUI URLs will be sent to the browser process. - WebKit::WebURLRequest form_request(GURL("chrome://foo")); + blink::WebURLRequest form_request(GURL("chrome://foo")); form_request.setHTTPMethod("POST"); policy = view()->decidePolicyForNavigation( GetMainFrame(), &state, form_request, - WebKit::WebNavigationTypeFormSubmitted, - WebKit::WebNavigationPolicyCurrentTab, + blink::WebNavigationTypeFormSubmitted, + blink::WebNavigationPolicyCurrentTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy); + EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy); // Verify that popup links to WebUI URLs also are sent to browser. - WebKit::WebURLRequest popup_request(GURL("chrome://foo")); + blink::WebURLRequest popup_request(GURL("chrome://foo")); policy = view()->decidePolicyForNavigation( GetMainFrame(), &state, popup_request, - WebKit::WebNavigationTypeLinkClicked, - WebKit::WebNavigationPolicyNewForegroundTab, + blink::WebNavigationTypeLinkClicked, + blink::WebNavigationPolicyNewForegroundTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy); + EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy); } TEST_F(RenderViewImplTest, DecideNavigationPolicyForWebUI) { @@ -383,55 +383,55 @@ TEST_F(RenderViewImplTest, DecideNavigationPolicyForWebUI) { state.set_navigation_state(NavigationState::CreateContentInitiated()); // Navigations to normal HTTP URLs will be sent to browser process. - WebKit::WebURLRequest request(GURL("http://foo.com")); - WebKit::WebNavigationPolicy policy = view()->decidePolicyForNavigation( + blink::WebURLRequest request(GURL("http://foo.com")); + blink::WebNavigationPolicy policy = view()->decidePolicyForNavigation( GetMainFrame(), &state, request, - WebKit::WebNavigationTypeLinkClicked, - WebKit::WebNavigationPolicyCurrentTab, + blink::WebNavigationTypeLinkClicked, + blink::WebNavigationPolicyCurrentTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy); + EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy); // Navigations to WebUI URLs will also be sent to browser process. - WebKit::WebURLRequest webui_request(GURL("chrome://foo")); + blink::WebURLRequest webui_request(GURL("chrome://foo")); policy = view()->decidePolicyForNavigation( GetMainFrame(), &state, webui_request, - WebKit::WebNavigationTypeLinkClicked, - WebKit::WebNavigationPolicyCurrentTab, + blink::WebNavigationTypeLinkClicked, + blink::WebNavigationPolicyCurrentTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy); + EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy); // Verify that form posts to data URLs will be sent to the browser process. - WebKit::WebURLRequest data_request(GURL("data:text/html,foo")); + blink::WebURLRequest data_request(GURL("data:text/html,foo")); data_request.setHTTPMethod("POST"); policy = view()->decidePolicyForNavigation( GetMainFrame(), &state, data_request, - WebKit::WebNavigationTypeFormSubmitted, - WebKit::WebNavigationPolicyCurrentTab, + blink::WebNavigationTypeFormSubmitted, + blink::WebNavigationPolicyCurrentTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy); + EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy); // Verify that a popup that creates a view first and then navigates to a // normal HTTP URL will be sent to the browser process, even though the // new view does not have any enabled_bindings_. - WebKit::WebURLRequest popup_request(GURL("http://foo.com")); - WebKit::WebView* new_web_view = view()->createView( - GetMainFrame(), popup_request, WebKit::WebWindowFeatures(), "foo", - WebKit::WebNavigationPolicyNewForegroundTab); + blink::WebURLRequest popup_request(GURL("http://foo.com")); + blink::WebView* new_web_view = view()->createView( + GetMainFrame(), popup_request, blink::WebWindowFeatures(), "foo", + blink::WebNavigationPolicyNewForegroundTab); RenderViewImpl* new_view = RenderViewImpl::FromWebView(new_web_view); policy = new_view->decidePolicyForNavigation( new_web_view->mainFrame(), &state, popup_request, - WebKit::WebNavigationTypeLinkClicked, - WebKit::WebNavigationPolicyNewForegroundTab, + blink::WebNavigationTypeLinkClicked, + blink::WebNavigationPolicyNewForegroundTab, false); - EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy); + EXPECT_EQ(blink::WebNavigationPolicyIgnore, policy); // Clean up after the new view so we don't leak it. new_view->Close(); @@ -1007,7 +1007,7 @@ TEST_F(RenderViewImplTest, ImeComposition) { case IME_SETCOMPOSITION: view()->OnImeSetComposition( WideToUTF16Hack(ime_message->ime_string), - std::vector<WebKit::WebCompositionUnderline>(), + std::vector<blink::WebCompositionUnderline>(), ime_message->selection_start, ime_message->selection_end); break; @@ -1022,7 +1022,7 @@ TEST_F(RenderViewImplTest, ImeComposition) { case IME_CANCELCOMPOSITION: view()->OnImeSetComposition( string16(), - std::vector<WebKit::WebCompositionUnderline>(), + std::vector<blink::WebCompositionUnderline>(), 0, 0); break; } @@ -1066,8 +1066,8 @@ TEST_F(RenderViewImplTest, OnSetTextDirection) { WebTextDirection direction; const wchar_t* expected_result; } kTextDirection[] = { - { WebKit::WebTextDirectionRightToLeft, L"\x000A" L"rtl,rtl" }, - { WebKit::WebTextDirectionLeftToRight, L"\x000A" L"ltr,ltr" }, + { blink::WebTextDirectionRightToLeft, L"\x000A" L"rtl,rtl" }, + { blink::WebTextDirectionLeftToRight, L"\x000A" L"ltr,ltr" }, }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTextDirection); ++i) { // Set the text direction of the <textarea> element. @@ -1523,7 +1523,7 @@ TEST_F(RenderViewImplTest, DidFailProvisionalLoadWithErrorForCancellation) { // Regression test for http://crbug.com/41562 TEST_F(RenderViewImplTest, UpdateTargetURLWithInvalidURL) { const GURL invalid_gurl("http://"); - view()->setMouseOverURL(WebKit::WebURL(invalid_gurl)); + view()->setMouseOverURL(blink::WebURL(invalid_gurl)); EXPECT_EQ(invalid_gurl, view()->target_url_); } @@ -1712,7 +1712,7 @@ TEST_F(RenderViewImplTest, ContextMenu) { TEST_F(RenderViewImplTest, TestBackForward) { LoadHTML("<div id=pagename>Page A</div>"); - WebKit::WebHistoryItem page_a_item = GetMainFrame()->currentHistoryItem(); + blink::WebHistoryItem page_a_item = GetMainFrame()->currentHistoryItem(); int was_page_a = -1; string16 check_page_a = ASCIIToUTF16( @@ -1736,7 +1736,7 @@ TEST_F(RenderViewImplTest, TestBackForward) { EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(check_page_c, &was_page_c)); EXPECT_EQ(1, was_page_b); - WebKit::WebHistoryItem forward_item = GetMainFrame()->currentHistoryItem(); + blink::WebHistoryItem forward_item = GetMainFrame()->currentHistoryItem(); GoBack(GetMainFrame()->previousHistoryItem()); EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(check_page_b, &was_page_b)); EXPECT_EQ(1, was_page_b); @@ -1772,7 +1772,7 @@ TEST_F(RenderViewImplTest, GetCompositionCharacterBoundsTest) { ExecuteJavaScript("document.getElementById('test').focus();"); const string16 empty_string = UTF8ToUTF16(""); - const std::vector<WebKit::WebCompositionUnderline> empty_underline; + const std::vector<blink::WebCompositionUnderline> empty_underline; std::vector<gfx::Rect> bounds; view()->OnSetFocus(true); view()->OnSetInputMethodActive(true); @@ -1874,9 +1874,9 @@ TEST_F(RenderViewImplTest, SetEditableSelectionAndComposition) { "</html>"); ExecuteJavaScript("document.getElementById('test1').focus();"); view()->OnSetEditableSelectionOffsets(4, 8); - const std::vector<WebKit::WebCompositionUnderline> empty_underline; + const std::vector<blink::WebCompositionUnderline> empty_underline; view()->OnSetCompositionFromExistingText(7, 10, empty_underline); - WebKit::WebTextInputInfo info = view()->webview()->textInputInfo(); + blink::WebTextInputInfo info = view()->webview()->textInputInfo(); EXPECT_EQ(4, info.selectionStart); EXPECT_EQ(8, info.selectionEnd); EXPECT_EQ(7, info.compositionStart); @@ -1900,7 +1900,7 @@ TEST_F(RenderViewImplTest, OnExtendSelectionAndDelete) { ExecuteJavaScript("document.getElementById('test1').focus();"); view()->OnSetEditableSelectionOffsets(10, 10); view()->OnExtendSelectionAndDelete(3, 4); - WebKit::WebTextInputInfo info = view()->webview()->textInputInfo(); + blink::WebTextInputInfo info = view()->webview()->textInputInfo(); EXPECT_EQ("abcdefgopqrstuvwxyz", info.value); EXPECT_EQ(7, info.selectionStart); EXPECT_EQ(7, info.selectionEnd); @@ -1951,7 +1951,7 @@ TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) { SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame); EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); - const_cast<WebKit::WebURLResponse&>(frame->dataSource()->response()). + const_cast<blink::WebURLResponse&>(frame->dataSource()->response()). setSecurityInfo( SerializeSecurityInfo(0, net::CERT_STATUS_ALL_ERRORS, 0, 0)); ssl_status = view()->GetSSLStatusOfFrame(frame); @@ -2008,9 +2008,9 @@ class SuppressErrorPageTest : public RenderViewTest { } virtual void GetNavigationErrorStrings( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& failed_request, - const WebKit::WebURLError& error, + blink::WebFrame* frame, + const blink::WebURLRequest& failed_request, + const blink::WebURLError& error, const std::string& accept_languages, std::string* error_html, string16* error_description) OVERRIDE { diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 54fb187..3a2abf6 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -255,102 +255,102 @@ #include "content/renderer/media/rtc_peer_connection_handler.h" #endif -using WebKit::WebAXObject; -using WebKit::WebApplicationCacheHost; -using WebKit::WebApplicationCacheHostClient; -using WebKit::WebCString; -using WebKit::WebColor; -using WebKit::WebColorName; -using WebKit::WebConsoleMessage; -using WebKit::WebContextMenuData; -using WebKit::WebCookieJar; -using WebKit::WebData; -using WebKit::WebDataSource; -using WebKit::WebDocument; -using WebKit::WebDOMEvent; -using WebKit::WebDOMMessageEvent; -using WebKit::WebDragData; -using WebKit::WebDragOperation; -using WebKit::WebDragOperationsMask; -using WebKit::WebElement; -using WebKit::WebExternalPopupMenu; -using WebKit::WebExternalPopupMenuClient; -using WebKit::WebFileChooserCompletion; -using WebKit::WebFindOptions; -using WebKit::WebFormControlElement; -using WebKit::WebFormElement; -using WebKit::WebFrame; -using WebKit::WebGestureEvent; -using WebKit::WebHistoryItem; -using WebKit::WebHTTPBody; -using WebKit::WebIconURL; -using WebKit::WebImage; -using WebKit::WebInputElement; -using WebKit::WebInputEvent; -using WebKit::WebMediaPlayer; -using WebKit::WebMediaPlayerAction; -using WebKit::WebMediaPlayerClient; -using WebKit::WebMouseEvent; -using WebKit::WebNavigationPolicy; -using WebKit::WebNavigationType; -using WebKit::WebNode; -using WebKit::WebPageSerializer; -using WebKit::WebPageSerializerClient; -using WebKit::WebPeerConnection00Handler; -using WebKit::WebPeerConnection00HandlerClient; -using WebKit::WebPeerConnectionHandler; -using WebKit::WebPeerConnectionHandlerClient; -using WebKit::WebPluginAction; -using WebKit::WebPluginContainer; -using WebKit::WebPluginDocument; -using WebKit::WebPluginParams; -using WebKit::WebPoint; -using WebKit::WebPopupMenuInfo; -using WebKit::WebRange; -using WebKit::WebRect; -using WebKit::WebReferrerPolicy; -using WebKit::WebRuntimeFeatures; -using WebKit::WebScriptSource; -using WebKit::WebSearchableFormData; -using WebKit::WebSecurityOrigin; -using WebKit::WebSecurityPolicy; -using WebKit::WebSerializedScriptValue; -using WebKit::WebSettings; -using WebKit::WebSize; -using WebKit::WebSocketStreamHandle; -using WebKit::WebStorageNamespace; -using WebKit::WebStorageQuotaCallbacks; -using WebKit::WebStorageQuotaError; -using WebKit::WebStorageQuotaType; -using WebKit::WebString; -using WebKit::WebTextAffinity; -using WebKit::WebTextDirection; -using WebKit::WebTouchEvent; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; -using WebKit::WebUserGestureIndicator; -using WebKit::WebVector; -using WebKit::WebView; -using WebKit::WebWidget; -using WebKit::WebWindowFeatures; +using blink::WebAXObject; +using blink::WebApplicationCacheHost; +using blink::WebApplicationCacheHostClient; +using blink::WebCString; +using blink::WebColor; +using blink::WebColorName; +using blink::WebConsoleMessage; +using blink::WebContextMenuData; +using blink::WebCookieJar; +using blink::WebData; +using blink::WebDataSource; +using blink::WebDocument; +using blink::WebDOMEvent; +using blink::WebDOMMessageEvent; +using blink::WebDragData; +using blink::WebDragOperation; +using blink::WebDragOperationsMask; +using blink::WebElement; +using blink::WebExternalPopupMenu; +using blink::WebExternalPopupMenuClient; +using blink::WebFileChooserCompletion; +using blink::WebFindOptions; +using blink::WebFormControlElement; +using blink::WebFormElement; +using blink::WebFrame; +using blink::WebGestureEvent; +using blink::WebHistoryItem; +using blink::WebHTTPBody; +using blink::WebIconURL; +using blink::WebImage; +using blink::WebInputElement; +using blink::WebInputEvent; +using blink::WebMediaPlayer; +using blink::WebMediaPlayerAction; +using blink::WebMediaPlayerClient; +using blink::WebMouseEvent; +using blink::WebNavigationPolicy; +using blink::WebNavigationType; +using blink::WebNode; +using blink::WebPageSerializer; +using blink::WebPageSerializerClient; +using blink::WebPeerConnection00Handler; +using blink::WebPeerConnection00HandlerClient; +using blink::WebPeerConnectionHandler; +using blink::WebPeerConnectionHandlerClient; +using blink::WebPluginAction; +using blink::WebPluginContainer; +using blink::WebPluginDocument; +using blink::WebPluginParams; +using blink::WebPoint; +using blink::WebPopupMenuInfo; +using blink::WebRange; +using blink::WebRect; +using blink::WebReferrerPolicy; +using blink::WebRuntimeFeatures; +using blink::WebScriptSource; +using blink::WebSearchableFormData; +using blink::WebSecurityOrigin; +using blink::WebSecurityPolicy; +using blink::WebSerializedScriptValue; +using blink::WebSettings; +using blink::WebSize; +using blink::WebSocketStreamHandle; +using blink::WebStorageNamespace; +using blink::WebStorageQuotaCallbacks; +using blink::WebStorageQuotaError; +using blink::WebStorageQuotaType; +using blink::WebString; +using blink::WebTextAffinity; +using blink::WebTextDirection; +using blink::WebTouchEvent; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLRequest; +using blink::WebURLResponse; +using blink::WebUserGestureIndicator; +using blink::WebVector; +using blink::WebView; +using blink::WebWidget; +using blink::WebWindowFeatures; using base::Time; using base::TimeDelta; using webkit_glue::WebURLResponseExtraDataImpl; #if defined(OS_ANDROID) -using WebKit::WebContentDetectionResult; -using WebKit::WebFloatPoint; -using WebKit::WebFloatRect; -using WebKit::WebHitTestResult; +using blink::WebContentDetectionResult; +using blink::WebFloatPoint; +using blink::WebFloatRect; +using blink::WebHitTestResult; #endif namespace content { //----------------------------------------------------------------------------- -typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; +typedef std::map<blink::WebView*, RenderViewImpl*> ViewMap; static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER; typedef std::map<int32, RenderViewImpl*> RoutingIDViewMap; static base::LazyInstance<RoutingIDViewMap> g_routing_id_view_map = @@ -520,13 +520,13 @@ static bool IsNonLocalTopLevelNavigation(const GURL& url, if (!url.SchemeIs(kHttpScheme) && !url.SchemeIs(kHttpsScheme)) return false; - if (type != WebKit::WebNavigationTypeReload && - type != WebKit::WebNavigationTypeBackForward && !is_form_post) { + if (type != blink::WebNavigationTypeReload && + type != blink::WebNavigationTypeBackForward && !is_form_post) { // The opener relationship between the new window and the parent allows the // new window to script the parent and vice versa. This is not allowed if // the origins of the two domains are different. This can be treated as a // top level navigation and routed back to the host. - WebKit::WebFrame* opener = frame->opener(); + blink::WebFrame* opener = frame->opener(); if (!opener) return true; @@ -536,11 +536,11 @@ static bool IsNonLocalTopLevelNavigation(const GURL& url, return false; } -static void NotifyTimezoneChange(WebKit::WebFrame* frame) { +static void NotifyTimezoneChange(blink::WebFrame* frame) { v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); v8::Context::Scope context_scope(frame->mainWorldScriptContext()); v8::Date::DateTimeConfigurationChangeNotification(); - WebKit::WebFrame* child = frame->firstChild(); + blink::WebFrame* child = frame->firstChild(); for (; child; child = child->nextSibling()) NotifyTimezoneChange(child); } @@ -548,19 +548,19 @@ static void NotifyTimezoneChange(WebKit::WebFrame* frame) { static WindowOpenDisposition NavigationPolicyToDisposition( WebNavigationPolicy policy) { switch (policy) { - case WebKit::WebNavigationPolicyIgnore: + case blink::WebNavigationPolicyIgnore: return IGNORE_ACTION; - case WebKit::WebNavigationPolicyDownload: + case blink::WebNavigationPolicyDownload: return SAVE_TO_DISK; - case WebKit::WebNavigationPolicyCurrentTab: + case blink::WebNavigationPolicyCurrentTab: return CURRENT_TAB; - case WebKit::WebNavigationPolicyNewBackgroundTab: + case blink::WebNavigationPolicyNewBackgroundTab: return NEW_BACKGROUND_TAB; - case WebKit::WebNavigationPolicyNewForegroundTab: + case blink::WebNavigationPolicyNewForegroundTab: return NEW_FOREGROUND_TAB; - case WebKit::WebNavigationPolicyNewWindow: + case blink::WebNavigationPolicyNewWindow: return NEW_WINDOW; - case WebKit::WebNavigationPolicyNewPopup: + case blink::WebNavigationPolicyNewPopup: return NEW_POPUP; default: NOTREACHED() << "Unexpected WebNavigationPolicy"; @@ -680,15 +680,15 @@ static bool ShouldUseAcceleratedFixedRootBackground(float device_scale_factor) { return DeviceScaleEnsuresTextQuality(device_scale_factor); } -static FaviconURL::IconType ToFaviconType(WebKit::WebIconURL::Type type) { +static FaviconURL::IconType ToFaviconType(blink::WebIconURL::Type type) { switch (type) { - case WebKit::WebIconURL::TypeFavicon: + case blink::WebIconURL::TypeFavicon: return FaviconURL::FAVICON; - case WebKit::WebIconURL::TypeTouch: + case blink::WebIconURL::TypeTouch: return FaviconURL::TOUCH_ICON; - case WebKit::WebIconURL::TypeTouchPrecomposed: + case blink::WebIconURL::TypeTouchPrecomposed: return FaviconURL::TOUCH_PRECOMPOSED_ICON; - case WebKit::WebIconURL::TypeInvalid: + case blink::WebIconURL::TypeInvalid: return FaviconURL::INVALID_ICON; } return FaviconURL::INVALID_ICON; @@ -709,7 +709,7 @@ namespace { class WebWidgetLockTarget : public MouseLockDispatcher::LockTarget { public: - explicit WebWidgetLockTarget(WebKit::WebWidget* webwidget) + explicit WebWidgetLockTarget(blink::WebWidget* webwidget) : webwidget_(webwidget) {} virtual void OnLockMouseACK(bool succeeded) OVERRIDE { @@ -724,13 +724,13 @@ class WebWidgetLockTarget : public MouseLockDispatcher::LockTarget { } virtual bool HandleMouseLockedInputEvent( - const WebKit::WebMouseEvent &event) OVERRIDE { + const blink::WebMouseEvent &event) OVERRIDE { // The WebWidget handles mouse lock in WebKit's handleInputEvent(). return false; } private: - WebKit::WebWidget* webwidget_; + blink::WebWidget* webwidget_; }; int64 ExtractPostId(const WebHistoryItem& item) { @@ -820,7 +820,7 @@ WebDragData DropDataToWebDragData(const DropData& drop_data) { } // namespace RenderViewImpl::RenderViewImpl(RenderViewImplParams* params) - : RenderWidget(WebKit::WebPopupTypeNone, + : RenderWidget(blink::WebPopupTypeNone, params->screen_info, params->swapped_out, params->hidden), @@ -1073,7 +1073,7 @@ RenderViewImpl* RenderViewImpl::FromWebView(WebView* webview) { } /*static*/ -RenderView* RenderView::FromWebView(WebKit::WebView* webview) { +RenderView* RenderView::FromWebView(blink::WebView* webview) { return RenderViewImpl::FromWebView(webview); } @@ -1112,7 +1112,7 @@ RenderViewImpl* RenderViewImpl::Create( bool swapped_out, bool hidden, int32 next_page_id, - const WebKit::WebScreenInfo& screen_info, + const blink::WebScreenInfo& screen_info, AccessibilityMode accessibility_mode, bool allow_partial_swap) { DCHECK(routing_id != MSG_ROUTING_NONE); @@ -1157,8 +1157,8 @@ void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { observers_.RemoveObserver(observer); } -WebKit::WebView* RenderViewImpl::webview() const { - return static_cast<WebKit::WebView*>(webwidget()); +blink::WebView* RenderViewImpl::webview() const { + return static_cast<blink::WebView*>(webwidget()); } #if defined(ENABLE_PLUGINS) @@ -1177,7 +1177,7 @@ void RenderViewImpl::PepperInstanceDeleted(PepperPluginInstanceImpl* instance) { void RenderViewImpl::PepperDidChangeCursor( PepperPluginInstanceImpl* instance, - const WebKit::WebCursorInfo& cursor) { + const blink::WebCursorInfo& cursor) { // Update the cursor appearance immediately if the requesting plugin is the // one which receives the last mouse event. Otherwise, the new cursor won't be // picked up until the plugin gets the next input event. That is bad if, e.g., @@ -1244,7 +1244,7 @@ RenderWidgetFullscreenPepper* RenderViewImpl::CreatePepperFullscreenContainer( active_url = GURL(webview()->mainFrame()->document().url()); RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( routing_id_, plugin, active_url, screen_info_); - widget->show(WebKit::WebNavigationPolicyIgnore); + widget->show(blink::WebNavigationPolicyIgnore); return widget; } @@ -1306,7 +1306,7 @@ bool RenderViewImpl::GetPluginInfo(const GURL& url, void RenderViewImpl::SimulateImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { OnImeSetComposition(text, underlines, selection_start, selection_end); @@ -1344,7 +1344,7 @@ void RenderViewImpl::StartPluginIme() { #endif // ENABLE_PLUGINS void RenderViewImpl::TransferActiveWheelFlingAnimation( - const WebKit::WebActiveWheelFlingParameters& params) { + const blink::WebActiveWheelFlingParameters& params) { if (webview()) webview()->transferActiveWheelFlingAnimation(params); } @@ -1840,7 +1840,7 @@ void RenderViewImpl::OnReplaceMisspelling(const string16& text) { void RenderViewImpl::OnScrollFocusedEditableNodeIntoRect( const gfx::Rect& rect) { - WebKit::WebNode node = GetFocusedNode(); + blink::WebNode node = GetFocusedNode(); if (!node.isNull()) { if (IsEditableNode(node)) { webview()->saveScrollAndScaleState(); @@ -1924,7 +1924,7 @@ void RenderViewImpl::OnSetEditableSelectionOffsets(int start, int end) { void RenderViewImpl::OnSetCompositionFromExistingText( int start, int end, - const std::vector<WebKit::WebCompositionUnderline>& underlines) { + const std::vector<blink::WebCompositionUnderline>& underlines) { if (!ShouldHandleImeEvent()) return; ImeEventGuard guard(this); @@ -2133,7 +2133,7 @@ void RenderViewImpl::UpdateURL(WebFrame* frame) { // Save some histogram data so we can compute the average memory used per // page load of the glyphs. UMA_HISTOGRAM_COUNTS_10000("Memory.GlyphPagesPerLoad", - WebKit::WebGlyphCache::pageCount()); + blink::WebGlyphCache::pageCount()); // This message needs to be sent before any of allowScripts(), // allowImages(), allowPlugins() is called for the new page, so that when @@ -2239,10 +2239,10 @@ void RenderViewImpl::OpenURL(WebFrame* frame, if (GetContentClient()->renderer()->AllowPopup()) params.user_gesture = true; - if (policy == WebKit::WebNavigationPolicyNewBackgroundTab || - policy == WebKit::WebNavigationPolicyNewForegroundTab || - policy == WebKit::WebNavigationPolicyNewWindow || - policy == WebKit::WebNavigationPolicyNewPopup) { + if (policy == blink::WebNavigationPolicyNewBackgroundTab || + policy == blink::WebNavigationPolicyNewForegroundTab || + policy == blink::WebNavigationPolicyNewWindow || + policy == blink::WebNavigationPolicyNewPopup) { WebUserGestureIndicator::consumeUserGesture(); } @@ -2338,7 +2338,7 @@ void RenderViewImpl::OnWindowSnapshotCompleted(const int snapshot_id, } } -// WebKit::WebViewClient ------------------------------------------------------ +// blink::WebViewClient ------------------------------------------------------ WebView* RenderViewImpl::createView( WebFrame* creator, @@ -2444,7 +2444,7 @@ WebView* RenderViewImpl::createView( return view->webview(); } -WebWidget* RenderViewImpl::createPopupMenu(WebKit::WebPopupType popup_type) { +WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { RenderWidget* widget = RenderWidget::Create(routing_id_, popup_type, screen_info_); if (screen_metrics_emulator_) { @@ -2530,7 +2530,7 @@ void RenderViewImpl::printPage(WebFrame* frame) { PrintPage(frame, handling_input_event_)); } -WebKit::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { +blink::WebNotificationPresenter* RenderViewImpl::notificationPresenter() { return notification_provider_; } @@ -2546,7 +2546,7 @@ bool RenderViewImpl::enumerateChosenDirectory( } void RenderViewImpl::initializeHelperPluginWebFrame( - WebKit::WebHelperPlugin* plugin) { + blink::WebHelperPlugin* plugin) { plugin->initializeFrame(main_render_frame_.get()); } @@ -2650,9 +2650,9 @@ bool RenderViewImpl::handleCurrentKeyboardEvent() { return did_execute_command; } -WebKit::WebColorChooser* RenderViewImpl::createColorChooser( - WebKit::WebColorChooserClient* client, - const WebKit::WebColor& initial_color) { +blink::WebColorChooser* RenderViewImpl::createColorChooser( + blink::WebColorChooserClient* client, + const blink::WebColor& initial_color) { RendererWebColorChooserImpl* color_chooser = new RendererWebColorChooserImpl(this, client); color_chooser->Open(static_cast<SkColor>(initial_color)); @@ -2660,7 +2660,7 @@ WebKit::WebColorChooser* RenderViewImpl::createColorChooser( } bool RenderViewImpl::runFileChooser( - const WebKit::WebFileChooserParams& params, + const blink::WebFileChooserParams& params, WebFileChooserCompletion* chooser_completion) { // Do not open the file dialog in a hidden RenderView. if (is_hidden()) @@ -2725,7 +2725,7 @@ bool RenderViewImpl::runModalBeforeUnloadDialog( bool is_reload = false; WebDataSource* ds = frame->provisionalDataSource(); if (ds) - is_reload = (ds->navigationType() == WebKit::WebNavigationTypeReload); + is_reload = (ds->navigationType() == blink::WebNavigationTypeReload); return runModalBeforeUnloadDialog(frame, is_reload, message); } @@ -2956,7 +2956,7 @@ int RenderViewImpl::historyForwardListCount() { } void RenderViewImpl::postAccessibilityEvent( - const WebAXObject& obj, WebKit::WebAXEvent event) { + const WebAXObject& obj, blink::WebAXEvent event) { if (renderer_accessibility_) { renderer_accessibility_->HandleWebAccessibilityEvent(obj, event); } @@ -2969,7 +2969,7 @@ void RenderViewImpl::didUpdateInspectorSetting(const WebString& key, value.utf8())); } -// WebKit::WebWidgetClient ---------------------------------------------------- +// blink::WebWidgetClient ---------------------------------------------------- void RenderViewImpl::didFocus() { // TODO(jcivelli): when https://bugs.webkit.org/show_bug.cgi?id=33389 is fixed @@ -3013,8 +3013,8 @@ void RenderViewImpl::show(WebNavigationPolicy policy) { // We exempt background tabs for compat with older versions of Chrome. // TODO(darin): This seems bogus. These should have a user gesture, so // we probably don't need this check. - if (policy != WebKit::WebNavigationPolicyNewBackgroundTab) - policy = WebKit::WebNavigationPolicyNewPopup; + if (policy != blink::WebNavigationPolicyNewBackgroundTab) + policy = blink::WebNavigationPolicyNewPopup; } // NOTE: initial_pos_ may still have its default values at this point, but @@ -3101,10 +3101,10 @@ void RenderViewImpl::initializeLayerTreeView() { webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); } -// WebKit::WebFrameClient ----------------------------------------------------- +// blink::WebFrameClient ----------------------------------------------------- WebMediaPlayer* RenderViewImpl::createMediaPlayer( - WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) { + WebFrame* frame, const blink::WebURL& url, WebMediaPlayerClient* client) { FOR_EACH_OBSERVER( RenderViewObserver, observers_, WillCreateMediaPlayer(frame, client)); @@ -3146,7 +3146,7 @@ void RenderViewImpl::didAccessInitialDocument(WebFrame* frame) { Send(new ViewHostMsg_DidAccessInitialDocument(routing_id_)); } -void RenderViewImpl::didDisownOpener(WebKit::WebFrame* frame) { +void RenderViewImpl::didDisownOpener(blink::WebFrame* frame) { // We only need to notify the browser if the active, top-level frame clears // its opener. We can ignore cases where a swapped out frame clears its // opener after hearing about it from the browser, and the browser does not @@ -3190,7 +3190,7 @@ void RenderViewImpl::ClearEditCommands() { edit_commands_.clear(); } -SSLStatus RenderViewImpl::GetSSLStatusOfFrame(WebKit::WebFrame* frame) const { +SSLStatus RenderViewImpl::GetSSLStatusOfFrame(blink::WebFrame* frame) const { std::string security_info; if (frame && frame->dataSource()) security_info = frame->dataSource()->response().securityInfo(); @@ -3216,7 +3216,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( GetContentClient()->renderer()->HandleNavigation(frame, request, type, default_policy, is_redirect)) { - return WebKit::WebNavigationPolicyIgnore; + return blink::WebNavigationPolicyIgnore; } Referrer referrer(GetReferrerFromRequest(frame, request)); @@ -3232,12 +3232,12 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( // fixing http://crbug.com/101395. if (frame->parent() == NULL) { OpenURL(frame, request.url(), referrer, default_policy); - return WebKit::WebNavigationPolicyIgnore; // Suppress the load here. + return blink::WebNavigationPolicyIgnore; // Suppress the load here. } // We should otherwise ignore in-process iframe navigations, if they // arrive just after we are swapped out. - return WebKit::WebNavigationPolicyIgnore; + return blink::WebNavigationPolicyIgnore; } // Allow kSwappedOutURL to complete. @@ -3276,14 +3276,14 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); if (!same_domain_or_host || frame_url.scheme() != url.scheme()) { OpenURL(frame, url, referrer, default_policy); - return WebKit::WebNavigationPolicyIgnore; + return blink::WebNavigationPolicyIgnore; } } // If the browser is interested, then give it a chance to look at the request. if (is_content_initiated) { - bool is_form_post = ((type == WebKit::WebNavigationTypeFormSubmitted) || - (type == WebKit::WebNavigationTypeFormResubmitted)) && + bool is_form_post = ((type == blink::WebNavigationTypeFormSubmitted) || + (type == blink::WebNavigationTypeFormResubmitted)) && EqualsASCII(request.httpMethod(), "POST"); bool browser_handles_request = renderer_preferences_.browser_handles_non_local_top_level_requests && @@ -3300,7 +3300,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( page_id_ = -1; last_page_id_sent_to_browser_ = -1; OpenURL(frame, url, referrer, default_policy); - return WebKit::WebNavigationPolicyIgnore; // Suppress the load here. + return blink::WebNavigationPolicyIgnore; // Suppress the load here. } } @@ -3342,7 +3342,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || url.SchemeIs(kViewSourceScheme) || (frame->isViewSourceModeEnabled() && - type != WebKit::WebNavigationTypeReload); + type != blink::WebNavigationTypeReload); if (!should_fork && url.SchemeIs(chrome::kFileScheme)) { // Fork non-file to file opens. Check the opener URL if this is the @@ -3364,7 +3364,7 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( if (should_fork) { OpenURL( frame, url, send_referrer ? referrer : Referrer(), default_policy); - return WebKit::WebNavigationPolicyIgnore; // Suppress the load here. + return blink::WebNavigationPolicyIgnore; // Suppress the load here. } } @@ -3396,14 +3396,14 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( // Must not have issued the request from this page. is_content_initiated && // Must be targeted at the current tab. - default_policy == WebKit::WebNavigationPolicyCurrentTab && + default_policy == blink::WebNavigationPolicyCurrentTab && // Must be a JavaScript navigation, which appears as "other". - type == WebKit::WebNavigationTypeOther; + type == blink::WebNavigationTypeOther; if (is_fork) { // Open the URL via the browser, not via WebKit. OpenURL(frame, url, Referrer(), default_policy); - return WebKit::WebNavigationPolicyIgnore; + return blink::WebNavigationPolicyIgnore; } return default_policy; @@ -3417,8 +3417,8 @@ WebNavigationPolicy RenderViewImpl::decidePolicyForNavigation( request, type, default_policy, is_redirect); } -void RenderViewImpl::willSendSubmitEvent(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form) { +void RenderViewImpl::willSendSubmitEvent(blink::WebFrame* frame, + const blink::WebFormElement& form) { FOR_EACH_OBSERVER( RenderViewObserver, observers_, WillSendSubmitEvent(frame, form)); } @@ -4159,7 +4159,7 @@ void RenderViewImpl::didChangeScrollOffset(WebFrame* frame) { RenderViewObserver, observers_, DidChangeScrollOffset(frame)); } -void RenderViewImpl::willInsertBody(WebKit::WebFrame* frame) { +void RenderViewImpl::willInsertBody(blink::WebFrame* frame) { NOTREACHED(); } @@ -4246,10 +4246,10 @@ void RenderViewImpl::requestStorageQuota( } bool RenderViewImpl::willCheckAndDispatchMessageEvent( - WebKit::WebFrame* sourceFrame, - WebKit::WebFrame* targetFrame, - WebKit::WebSecurityOrigin target_origin, - WebKit::WebDOMMessageEvent event) { + blink::WebFrame* sourceFrame, + blink::WebFrame* targetFrame, + blink::WebSecurityOrigin target_origin, + blink::WebDOMMessageEvent event) { if (!is_swapped_out_) return false; @@ -4259,7 +4259,7 @@ bool RenderViewImpl::willCheckAndDispatchMessageEvent( if (!target_origin.isNull()) params.target_origin = target_origin.toString(); - WebKit::WebMessagePortChannelArray channels = event.releaseChannels(); + blink::WebMessagePortChannelArray channels = event.releaseChannels(); if (!channels.isEmpty()) { std::vector<int> message_port_ids(channels.size()); // Extract the port IDs from the channel array. @@ -4293,24 +4293,24 @@ void RenderViewImpl::willOpenSocketStream( } void RenderViewImpl::willStartUsingPeerConnectionHandler( - WebKit::WebFrame* frame, WebKit::WebRTCPeerConnectionHandler* handler) { + blink::WebFrame* frame, blink::WebRTCPeerConnectionHandler* handler) { NOTREACHED(); } -WebKit::WebString RenderViewImpl::acceptLanguages() { +blink::WebString RenderViewImpl::acceptLanguages() { return WebString::fromUTF8(renderer_preferences_.accept_languages); } -WebKit::WebString RenderViewImpl::userAgentOverride( - WebKit::WebFrame* frame, - const WebKit::WebURL& url) { +blink::WebString RenderViewImpl::userAgentOverride( + blink::WebFrame* frame, + const blink::WebURL& url) { NOTREACHED(); - return WebKit::WebString(); + return blink::WebString(); } WebString RenderViewImpl::doNotTrackValue(WebFrame* frame) { NOTREACHED(); - return WebKit::WebString(); + return blink::WebString(); } bool RenderViewImpl::allowWebGL(WebFrame* frame, bool default_value) { @@ -4319,12 +4319,12 @@ bool RenderViewImpl::allowWebGL(WebFrame* frame, bool default_value) { } void RenderViewImpl::didLoseWebGLContext( - WebKit::WebFrame* frame, + blink::WebFrame* frame, int arb_robustness_status_code) { NOTREACHED(); } -// WebKit::WebPageSerializerClient implementation ------------------------------ +// blink::WebPageSerializerClient implementation ------------------------------ void RenderViewImpl::didSerializeDataForFrame( const WebURL& frame_url, @@ -4363,11 +4363,11 @@ void RenderViewImpl::SetWebkitPreferences(const WebPreferences& preferences) { OnUpdateWebPreferences(preferences); } -WebKit::WebView* RenderViewImpl::GetWebView() { +blink::WebView* RenderViewImpl::GetWebView() { return webview(); } -WebKit::WebNode RenderViewImpl::GetFocusedNode() const { +blink::WebNode RenderViewImpl::GetFocusedNode() const { if (!webview()) return WebNode(); WebFrame* focused_frame = webview()->focusedFrame(); @@ -4380,7 +4380,7 @@ WebKit::WebNode RenderViewImpl::GetFocusedNode() const { return WebNode(); } -WebKit::WebNode RenderViewImpl::GetContextMenuNode() const { +blink::WebNode RenderViewImpl::GetContextMenuNode() const { return context_menu_node_; } @@ -4409,10 +4409,10 @@ bool RenderViewImpl::IsEditableNode(const WebNode& node) const { return false; } -WebKit::WebPlugin* RenderViewImpl::CreatePlugin( - WebKit::WebFrame* frame, +blink::WebPlugin* RenderViewImpl::CreatePlugin( + blink::WebFrame* frame, const WebPluginInfo& info, - const WebKit::WebPluginParams& params) { + const blink::WebPluginParams& params) { #if defined(ENABLE_PLUGINS) bool pepper_plugin_was_registered = false; scoped_refptr<PluginModule> pepper_module(PluginModule::Create( @@ -4486,19 +4486,19 @@ void RenderViewImpl::CancelContextMenu(int request_id) { pending_context_menus_.Remove(request_id); } -WebKit::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { +blink::WebPageVisibilityState RenderViewImpl::GetVisibilityState() const { return visibilityState(); } -void RenderViewImpl::RunModalAlertDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message) { +void RenderViewImpl::RunModalAlertDialog(blink::WebFrame* frame, + const blink::WebString& message) { return runModalAlertDialog(frame, message); } void RenderViewImpl::LoadURLExternally( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy) { + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy) { main_render_frame_->loadURLExternally(frame, request, policy); } @@ -4510,7 +4510,7 @@ void RenderViewImpl::DidStopLoading() { didStopLoading(); } -void RenderViewImpl::DidPlay(WebKit::WebMediaPlayer* player) { +void RenderViewImpl::DidPlay(blink::WebMediaPlayer* player) { Send(new ViewHostMsg_MediaNotification(routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), @@ -4518,7 +4518,7 @@ void RenderViewImpl::DidPlay(WebKit::WebMediaPlayer* player) { true)); } -void RenderViewImpl::DidPause(WebKit::WebMediaPlayer* player) { +void RenderViewImpl::DidPause(blink::WebMediaPlayer* player) { Send(new ViewHostMsg_MediaNotification(routing_id_, reinterpret_cast<int64>(player), player->hasVideo(), @@ -4526,7 +4526,7 @@ void RenderViewImpl::DidPause(WebKit::WebMediaPlayer* player) { false)); } -void RenderViewImpl::PlayerGone(WebKit::WebMediaPlayer* player) { +void RenderViewImpl::PlayerGone(blink::WebMediaPlayer* player) { DidPause(player); } @@ -4560,7 +4560,7 @@ void RenderViewImpl::SyncSelectionIfRequired() { range = gfx::Range(location, location + length); - if (webview()->textInputInfo().type != WebKit::WebTextInputTypeNone) { + if (webview()->textInputInfo().type != blink::WebTextInputTypeNone) { // If current focused element is editable, we will send 100 more chars // before and after selection. It is for input method surrounding text // feature. @@ -4656,7 +4656,7 @@ GURL RenderViewImpl::GetAlternateErrorPageURL(const GURL& failed_url, return url; } -GURL RenderViewImpl::GetLoadingUrl(WebKit::WebFrame* frame) const { +GURL RenderViewImpl::GetLoadingUrl(blink::WebFrame* frame) const { WebDataSource* ds = frame->dataSource(); if (ds->hasUnreachableURL()) return ds->unreachableURL(); @@ -4665,7 +4665,7 @@ GURL RenderViewImpl::GetLoadingUrl(WebKit::WebFrame* frame) const { return request.url(); } -WebKit::WebPlugin* RenderViewImpl::GetWebPluginFromPluginDocument() { +blink::WebPlugin* RenderViewImpl::GetWebPluginFromPluginDocument() { return webview()->mainFrame()->document().to<WebPluginDocument>().plugin(); } @@ -5001,7 +5001,7 @@ void RenderViewImpl::OnPostMessageEvent( // If the message contained MessagePorts, create the corresponding endpoints. DCHECK_EQ(params.message_port_ids.size(), params.new_routing_ids.size()); - WebKit::WebMessagePortChannelArray channels(params.message_port_ids.size()); + blink::WebMessagePortChannelArray channels(params.message_port_ids.size()); for (size_t i = 0; i < params.message_port_ids.size() && i < params.new_routing_ids.size(); ++i) { @@ -5235,9 +5235,9 @@ void RenderViewImpl::OnSetRendererPrefs( #if defined(USE_DEFAULT_RENDER_THEME) || defined(TOOLKIT_GTK) if (renderer_prefs.use_custom_colors) { - WebColorName name = WebKit::WebColorWebkitFocusRingColor; - WebKit::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); - WebKit::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); + WebColorName name = blink::WebColorWebkitFocusRingColor; + blink::setNamedColors(&name, &renderer_prefs.focus_ring_color, 1); + blink::setCaretBlinkInterval(renderer_prefs.caret_blink_interval); #if defined(TOOLKIT_GTK) ui::NativeTheme::instance()->SetScrollbarColors( renderer_prefs.thumb_inactive_color, @@ -5297,7 +5297,7 @@ void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( // Prepare list to storage all savable resource links. std::vector<GURL> resources_list; std::vector<GURL> referrer_urls_list; - std::vector<WebKit::WebReferrerPolicy> referrer_policies_list; + std::vector<blink::WebReferrerPolicy> referrer_policies_list; std::vector<GURL> frames_list; SavableResourcesResult result(&resources_list, &referrer_urls_list, @@ -5394,7 +5394,7 @@ void RenderViewImpl::OnSwapOut() { // Let WebKit know that this view is hidden so it can drop resources and // stop compositing. - webview()->setVisibilityState(WebKit::WebPageVisibilityStateHidden, false); + webview()->setVisibilityState(blink::WebPageVisibilityStateHidden, false); } // It is now safe to show modal dialogs again. @@ -5403,7 +5403,7 @@ void RenderViewImpl::OnSwapOut() { Send(new ViewHostMsg_SwapOut_ACK(routing_id_)); } -void RenderViewImpl::NavigateToSwappedOutURL(WebKit::WebFrame* frame) { +void RenderViewImpl::NavigateToSwappedOutURL(blink::WebFrame* frame) { // We use loadRequest instead of loadHTMLString because the former commits // synchronously. Otherwise a new navigation can interrupt the navigation // to kSwappedOutURL. If that happens to be to the page we had been @@ -5713,7 +5713,7 @@ void RenderViewImpl::DidHandleKeyEvent() { ClearEditCommands(); } -bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { +bool RenderViewImpl::WillHandleMouseEvent(const blink::WebMouseEvent& event) { context_menu_source_type_ = ui::MENU_SOURCE_MOUSE; possible_drag_event_info_.event_source = ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE; @@ -5736,13 +5736,13 @@ bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { return mouse_lock_dispatcher_->WillHandleMouseEvent(event); } -bool RenderViewImpl::WillHandleKeyEvent(const WebKit::WebKeyboardEvent& event) { +bool RenderViewImpl::WillHandleKeyEvent(const blink::WebKeyboardEvent& event) { context_menu_source_type_ = ui::MENU_SOURCE_KEYBOARD; return false; } bool RenderViewImpl::WillHandleGestureEvent( - const WebKit::WebGestureEvent& event) { + const blink::WebGestureEvent& event) { context_menu_source_type_ = ui::MENU_SOURCE_TOUCH; possible_drag_event_info_.event_source = ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH; @@ -5863,7 +5863,7 @@ void RenderViewImpl::OnSetFocus(bool enable) { void RenderViewImpl::OnImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) { #if defined(ENABLE_PLUGINS) @@ -5947,8 +5947,8 @@ void RenderViewImpl::OnImeConfirmComposition( base::i18n::UTF16CharIterator iterator(&last_text); int32 i = 0; while (iterator.Advance()) { - WebKit::WebKeyboardEvent char_event; - char_event.type = WebKit::WebInputEvent::Char; + blink::WebKeyboardEvent char_event; + char_event.type = blink::WebInputEvent::Char; char_event.timeStampSeconds = base::Time::Now().ToDoubleT(); char_event.modifiers = 0; char_event.windowsKeyCode = last_text[i]; @@ -6073,12 +6073,12 @@ void RenderViewImpl::GetCompositionCharacterBounds( if (character_count == 0) return; - WebKit::WebFrame* frame = webview()->focusedFrame(); + blink::WebFrame* frame = webview()->focusedFrame(); if (!frame) return; bounds->reserve(character_count); - WebKit::WebRect webrect; + blink::WebRect webrect; for (size_t i = 0; i < character_count; ++i) { if (!frame->firstRectForCharacterRange(start_offset + i, 1, webrect)) { DLOG(ERROR) << "Could not retrieve character rectangle at " << i; @@ -6177,14 +6177,14 @@ bool RenderViewImpl::ScheduleFileChooser( return true; } -WebKit::WebGeolocationClient* RenderViewImpl::geolocationClient() { +blink::WebGeolocationClient* RenderViewImpl::geolocationClient() { if (!geolocation_dispatcher_) geolocation_dispatcher_ = new GeolocationDispatcher(this); return geolocation_dispatcher_; } -WebKit::WebSpeechInputController* RenderViewImpl::speechInputController( - WebKit::WebSpeechInputListener* listener) { +blink::WebSpeechInputController* RenderViewImpl::speechInputController( + blink::WebSpeechInputListener* listener) { #if defined(ENABLE_INPUT_SPEECH) if (!input_tag_speech_dispatcher_) input_tag_speech_dispatcher_ = @@ -6193,7 +6193,7 @@ WebKit::WebSpeechInputController* RenderViewImpl::speechInputController( return input_tag_speech_dispatcher_; } -WebKit::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() { +blink::WebSpeechRecognizer* RenderViewImpl::speechRecognizer() { if (!speech_recognition_dispatcher_) speech_recognition_dispatcher_ = new SpeechRecognitionDispatcher(this); return speech_recognition_dispatcher_; @@ -6253,11 +6253,11 @@ void RenderViewImpl::registerProtocolHandler(const WebString& scheme, user_gesture)); } -WebKit::WebPageVisibilityState RenderViewImpl::visibilityState() const { - WebKit::WebPageVisibilityState current_state = is_hidden() ? - WebKit::WebPageVisibilityStateHidden : - WebKit::WebPageVisibilityStateVisible; - WebKit::WebPageVisibilityState override_state = current_state; +blink::WebPageVisibilityState RenderViewImpl::visibilityState() const { + blink::WebPageVisibilityState current_state = is_hidden() ? + blink::WebPageVisibilityStateHidden : + blink::WebPageVisibilityStateVisible; + blink::WebPageVisibilityState override_state = current_state; if (GetContentClient()->renderer()-> ShouldOverridePageVisibilityState(this, &override_state)) @@ -6265,7 +6265,7 @@ WebKit::WebPageVisibilityState RenderViewImpl::visibilityState() const { return current_state; } -WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() { +blink::WebUserMediaClient* RenderViewImpl::userMediaClient() { // This can happen in tests, in which case it's OK to return NULL. if (!InitializeMediaStreamClient()) return NULL; @@ -6273,7 +6273,7 @@ WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() { return web_user_media_client_; } -WebKit::WebMIDIClient* RenderViewImpl::webMIDIClient() { +blink::WebMIDIClient* RenderViewImpl::webMIDIClient() { if (!midi_dispatcher_) midi_dispatcher_ = new MIDIDispatcher(this); return midi_dispatcher_; @@ -6288,7 +6288,7 @@ void RenderViewImpl::draggableRegionsChanged() { WebMediaPlayer* RenderViewImpl::CreateWebMediaPlayerForMediaStream( WebFrame* frame, - const WebKit::WebURL& url, + const blink::WebURL& url, WebMediaPlayerClient* client) { #if defined(ENABLE_WEBRTC) if (!InitializeMediaStreamClient()) { @@ -6358,8 +6358,8 @@ void RenderViewImpl::LaunchAndroidContentIntent(const GURL& intent, } bool RenderViewImpl::openDateTimeChooser( - const WebKit::WebDateTimeChooserParams& params, - WebKit::WebDateTimeChooserCompletion* completion) { + const blink::WebDateTimeChooserParams& params, + blink::WebDateTimeChooserCompletion* completion) { date_time_picker_client_.reset( new RendererDateTimePicker(this, params, completion)); return date_time_picker_client_->Open(); @@ -6367,7 +6367,7 @@ bool RenderViewImpl::openDateTimeChooser( WebMediaPlayer* RenderViewImpl::CreateAndroidWebMediaPlayer( WebFrame* frame, - const WebKit::WebURL& url, + const blink::WebURL& url, WebMediaPlayerClient* client) { GpuChannelHost* gpu_channel_host = RenderThreadImpl::current()->EstablishGpuChannelSync( @@ -6500,7 +6500,7 @@ void RenderViewImpl::OnDisownOpener() { #if defined(OS_ANDROID) bool RenderViewImpl::didTapMultipleTargets( - const WebKit::WebGestureEvent& event, + const blink::WebGestureEvent& event, const WebVector<WebRect>& target_rects) { // Never show a disambiguation popup when accessibility is enabled, // as this interferes with "touch exploration". diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 73d2006..7b1dcaa 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -84,7 +84,7 @@ namespace ui { struct SelectedFileInfo; } // namespace ui -namespace WebKit { +namespace blink { class WebApplicationCacheHost; class WebApplicationCacheHostClient; class WebDOMMessageEvent; @@ -176,9 +176,9 @@ class WebMediaPlayerProxyAndroid; // class CONTENT_EXPORT RenderViewImpl : public RenderWidget, - NON_EXPORTED_BASE(public WebKit::WebViewClient), - NON_EXPORTED_BASE(public WebKit::WebFrameClient), - NON_EXPORTED_BASE(public WebKit::WebPageSerializerClient), + NON_EXPORTED_BASE(public blink::WebViewClient), + NON_EXPORTED_BASE(public blink::WebFrameClient), + NON_EXPORTED_BASE(public blink::WebPageSerializerClient), public RenderView, NON_EXPORTED_BASE(public WebMediaPlayerDelegate), public base::SupportsWeakPtr<RenderViewImpl> { @@ -198,7 +198,7 @@ class CONTENT_EXPORT RenderViewImpl bool swapped_out, bool hidden, int32 next_page_id, - const WebKit::WebScreenInfo& screen_info, + const blink::WebScreenInfo& screen_info, AccessibilityMode accessibility_mode, bool allow_partial_swap); @@ -208,13 +208,13 @@ class CONTENT_EXPORT RenderViewImpl RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); // Returns the RenderViewImpl containing the given WebView. - static RenderViewImpl* FromWebView(WebKit::WebView* webview); + static RenderViewImpl* FromWebView(blink::WebView* webview); // Returns the RenderViewImpl for the given routing ID. static RenderViewImpl* FromRoutingID(int routing_id); // May return NULL when the view is closing. - WebKit::WebView* webview() const; + blink::WebView* webview() const; int history_list_offset() const { return history_list_offset_; } @@ -256,12 +256,12 @@ class CONTENT_EXPORT RenderViewImpl // Returns true if the chooser was successfully scheduled. False means we // didn't schedule anything. bool ScheduleFileChooser(const FileChooserParams& params, - WebKit::WebFileChooserCompletion* completion); + blink::WebFileChooserCompletion* completion); void LoadNavigationErrorPage( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& failed_request, - const WebKit::WebURLError& error, + blink::WebFrame* frame, + const blink::WebURLRequest& failed_request, + const blink::WebURLError& error, const std::string& html, bool replace); @@ -280,7 +280,7 @@ class CONTENT_EXPORT RenderViewImpl // This will update the cursor appearance if it is currently over the plugin // instance. void PepperDidChangeCursor(PepperPluginInstanceImpl* instance, - const WebKit::WebCursorInfo& cursor); + const blink::WebCursorInfo& cursor); // Notifies that |instance| has received a mouse event. void PepperDidReceiveMouseEvent(PepperPluginInstanceImpl* instance); @@ -317,7 +317,7 @@ class CONTENT_EXPORT RenderViewImpl // Simulates IME events for testing purpose. void SimulateImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); void SimulateImeConfirmComposition(const string16& text, @@ -350,7 +350,7 @@ class CONTENT_EXPORT RenderViewImpl #endif // ENABLE_PLUGINS void TransferActiveWheelFlingAnimation( - const WebKit::WebActiveWheelFlingParameters& params); + const blink::WebActiveWheelFlingParameters& params); // Returns true if the focused element is editable text from the perspective // of IME support (also used for on-screen keyboard). Works correctly inside @@ -402,12 +402,12 @@ class CONTENT_EXPORT RenderViewImpl virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - // WebKit::WebWidgetClient implementation ------------------------------------ + // blink::WebWidgetClient implementation ------------------------------------ // Most methods are handled by RenderWidget. virtual void didFocus(); virtual void didBlur(); - virtual void show(WebKit::WebNavigationPolicy policy); + virtual void show(blink::WebNavigationPolicy policy); virtual void runModal(); virtual bool enterFullScreen(); virtual void exitFullScreen(); @@ -415,255 +415,255 @@ class CONTENT_EXPORT RenderViewImpl virtual void requestPointerUnlock(); virtual bool isPointerLocked(); virtual void didActivateCompositor(int input_handler_identifier); - virtual void didHandleGestureEvent(const WebKit::WebGestureEvent& event, + virtual void didHandleGestureEvent(const blink::WebGestureEvent& event, bool event_cancelled) OVERRIDE; virtual void initializeLayerTreeView() OVERRIDE; - // WebKit::WebViewClient implementation -------------------------------------- + // blink::WebViewClient implementation -------------------------------------- - virtual WebKit::WebView* createView( - WebKit::WebFrame* creator, - const WebKit::WebURLRequest& request, - const WebKit::WebWindowFeatures& features, - const WebKit::WebString& frame_name, - WebKit::WebNavigationPolicy policy, + virtual blink::WebView* createView( + blink::WebFrame* creator, + const blink::WebURLRequest& request, + const blink::WebWindowFeatures& features, + const blink::WebString& frame_name, + blink::WebNavigationPolicy policy, bool suppress_opener); // DEPRECATED - virtual WebKit::WebView* createView( - WebKit::WebFrame* creator, - const WebKit::WebURLRequest& request, - const WebKit::WebWindowFeatures& features, - const WebKit::WebString& frame_name, - WebKit::WebNavigationPolicy policy); - virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType popup_type); - virtual WebKit::WebExternalPopupMenu* createExternalPopupMenu( - const WebKit::WebPopupMenuInfo& popup_menu_info, - WebKit::WebExternalPopupMenuClient* popup_menu_client); - virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(); + virtual blink::WebView* createView( + blink::WebFrame* creator, + const blink::WebURLRequest& request, + const blink::WebWindowFeatures& features, + const blink::WebString& frame_name, + blink::WebNavigationPolicy policy); + virtual blink::WebWidget* createPopupMenu(blink::WebPopupType popup_type); + virtual blink::WebExternalPopupMenu* createExternalPopupMenu( + const blink::WebPopupMenuInfo& popup_menu_info, + blink::WebExternalPopupMenuClient* popup_menu_client); + virtual blink::WebStorageNamespace* createSessionStorageNamespace(); virtual bool shouldReportDetailedMessageForSource( - const WebKit::WebString& source); + const blink::WebString& source); virtual void didAddMessageToConsole( - const WebKit::WebConsoleMessage& message, - const WebKit::WebString& source_name, + const blink::WebConsoleMessage& message, + const blink::WebString& source_name, unsigned source_line, - const WebKit::WebString& stack_trace); - virtual void printPage(WebKit::WebFrame* frame); - virtual WebKit::WebNotificationPresenter* notificationPresenter(); + const blink::WebString& stack_trace); + virtual void printPage(blink::WebFrame* frame); + virtual blink::WebNotificationPresenter* notificationPresenter(); virtual bool enumerateChosenDirectory( - const WebKit::WebString& path, - WebKit::WebFileChooserCompletion* chooser_completion); - virtual void initializeHelperPluginWebFrame(WebKit::WebHelperPlugin*); + const blink::WebString& path, + blink::WebFileChooserCompletion* chooser_completion); + virtual void initializeHelperPluginWebFrame(blink::WebHelperPlugin*); virtual void didStartLoading(); virtual void didStopLoading(); - virtual void didChangeLoadProgress(WebKit::WebFrame* frame, + virtual void didChangeLoadProgress(blink::WebFrame* frame, double load_progress); virtual void didCancelCompositionOnSelectionChange(); virtual void didChangeSelection(bool is_selection_empty); - virtual void didExecuteCommand(const WebKit::WebString& command_name); + virtual void didExecuteCommand(const blink::WebString& command_name); virtual bool handleCurrentKeyboardEvent(); - virtual WebKit::WebColorChooser* createColorChooser( - WebKit::WebColorChooserClient*, const WebKit::WebColor& initial_color); + virtual blink::WebColorChooser* createColorChooser( + blink::WebColorChooserClient*, const blink::WebColor& initial_color); virtual bool runFileChooser( - const WebKit::WebFileChooserParams& params, - WebKit::WebFileChooserCompletion* chooser_completion); - virtual void runModalAlertDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message); - virtual bool runModalConfirmDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message); - virtual bool runModalPromptDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message, - const WebKit::WebString& default_value, - WebKit::WebString* actual_value); - virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame* frame, + const blink::WebFileChooserParams& params, + blink::WebFileChooserCompletion* chooser_completion); + virtual void runModalAlertDialog(blink::WebFrame* frame, + const blink::WebString& message); + virtual bool runModalConfirmDialog(blink::WebFrame* frame, + const blink::WebString& message); + virtual bool runModalPromptDialog(blink::WebFrame* frame, + const blink::WebString& message, + const blink::WebString& default_value, + blink::WebString* actual_value); + virtual bool runModalBeforeUnloadDialog(blink::WebFrame* frame, bool is_reload, - const WebKit::WebString& message); + const blink::WebString& message); // DEPRECATED - virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message); - virtual void showContextMenu(WebKit::WebFrame* frame, - const WebKit::WebContextMenuData& data); + virtual bool runModalBeforeUnloadDialog(blink::WebFrame* frame, + const blink::WebString& message); + virtual void showContextMenu(blink::WebFrame* frame, + const blink::WebContextMenuData& data); virtual void clearContextMenu(); - virtual void setStatusText(const WebKit::WebString& text); - virtual void setMouseOverURL(const WebKit::WebURL& url); - virtual void setKeyboardFocusURL(const WebKit::WebURL& url); - virtual void startDragging(WebKit::WebFrame* frame, - const WebKit::WebDragData& data, - WebKit::WebDragOperationsMask mask, - const WebKit::WebImage& image, - const WebKit::WebPoint& imageOffset); + virtual void setStatusText(const blink::WebString& text); + virtual void setMouseOverURL(const blink::WebURL& url); + virtual void setKeyboardFocusURL(const blink::WebURL& url); + virtual void startDragging(blink::WebFrame* frame, + const blink::WebDragData& data, + blink::WebDragOperationsMask mask, + const blink::WebImage& image, + const blink::WebPoint& imageOffset); virtual bool acceptsLoadDrops(); virtual void focusNext(); virtual void focusPrevious(); - virtual void focusedNodeChanged(const WebKit::WebNode& node); + virtual void focusedNodeChanged(const blink::WebNode& node); virtual void numberOfWheelEventHandlersChanged(unsigned num_handlers); virtual void didUpdateLayout(); #if defined(OS_ANDROID) virtual bool didTapMultipleTargets( - const WebKit::WebGestureEvent& event, - const WebKit::WebVector<WebKit::WebRect>& target_rects); + const blink::WebGestureEvent& event, + const blink::WebVector<blink::WebRect>& target_rects); #endif virtual void navigateBackForwardSoon(int offset); virtual int historyBackListCount(); virtual int historyForwardListCount(); virtual void postAccessibilityEvent( - const WebKit::WebAXObject& obj, WebKit::WebAXEvent event); - virtual void didUpdateInspectorSetting(const WebKit::WebString& key, - const WebKit::WebString& value); - virtual WebKit::WebGeolocationClient* geolocationClient(); - virtual WebKit::WebSpeechInputController* speechInputController( - WebKit::WebSpeechInputListener* listener); - virtual WebKit::WebSpeechRecognizer* speechRecognizer(); + const blink::WebAXObject& obj, blink::WebAXEvent event); + virtual void didUpdateInspectorSetting(const blink::WebString& key, + const blink::WebString& value); + virtual blink::WebGeolocationClient* geolocationClient(); + virtual blink::WebSpeechInputController* speechInputController( + blink::WebSpeechInputListener* listener); + virtual blink::WebSpeechRecognizer* speechRecognizer(); virtual void zoomLimitsChanged(double minimum_level, double maximum_level); virtual void zoomLevelChanged(); virtual double zoomLevelToZoomFactor(double zoom_level) const; virtual double zoomFactorToZoomLevel(double factor) const; - virtual void registerProtocolHandler(const WebKit::WebString& scheme, - const WebKit::WebString& base_url, - const WebKit::WebString& url, - const WebKit::WebString& title); - virtual WebKit::WebPageVisibilityState visibilityState() const; - virtual WebKit::WebUserMediaClient* userMediaClient(); - virtual WebKit::WebMIDIClient* webMIDIClient(); + virtual void registerProtocolHandler(const blink::WebString& scheme, + const blink::WebString& base_url, + const blink::WebString& url, + const blink::WebString& title); + virtual blink::WebPageVisibilityState visibilityState() const; + virtual blink::WebUserMediaClient* userMediaClient(); + virtual blink::WebMIDIClient* webMIDIClient(); virtual void draggableRegionsChanged(); #if defined(OS_ANDROID) - virtual void scheduleContentIntent(const WebKit::WebURL& intent); + virtual void scheduleContentIntent(const blink::WebURL& intent); virtual void cancelScheduledContentIntents(); - virtual WebKit::WebContentDetectionResult detectContentAround( - const WebKit::WebHitTestResult& touch_hit); + virtual blink::WebContentDetectionResult detectContentAround( + const blink::WebHitTestResult& touch_hit); // Only used on Android since all other platforms implement // date and time input fields using MULTIPLE_FIELDS_UI - virtual bool openDateTimeChooser(const WebKit::WebDateTimeChooserParams&, - WebKit::WebDateTimeChooserCompletion*); - virtual void didScrollWithKeyboard(const WebKit::WebSize& delta); + virtual bool openDateTimeChooser(const blink::WebDateTimeChooserParams&, + blink::WebDateTimeChooserCompletion*); + virtual void didScrollWithKeyboard(const blink::WebSize& delta); #endif - // WebKit::WebFrameClient implementation ------------------------------------- - - virtual WebKit::WebMediaPlayer* createMediaPlayer( - WebKit::WebFrame* frame, - const WebKit::WebURL& url, - WebKit::WebMediaPlayerClient* client); - virtual WebKit::WebCookieJar* cookieJar(WebKit::WebFrame* frame); - virtual void didAccessInitialDocument(WebKit::WebFrame* frame); - virtual void didDisownOpener(WebKit::WebFrame* frame); - virtual void frameDetached(WebKit::WebFrame* frame); - virtual void willClose(WebKit::WebFrame* frame); + // blink::WebFrameClient implementation ------------------------------------- + + virtual blink::WebMediaPlayer* createMediaPlayer( + blink::WebFrame* frame, + const blink::WebURL& url, + blink::WebMediaPlayerClient* client); + virtual blink::WebCookieJar* cookieJar(blink::WebFrame* frame); + virtual void didAccessInitialDocument(blink::WebFrame* frame); + virtual void didDisownOpener(blink::WebFrame* frame); + virtual void frameDetached(blink::WebFrame* frame); + virtual void willClose(blink::WebFrame* frame); virtual void didMatchCSS( - WebKit::WebFrame* frame, - const WebKit::WebVector<WebKit::WebString>& newly_matching_selectors, - const WebKit::WebVector<WebKit::WebString>& stopped_matching_selectors); + blink::WebFrame* frame, + const blink::WebVector<blink::WebString>& newly_matching_selectors, + const blink::WebVector<blink::WebString>& stopped_matching_selectors); // The WebDataSource::ExtraData* is assumed to be a DocumentState* subclass. - virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( - WebKit::WebFrame* frame, - WebKit::WebDataSource::ExtraData* extraData, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, + virtual blink::WebNavigationPolicy decidePolicyForNavigation( + blink::WebFrame* frame, + blink::WebDataSource::ExtraData* extraData, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect); // DEPRECATED. - virtual WebKit::WebNavigationPolicy decidePolicyForNavigation( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationType type, - WebKit::WebNavigationPolicy default_policy, + virtual blink::WebNavigationPolicy decidePolicyForNavigation( + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationType type, + blink::WebNavigationPolicy default_policy, bool is_redirect); - virtual void willSendSubmitEvent(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form); - virtual void willSubmitForm(WebKit::WebFrame* frame, - const WebKit::WebFormElement& form); - virtual void didCreateDataSource(WebKit::WebFrame* frame, - WebKit::WebDataSource* datasource); - virtual void didStartProvisionalLoad(WebKit::WebFrame* frame); + virtual void willSendSubmitEvent(blink::WebFrame* frame, + const blink::WebFormElement& form); + virtual void willSubmitForm(blink::WebFrame* frame, + const blink::WebFormElement& form); + virtual void didCreateDataSource(blink::WebFrame* frame, + blink::WebDataSource* datasource); + virtual void didStartProvisionalLoad(blink::WebFrame* frame); virtual void didReceiveServerRedirectForProvisionalLoad( - WebKit::WebFrame* frame); - virtual void didFailProvisionalLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error); - virtual void didCommitProvisionalLoad(WebKit::WebFrame* frame, + blink::WebFrame* frame); + virtual void didFailProvisionalLoad(blink::WebFrame* frame, + const blink::WebURLError& error); + virtual void didCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation); - virtual void didClearWindowObject(WebKit::WebFrame* frame); - virtual void didCreateDocumentElement(WebKit::WebFrame* frame); - virtual void didReceiveTitle(WebKit::WebFrame* frame, - const WebKit::WebString& title, - WebKit::WebTextDirection direction); - virtual void didChangeIcon(WebKit::WebFrame*, - WebKit::WebIconURL::Type); - virtual void didFinishDocumentLoad(WebKit::WebFrame* frame); - virtual void didHandleOnloadEvents(WebKit::WebFrame* frame); - virtual void didFailLoad(WebKit::WebFrame* frame, - const WebKit::WebURLError& error); - virtual void didFinishLoad(WebKit::WebFrame* frame); - virtual void didNavigateWithinPage(WebKit::WebFrame* frame, + virtual void didClearWindowObject(blink::WebFrame* frame); + virtual void didCreateDocumentElement(blink::WebFrame* frame); + virtual void didReceiveTitle(blink::WebFrame* frame, + const blink::WebString& title, + blink::WebTextDirection direction); + virtual void didChangeIcon(blink::WebFrame*, + blink::WebIconURL::Type); + virtual void didFinishDocumentLoad(blink::WebFrame* frame); + virtual void didHandleOnloadEvents(blink::WebFrame* frame); + virtual void didFailLoad(blink::WebFrame* frame, + const blink::WebURLError& error); + virtual void didFinishLoad(blink::WebFrame* frame); + virtual void didNavigateWithinPage(blink::WebFrame* frame, bool is_new_navigation); - virtual void didUpdateCurrentHistoryItem(WebKit::WebFrame* frame); - virtual void willSendRequest(WebKit::WebFrame* frame, + virtual void didUpdateCurrentHistoryItem(blink::WebFrame* frame); + virtual void willSendRequest(blink::WebFrame* frame, unsigned identifier, - WebKit::WebURLRequest& request, - const WebKit::WebURLResponse& redirect_response); - virtual void didReceiveResponse(WebKit::WebFrame* frame, + blink::WebURLRequest& request, + const blink::WebURLResponse& redirect_response); + virtual void didReceiveResponse(blink::WebFrame* frame, unsigned identifier, - const WebKit::WebURLResponse& response); - virtual void didFinishResourceLoad(WebKit::WebFrame* frame, + const blink::WebURLResponse& response); + virtual void didFinishResourceLoad(blink::WebFrame* frame, unsigned identifier); virtual void didLoadResourceFromMemoryCache( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - const WebKit::WebURLResponse&); - virtual void didDisplayInsecureContent(WebKit::WebFrame* frame); + blink::WebFrame* frame, + const blink::WebURLRequest& request, + const blink::WebURLResponse&); + virtual void didDisplayInsecureContent(blink::WebFrame* frame); virtual void didRunInsecureContent( - WebKit::WebFrame* frame, - const WebKit::WebSecurityOrigin& origin, - const WebKit::WebURL& target); - virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame* frame); - virtual void didCreateScriptContext(WebKit::WebFrame* frame, + blink::WebFrame* frame, + const blink::WebSecurityOrigin& origin, + const blink::WebURL& target); + virtual void didExhaustMemoryAvailableForScript(blink::WebFrame* frame); + virtual void didCreateScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context>, int extension_group, int world_id); - virtual void willReleaseScriptContext(WebKit::WebFrame* frame, + virtual void willReleaseScriptContext(blink::WebFrame* frame, v8::Handle<v8::Context>, int world_id); - virtual void didChangeScrollOffset(WebKit::WebFrame* frame); - virtual void willInsertBody(WebKit::WebFrame* frame); - virtual void didFirstVisuallyNonEmptyLayout(WebKit::WebFrame*); - virtual void didChangeContentsSize(WebKit::WebFrame* frame, - const WebKit::WebSize& size); + virtual void didChangeScrollOffset(blink::WebFrame* frame); + virtual void willInsertBody(blink::WebFrame* frame); + virtual void didFirstVisuallyNonEmptyLayout(blink::WebFrame*); + virtual void didChangeContentsSize(blink::WebFrame* frame, + const blink::WebSize& size); virtual void reportFindInPageMatchCount(int request_id, int count, bool final_update); virtual void reportFindInPageSelection(int request_id, int active_match_ordinal, - const WebKit::WebRect& sel); + const blink::WebRect& sel); virtual void requestStorageQuota( - WebKit::WebFrame* frame, - WebKit::WebStorageQuotaType type, + blink::WebFrame* frame, + blink::WebStorageQuotaType type, unsigned long long requested_size, - WebKit::WebStorageQuotaCallbacks* callbacks); + blink::WebStorageQuotaCallbacks* callbacks); virtual void willOpenSocketStream( - WebKit::WebSocketStreamHandle* handle); - virtual void willStartUsingPeerConnectionHandler(WebKit::WebFrame* frame, - WebKit::WebRTCPeerConnectionHandler* handler); + blink::WebSocketStreamHandle* handle); + virtual void willStartUsingPeerConnectionHandler(blink::WebFrame* frame, + blink::WebRTCPeerConnectionHandler* handler); virtual bool willCheckAndDispatchMessageEvent( - WebKit::WebFrame* sourceFrame, - WebKit::WebFrame* targetFrame, - WebKit::WebSecurityOrigin targetOrigin, - WebKit::WebDOMMessageEvent event); - virtual WebKit::WebString acceptLanguages(); - virtual WebKit::WebString userAgentOverride( - WebKit::WebFrame* frame, - const WebKit::WebURL& url); - virtual WebKit::WebString doNotTrackValue(WebKit::WebFrame* frame); - virtual bool allowWebGL(WebKit::WebFrame* frame, bool default_value); + blink::WebFrame* sourceFrame, + blink::WebFrame* targetFrame, + blink::WebSecurityOrigin targetOrigin, + blink::WebDOMMessageEvent event); + virtual blink::WebString acceptLanguages(); + virtual blink::WebString userAgentOverride( + blink::WebFrame* frame, + const blink::WebURL& url); + virtual blink::WebString doNotTrackValue(blink::WebFrame* frame); + virtual bool allowWebGL(blink::WebFrame* frame, bool default_value); virtual void didLoseWebGLContext( - WebKit::WebFrame* frame, + blink::WebFrame* frame, int arb_robustness_status_code); - // WebKit::WebPageSerializerClient implementation ---------------------------- + // blink::WebPageSerializerClient implementation ---------------------------- virtual void didSerializeDataForFrame( - const WebKit::WebURL& frame_url, - const WebKit::WebCString& data, + const blink::WebURL& frame_url, + const blink::WebCString& data, PageSerializationStatus status) OVERRIDE; // RenderView implementation ------------------------------------------------- @@ -674,14 +674,14 @@ class CONTENT_EXPORT RenderViewImpl virtual gfx::Size GetSize() const OVERRIDE; virtual WebPreferences& GetWebkitPreferences() OVERRIDE; virtual void SetWebkitPreferences(const WebPreferences& preferences) OVERRIDE; - virtual WebKit::WebView* GetWebView() OVERRIDE; - virtual WebKit::WebNode GetFocusedNode() const OVERRIDE; - virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE; - virtual bool IsEditableNode(const WebKit::WebNode& node) const OVERRIDE; - virtual WebKit::WebPlugin* CreatePlugin( - WebKit::WebFrame* frame, + virtual blink::WebView* GetWebView() OVERRIDE; + virtual blink::WebNode GetFocusedNode() const OVERRIDE; + virtual blink::WebNode GetContextMenuNode() const OVERRIDE; + virtual bool IsEditableNode(const blink::WebNode& node) const OVERRIDE; + virtual blink::WebPlugin* CreatePlugin( + blink::WebFrame* frame, const WebPluginInfo& info, - const WebKit::WebPluginParams& params) OVERRIDE; + const blink::WebPluginParams& params) OVERRIDE; virtual void EvaluateScript(const string16& frame_xpath, const string16& jscript, int id, @@ -693,20 +693,20 @@ class CONTENT_EXPORT RenderViewImpl virtual int ShowContextMenu(ContextMenuClient* client, const ContextMenuParams& params) OVERRIDE; virtual void CancelContextMenu(int request_id) OVERRIDE; - virtual WebKit::WebPageVisibilityState GetVisibilityState() const OVERRIDE; - virtual void RunModalAlertDialog(WebKit::WebFrame* frame, - const WebKit::WebString& message) OVERRIDE; + virtual blink::WebPageVisibilityState GetVisibilityState() const OVERRIDE; + virtual void RunModalAlertDialog(blink::WebFrame* frame, + const blink::WebString& message) OVERRIDE; virtual void LoadURLExternally( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request, - WebKit::WebNavigationPolicy policy) OVERRIDE; + blink::WebFrame* frame, + const blink::WebURLRequest& request, + blink::WebNavigationPolicy policy) OVERRIDE; virtual void DidStartLoading() OVERRIDE; virtual void DidStopLoading() OVERRIDE; virtual void Repaint(const gfx::Size& size) OVERRIDE; virtual void SetEditCommandForNextKeyEvent(const std::string& name, const std::string& value) OVERRIDE; virtual void ClearEditCommands() OVERRIDE; - virtual SSLStatus GetSSLStatusOfFrame(WebKit::WebFrame* frame) const OVERRIDE; + virtual SSLStatus GetSSLStatusOfFrame(blink::WebFrame* frame) const OVERRIDE; virtual const std::string& GetAcceptLanguages() const OVERRIDE; #if defined(OS_ANDROID) virtual void UpdateTopControlsState(TopControlsState constraints, @@ -716,9 +716,9 @@ class CONTENT_EXPORT RenderViewImpl // WebMediaPlayerDelegate implementation ----------------------- - virtual void DidPlay(WebKit::WebMediaPlayer* player) OVERRIDE; - virtual void DidPause(WebKit::WebMediaPlayer* player) OVERRIDE; - virtual void PlayerGone(WebKit::WebMediaPlayer* player) OVERRIDE; + virtual void DidPlay(blink::WebMediaPlayer* player) OVERRIDE; + virtual void DidPause(blink::WebMediaPlayer* player) OVERRIDE; + virtual void PlayerGone(blink::WebMediaPlayer* player) OVERRIDE; // Please do not add your stuff randomly to the end here. If there is an // appropriate section, add it there. If not, there are some random functions @@ -744,13 +744,13 @@ class CONTENT_EXPORT RenderViewImpl virtual gfx::Vector2d GetScrollOffset() OVERRIDE; virtual void DidHandleKeyEvent() OVERRIDE; virtual bool WillHandleMouseEvent( - const WebKit::WebMouseEvent& event) OVERRIDE; + const blink::WebMouseEvent& event) OVERRIDE; virtual bool WillHandleKeyEvent( - const WebKit::WebKeyboardEvent& event) OVERRIDE; + const blink::WebKeyboardEvent& event) OVERRIDE; virtual bool WillHandleGestureEvent( - const WebKit::WebGestureEvent& event) OVERRIDE; - virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) OVERRIDE; - virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) OVERRIDE; + const blink::WebGestureEvent& event) OVERRIDE; + virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) OVERRIDE; + virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) OVERRIDE; virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const OVERRIDE; virtual void OnSetFocus(bool enable) OVERRIDE; virtual void OnWasHidden() OVERRIDE; @@ -759,7 +759,7 @@ class CONTENT_EXPORT RenderViewImpl virtual bool ForceCompositingModeEnabled() OVERRIDE; virtual void OnImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end) OVERRIDE; virtual void OnImeConfirmComposition(const string16& text, @@ -857,22 +857,22 @@ class CONTENT_EXPORT RenderViewImpl CONNECTION_ERROR, }; - static WebKit::WebReferrerPolicy GetReferrerPolicyFromRequest( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request); + static blink::WebReferrerPolicy GetReferrerPolicyFromRequest( + blink::WebFrame* frame, + const blink::WebURLRequest& request); static Referrer GetReferrerFromRequest( - WebKit::WebFrame* frame, - const WebKit::WebURLRequest& request); + blink::WebFrame* frame, + const blink::WebURLRequest& request); static webkit_glue::WebURLResponseExtraDataImpl* GetExtraDataFromResponse( - const WebKit::WebURLResponse& response); + const blink::WebURLResponse& response); - void UpdateURL(WebKit::WebFrame* frame); - void UpdateTitle(WebKit::WebFrame* frame, const string16& title, - WebKit::WebTextDirection title_direction); - void UpdateSessionHistory(WebKit::WebFrame* frame); - void SendUpdateState(const WebKit::WebHistoryItem& item); + void UpdateURL(blink::WebFrame* frame); + void UpdateTitle(blink::WebFrame* frame, const string16& title, + blink::WebTextDirection title_direction); + void UpdateSessionHistory(blink::WebFrame* frame); + void SendUpdateState(const blink::WebHistoryItem& item); // Update current main frame's encoding and send it to browser window. // Since we want to let users see the right encoding info from menu @@ -887,13 +887,13 @@ class CONTENT_EXPORT RenderViewImpl // c) function:DidFinishDocumentLoadForFrame. When this function is // called, that means we have got whole html page. In here we should // finally get right encoding of page. - void UpdateEncoding(WebKit::WebFrame* frame, + void UpdateEncoding(blink::WebFrame* frame, const std::string& encoding_name); - void OpenURL(WebKit::WebFrame* frame, + void OpenURL(blink::WebFrame* frame, const GURL& url, const Referrer& referrer, - WebKit::WebNavigationPolicy policy); + blink::WebNavigationPolicy policy); bool RunJavaScriptMessage(JavaScriptMessageType type, const string16& message, @@ -905,7 +905,7 @@ class CONTENT_EXPORT RenderViewImpl bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); // Called when the "pinned to left/right edge" state needs to be updated. - void UpdateScrollState(WebKit::WebFrame* frame); + void UpdateScrollState(blink::WebFrame* frame); // IPC message handlers ------------------------------------------------------ // @@ -947,7 +947,7 @@ class CONTENT_EXPORT RenderViewImpl void OnDragSourceEndedOrMoved(const gfx::Point& client_point, const gfx::Point& screen_point, bool ended, - WebKit::WebDragOperation drag_operation); + blink::WebDragOperation drag_operation); void OnDragSourceSystemDragEnded(); void OnDragTargetDrop(const gfx::Point& client_pt, const gfx::Point& screen_pt, @@ -955,12 +955,12 @@ class CONTENT_EXPORT RenderViewImpl void OnDragTargetDragEnter(const DropData& drop_data, const gfx::Point& client_pt, const gfx::Point& screen_pt, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, int key_modifiers); void OnDragTargetDragLeave(); void OnDragTargetDragOver(const gfx::Point& client_pt, const gfx::Point& screen_pt, - WebKit::WebDragOperationsMask operations_allowed, + blink::WebDragOperationsMask operations_allowed, int key_modifiers); void OnEnablePreferredSizeChangedMode(); void OnEnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size); @@ -970,17 +970,17 @@ class CONTENT_EXPORT RenderViewImpl void OnExtendSelectionAndDelete(int before, int after); void OnFileChooserResponse( const std::vector<ui::SelectedFileInfo>& files); - void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); + void OnFind(int request_id, const string16&, const blink::WebFindOptions&); void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( const std::vector<GURL>& links, const std::vector<base::FilePath>& local_paths, const base::FilePath& local_directory_name); void OnMediaPlayerActionAt(const gfx::Point& location, - const WebKit::WebMediaPlayerAction& action); + const blink::WebMediaPlayerAction& action); void OnOrientationChangeEvent(int orientation); void OnPluginActionAt(const gfx::Point& location, - const WebKit::WebPluginAction& action); + const blink::WebPluginAction& action); void OnMoveOrResizeStarted(); void OnNavigate(const ViewMsg_Navigate_Params& params); void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); @@ -997,7 +997,7 @@ class CONTENT_EXPORT RenderViewImpl void OnSetBackground(const SkBitmap& background); void OnSetCompositionFromExistingText( int start, int end, - const std::vector<WebKit::WebCompositionUnderline>& underlines); + const std::vector<blink::WebCompositionUnderline>& underlines); void OnExitFullscreen(); void OnSetEditableSelectionOffsets(int start, int end); void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); @@ -1050,9 +1050,9 @@ class CONTENT_EXPORT RenderViewImpl void ZoomFactorHelper(PageZoom zoom, int zoom_center_x, int zoom_center_y, float scaling_increment); - void AltErrorPageFinished(WebKit::WebFrame* frame, - const WebKit::WebURLRequest& original_request, - const WebKit::WebURLError& original_error, + void AltErrorPageFinished(blink::WebFrame* frame, + const blink::WebURLRequest& original_request, + const blink::WebURLError& original_error, const std::string& html); // Check whether the preferred size has changed. @@ -1081,25 +1081,25 @@ class CONTENT_EXPORT RenderViewImpl ErrorPageType error_type); // Locates a sub frame with given xpath - WebKit::WebFrame* GetChildFrame(const string16& frame_xpath) const; + blink::WebFrame* GetChildFrame(const string16& frame_xpath) const; // Returns the URL being loaded by the given frame's request. - GURL GetLoadingUrl(WebKit::WebFrame* frame) const; + GURL GetLoadingUrl(blink::WebFrame* frame) const; // Should only be called if this object wraps a PluginDocument. - WebKit::WebPlugin* GetWebPluginFromPluginDocument(); + blink::WebPlugin* GetWebPluginFromPluginDocument(); // Returns true if the |params| navigation is to an entry that has been // cropped due to a recent navigation the browser did not know about. bool IsBackForwardToStaleEntry(const ViewMsg_Navigate_Params& params, bool is_reload); - bool MaybeLoadAlternateErrorPage(WebKit::WebFrame* frame, - const WebKit::WebURLError& error, + bool MaybeLoadAlternateErrorPage(blink::WebFrame* frame, + const blink::WebURLError& error, bool replace); // Make this RenderView show an empty, unscriptable page. - void NavigateToSwappedOutURL(WebKit::WebFrame* frame); + void NavigateToSwappedOutURL(blink::WebFrame* frame); // If we initiated a navigation, this function will populate |document_state| // with the navigation information saved in OnNavigate(). @@ -1117,23 +1117,23 @@ class CONTENT_EXPORT RenderViewImpl // Launch an Android content intent with the given URL. void LaunchAndroidContentIntent(const GURL& intent_url, size_t request_id); - WebKit::WebMediaPlayer* CreateAndroidWebMediaPlayer( - WebKit::WebFrame* frame, - const WebKit::WebURL& url, - WebKit::WebMediaPlayerClient* client); + blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( + blink::WebFrame* frame, + const blink::WebURL& url, + blink::WebMediaPlayerClient* client); #endif - WebKit::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( - WebKit::WebFrame* frame, - const WebKit::WebURL& url, - WebKit::WebMediaPlayerClient* client); + blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( + blink::WebFrame* frame, + const blink::WebURL& url, + blink::WebMediaPlayerClient* client); // Sends a reply to the current find operation handling if it was a // synchronous find request. void SendFindReply(int request_id, int match_count, int ordinal, - const WebKit::WebRect& selection_rect, + const blink::WebRect& selection_rect, bool final_status_update); // Returns whether |params.selection_text| should be synchronized to the @@ -1418,7 +1418,7 @@ class CONTENT_EXPORT RenderViewImpl // MediaStreamClient attached to this view; lazily initialized. MediaStreamClient* media_stream_client_; - WebKit::WebUserMediaClient* web_user_media_client_; + blink::WebUserMediaClient* web_user_media_client_; // MIDIClient attached to this view; lazily initialized. MIDIDispatcher* midi_dispatcher_; @@ -1499,7 +1499,7 @@ class CONTENT_EXPORT RenderViewImpl std::deque< linked_ptr<PendingFileChooser> > file_chooser_completions_; // The current directory enumeration callback - std::map<int, WebKit::WebFileChooserCompletion*> enumeration_completions_; + std::map<int, blink::WebFileChooserCompletion*> enumeration_completions_; int enumeration_completion_id_; // Reports load progress to the browser. @@ -1518,7 +1518,7 @@ class CONTENT_EXPORT RenderViewImpl scoped_ptr<ExternalPopupMenu> external_popup_menu_; // The node that the context menu was pressed over. - WebKit::WebNode context_menu_node_; + blink::WebNode context_menu_node_; // All the registered observers. We expect this list to be small, so vector // is fine. diff --git a/content/renderer/render_view_impl_android.cc b/content/renderer/render_view_impl_android.cc index 18f41a2..5ae3f09 100644 --- a/content/renderer/render_view_impl_android.cc +++ b/content/renderer/render_view_impl_android.cc @@ -51,7 +51,7 @@ void RenderViewImpl::UpdateTopControlsState(TopControlsState constraints, top_controls_constraints_ = constraints_cc; } -void RenderViewImpl::didScrollWithKeyboard(const WebKit::WebSize& delta) { +void RenderViewImpl::didScrollWithKeyboard(const blink::WebSize& delta) { if (delta.height == 0) return; if (compositor_) { diff --git a/content/renderer/render_view_impl_params.cc b/content/renderer/render_view_impl_params.cc index 44c8353..253ef7f 100644 --- a/content/renderer/render_view_impl_params.cc +++ b/content/renderer/render_view_impl_params.cc @@ -19,7 +19,7 @@ RenderViewImplParams::RenderViewImplParams( bool swapped_out, bool hidden, int32 next_page_id, - const WebKit::WebScreenInfo& screen_info, + const blink::WebScreenInfo& screen_info, AccessibilityMode accessibility_mode, bool allow_partial_swap) : opener_id(opener_id), diff --git a/content/renderer/render_view_impl_params.h b/content/renderer/render_view_impl_params.h index 07a4f41..3aec433 100644 --- a/content/renderer/render_view_impl_params.h +++ b/content/renderer/render_view_impl_params.h @@ -13,7 +13,7 @@ struct WebPreferences; -namespace WebKit { +namespace blink { struct WebScreenInfo; } @@ -35,7 +35,7 @@ struct CONTENT_EXPORT RenderViewImplParams { bool swapped_out, bool hidden, int32 next_page_id, - const WebKit::WebScreenInfo& screen_info, + const blink::WebScreenInfo& screen_info, AccessibilityMode accessibility_mode, bool allow_partial_swap); ~RenderViewImplParams(); @@ -52,7 +52,7 @@ struct CONTENT_EXPORT RenderViewImplParams { bool swapped_out; bool hidden; int32 next_page_id; - const WebKit::WebScreenInfo& screen_info; + const blink::WebScreenInfo& screen_info; AccessibilityMode accessibility_mode; bool allow_partial_swap; }; diff --git a/content/renderer/render_view_linux.cc b/content/renderer/render_view_linux.cc index 01218ad..41f558c 100644 --- a/content/renderer/render_view_linux.cc +++ b/content/renderer/render_view_linux.cc @@ -7,7 +7,7 @@ #include "content/public/common/renderer_preferences.h" #include "third_party/WebKit/public/web/linux/WebFontRendering.h" -using WebKit::WebFontRendering; +using blink::WebFontRendering; namespace content { diff --git a/content/renderer/render_view_mouse_lock_dispatcher.cc b/content/renderer/render_view_mouse_lock_dispatcher.cc index 41d21b7..25b4ccc 100644 --- a/content/renderer/render_view_mouse_lock_dispatcher.cc +++ b/content/renderer/render_view_mouse_lock_dispatcher.cc @@ -11,7 +11,7 @@ #include "third_party/WebKit/public/web/WebView.h" #include "third_party/WebKit/public/web/WebWidget.h" -using WebKit::WebUserGestureIndicator; +using blink::WebUserGestureIndicator; namespace content { diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 70da9f2..b9ad015 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -78,26 +78,26 @@ #include "third_party/WebKit/public/web/WebWidget.h" -using WebKit::WebCompositionUnderline; -using WebKit::WebCursorInfo; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebKeyboardEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebNavigationPolicy; -using WebKit::WebPagePopup; -using WebKit::WebPopupMenu; -using WebKit::WebPopupMenuInfo; -using WebKit::WebPopupType; -using WebKit::WebRange; -using WebKit::WebRect; -using WebKit::WebScreenInfo; -using WebKit::WebSize; -using WebKit::WebTextDirection; -using WebKit::WebTouchEvent; -using WebKit::WebVector; -using WebKit::WebWidget; +using blink::WebCompositionUnderline; +using blink::WebCursorInfo; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebKeyboardEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebNavigationPolicy; +using blink::WebPagePopup; +using blink::WebPopupMenu; +using blink::WebPopupMenuInfo; +using blink::WebPopupType; +using blink::WebRange; +using blink::WebRect; +using blink::WebScreenInfo; +using blink::WebSize; +using blink::WebTextDirection; +using blink::WebTouchEvent; +using blink::WebVector; +using blink::WebWidget; namespace { @@ -134,7 +134,7 @@ class TextInputModeMapSingleton { }; ui::TextInputMode ConvertInputMode( - const WebKit::WebString& input_mode) { + const blink::WebString& input_mode) { static TextInputModeMapSingleton* singleton = TextInputModeMapSingleton::GetInstance(); TextInputModeMap::iterator it = singleton->Map().find(input_mode.utf8()); @@ -200,7 +200,7 @@ class RenderWidget::ScreenMetricsEmulator { // Original values to restore back after emulation ends. gfx::Size original_size_; gfx::Size original_physical_backing_size_; - WebKit::WebScreenInfo original_screen_info_; + blink::WebScreenInfo original_screen_info_; gfx::Rect original_view_screen_rect_; gfx::Rect original_window_screen_rect_; }; @@ -330,8 +330,8 @@ void RenderWidget::ScreenMetricsEmulator::OnShowContextMenu( // RenderWidget --------------------------------------------------------------- -RenderWidget::RenderWidget(WebKit::WebPopupType popup_type, - const WebKit::WebScreenInfo& screen_info, +RenderWidget::RenderWidget(blink::WebPopupType popup_type, + const blink::WebScreenInfo& screen_info, bool swapped_out, bool hidden) : routing_id_(MSG_ROUTING_NONE), @@ -411,8 +411,8 @@ RenderWidget::~RenderWidget() { // static RenderWidget* RenderWidget::Create(int32 opener_id, - WebKit::WebPopupType popup_type, - const WebKit::WebScreenInfo& screen_info) { + blink::WebPopupType popup_type, + const blink::WebScreenInfo& screen_info) { DCHECK(opener_id != MSG_ROUTING_NONE); scoped_refptr<RenderWidget> widget( new RenderWidget(popup_type, screen_info, false, false)); @@ -425,15 +425,15 @@ RenderWidget* RenderWidget::Create(int32 opener_id, // static WebWidget* RenderWidget::CreateWebWidget(RenderWidget* render_widget) { switch (render_widget->popup_type_) { - case WebKit::WebPopupTypeNone: // Nothing to create. + case blink::WebPopupTypeNone: // Nothing to create. break; - case WebKit::WebPopupTypeSelect: - case WebKit::WebPopupTypeSuggestion: + case blink::WebPopupTypeSelect: + case blink::WebPopupTypeSuggestion: return WebPopupMenu::create(render_widget); - case WebKit::WebPopupTypePage: + case blink::WebPopupTypePage: return WebPagePopup::create(render_widget); - case WebKit::WebPopupTypeHelperPlugin: - return WebKit::WebHelperPlugin::create(render_widget); + case blink::WebPopupTypeHelperPlugin: + return blink::WebHelperPlugin::create(render_widget); default: NOTREACHED(); } @@ -897,7 +897,7 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface(bool fallback) { // be optimized to resolve directly into the IOSurface shared between the // GPU and browser processes. For these reasons and to avoid platform // disparities we explicitly disable antialiasing. - WebKit::WebGraphicsContext3D::Attributes attributes; + blink::WebGraphicsContext3D::Attributes attributes; attributes.antialias = false; attributes.shareResources = true; attributes.noAutomaticFlushes = true; @@ -1049,7 +1049,7 @@ void RenderWidget::OnViewContextSwapBuffersComplete() { DoDeferredUpdateAndSendInputAck(); } -void RenderWidget::OnHandleInputEvent(const WebKit::WebInputEvent* input_event, +void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event, const ui::LatencyInfo& latency_info, bool is_keyboard_shortcut) { handling_input_event_ = true; @@ -1848,7 +1848,7 @@ void RenderWidget::initializeLayerTreeView() { compositor_->setSurfaceReady(); } -WebKit::WebLayerTreeView* RenderWidget::layerTreeView() { +blink::WebLayerTreeView* RenderWidget::layerTreeView() { return compositor_.get(); } @@ -2015,7 +2015,7 @@ WebRect RenderWidget::windowRect() { return view_screen_rect_; } -void RenderWidget::setToolTipText(const WebKit::WebString& text, +void RenderWidget::setToolTipText(const blink::WebString& text, WebTextDirection hint) { Send(new ViewHostMsg_SetTooltipText(routing_id_, text, hint)); } @@ -2433,7 +2433,7 @@ void RenderWidget::UpdateTextInputType() { bool new_can_compose_inline = CanComposeInline(); - WebKit::WebTextInputInfo new_info; + blink::WebTextInputInfo new_info; if (webwidget_) new_info = webwidget_->textInputInfo(); const ui::TextInputMode new_mode = ConvertInputMode(new_info.inputMode); @@ -2462,7 +2462,7 @@ void RenderWidget::UpdateTextInputState(bool show_ime_if_needed, if (IsDateTimeInput(new_type)) return; // Not considered as a text input field in WebKit/Chromium. - WebKit::WebTextInputInfo new_info; + blink::WebTextInputInfo new_info; if (webwidget_) new_info = webwidget_->textInputInfo(); @@ -2523,47 +2523,47 @@ void RenderWidget::UpdateSelectionBounds() { #endif } -// Check WebKit::WebTextInputType and ui::TextInputType is kept in sync. -COMPILE_ASSERT(int(WebKit::WebTextInputTypeNone) == \ +// Check blink::WebTextInputType and ui::TextInputType is kept in sync. +COMPILE_ASSERT(int(blink::WebTextInputTypeNone) == \ int(ui::TEXT_INPUT_TYPE_NONE), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeText) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeText) == \ int(ui::TEXT_INPUT_TYPE_TEXT), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypePassword) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypePassword) == \ int(ui::TEXT_INPUT_TYPE_PASSWORD), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeSearch) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeSearch) == \ int(ui::TEXT_INPUT_TYPE_SEARCH), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeEmail) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeEmail) == \ int(ui::TEXT_INPUT_TYPE_EMAIL), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeNumber) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeNumber) == \ int(ui::TEXT_INPUT_TYPE_NUMBER), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeTelephone) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeTelephone) == \ int(ui::TEXT_INPUT_TYPE_TELEPHONE), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeURL) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeURL) == \ int(ui::TEXT_INPUT_TYPE_URL), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeDate) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeDate) == \ int(ui::TEXT_INPUT_TYPE_DATE), mismatching_enum); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeDateTime) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeDateTime) == \ int(ui::TEXT_INPUT_TYPE_DATE_TIME), mismatching_enum); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeDateTimeLocal) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeDateTimeLocal) == \ int(ui::TEXT_INPUT_TYPE_DATE_TIME_LOCAL), mismatching_enum); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeMonth) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeMonth) == \ int(ui::TEXT_INPUT_TYPE_MONTH), mismatching_enum); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeTime) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeTime) == \ int(ui::TEXT_INPUT_TYPE_TIME), mismatching_enum); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeWeek) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeWeek) == \ int(ui::TEXT_INPUT_TYPE_WEEK), mismatching_enum); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeTextArea) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeTextArea) == \ int(ui::TEXT_INPUT_TYPE_TEXT_AREA), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeContentEditable) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeContentEditable) == \ int(ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE), mismatching_enums); -COMPILE_ASSERT(int(WebKit::WebTextInputTypeDateTimeField) == \ +COMPILE_ASSERT(int(blink::WebTextInputTypeDateTimeField) == \ int(ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD), mismatching_enums); ui::TextInputType RenderWidget::WebKitToUiTextInputType( - WebKit::WebTextInputType type) { + blink::WebTextInputType type) { // Check the type is in the range representable by ui::TextInputType. DCHECK_LE(type, static_cast<int>(ui::TEXT_INPUT_TYPE_MAX)) << - "WebKit::WebTextInputType and ui::TextInputType not synchronized"; + "blink::WebTextInputType and ui::TextInputType not synchronized"; return static_cast<ui::TextInputType>(type); } @@ -2698,7 +2698,7 @@ void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { } void RenderWidget::GetRenderingStats( - WebKit::WebRenderingStatsImpl& stats) const { + blink::WebRenderingStatsImpl& stats) const { if (compositor_) compositor_->GetRenderingStats(&stats.rendering_stats); @@ -2763,16 +2763,16 @@ void RenderWidget::BeginPinch( pending_synthetic_gesture_ = callback; } -bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { +bool RenderWidget::WillHandleMouseEvent(const blink::WebMouseEvent& event) { return false; } -bool RenderWidget::WillHandleKeyEvent(const WebKit::WebKeyboardEvent& event) { +bool RenderWidget::WillHandleKeyEvent(const blink::WebKeyboardEvent& event) { return false; } bool RenderWidget::WillHandleGestureEvent( - const WebKit::WebGestureEvent& event) { + const blink::WebGestureEvent& event) { return false; } @@ -2786,7 +2786,7 @@ bool RenderWidget::HasTouchEventHandlersAt(const gfx::Point& point) const { scoped_ptr<WebGraphicsContext3DCommandBufferImpl> RenderWidget::CreateGraphicsContext3D( - const WebKit::WebGraphicsContext3D::Attributes& attributes) { + const blink::WebGraphicsContext3D::Attributes& attributes) { if (!webwidget_) return scoped_ptr<WebGraphicsContext3DCommandBufferImpl>(); if (CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 85e7eb9..abd20c3 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h @@ -48,7 +48,7 @@ namespace IPC { class SyncMessage; } -namespace WebKit { +namespace blink { class WebGestureEvent; class WebInputEvent; class WebKeyboardEvent; @@ -78,18 +78,18 @@ struct WebPluginGeometry; class CONTENT_EXPORT RenderWidget : public IPC::Listener, public IPC::Sender, - NON_EXPORTED_BASE(virtual public WebKit::WebWidgetClient), + NON_EXPORTED_BASE(virtual public blink::WebWidgetClient), NON_EXPORTED_BASE(public WebGraphicsContext3DSwapBuffersClient), public base::RefCounted<RenderWidget> { public: // Creates a new RenderWidget. The opener_id is the routing ID of the // RenderView that this widget lives inside. static RenderWidget* Create(int32 opener_id, - WebKit::WebPopupType popup_type, - const WebKit::WebScreenInfo& screen_info); + blink::WebPopupType popup_type, + const blink::WebScreenInfo& screen_info); // Creates a WebWidget based on the popup type. - static WebKit::WebWidget* CreateWebWidget(RenderWidget* render_widget); + static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); // The compositing surface assigned by the RenderWidgetHost // (or RenderViewHost). Will be gfx::kNullPluginWindow if not assigned yet, @@ -106,7 +106,7 @@ class CONTENT_EXPORT RenderWidget } // May return NULL when the window is closing. - WebKit::WebWidget* webwidget() const { return webwidget_; } + blink::WebWidget* webwidget() const { return webwidget_; } gfx::Size size() const { return size_; } bool has_focus() const { return has_focus_; } @@ -119,17 +119,17 @@ class CONTENT_EXPORT RenderWidget // IPC::Sender virtual bool Send(IPC::Message* msg) OVERRIDE; - // WebKit::WebWidgetClient + // blink::WebWidgetClient virtual void suppressCompositorScheduling(bool enable); virtual void willBeginCompositorFrame(); - virtual void didInvalidateRect(const WebKit::WebRect&); + virtual void didInvalidateRect(const blink::WebRect&); virtual void didScrollRect(int dx, int dy, - const WebKit::WebRect& clipRect); - virtual void didAutoResize(const WebKit::WebSize& new_size); + const blink::WebRect& clipRect); + virtual void didAutoResize(const blink::WebSize& new_size); virtual void didActivateCompositor(int input_handler_identifier); virtual void didDeactivateCompositor(); virtual void initializeLayerTreeView(); - virtual WebKit::WebLayerTreeView* layerTreeView(); + virtual blink::WebLayerTreeView* layerTreeView(); virtual void didBecomeReadyForAdditionalInput(); virtual void didCommitAndDrawCompositorFrame(); virtual void didCompleteSwapBuffers(); @@ -137,20 +137,20 @@ class CONTENT_EXPORT RenderWidget virtual void scheduleAnimation(); virtual void didFocus(); virtual void didBlur(); - virtual void didChangeCursor(const WebKit::WebCursorInfo&); + virtual void didChangeCursor(const blink::WebCursorInfo&); virtual void closeWidgetSoon(); - virtual void show(WebKit::WebNavigationPolicy); + virtual void show(blink::WebNavigationPolicy); virtual void runModal() {} - virtual WebKit::WebRect windowRect(); - virtual void setToolTipText(const WebKit::WebString& text, - WebKit::WebTextDirection hint); - virtual void setWindowRect(const WebKit::WebRect&); - virtual WebKit::WebRect windowResizerRect(); - virtual WebKit::WebRect rootWindowRect(); - virtual WebKit::WebScreenInfo screenInfo(); + virtual blink::WebRect windowRect(); + virtual void setToolTipText(const blink::WebString& text, + blink::WebTextDirection hint); + virtual void setWindowRect(const blink::WebRect&); + virtual blink::WebRect windowResizerRect(); + virtual blink::WebRect rootWindowRect(); + virtual blink::WebScreenInfo screenInfo(); virtual float deviceScaleFactor(); virtual void resetInputMethod(); - virtual void didHandleGestureEvent(const WebKit::WebGestureEvent& event, + virtual void didHandleGestureEvent(const blink::WebGestureEvent& event, bool event_cancelled); // Called when a plugin is moved. These events are queued up and sent with @@ -163,7 +163,7 @@ class CONTENT_EXPORT RenderWidget // Fills in a WebRenderingStatsImpl struct containing information about // rendering, e.g. count of frames rendered, time spent painting. - void GetRenderingStats(WebKit::WebRenderingStatsImpl&) const; + void GetRenderingStats(blink::WebRenderingStatsImpl&) const; // Fills in a GpuRenderingStats struct containing information about // GPU rendering, e.g. count of texture uploads performed, time spent @@ -254,8 +254,8 @@ class CONTENT_EXPORT RenderWidget NO_RESIZE_ACK, }; - RenderWidget(WebKit::WebPopupType popup_type, - const WebKit::WebScreenInfo& screen_info, + RenderWidget(blink::WebPopupType popup_type, + const blink::WebScreenInfo& screen_info, bool swapped_out, bool hidden); @@ -267,7 +267,7 @@ class CONTENT_EXPORT RenderWidget // Called by Init and subclasses to perform initialization. bool DoInit(int32 opener_id, - WebKit::WebWidget* web_widget, + blink::WebWidget* web_widget, IPC::SyncMessage* create_widget_message); // Finishes creation of a pending view started with Init. @@ -296,7 +296,7 @@ class CONTENT_EXPORT RenderWidget void DoDeferredUpdateAndSendInputAck(); void DoDeferredUpdate(); void DoDeferredClose(); - void DoDeferredSetWindowRect(const WebKit::WebRect& pos); + void DoDeferredSetWindowRect(const blink::WebRect& pos); virtual void Composite(base::TimeTicks frame_begin_time); // Set the background of the render widget to a bitmap. The bitmap will be @@ -320,7 +320,7 @@ class CONTENT_EXPORT RenderWidget virtual void OnShowHostContextMenu(ContextMenuParams* params); // RenderWidget IPC message handlers - void OnHandleInputEvent(const WebKit::WebInputEvent* event, + void OnHandleInputEvent(const blink::WebInputEvent* event, const ui::LatencyInfo& latency_info, bool keyboard_shortcut); void OnCursorVisibilityChange(bool is_visible); @@ -340,7 +340,7 @@ class CONTENT_EXPORT RenderWidget void OnSetInputMethodActive(bool is_active); virtual void OnImeSetComposition( const string16& text, - const std::vector<WebKit::WebCompositionUnderline>& underlines, + const std::vector<blink::WebCompositionUnderline>& underlines, int selection_start, int selection_end); virtual void OnImeConfirmComposition(const string16& text, @@ -352,7 +352,7 @@ class CONTENT_EXPORT RenderWidget const gfx::Size& desired_size); void OnRepaint(gfx::Size size_to_paint); void OnSyntheticGestureCompleted(); - void OnSetTextDirection(WebKit::WebTextDirection direction); + void OnSetTextDirection(blink::WebTextDirection direction); void OnGetFPS(); void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, const gfx::Rect& window_screen_rect); @@ -466,7 +466,7 @@ class CONTENT_EXPORT RenderWidget virtual ui::TextInputType GetTextInputType(); virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end); virtual ui::TextInputType WebKitToUiTextInputType( - WebKit::WebTextInputType type); + blink::WebTextInputType type); #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) // Checks if the composition range or composition character bounds have been @@ -506,7 +506,7 @@ class CONTENT_EXPORT RenderWidget // been processed by the browser. So we maintain a pending window rect // size. If JS code sets the WindowRect, and then immediately calls // GetWindowRect() we'll use this pending window rect as the size. - void SetPendingWindowRect(const WebKit::WebRect& r); + void SetPendingWindowRect(const blink::WebRect& r); // Called by OnHandleInputEvent() to notify subclasses that a key event was // just handled. @@ -516,27 +516,27 @@ class CONTENT_EXPORT RenderWidget // about to be handled. // Returns true if no further handling is needed. In that case, the event // won't be sent to WebKit or trigger DidHandleMouseEvent(). - virtual bool WillHandleMouseEvent(const WebKit::WebMouseEvent& event); + virtual bool WillHandleMouseEvent(const blink::WebMouseEvent& event); // Called by OnHandleInputEvent() to notify subclasses that a key event is // about to be handled. // Returns true if no further handling is needed. In that case, the event // won't be sent to WebKit or trigger DidHandleKeyEvent(). - virtual bool WillHandleKeyEvent(const WebKit::WebKeyboardEvent& event); + virtual bool WillHandleKeyEvent(const blink::WebKeyboardEvent& event); // Called by OnHandleInputEvent() to notify subclasses that a gesture event is // about to be handled. // Returns true if no further handling is needed. In that case, the event // won't be sent to WebKit. - virtual bool WillHandleGestureEvent(const WebKit::WebGestureEvent& event); + virtual bool WillHandleGestureEvent(const blink::WebGestureEvent& event); // Called by OnHandleInputEvent() to notify subclasses that a mouse event was // just handled. - virtual void DidHandleMouseEvent(const WebKit::WebMouseEvent& event) {} + virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) {} // Called by OnHandleInputEvent() to notify subclasses that a touch event was // just handled. - virtual void DidHandleTouchEvent(const WebKit::WebTouchEvent& event) {} + virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {} // Check whether the WebWidget has any touch event handlers registered // at the given point. @@ -547,7 +547,7 @@ class CONTENT_EXPORT RenderWidget // Creates a 3D context associated with this view. scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D( - const WebKit::WebGraphicsContext3D::Attributes& attributes); + const blink::WebGraphicsContext3D::Attributes& attributes); bool OnSnapshotHelper(const gfx::Rect& src_subrect, SkBitmap* bitmap); @@ -560,7 +560,7 @@ class CONTENT_EXPORT RenderWidget int32 surface_id_; // We are responsible for destroying this object via its Close method. - WebKit::WebWidget* webwidget_; + blink::WebWidget* webwidget_; // This is lazily constructed and must not outlive webwidget_. scoped_ptr<RenderWidgetCompositor> compositor_; @@ -672,7 +672,7 @@ class CONTENT_EXPORT RenderWidget bool input_method_is_active_; // Stores information about the current text input. - WebKit::WebTextInputInfo text_input_info_; + blink::WebTextInputInfo text_input_info_; // Stores the current text input type of |webwidget_|. ui::TextInputType text_input_type_; @@ -694,7 +694,7 @@ class CONTENT_EXPORT RenderWidget gfx::Range composition_range_; // The kind of popup this widget represents, NONE if not a popup. - WebKit::WebPopupType popup_type_; + blink::WebPopupType popup_type_; // Holds all the needed plugin window moves for a scroll. typedef std::vector<WebPluginGeometry> WebPluginGeometryVector; @@ -706,7 +706,7 @@ class CONTENT_EXPORT RenderWidget // While we are waiting for the browser to update window sizes, we track the // pending size temporarily. int pending_window_rect_count_; - WebKit::WebRect pending_window_rect_; + blink::WebRect pending_window_rect_; // The screen rects of the view and the window that contains it. gfx::Rect view_screen_rect_; @@ -752,7 +752,7 @@ class CONTENT_EXPORT RenderWidget std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; // Properties of the screen hosting this RenderWidget instance. - WebKit::WebScreenInfo screen_info_; + blink::WebScreenInfo screen_info_; // The device scale factor. This value is computed from the DPI entries in // |screen_info_| on some platforms, and defaults to 1 on other platforms. diff --git a/content/renderer/render_widget_fullscreen.cc b/content/renderer/render_widget_fullscreen.cc index 5798285d..d6650ae 100644 --- a/content/renderer/render_widget_fullscreen.cc +++ b/content/renderer/render_widget_fullscreen.cc @@ -7,11 +7,11 @@ #include "content/common/view_messages.h" #include "third_party/WebKit/public/web/WebWidget.h" -using WebKit::WebWidget; +using blink::WebWidget; namespace content { -void RenderWidgetFullscreen::show(WebKit::WebNavigationPolicy) { +void RenderWidgetFullscreen::show(blink::WebNavigationPolicy) { DCHECK(!did_show_) << "received extraneous Show call"; DCHECK_NE(MSG_ROUTING_NONE, routing_id_); DCHECK_NE(MSG_ROUTING_NONE, opener_id_); @@ -24,8 +24,8 @@ void RenderWidgetFullscreen::show(WebKit::WebNavigationPolicy) { } RenderWidgetFullscreen::RenderWidgetFullscreen( - const WebKit::WebScreenInfo& screen_info) - : RenderWidget(WebKit::WebPopupTypeNone, screen_info, false, false) { + const blink::WebScreenInfo& screen_info) + : RenderWidget(blink::WebPopupTypeNone, screen_info, false, false) { } RenderWidgetFullscreen::~RenderWidgetFullscreen() {} diff --git a/content/renderer/render_widget_fullscreen.h b/content/renderer/render_widget_fullscreen.h index 9978fd2..4b65b88 100644 --- a/content/renderer/render_widget_fullscreen.h +++ b/content/renderer/render_widget_fullscreen.h @@ -14,13 +14,13 @@ namespace content { // TODO(boliu): Override non-supported methods with no-op? eg setWindowRect(). class RenderWidgetFullscreen : public RenderWidget { public: - virtual void show(WebKit::WebNavigationPolicy); + virtual void show(blink::WebNavigationPolicy); protected: - RenderWidgetFullscreen(const WebKit::WebScreenInfo& screen_info); + RenderWidgetFullscreen(const blink::WebScreenInfo& screen_info); virtual ~RenderWidgetFullscreen(); - virtual WebKit::WebWidget* CreateWebWidget(); + virtual blink::WebWidget* CreateWebWidget(); bool Init(int32 opener_id); }; diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc index 405b5450..d81b8cc 100644 --- a/content/renderer/render_widget_fullscreen_pepper.cc +++ b/content/renderer/render_widget_fullscreen_pepper.cc @@ -27,22 +27,22 @@ #include "ui/gfx/size_conversions.h" #include "ui/gl/gpu_preference.h" -using WebKit::WebCanvas; -using WebKit::WebCompositionUnderline; -using WebKit::WebCursorInfo; -using WebKit::WebGestureEvent; -using WebKit::WebInputEvent; -using WebKit::WebMouseEvent; -using WebKit::WebMouseWheelEvent; -using WebKit::WebPoint; -using WebKit::WebRect; -using WebKit::WebSize; -using WebKit::WebString; -using WebKit::WebTextDirection; -using WebKit::WebTextInputType; -using WebKit::WebVector; -using WebKit::WebWidget; -using WebKit::WGC3Dintptr; +using blink::WebCanvas; +using blink::WebCompositionUnderline; +using blink::WebCursorInfo; +using blink::WebGestureEvent; +using blink::WebInputEvent; +using blink::WebMouseEvent; +using blink::WebMouseWheelEvent; +using blink::WebPoint; +using blink::WebRect; +using blink::WebSize; +using blink::WebString; +using blink::WebTextDirection; +using blink::WebTextInputType; +using blink::WebVector; +using blink::WebWidget; +using blink::WGC3Dintptr; namespace content { @@ -309,7 +309,7 @@ class PepperWidget : public WebWidget { } virtual WebTextInputType textInputType() { - return WebKit::WebTextInputTypeNone; + return blink::WebTextInputTypeNone; } virtual WebRect caretOrSelectionBounds() { @@ -345,7 +345,7 @@ RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( int32 opener_id, PepperPluginInstanceImpl* plugin, const GURL& active_url, - const WebKit::WebScreenInfo& screen_info) { + const blink::WebScreenInfo& screen_info) { DCHECK_NE(MSG_ROUTING_NONE, opener_id); scoped_refptr<RenderWidgetFullscreenPepper> widget( new RenderWidgetFullscreenPepper(plugin, active_url, screen_info)); @@ -357,7 +357,7 @@ RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( PepperPluginInstanceImpl* plugin, const GURL& active_url, - const WebKit::WebScreenInfo& screen_info) + const blink::WebScreenInfo& screen_info) : RenderWidgetFullscreen(screen_info), active_url_(active_url), plugin_(plugin), @@ -373,12 +373,12 @@ void RenderWidgetFullscreenPepper::Invalidate() { InvalidateRect(gfx::Rect(size_.width(), size_.height())); } -void RenderWidgetFullscreenPepper::InvalidateRect(const WebKit::WebRect& rect) { +void RenderWidgetFullscreenPepper::InvalidateRect(const blink::WebRect& rect) { didInvalidateRect(rect); } void RenderWidgetFullscreenPepper::ScrollRect( - int dx, int dy, const WebKit::WebRect& rect) { + int dx, int dy, const blink::WebRect& rect) { didScrollRect(dx, dy, rect); } @@ -397,11 +397,11 @@ void RenderWidgetFullscreenPepper::Destroy() { } void RenderWidgetFullscreenPepper::DidChangeCursor( - const WebKit::WebCursorInfo& cursor) { + const blink::WebCursorInfo& cursor) { didChangeCursor(cursor); } -void RenderWidgetFullscreenPepper::SetLayer(WebKit::WebLayer* layer) { +void RenderWidgetFullscreenPepper::SetLayer(blink::WebLayer* layer) { layer_ = layer; bool compositing = !!layer_; if (compositing != is_accelerated_compositing_active_) { @@ -410,7 +410,7 @@ void RenderWidgetFullscreenPepper::SetLayer(WebKit::WebLayer* layer) { initializeLayerTreeView(); if (!layerTreeView()) return; - layer_->setBounds(WebKit::WebSize(size())); + layer_->setBounds(blink::WebSize(size())); layer_->setDrawsContent(true); compositor_->setDeviceScaleFactor(device_scale_factor_); compositor_->setRootLayer(*layer_); @@ -475,7 +475,7 @@ PepperPluginInstanceImpl* void RenderWidgetFullscreenPepper::OnResize( const ViewMsg_Resize_Params& params) { if (layer_) - layer_->setBounds(WebKit::WebSize(params.new_size)); + layer_->setBounds(blink::WebSize(params.new_size)); RenderWidget::OnResize(params); } diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h index 16b88b9..5e2952c 100644 --- a/content/renderer/render_widget_fullscreen_pepper.h +++ b/content/renderer/render_widget_fullscreen_pepper.h @@ -11,7 +11,7 @@ #include "content/renderer/render_widget_fullscreen.h" #include "third_party/WebKit/public/web/WebWidget.h" -namespace WebKit { +namespace blink { class WebLayer; } @@ -28,15 +28,15 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, int32 opener_id, PepperPluginInstanceImpl* plugin, const GURL& active_url, - const WebKit::WebScreenInfo& screen_info); + const blink::WebScreenInfo& screen_info); // pepper::FullscreenContainer API. virtual void Invalidate() OVERRIDE; - virtual void InvalidateRect(const WebKit::WebRect& rect) OVERRIDE; - virtual void ScrollRect(int dx, int dy, const WebKit::WebRect& rect) OVERRIDE; + virtual void InvalidateRect(const blink::WebRect& rect) OVERRIDE; + virtual void ScrollRect(int dx, int dy, const blink::WebRect& rect) OVERRIDE; virtual void Destroy() OVERRIDE; - virtual void DidChangeCursor(const WebKit::WebCursorInfo& cursor) OVERRIDE; - virtual void SetLayer(WebKit::WebLayer* layer) OVERRIDE; + virtual void DidChangeCursor(const blink::WebCursorInfo& cursor) OVERRIDE; + virtual void SetLayer(blink::WebLayer* layer) OVERRIDE; // IPC::Listener implementation. This overrides the implementation // in RenderWidgetFullscreen. @@ -54,7 +54,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, protected: RenderWidgetFullscreenPepper(PepperPluginInstanceImpl* plugin, const GURL& active_url, - const WebKit::WebScreenInfo& screen_info); + const blink::WebScreenInfo& screen_info); virtual ~RenderWidgetFullscreenPepper(); // RenderWidget API. @@ -70,7 +70,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, virtual void OnResize(const ViewMsg_Resize_Params& params) OVERRIDE; // RenderWidgetFullscreen API. - virtual WebKit::WebWidget* CreateWebWidget() OVERRIDE; + virtual blink::WebWidget* CreateWebWidget() OVERRIDE; // RenderWidget overrides. virtual GURL GetURLForGraphicsContext3D() OVERRIDE; @@ -83,7 +83,7 @@ class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, // The plugin instance this widget wraps. PepperPluginInstanceImpl* plugin_; - WebKit::WebLayer* layer_; + blink::WebLayer* layer_; scoped_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; diff --git a/content/renderer/renderer_date_time_picker.cc b/content/renderer/renderer_date_time_picker.cc index 86d268a..074ebe5 100644 --- a/content/renderer/renderer_date_time_picker.cc +++ b/content/renderer/renderer_date_time_picker.cc @@ -13,14 +13,14 @@ #include "third_party/WebKit/public/web/WebDateTimeChooserParams.h" #include "third_party/WebKit/public/web/WebDateTimeInputType.h" -using WebKit::WebString; +using blink::WebString; namespace content { RendererDateTimePicker::RendererDateTimePicker( RenderViewImpl* sender, - const WebKit::WebDateTimeChooserParams& params, - WebKit::WebDateTimeChooserCompletion* completion) + const blink::WebDateTimeChooserParams& params, + blink::WebDateTimeChooserCompletion* completion) : RenderViewObserver(sender), chooser_params_(params), chooser_completion_(completion){ diff --git a/content/renderer/renderer_date_time_picker.h b/content/renderer/renderer_date_time_picker.h index d7292b7..2dc6386 100644 --- a/content/renderer/renderer_date_time_picker.h +++ b/content/renderer/renderer_date_time_picker.h @@ -11,9 +11,9 @@ struct ViewHostMsg_DateTimeDialogValue_Params; -namespace WebKit { +namespace blink { class WebDateTimeChooserCompletion; -} // namespace WebKit +} // namespace blink namespace content { class RenderViewImpl; @@ -22,8 +22,8 @@ class RendererDateTimePicker : public RenderViewObserver { public: RendererDateTimePicker( RenderViewImpl* sender, - const WebKit::WebDateTimeChooserParams& params, - WebKit::WebDateTimeChooserCompletion* completion); + const blink::WebDateTimeChooserParams& params, + blink::WebDateTimeChooserCompletion* completion); virtual ~RendererDateTimePicker(); bool Open(); @@ -35,8 +35,8 @@ class RendererDateTimePicker : public RenderViewObserver { // RenderViewObserver virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - WebKit::WebDateTimeChooserParams chooser_params_; - WebKit::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us + blink::WebDateTimeChooserParams chooser_params_; + blink::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker); }; diff --git a/content/renderer/renderer_webapplicationcachehost_impl.cc b/content/renderer/renderer_webapplicationcachehost_impl.cc index 42b281c..8aeee8a 100644 --- a/content/renderer/renderer_webapplicationcachehost_impl.cc +++ b/content/renderer/renderer_webapplicationcachehost_impl.cc @@ -11,8 +11,8 @@ #include "third_party/WebKit/public/web/WebView.h" using appcache::AppCacheBackend; -using WebKit::WebApplicationCacheHostClient; -using WebKit::WebConsoleMessage; +using blink::WebApplicationCacheHostClient; +using blink::WebConsoleMessage; namespace content { @@ -34,10 +34,10 @@ void RendererWebApplicationCacheHostImpl::OnLogMessage( !render_view->webview()->mainFrame()) return; - WebKit::WebFrame* frame = render_view->webview()->mainFrame(); + blink::WebFrame* frame = render_view->webview()->mainFrame(); frame->addMessageToConsole(WebConsoleMessage( static_cast<WebConsoleMessage::Level>(log_level), - WebKit::WebString::fromUTF8(message.c_str()))); + blink::WebString::fromUTF8(message.c_str()))); } void RendererWebApplicationCacheHostImpl::OnContentBlocked( diff --git a/content/renderer/renderer_webapplicationcachehost_impl.h b/content/renderer/renderer_webapplicationcachehost_impl.h index 0612039..16fd17c 100644 --- a/content/renderer/renderer_webapplicationcachehost_impl.h +++ b/content/renderer/renderer_webapplicationcachehost_impl.h @@ -14,7 +14,7 @@ class RendererWebApplicationCacheHostImpl : public WebApplicationCacheHostImpl { public: RendererWebApplicationCacheHostImpl( RenderViewImpl* render_view, - WebKit::WebApplicationCacheHostClient* client, + blink::WebApplicationCacheHostClient* client, appcache::AppCacheBackend* backend); // WebApplicationCacheHostImpl: diff --git a/content/renderer/renderer_webcolorchooser_impl.cc b/content/renderer/renderer_webcolorchooser_impl.cc index 337ec7e..af04dab 100644 --- a/content/renderer/renderer_webcolorchooser_impl.cc +++ b/content/renderer/renderer_webcolorchooser_impl.cc @@ -16,7 +16,7 @@ static int GenerateColorChooserIdentifier() { RendererWebColorChooserImpl::RendererWebColorChooserImpl( RenderViewImpl* render_view, - WebKit::WebColorChooserClient* client) + blink::WebColorChooserClient* client) : RenderViewObserver(render_view), identifier_(GenerateColorChooserIdentifier()), client_(client) { @@ -38,7 +38,7 @@ bool RendererWebColorChooserImpl::OnMessageReceived( return handled; } -void RendererWebColorChooserImpl::setSelectedColor(WebKit::WebColor color) { +void RendererWebColorChooserImpl::setSelectedColor(blink::WebColor color) { Send(new ViewHostMsg_SetSelectedColorInColorChooser(routing_id(), identifier_, static_cast<SkColor>(color))); } @@ -56,7 +56,7 @@ void RendererWebColorChooserImpl::OnDidChooseColorResponse(int color_chooser_id, SkColor color) { DCHECK(identifier_ == color_chooser_id); - client_->didChooseColor(static_cast<WebKit::WebColor>(color)); + client_->didChooseColor(static_cast<blink::WebColor>(color)); } void RendererWebColorChooserImpl::OnDidEndColorChooser(int color_chooser_id) { diff --git a/content/renderer/renderer_webcolorchooser_impl.h b/content/renderer/renderer_webcolorchooser_impl.h index bd8f235..4d6540b 100644 --- a/content/renderer/renderer_webcolorchooser_impl.h +++ b/content/renderer/renderer_webcolorchooser_impl.h @@ -11,26 +11,26 @@ #include "third_party/WebKit/public/web/WebColorChooserClient.h" #include "third_party/skia/include/core/SkColor.h" -namespace WebKit { +namespace blink { class WebFrame; } namespace content { class RenderViewImpl; -class RendererWebColorChooserImpl : public WebKit::WebColorChooser, +class RendererWebColorChooserImpl : public blink::WebColorChooser, public RenderViewObserver { public: explicit RendererWebColorChooserImpl(RenderViewImpl* sender, - WebKit::WebColorChooserClient*); + blink::WebColorChooserClient*); virtual ~RendererWebColorChooserImpl(); - virtual void setSelectedColor(const WebKit::WebColor); + virtual void setSelectedColor(const blink::WebColor); virtual void endChooser(); void Open(SkColor initial_color); - WebKit::WebColorChooserClient* client() { return client_; } + blink::WebColorChooserClient* client() { return client_; } private: // RenderViewObserver implementation. @@ -40,7 +40,7 @@ class RendererWebColorChooserImpl : public WebKit::WebColorChooser, void OnDidEndColorChooser(int color_chooser_id); int identifier_; - WebKit::WebColorChooserClient* client_; + blink::WebColorChooserClient* client_; DISALLOW_COPY_AND_ASSIGN(RendererWebColorChooserImpl); }; diff --git a/content/renderer/renderer_webcookiejar_impl.cc b/content/renderer/renderer_webcookiejar_impl.cc index c9e6934..e169c48 100644 --- a/content/renderer/renderer_webcookiejar_impl.cc +++ b/content/renderer/renderer_webcookiejar_impl.cc @@ -11,10 +11,10 @@ #include "content/renderer/render_view_impl.h" #include "third_party/WebKit/public/platform/WebCookie.h" -using WebKit::WebCookie; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebCookie; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; namespace content { diff --git a/content/renderer/renderer_webcookiejar_impl.h b/content/renderer/renderer_webcookiejar_impl.h index 4820bc4..a6451af 100644 --- a/content/renderer/renderer_webcookiejar_impl.h +++ b/content/renderer/renderer_webcookiejar_impl.h @@ -12,7 +12,7 @@ namespace content { class RenderViewImpl; -class RendererWebCookieJarImpl : public WebKit::WebCookieJar { +class RendererWebCookieJarImpl : public blink::WebCookieJar { public: explicit RendererWebCookieJarImpl(RenderViewImpl* sender) : sender_(sender) { @@ -20,21 +20,21 @@ class RendererWebCookieJarImpl : public WebKit::WebCookieJar { virtual ~RendererWebCookieJarImpl() {} private: - // WebKit::WebCookieJar methods: + // blink::WebCookieJar methods: virtual void setCookie( - const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies, - const WebKit::WebString& value); - virtual WebKit::WebString cookies( - const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); - virtual WebKit::WebString cookieRequestHeaderFieldValue( - const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); + const blink::WebURL& url, const blink::WebURL& first_party_for_cookies, + const blink::WebString& value); + virtual blink::WebString cookies( + const blink::WebURL& url, const blink::WebURL& first_party_for_cookies); + virtual blink::WebString cookieRequestHeaderFieldValue( + const blink::WebURL& url, const blink::WebURL& first_party_for_cookies); virtual void rawCookies( - const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies, - WebKit::WebVector<WebKit::WebCookie>& cookies); + const blink::WebURL& url, const blink::WebURL& first_party_for_cookies, + blink::WebVector<blink::WebCookie>& cookies); virtual void deleteCookie( - const WebKit::WebURL& url, const WebKit::WebString& cookie_name); + const blink::WebURL& url, const blink::WebString& cookie_name); virtual bool cookiesEnabled( - const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); + const blink::WebURL& url, const blink::WebURL& first_party_for_cookies); RenderViewImpl* sender_; }; diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index 6f7dd05..3515563 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -103,33 +103,33 @@ #include "content/renderer/media/android/audio_decoder_android.h" #endif -using WebKit::WebAudioDevice; -using WebKit::WebBlobRegistry; -using WebKit::WebFileInfo; -using WebKit::WebFileSystem; -using WebKit::WebFrame; -using WebKit::WebGamepads; -using WebKit::WebIDBFactory; -using WebKit::WebMIDIAccessor; -using WebKit::Platform; -using WebKit::WebMediaStreamCenter; -using WebKit::WebMediaStreamCenterClient; -using WebKit::WebMimeRegistry; -using WebKit::WebRTCPeerConnectionHandler; -using WebKit::WebRTCPeerConnectionHandlerClient; -using WebKit::WebStorageNamespace; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebAudioDevice; +using blink::WebBlobRegistry; +using blink::WebFileInfo; +using blink::WebFileSystem; +using blink::WebFrame; +using blink::WebGamepads; +using blink::WebIDBFactory; +using blink::WebMIDIAccessor; +using blink::Platform; +using blink::WebMediaStreamCenter; +using blink::WebMediaStreamCenterClient; +using blink::WebMimeRegistry; +using blink::WebRTCPeerConnectionHandler; +using blink::WebRTCPeerConnectionHandlerClient; +using blink::WebStorageNamespace; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; namespace content { static bool g_sandbox_enabled = true; base::LazyInstance<WebGamepads>::Leaky g_test_gamepads = LAZY_INSTANCE_INITIALIZER; -base::LazyInstance<WebKit::WebDeviceMotionData>::Leaky +base::LazyInstance<blink::WebDeviceMotionData>::Leaky g_test_device_motion_data = LAZY_INSTANCE_INITIALIZER; -base::LazyInstance<WebKit::WebDeviceOrientationData>::Leaky +base::LazyInstance<blink::WebDeviceOrientationData>::Leaky g_test_device_orientation_data = LAZY_INSTANCE_INITIALIZER; //------------------------------------------------------------------------------ @@ -137,16 +137,16 @@ base::LazyInstance<WebKit::WebDeviceOrientationData>::Leaky class RendererWebKitPlatformSupportImpl::MimeRegistry : public webkit_glue::SimpleWebMimeRegistryImpl { public: - virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( - const WebKit::WebString& mime_type, - const WebKit::WebString& codecs, - const WebKit::WebString& key_system); - virtual bool supportsMediaSourceMIMEType(const WebKit::WebString& mime_type, - const WebKit::WebString& codecs); - virtual WebKit::WebString mimeTypeForExtension( - const WebKit::WebString& file_extension); - virtual WebKit::WebString mimeTypeFromFile( - const WebKit::WebString& file_path); + virtual blink::WebMimeRegistry::SupportsType supportsMediaMIMEType( + const blink::WebString& mime_type, + const blink::WebString& codecs, + const blink::WebString& key_system); + virtual bool supportsMediaSourceMIMEType(const blink::WebString& mime_type, + const blink::WebString& codecs); + virtual blink::WebString mimeTypeForExtension( + const blink::WebString& file_extension); + virtual blink::WebString mimeTypeFromFile( + const blink::WebString& file_path); }; class RendererWebKitPlatformSupportImpl::FileUtilities @@ -167,7 +167,7 @@ class RendererWebKitPlatformSupportImpl::SandboxSupport { }; #else class RendererWebKitPlatformSupportImpl::SandboxSupport - : public WebKit::WebSandboxSupport { + : public blink::WebSandboxSupport { public: virtual ~SandboxSupport() {} @@ -180,18 +180,18 @@ class RendererWebKitPlatformSupportImpl::SandboxSupport uint32* font_id); #elif defined(OS_POSIX) virtual void getFontFamilyForCharacter( - WebKit::WebUChar32 character, + blink::WebUChar32 character, const char* preferred_locale, - WebKit::WebFontFamily* family); + blink::WebFontFamily* family); virtual void getRenderStyleForStrike( - const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out); + const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out); private: // WebKit likes to ask us for the correct font family to use for a set of // unicode code points. It needs this information frequently so we cache it // here. base::Lock unicode_font_families_mutex_; - std::map<int32_t, WebKit::WebFontFamily> unicode_font_families_; + std::map<int32_t, blink::WebFontFamily> unicode_font_families_; #endif }; #endif // defined(OS_ANDROID) @@ -227,19 +227,19 @@ RendererWebKitPlatformSupportImpl::~RendererWebKitPlatformSupportImpl() { //------------------------------------------------------------------------------ -WebKit::WebClipboard* RendererWebKitPlatformSupportImpl::clipboard() { - WebKit::WebClipboard* clipboard = +blink::WebClipboard* RendererWebKitPlatformSupportImpl::clipboard() { + blink::WebClipboard* clipboard = GetContentClient()->renderer()->OverrideWebClipboard(); if (clipboard) return clipboard; return clipboard_.get(); } -WebKit::WebMimeRegistry* RendererWebKitPlatformSupportImpl::mimeRegistry() { +blink::WebMimeRegistry* RendererWebKitPlatformSupportImpl::mimeRegistry() { return mime_registry_.get(); } -WebKit::WebFileUtilities* +blink::WebFileUtilities* RendererWebKitPlatformSupportImpl::fileUtilities() { if (!file_utilities_) { file_utilities_.reset(new FileUtilities(thread_safe_sender_.get())); @@ -248,7 +248,7 @@ RendererWebKitPlatformSupportImpl::fileUtilities() { return file_utilities_.get(); } -WebKit::WebSandboxSupport* RendererWebKitPlatformSupportImpl::sandboxSupport() { +blink::WebSandboxSupport* RendererWebKitPlatformSupportImpl::sandboxSupport() { #if defined(OS_ANDROID) // WebKit doesn't use WebSandboxSupport on android. return NULL; @@ -257,13 +257,13 @@ WebKit::WebSandboxSupport* RendererWebKitPlatformSupportImpl::sandboxSupport() { #endif } -WebKit::WebCookieJar* RendererWebKitPlatformSupportImpl::cookieJar() { +blink::WebCookieJar* RendererWebKitPlatformSupportImpl::cookieJar() { NOTREACHED() << "Use WebFrameClient::cookieJar() instead!"; return NULL; } -WebKit::WebThemeEngine* RendererWebKitPlatformSupportImpl::themeEngine() { - WebKit::WebThemeEngine* theme_engine = +blink::WebThemeEngine* RendererWebKitPlatformSupportImpl::themeEngine() { + blink::WebThemeEngine* theme_engine = GetContentClient()->renderer()->OverrideThemeEngine(); if (theme_engine) return theme_engine; @@ -292,12 +292,12 @@ bool RendererWebKitPlatformSupportImpl::isLinkVisited( return GetContentClient()->renderer()->IsLinkVisited(link_hash); } -WebKit::WebMessagePortChannel* +blink::WebMessagePortChannel* RendererWebKitPlatformSupportImpl::createMessagePortChannel() { return new WebMessagePortChannelImpl(child_thread_loop_.get()); } -WebKit::WebPrescientNetworking* +blink::WebPrescientNetworking* RendererWebKitPlatformSupportImpl::prescientNetworking() { return GetContentClient()->renderer()->GetPrescientNetworking(); } @@ -315,7 +315,7 @@ RendererWebKitPlatformSupportImpl::CheckPreparsedJsCachingEnabled() const { } void RendererWebKitPlatformSupportImpl::cacheMetadata( - const WebKit::WebURL& url, + const blink::WebURL& url, double response_time, const char* data, size_t size) { @@ -429,7 +429,7 @@ RendererWebKitPlatformSupportImpl::MimeRegistry::supportsMediaMIMEType( bool RendererWebKitPlatformSupportImpl::MimeRegistry::supportsMediaSourceMIMEType( - const WebKit::WebString& mime_type, + const blink::WebString& mime_type, const WebString& codecs) { const std::string mime_type_ascii = ToASCIIOrEmpty(mime_type); std::vector<std::string> parsed_codec_ids; @@ -547,11 +547,11 @@ bool RendererWebKitPlatformSupportImpl::SandboxSupport::loadFont( void RendererWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacter( - WebKit::WebUChar32 character, + blink::WebUChar32 character, const char* preferred_locale, - WebKit::WebFontFamily* family) { + blink::WebFontFamily* family) { base::AutoLock lock(unicode_font_families_mutex_); - const std::map<int32_t, WebKit::WebFontFamily>::const_iterator iter = + const std::map<int32_t, blink::WebFontFamily>::const_iterator iter = unicode_font_families_.find(character); if (iter != unicode_font_families_.end()) { family->name = iter->second.name; @@ -566,7 +566,7 @@ RendererWebKitPlatformSupportImpl::SandboxSupport::getFontFamilyForCharacter( void RendererWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike( - const char* family, int sizeAndStyle, WebKit::WebFontRenderStyle* out) { + const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out) { GetRenderStyleForStrike(family, sizeAndStyle, out); } @@ -668,9 +668,9 @@ RendererWebKitPlatformSupportImpl::createAudioDevice( unsigned channels, double sample_rate, WebAudioDevice::RenderCallback* callback, - const WebKit::WebString& input_device_id) { + const blink::WebString& input_device_id) { // Use a mock for testing. - WebKit::WebAudioDevice* mock_device = + blink::WebAudioDevice* mock_device = GetContentClient()->renderer()->OverrideCreateAudioDevice(sample_rate); if (mock_device) return mock_device; @@ -729,7 +729,7 @@ RendererWebKitPlatformSupportImpl::createAudioDevice( #if defined(OS_ANDROID) bool RendererWebKitPlatformSupportImpl::loadAudioResource( - WebKit::WebAudioBus* destination_bus, const char* audio_file_data, + blink::WebAudioBus* destination_bus, const char* audio_file_data, size_t data_size, double sample_rate) { return DecodeAudioFileData(destination_bus, audio_file_data, @@ -739,7 +739,7 @@ bool RendererWebKitPlatformSupportImpl::loadAudioResource( } #else bool RendererWebKitPlatformSupportImpl::loadAudioResource( - WebKit::WebAudioBus* destination_bus, const char* audio_file_data, + blink::WebAudioBus* destination_bus, const char* audio_file_data, size_t data_size, double sample_rate) { return DecodeAudioFileData( destination_bus, audio_file_data, data_size, sample_rate); @@ -748,18 +748,18 @@ bool RendererWebKitPlatformSupportImpl::loadAudioResource( //------------------------------------------------------------------------------ -WebKit::WebContentDecryptionModule* +blink::WebContentDecryptionModule* RendererWebKitPlatformSupportImpl::createContentDecryptionModule( - const WebKit::WebString& key_system) { + const blink::WebString& key_system) { return WebContentDecryptionModuleImpl::Create(key_system); } //------------------------------------------------------------------------------ -WebKit::WebMIDIAccessor* +blink::WebMIDIAccessor* RendererWebKitPlatformSupportImpl::createMIDIAccessor( - WebKit::WebMIDIAccessorClient* client) { - WebKit::WebMIDIAccessor* accessor = + blink::WebMIDIAccessorClient* client) { + blink::WebMIDIAccessor* accessor = GetContentClient()->renderer()->OverrideCreateMIDIAccessor(client); if (accessor) return accessor; @@ -769,7 +769,7 @@ RendererWebKitPlatformSupportImpl::createMIDIAccessor( void RendererWebKitPlatformSupportImpl::getPluginList( bool refresh, - WebKit::WebPluginListBuilder* builder) { + blink::WebPluginListBuilder* builder) { #if defined(ENABLE_PLUGINS) std::vector<WebPluginInfo> plugins; if (!plugin_refresh_allowed_) @@ -800,11 +800,11 @@ void RendererWebKitPlatformSupportImpl::getPluginList( //------------------------------------------------------------------------------ -WebKit::WebString +blink::WebString RendererWebKitPlatformSupportImpl::signedPublicKeyAndChallengeString( unsigned key_size_index, - const WebKit::WebString& challenge, - const WebKit::WebURL& url) { + const blink::WebString& challenge, + const blink::WebURL& url) { std::string signed_public_key; RenderThread::Get()->Send(new ViewHostMsg_Keygen( static_cast<uint32>(key_size_index), @@ -841,8 +841,8 @@ void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) { } } -WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( - const WebKit::WebURL& url) { +blink::WebString RendererWebKitPlatformSupportImpl::userAgent( + const blink::WebURL& url) { return WebKitPlatformSupportImpl::userAgent(url); } @@ -899,9 +899,9 @@ void RendererWebKitPlatformSupportImpl::SetMockGamepadsForTesting( //------------------------------------------------------------------------------ -WebKit::WebSpeechSynthesizer* +blink::WebSpeechSynthesizer* RendererWebKitPlatformSupportImpl::createSpeechSynthesizer( - WebKit::WebSpeechSynthesizerClient* client) { + blink::WebSpeechSynthesizerClient* client) { return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); } @@ -916,9 +916,9 @@ bool RendererWebKitPlatformSupportImpl::processMemorySizesInBytes( //------------------------------------------------------------------------------ -WebKit::WebGraphicsContext3D* +blink::WebGraphicsContext3D* RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( - const WebKit::WebGraphicsContext3D::Attributes& attributes) { + const blink::WebGraphicsContext3D::Attributes& attributes) { if (!RenderThreadImpl::current()) return NULL; @@ -933,7 +933,7 @@ RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( //------------------------------------------------------------------------------ -WebKit::WebGraphicsContext3DProvider* RendererWebKitPlatformSupportImpl:: +blink::WebGraphicsContext3DProvider* RendererWebKitPlatformSupportImpl:: createSharedOffscreenGraphicsContext3DProvider() { scoped_refptr<cc::ContextProvider> provider = RenderThreadImpl::current()->SharedMainThreadContextProvider(); @@ -944,23 +944,23 @@ WebKit::WebGraphicsContext3DProvider* RendererWebKitPlatformSupportImpl:: //------------------------------------------------------------------------------ -WebKit::WebCompositorSupport* +blink::WebCompositorSupport* RendererWebKitPlatformSupportImpl::compositorSupport() { return &compositor_support_; } //------------------------------------------------------------------------------ -WebKit::WebString RendererWebKitPlatformSupportImpl::convertIDNToUnicode( - const WebKit::WebString& host, - const WebKit::WebString& languages) { +blink::WebString RendererWebKitPlatformSupportImpl::convertIDNToUnicode( + const blink::WebString& host, + const blink::WebString& languages) { return net::IDNToUnicode(host.utf8(), languages.utf8()); } //------------------------------------------------------------------------------ void RendererWebKitPlatformSupportImpl::setDeviceMotionListener( - WebKit::WebDeviceMotionListener* listener) { + blink::WebDeviceMotionListener* listener) { if (g_test_device_motion_data == 0) { if (!device_motion_event_pump_) { device_motion_event_pump_.reset(new DeviceMotionEventPump); @@ -971,7 +971,7 @@ void RendererWebKitPlatformSupportImpl::setDeviceMotionListener( // Testing mode: just echo the test data to the listener. base::MessageLoopProxy::current()->PostTask( FROM_HERE, - base::Bind(&WebKit::WebDeviceMotionListener::didChangeDeviceMotion, + base::Bind(&blink::WebDeviceMotionListener::didChangeDeviceMotion, base::Unretained(listener), g_test_device_motion_data.Get())); } @@ -979,14 +979,14 @@ void RendererWebKitPlatformSupportImpl::setDeviceMotionListener( // static void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( - const WebKit::WebDeviceMotionData& data) { + const blink::WebDeviceMotionData& data) { g_test_device_motion_data.Get() = data; } //------------------------------------------------------------------------------ void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener( - WebKit::WebDeviceOrientationListener* listener) { + blink::WebDeviceOrientationListener* listener) { if (g_test_device_orientation_data == 0) { if (!device_orientation_event_pump_) { device_orientation_event_pump_.reset(new DeviceOrientationEventPump); @@ -998,7 +998,7 @@ void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener( base::MessageLoopProxy::current()->PostTask( FROM_HERE, base::Bind( - &WebKit::WebDeviceOrientationListener::didChangeDeviceOrientation, + &blink::WebDeviceOrientationListener::didChangeDeviceOrientation, base::Unretained(listener), g_test_device_orientation_data.Get())); } @@ -1006,13 +1006,13 @@ void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener( // static void RendererWebKitPlatformSupportImpl::SetMockDeviceOrientationDataForTesting( - const WebKit::WebDeviceOrientationData& data) { + const blink::WebDeviceOrientationData& data) { g_test_device_orientation_data.Get() = data; } //------------------------------------------------------------------------------ -WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { +blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { if (!web_crypto_) web_crypto_.reset(new WebCryptoImpl()); return web_crypto_.get(); @@ -1035,9 +1035,9 @@ void RendererWebKitPlatformSupportImpl::cancelVibration() { //------------------------------------------------------------------------------ void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( - const WebKit::WebURL& storage_partition, - WebKit::WebStorageQuotaType type, - WebKit::WebStorageQuotaCallbacks* callbacks) { + const blink::WebURL& storage_partition, + blink::WebStorageQuotaType type, + blink::WebStorageQuotaCallbacks* callbacks) { if (!thread_safe_sender_.get() || !quota_message_filter_.get()) return; QuotaDispatcher::ThreadSpecificInstance( diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h index 1a55021..51d76e7 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.h +++ b/content/renderer/renderer_webkitplatformsupport_impl.h @@ -26,7 +26,7 @@ namespace IPC { class SyncMessageFilter; } -namespace WebKit { +namespace blink { class WebDeviceMotionData; class WebDeviceOrientationData; class WebGraphicsContext3DProvider; @@ -52,44 +52,44 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl plugin_refresh_allowed_ = plugin_refresh_allowed; } // Platform methods: - virtual WebKit::WebClipboard* clipboard(); - virtual WebKit::WebMimeRegistry* mimeRegistry(); - virtual WebKit::WebFileUtilities* fileUtilities(); - virtual WebKit::WebSandboxSupport* sandboxSupport(); - virtual WebKit::WebCookieJar* cookieJar(); - virtual WebKit::WebThemeEngine* themeEngine(); - virtual WebKit::WebSpeechSynthesizer* createSpeechSynthesizer( - WebKit::WebSpeechSynthesizerClient* client); + virtual blink::WebClipboard* clipboard(); + virtual blink::WebMimeRegistry* mimeRegistry(); + virtual blink::WebFileUtilities* fileUtilities(); + virtual blink::WebSandboxSupport* sandboxSupport(); + virtual blink::WebCookieJar* cookieJar(); + virtual blink::WebThemeEngine* themeEngine(); + virtual blink::WebSpeechSynthesizer* createSpeechSynthesizer( + blink::WebSpeechSynthesizerClient* client); virtual bool sandboxEnabled(); virtual unsigned long long visitedLinkHash( const char* canonicalURL, size_t length); virtual bool isLinkVisited(unsigned long long linkHash); - virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); - virtual WebKit::WebPrescientNetworking* prescientNetworking(); + virtual blink::WebMessagePortChannel* createMessagePortChannel(); + virtual blink::WebPrescientNetworking* prescientNetworking(); virtual void cacheMetadata( - const WebKit::WebURL&, double, const char*, size_t); - virtual WebKit::WebString defaultLocale(); + const blink::WebURL&, double, const char*, size_t); + virtual blink::WebString defaultLocale(); virtual void suddenTerminationChanged(bool enabled); - virtual WebKit::WebStorageNamespace* createLocalStorageNamespace(); - virtual WebKit::Platform::FileHandle databaseOpenFile( - const WebKit::WebString& vfs_file_name, int desired_flags); - virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, + virtual blink::WebStorageNamespace* createLocalStorageNamespace(); + virtual blink::Platform::FileHandle databaseOpenFile( + const blink::WebString& vfs_file_name, int desired_flags); + virtual int databaseDeleteFile(const blink::WebString& vfs_file_name, bool sync_dir); virtual long databaseGetFileAttributes( - const WebKit::WebString& vfs_file_name); + const blink::WebString& vfs_file_name); virtual long long databaseGetFileSize( - const WebKit::WebString& vfs_file_name); + const blink::WebString& vfs_file_name); virtual long long databaseGetSpaceAvailableForOrigin( - const WebKit::WebString& origin_identifier); - virtual WebKit::WebString signedPublicKeyAndChallengeString( + const blink::WebString& origin_identifier); + virtual blink::WebString signedPublicKeyAndChallengeString( unsigned key_size_index, - const WebKit::WebString& challenge, - const WebKit::WebURL& url); + const blink::WebString& challenge, + const blink::WebURL& url); virtual void getPluginList(bool refresh, - WebKit::WebPluginListBuilder* builder); - virtual void screenColorProfile(WebKit::WebVector<char>* to_profile); - virtual WebKit::WebIDBFactory* idbFactory(); - virtual WebKit::WebFileSystem* fileSystem(); + blink::WebPluginListBuilder* builder); + virtual void screenColorProfile(blink::WebVector<char>* to_profile); + virtual blink::WebIDBFactory* idbFactory(); + virtual blink::WebFileSystem* fileSystem(); virtual bool canAccelerate2dCanvas(); virtual bool isThreadedCompositingEnabled(); virtual double audioHardwareSampleRate(); @@ -97,53 +97,53 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl virtual unsigned audioHardwareOutputChannels(); // TODO(crogers): remove deprecated API as soon as WebKit calls new API. - virtual WebKit::WebAudioDevice* createAudioDevice( + virtual blink::WebAudioDevice* createAudioDevice( size_t buffer_size, unsigned channels, double sample_rate, - WebKit::WebAudioDevice::RenderCallback* callback); + blink::WebAudioDevice::RenderCallback* callback); // TODO(crogers): remove deprecated API as soon as WebKit calls new API. - virtual WebKit::WebAudioDevice* createAudioDevice( + virtual blink::WebAudioDevice* createAudioDevice( size_t buffer_size, unsigned input_channels, unsigned channels, - double sample_rate, WebKit::WebAudioDevice::RenderCallback* callback); + double sample_rate, blink::WebAudioDevice::RenderCallback* callback); - virtual WebKit::WebAudioDevice* createAudioDevice( + virtual blink::WebAudioDevice* createAudioDevice( size_t buffer_size, unsigned input_channels, unsigned channels, - double sample_rate, WebKit::WebAudioDevice::RenderCallback* callback, - const WebKit::WebString& input_device_id); + double sample_rate, blink::WebAudioDevice::RenderCallback* callback, + const blink::WebString& input_device_id); virtual bool loadAudioResource( - WebKit::WebAudioBus* destination_bus, const char* audio_file_data, + blink::WebAudioBus* destination_bus, const char* audio_file_data, size_t data_size, double sample_rate); - virtual WebKit::WebContentDecryptionModule* createContentDecryptionModule( - const WebKit::WebString& key_system); - virtual WebKit::WebMIDIAccessor* - createMIDIAccessor(WebKit::WebMIDIAccessorClient* client); - - virtual WebKit::WebBlobRegistry* blobRegistry(); - virtual void sampleGamepads(WebKit::WebGamepads&); - virtual WebKit::WebString userAgent(const WebKit::WebURL& url); - virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client); - virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( - WebKit::WebMediaStreamCenterClient* client); + virtual blink::WebContentDecryptionModule* createContentDecryptionModule( + const blink::WebString& key_system); + virtual blink::WebMIDIAccessor* + createMIDIAccessor(blink::WebMIDIAccessorClient* client); + + virtual blink::WebBlobRegistry* blobRegistry(); + virtual void sampleGamepads(blink::WebGamepads&); + virtual blink::WebString userAgent(const blink::WebURL& url); + virtual blink::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( + blink::WebRTCPeerConnectionHandlerClient* client); + virtual blink::WebMediaStreamCenter* createMediaStreamCenter( + blink::WebMediaStreamCenterClient* client); virtual bool processMemorySizesInBytes( size_t* private_bytes, size_t* shared_bytes); - virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D( - const WebKit::WebGraphicsContext3D::Attributes& attributes); - virtual WebKit::WebGraphicsContext3DProvider* + virtual blink::WebGraphicsContext3D* createOffscreenGraphicsContext3D( + const blink::WebGraphicsContext3D::Attributes& attributes); + virtual blink::WebGraphicsContext3DProvider* createSharedOffscreenGraphicsContext3DProvider(); - virtual WebKit::WebCompositorSupport* compositorSupport(); - virtual WebKit::WebString convertIDNToUnicode( - const WebKit::WebString& host, const WebKit::WebString& languages); + virtual blink::WebCompositorSupport* compositorSupport(); + virtual blink::WebString convertIDNToUnicode( + const blink::WebString& host, const blink::WebString& languages); virtual void setDeviceMotionListener( - WebKit::WebDeviceMotionListener* listener) OVERRIDE; + blink::WebDeviceMotionListener* listener) OVERRIDE; virtual void setDeviceOrientationListener( - WebKit::WebDeviceOrientationListener* listener) OVERRIDE; - virtual WebKit::WebCrypto* crypto() OVERRIDE; + blink::WebDeviceOrientationListener* listener) OVERRIDE; + virtual blink::WebCrypto* crypto() OVERRIDE; virtual void queryStorageUsageAndQuota( - const WebKit::WebURL& storage_partition, - WebKit::WebStorageQuotaType, - WebKit::WebStorageQuotaCallbacks*) OVERRIDE; + const blink::WebURL& storage_partition, + blink::WebStorageQuotaType, + blink::WebStorageQuotaCallbacks*) OVERRIDE; #if defined(OS_ANDROID) virtual void vibrate(unsigned int milliseconds); @@ -160,14 +160,14 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl static bool SetSandboxEnabledForTesting(bool enable); // Set WebGamepads to return when sampleGamepads() is invoked. - static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads); + static void SetMockGamepadsForTesting(const blink::WebGamepads& pads); // Set WebDeviceMotionData to return when setDeviceMotionListener is invoked. static void SetMockDeviceMotionDataForTesting( - const WebKit::WebDeviceMotionData& data); + const blink::WebDeviceMotionData& data); // Set WebDeviceOrientationData to return when setDeviceOrientationListener // is invoked. static void SetMockDeviceOrientationDataForTesting( - const WebKit::WebDeviceOrientationData& data); + const blink::WebDeviceOrientationData& data); private: bool CheckPreparsedJsCachingEnabled() const; @@ -193,11 +193,11 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl // If true, then a GetPlugins call is allowed to rescan the disk. bool plugin_refresh_allowed_; - scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; + scoped_ptr<blink::WebIDBFactory> web_idb_factory_; scoped_ptr<WebFileSystemImpl> web_file_system_; - scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; + scoped_ptr<blink::WebBlobRegistry> blob_registry_; scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_; scoped_ptr<DeviceOrientationEventPump> device_orientation_event_pump_; diff --git a/content/renderer/resource_fetcher_browsertest.cc b/content/renderer/resource_fetcher_browsertest.cc index 573fe4d..b03ad45 100644 --- a/content/renderer/resource_fetcher_browsertest.cc +++ b/content/renderer/resource_fetcher_browsertest.cc @@ -20,9 +20,9 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebFrame; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebFrame; +using blink::WebURLRequest; +using blink::WebURLResponse; namespace content { diff --git a/content/renderer/sad_plugin.cc b/content/renderer/sad_plugin.cc index a30788c..52d613d 100644 --- a/content/renderer/sad_plugin.cc +++ b/content/renderer/sad_plugin.cc @@ -13,7 +13,7 @@ namespace content { -void PaintSadPlugin(WebKit::WebCanvas* webcanvas, +void PaintSadPlugin(blink::WebCanvas* webcanvas, const gfx::Rect& plugin_rect, const SkBitmap& sad_plugin_bitmap) { const int width = plugin_rect.width(); diff --git a/content/renderer/sad_plugin.h b/content/renderer/sad_plugin.h index 827d705..4148c0a 100644 --- a/content/renderer/sad_plugin.h +++ b/content/renderer/sad_plugin.h @@ -17,7 +17,7 @@ namespace content { // Paints the sad plugin to the given canvas for the given plugin bounds. This // is used by both the NPAPI and the PPAPI out-of-process plugin impls. -void PaintSadPlugin(WebKit::WebCanvas* canvas, +void PaintSadPlugin(blink::WebCanvas* canvas, const gfx::Rect& plugin_rect, const SkBitmap& sad_plugin_bitmap); diff --git a/content/renderer/savable_resources.cc b/content/renderer/savable_resources.cc index f1b2fde..5e5e047 100644 --- a/content/renderer/savable_resources.cc +++ b/content/renderer/savable_resources.cc @@ -20,16 +20,16 @@ #include "third_party/WebKit/public/web/WebNodeList.h" #include "third_party/WebKit/public/web/WebView.h" -using WebKit::WebDocument; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebInputElement; -using WebKit::WebNode; -using WebKit::WebNodeCollection; -using WebKit::WebNodeList; -using WebKit::WebString; -using WebKit::WebVector; -using WebKit::WebView; +using blink::WebDocument; +using blink::WebElement; +using blink::WebFrame; +using blink::WebInputElement; +using blink::WebNode; +using blink::WebNodeCollection; +using blink::WebNodeList; +using blink::WebString; +using blink::WebVector; +using blink::WebView; namespace content { namespace { @@ -97,7 +97,7 @@ void GetSavableResourceLinkForElement( result->resources_list->push_back(u); // Insert referrer for above new resource link. result->referrer_urls_list->push_back(GURL()); - result->referrer_policies_list->push_back(WebKit::WebReferrerPolicyDefault); + result->referrer_policies_list->push_back(blink::WebReferrerPolicyDefault); } // Get all savable resource links from current WebFrameImpl object pointer. diff --git a/content/renderer/savable_resources.h b/content/renderer/savable_resources.h index 52b5114..9432692 100644 --- a/content/renderer/savable_resources.h +++ b/content/renderer/savable_resources.h @@ -12,7 +12,7 @@ #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebElement; class WebString; class WebView; @@ -32,7 +32,7 @@ struct SavableResourcesResult { // it matched with links one by one. std::vector<GURL>* referrer_urls_list; // and the corresponding referrer policies. - std::vector<WebKit::WebReferrerPolicy>* referrer_policies_list; + std::vector<blink::WebReferrerPolicy>* referrer_policies_list; // vector which contains all savable links of main frame and sub frames. std::vector<GURL>* frames_list; @@ -40,7 +40,7 @@ struct SavableResourcesResult { SavableResourcesResult( std::vector<GURL>* resources_list, std::vector<GURL>* referrer_urls_list, - std::vector<WebKit::WebReferrerPolicy>* referrer_policies_list, + std::vector<blink::WebReferrerPolicy>* referrer_policies_list, std::vector<GURL>* frames_list) : resources_list(resources_list), referrer_urls_list(referrer_urls_list), @@ -56,7 +56,7 @@ struct SavableResourcesResult { // will send those links to embedder. Return value indicates whether we get // all saved resource links successfully. CONTENT_EXPORT bool GetAllSavableResourceLinksForCurrentPage( - WebKit::WebView* view, + blink::WebView* view, const GURL& page_url, SavableResourcesResult* savable_resources_result, const char** savable_schemes); @@ -66,8 +66,8 @@ CONTENT_EXPORT bool GetAllSavableResourceLinksForCurrentPage( // the value in "href". For BODY, TABLE, TR, TD, returns the value in // "background". For BLOCKQUOTE, Q, DEL, INS, returns the value in "cite" // attribute. Otherwise returns a null WebString. -CONTENT_EXPORT WebKit::WebString GetSubResourceLinkFromElement( - const WebKit::WebElement& element); +CONTENT_EXPORT blink::WebString GetSubResourceLinkFromElement( + const blink::WebElement& element); } // namespace content diff --git a/content/renderer/savable_resources_browsertest.cc b/content/renderer/savable_resources_browsertest.cc index a7ad83a..5f7a0ca 100644 --- a/content/renderer/savable_resources_browsertest.cc +++ b/content/renderer/savable_resources_browsertest.cc @@ -53,7 +53,7 @@ class SavableResourcesTest : public ContentBrowserTest { // Get all savable resource links for the page. std::vector<GURL> resources_list; std::vector<GURL> referrer_urls_list; - std::vector<WebKit::WebReferrerPolicy> referrer_policies_list; + std::vector<blink::WebReferrerPolicy> referrer_policies_list; std::vector<GURL> frames_list; SavableResourcesResult result(&resources_list, &referrer_urls_list, diff --git a/content/renderer/shared_worker_repository.cc b/content/renderer/shared_worker_repository.cc index e39fa37..66aae23 100644 --- a/content/renderer/shared_worker_repository.cc +++ b/content/renderer/shared_worker_repository.cc @@ -19,9 +19,9 @@ SharedWorkerRepository::SharedWorkerRepository(RenderViewImpl* render_view) SharedWorkerRepository::~SharedWorkerRepository() {} -WebKit::WebSharedWorker* SharedWorkerRepository::createSharedWorker( - const WebKit::WebURL& url, - const WebKit::WebString& name, +blink::WebSharedWorker* SharedWorkerRepository::createSharedWorker( + const blink::WebURL& url, + const blink::WebString& name, DocumentID document_id) { int route_id = MSG_ROUTING_NONE; bool exists = false; diff --git a/content/renderer/shared_worker_repository.h b/content/renderer/shared_worker_repository.h index 28c36d9..a51d7b3 100644 --- a/content/renderer/shared_worker_repository.h +++ b/content/renderer/shared_worker_repository.h @@ -16,15 +16,15 @@ namespace content { class RenderViewImpl; class SharedWorkerRepository : public RenderViewObserver, - public WebKit::WebSharedWorkerRepositoryClient { + public blink::WebSharedWorkerRepositoryClient { public: explicit SharedWorkerRepository(RenderViewImpl* render_view); virtual ~SharedWorkerRepository(); // WebSharedWorkerRepositoryClient overrides. - virtual WebKit::WebSharedWorker* createSharedWorker( - const WebKit::WebURL& url, - const WebKit::WebString& name, + virtual blink::WebSharedWorker* createSharedWorker( + const blink::WebURL& url, + const blink::WebString& name, DocumentID document_id) OVERRIDE; virtual void documentDetached(DocumentID document_id) OVERRIDE; diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc index 42ae3b4..46fd14d 100644 --- a/content/renderer/skia_benchmarking_extension.cc +++ b/content/renderer/skia_benchmarking_extension.cc @@ -24,7 +24,7 @@ #include "ui/gfx/skia_util.h" #include "v8/include/v8.h" -using WebKit::WebFrame; +using blink::WebFrame; namespace { @@ -202,8 +202,8 @@ class SkiaBenchmarkingWrapper : public v8::Extension { : std::min(last_index, stop_index)); } - WebKit::WebArrayBuffer buffer = - WebKit::WebArrayBuffer::create(bitmap.getSize(), 1); + blink::WebArrayBuffer buffer = + blink::WebArrayBuffer::create(bitmap.getSize(), 1); uint32* packed_pixels = reinterpret_cast<uint32*>(bitmap.getPixels()); uint8* buffer_pixels = reinterpret_cast<uint8*>(buffer.data()); // Swizzle from native Skia format to RGBA as we copy out. diff --git a/content/renderer/speech_recognition_dispatcher.cc b/content/renderer/speech_recognition_dispatcher.cc index cf7c2fe..1ac2237 100644 --- a/content/renderer/speech_recognition_dispatcher.cc +++ b/content/renderer/speech_recognition_dispatcher.cc @@ -15,13 +15,13 @@ #include "third_party/WebKit/public/web/WebSpeechRecognitionResult.h" #include "third_party/WebKit/public/web/WebSpeechRecognizerClient.h" -using WebKit::WebVector; -using WebKit::WebString; -using WebKit::WebSpeechGrammar; -using WebKit::WebSpeechRecognitionHandle; -using WebKit::WebSpeechRecognitionResult; -using WebKit::WebSpeechRecognitionParams; -using WebKit::WebSpeechRecognizerClient; +using blink::WebVector; +using blink::WebString; +using blink::WebSpeechGrammar; +using blink::WebSpeechRecognitionHandle; +using blink::WebSpeechRecognitionResult; +using blink::WebSpeechRecognitionParams; +using blink::WebSpeechRecognizerClient; namespace content { diff --git a/content/renderer/speech_recognition_dispatcher.h b/content/renderer/speech_recognition_dispatcher.h index bffb0c8..297f174 100644 --- a/content/renderer/speech_recognition_dispatcher.h +++ b/content/renderer/speech_recognition_dispatcher.h @@ -23,7 +23,7 @@ struct SpeechRecognitionResult; // scripted JS speech APIs. It's the complement of // SpeechRecognitionDispatcherHost (owned by RenderViewHost). class SpeechRecognitionDispatcher : public RenderViewObserver, - public WebKit::WebSpeechRecognizer { + public blink::WebSpeechRecognizer { public: explicit SpeechRecognitionDispatcher(RenderViewImpl* render_view); virtual ~SpeechRecognitionDispatcher(); @@ -32,14 +32,14 @@ class SpeechRecognitionDispatcher : public RenderViewObserver, // RenderViewObserver implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - // WebKit::WebSpeechRecognizer implementation. - virtual void start(const WebKit::WebSpeechRecognitionHandle&, - const WebKit::WebSpeechRecognitionParams&, - WebKit::WebSpeechRecognizerClient*) OVERRIDE; - virtual void stop(const WebKit::WebSpeechRecognitionHandle&, - WebKit::WebSpeechRecognizerClient*) OVERRIDE; - virtual void abort(const WebKit::WebSpeechRecognitionHandle&, - WebKit::WebSpeechRecognizerClient*) OVERRIDE; + // blink::WebSpeechRecognizer implementation. + virtual void start(const blink::WebSpeechRecognitionHandle&, + const blink::WebSpeechRecognitionParams&, + blink::WebSpeechRecognizerClient*) OVERRIDE; + virtual void stop(const blink::WebSpeechRecognitionHandle&, + blink::WebSpeechRecognizerClient*) OVERRIDE; + virtual void abort(const blink::WebSpeechRecognitionHandle&, + blink::WebSpeechRecognizerClient*) OVERRIDE; void OnRecognitionStarted(int request_id); void OnAudioStarted(int request_id); @@ -51,14 +51,14 @@ class SpeechRecognitionDispatcher : public RenderViewObserver, void OnResultsRetrieved(int request_id, const SpeechRecognitionResults& result); - int GetOrCreateIDForHandle(const WebKit::WebSpeechRecognitionHandle& handle); - bool HandleExists(const WebKit::WebSpeechRecognitionHandle& handle); - const WebKit::WebSpeechRecognitionHandle& GetHandleFromID(int handle_id); + int GetOrCreateIDForHandle(const blink::WebSpeechRecognitionHandle& handle); + bool HandleExists(const blink::WebSpeechRecognitionHandle& handle); + const blink::WebSpeechRecognitionHandle& GetHandleFromID(int handle_id); // The WebKit client class that we use to send events back to the JS world. - WebKit::WebSpeechRecognizerClient* recognizer_client_; + blink::WebSpeechRecognizerClient* recognizer_client_; - typedef std::map<int, WebKit::WebSpeechRecognitionHandle> HandleMap; + typedef std::map<int, blink::WebSpeechRecognitionHandle> HandleMap; HandleMap handle_map_; int next_id_; diff --git a/content/renderer/stats_collection_controller.cc b/content/renderer/stats_collection_controller.cc index f82a8c4..9f610ef 100644 --- a/content/renderer/stats_collection_controller.cc +++ b/content/renderer/stats_collection_controller.cc @@ -23,11 +23,11 @@ namespace content { namespace { bool CurrentRenderViewImpl(RenderViewImpl** out) { - WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); + blink::WebFrame* web_frame = blink::WebFrame::frameForCurrentContext(); if (!web_frame) return false; - WebKit::WebView* web_view = web_frame->view(); + blink::WebView* web_view = web_frame->view(); if (!web_view) return false; diff --git a/content/renderer/text_input_client_observer.cc b/content/renderer/text_input_client_observer.cc index cec5e1a..6d89203 100644 --- a/content/renderer/text_input_client_observer.cc +++ b/content/renderer/text_input_client_observer.cc @@ -38,12 +38,12 @@ bool TextInputClientObserver::OnMessageReceived(const IPC::Message& message) { return handled; } -WebKit::WebView* TextInputClientObserver::webview() { +blink::WebView* TextInputClientObserver::webview() { return render_view()->GetWebView(); } void TextInputClientObserver::OnCharacterIndexForPoint(gfx::Point point) { - WebKit::WebPoint web_point(point); + blink::WebPoint web_point(point); size_t index = webview()->focusedFrame()->characterIndexForPoint(web_point); Send(new TextInputClientReplyMsg_GotCharacterIndexForPoint(routing_id(), index)); @@ -55,9 +55,9 @@ void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) { if (!render_view_impl_->GetPepperCaretBounds(&rect)) #endif { - WebKit::WebFrame* frame = webview()->focusedFrame(); + blink::WebFrame* frame = webview()->focusedFrame(); if (frame) { - WebKit::WebRect web_rect; + blink::WebRect web_rect; frame->firstRectForCharacterRange(range.start(), range.length(), web_rect); rect = web_rect; @@ -69,9 +69,9 @@ void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) { void TextInputClientObserver::OnStringForRange(gfx::Range range) { #if defined(OS_MACOSX) NSAttributedString* string = nil; - WebKit::WebFrame* frame = webview()->focusedFrame(); + blink::WebFrame* frame = webview()->focusedFrame(); if (frame) { - string = WebKit::WebSubstringUtil::attributedSubstringInRange( + string = blink::WebSubstringUtil::attributedSubstringInRange( frame, range.start(), range.length()); } scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded( diff --git a/content/renderer/text_input_client_observer.h b/content/renderer/text_input_client_observer.h index 4c8b9a6..cd67418 100644 --- a/content/renderer/text_input_client_observer.h +++ b/content/renderer/text_input_client_observer.h @@ -11,7 +11,7 @@ #include "ui/gfx/point.h" #include "ui/gfx/range/range.h" -namespace WebKit { +namespace blink { class WebView; } @@ -32,7 +32,7 @@ class TextInputClientObserver : public RenderViewObserver { private: // Returns the WebView of the RenderView. - WebKit::WebView* webview(); + blink::WebView* webview(); // IPC Message handlers: void OnCharacterIndexForPoint(gfx::Point point); diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc index ab2a633..2f139cf 100644 --- a/content/renderer/v8_value_converter_impl.cc +++ b/content/renderer/v8_value_converter_impl.cc @@ -217,8 +217,8 @@ v8::Handle<v8::Value> V8ValueConverterImpl::ToV8Object( v8::Handle<v8::Value> V8ValueConverterImpl::ToArrayBuffer( const base::BinaryValue* value) const { - WebKit::WebArrayBuffer buffer = - WebKit::WebArrayBuffer::create(value->GetSize(), 1); + blink::WebArrayBuffer buffer = + blink::WebArrayBuffer::create(value->GetSize(), 1); memcpy(buffer.data(), value->GetBuffer(), value->GetSize()); return buffer.toV8Value(); } @@ -346,14 +346,14 @@ base::BinaryValue* V8ValueConverterImpl::FromV8Buffer( char* data = NULL; size_t length = 0; - scoped_ptr<WebKit::WebArrayBuffer> array_buffer( - WebKit::WebArrayBuffer::createFromV8Value(val)); - scoped_ptr<WebKit::WebArrayBufferView> view; + scoped_ptr<blink::WebArrayBuffer> array_buffer( + blink::WebArrayBuffer::createFromV8Value(val)); + scoped_ptr<blink::WebArrayBufferView> view; if (array_buffer) { data = reinterpret_cast<char*>(array_buffer->data()); length = array_buffer->byteLength(); } else { - view.reset(WebKit::WebArrayBufferView::createFromV8Value(val)); + view.reset(blink::WebArrayBufferView::createFromV8Value(val)); if (view) { data = reinterpret_cast<char*>(view->baseAddress()) + view->byteOffset(); length = view->byteLength(); diff --git a/content/renderer/web_preferences.cc b/content/renderer/web_preferences.cc index 6a1db98..ee27e92 100644 --- a/content/renderer/web_preferences.cc +++ b/content/renderer/web_preferences.cc @@ -16,18 +16,18 @@ #include "third_party/icu/source/common/unicode/uscript.h" #include "webkit/common/webpreferences.h" -using WebKit::WebNetworkStateNotifier; -using WebKit::WebRuntimeFeatures; -using WebKit::WebSettings; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebView; +using blink::WebNetworkStateNotifier; +using blink::WebRuntimeFeatures; +using blink::WebSettings; +using blink::WebString; +using blink::WebURL; +using blink::WebView; namespace content { namespace { -typedef void (*SetFontFamilyWrapper)(WebKit::WebSettings*, +typedef void (*SetFontFamilyWrapper)(blink::WebSettings*, const base::string16&, UScriptCode); diff --git a/content/renderer/web_ui_extension.cc b/content/renderer/web_ui_extension.cc index 9616dbb..2675f39 100644 --- a/content/renderer/web_ui_extension.cc +++ b/content/renderer/web_ui_extension.cc @@ -54,7 +54,7 @@ class WebUIExtensionWrapper : public v8::Extension { static void GetVariableValue(const v8::FunctionCallbackInfo<v8::Value>& args); private: - static bool ShouldRespondToRequest(WebKit::WebFrame** frame_ptr, + static bool ShouldRespondToRequest(blink::WebFrame** frame_ptr, RenderView** render_view_ptr); DISALLOW_COPY_AND_ASSIGN(WebUIExtensionWrapper); @@ -76,9 +76,9 @@ v8::Handle<v8::FunctionTemplate> WebUIExtensionWrapper::GetNativeFunction( // static bool WebUIExtensionWrapper::ShouldRespondToRequest( - WebKit::WebFrame** frame_ptr, + blink::WebFrame** frame_ptr, RenderView** render_view_ptr) { - WebKit::WebFrame* frame = WebKit::WebFrame::frameForCurrentContext(); + blink::WebFrame* frame = blink::WebFrame::frameForCurrentContext(); if (!frame || !frame->view()) return false; @@ -104,7 +104,7 @@ bool WebUIExtensionWrapper::ShouldRespondToRequest( // static void WebUIExtensionWrapper::Send( const v8::FunctionCallbackInfo<v8::Value>& args) { - WebKit::WebFrame* frame; + blink::WebFrame* frame; RenderView* render_view; if (!ShouldRespondToRequest(&frame, &render_view)) return; @@ -145,7 +145,7 @@ void WebUIExtensionWrapper::Send( // static void WebUIExtensionWrapper::GetVariableValue( const v8::FunctionCallbackInfo<v8::Value>& args) { - WebKit::WebFrame* frame; + blink::WebFrame* frame; RenderView* render_view; if (!ShouldRespondToRequest(&frame, &render_view)) return; diff --git a/content/renderer/webclipboard_impl.cc b/content/renderer/webclipboard_impl.cc index 0a73576..3232eca 100644 --- a/content/renderer/webclipboard_impl.cc +++ b/content/renderer/webclipboard_impl.cc @@ -25,13 +25,13 @@ #include "url/gurl.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebClipboard; -using WebKit::WebData; -using WebKit::WebDragData; -using WebKit::WebImage; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebClipboard; +using blink::WebData; +using blink::WebDragData; +using blink::WebImage; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; namespace content { diff --git a/content/renderer/webclipboard_impl.h b/content/renderer/webclipboard_impl.h index 926ca2c..477f53b 100644 --- a/content/renderer/webclipboard_impl.h +++ b/content/renderer/webclipboard_impl.h @@ -15,7 +15,7 @@ namespace content { class ClipboardClient; -class WebClipboardImpl : public WebKit::WebClipboard { +class WebClipboardImpl : public blink::WebClipboard { public: explicit WebClipboardImpl(ClipboardClient* client); @@ -24,28 +24,28 @@ class WebClipboardImpl : public WebKit::WebClipboard { // WebClipboard methods: virtual uint64 sequenceNumber(Buffer buffer); virtual bool isFormatAvailable(Format format, Buffer buffer); - virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( + virtual blink::WebVector<blink::WebString> readAvailableTypes( Buffer buffer, bool* contains_filenames); - virtual WebKit::WebString readPlainText(Buffer buffer); - virtual WebKit::WebString readHTML( + virtual blink::WebString readPlainText(Buffer buffer); + virtual blink::WebString readHTML( Buffer buffer, - WebKit::WebURL* source_url, + blink::WebURL* source_url, unsigned* fragment_start, unsigned* fragment_end); - virtual WebKit::WebData readImage(Buffer buffer); - virtual WebKit::WebString readCustomData( - Buffer buffer, const WebKit::WebString& type); - virtual void writePlainText(const WebKit::WebString& plain_text); + virtual blink::WebData readImage(Buffer buffer); + virtual blink::WebString readCustomData( + Buffer buffer, const blink::WebString& type); + virtual void writePlainText(const blink::WebString& plain_text); virtual void writeHTML( - const WebKit::WebString& html_text, - const WebKit::WebURL& source_url, - const WebKit::WebString& plain_text, + const blink::WebString& html_text, + const blink::WebURL& source_url, + const blink::WebString& plain_text, bool write_smart_paste); virtual void writeImage( - const WebKit::WebImage& image, - const WebKit::WebURL& source_url, - const WebKit::WebString& title); - virtual void writeDataObject(const WebKit::WebDragData& data); + const blink::WebImage& image, + const blink::WebURL& source_url, + const blink::WebString& title); + virtual void writeDataObject(const blink::WebDragData& data); private: bool ConvertBufferType(Buffer, ui::ClipboardType*); diff --git a/content/renderer/webcrypto/webcrypto_impl.cc b/content/renderer/webcrypto/webcrypto_impl.cc index 38dc772..2269030 100644 --- a/content/renderer/webcrypto/webcrypto_impl.cc +++ b/content/renderer/webcrypto/webcrypto_impl.cc @@ -14,12 +14,12 @@ namespace content { namespace { -bool IsAlgorithmAsymmetric(const WebKit::WebCryptoAlgorithm& algorithm) { +bool IsAlgorithmAsymmetric(const blink::WebCryptoAlgorithm& algorithm) { // TODO(padolph): include all other asymmetric algorithms once they are // defined, e.g. EC and DH. - return (algorithm.id() == WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5 || - algorithm.id() == WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 || - algorithm.id() == WebKit::WebCryptoAlgorithmIdRsaOaep); + return (algorithm.id() == blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5 || + algorithm.id() == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 || + algorithm.id() == blink::WebCryptoAlgorithmIdRsaOaep); } } // namespace @@ -32,28 +32,28 @@ WebCryptoImpl::WebCryptoImpl() { // TODO(eroman): This works by re-allocating a new buffer. It would be better if // the WebArrayBuffer could just be truncated instead. void WebCryptoImpl::ShrinkBuffer( - WebKit::WebArrayBuffer* buffer, + blink::WebArrayBuffer* buffer, unsigned new_size) { DCHECK_LE(new_size, buffer->byteLength()); if (new_size == buffer->byteLength()) return; - WebKit::WebArrayBuffer new_buffer = - WebKit::WebArrayBuffer::create(new_size, 1); + blink::WebArrayBuffer new_buffer = + blink::WebArrayBuffer::create(new_size, 1); DCHECK(!new_buffer.isNull()); memcpy(new_buffer.data(), buffer->data(), new_size); *buffer = new_buffer; } void WebCryptoImpl::encrypt( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result) { + blink::WebCryptoResult result) { DCHECK(!algorithm.isNull()); - WebKit::WebArrayBuffer buffer; + blink::WebArrayBuffer buffer; if (!EncryptInternal(algorithm, key, data, data_size, &buffer)) { result.completeWithError(); } else { @@ -62,13 +62,13 @@ void WebCryptoImpl::encrypt( } void WebCryptoImpl::decrypt( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result) { + blink::WebCryptoResult result) { DCHECK(!algorithm.isNull()); - WebKit::WebArrayBuffer buffer; + blink::WebArrayBuffer buffer; if (!DecryptInternal(algorithm, key, data, data_size, &buffer)) { result.completeWithError(); } else { @@ -77,12 +77,12 @@ void WebCryptoImpl::decrypt( } void WebCryptoImpl::digest( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result) { + blink::WebCryptoResult result) { DCHECK(!algorithm.isNull()); - WebKit::WebArrayBuffer buffer; + blink::WebArrayBuffer buffer; if (!DigestInternal(algorithm, data, data_size, &buffer)) { result.completeWithError(); } else { @@ -91,14 +91,14 @@ void WebCryptoImpl::digest( } void WebCryptoImpl::generateKey( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoResult result) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoResult result) { DCHECK(!algorithm.isNull()); if (IsAlgorithmAsymmetric(algorithm)) { - WebKit::WebCryptoKey public_key = WebKit::WebCryptoKey::createNull(); - WebKit::WebCryptoKey private_key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull(); + blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull(); if (!GenerateKeyPairInternal( algorithm, extractable, usage_mask, &public_key, &private_key)) { result.completeWithError(); @@ -118,7 +118,7 @@ void WebCryptoImpl::generateKey( result.completeWithKeyPair(public_key, private_key); } } else { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); if (!GenerateKeyInternal(algorithm, extractable, usage_mask, &key)) { result.completeWithError(); } else { @@ -132,14 +132,14 @@ void WebCryptoImpl::generateKey( } void WebCryptoImpl::importKey( - WebKit::WebCryptoKeyFormat format, + blink::WebCryptoKeyFormat format, const unsigned char* key_data, unsigned key_data_size, - const WebKit::WebCryptoAlgorithm& algorithm_or_null, + const blink::WebCryptoAlgorithm& algorithm_or_null, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoResult result) { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoResult result) { + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); if (!ImportKeyInternal(format, key_data, key_data_size, @@ -157,13 +157,13 @@ void WebCryptoImpl::importKey( } void WebCryptoImpl::sign( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result) { + blink::WebCryptoResult result) { DCHECK(!algorithm.isNull()); - WebKit::WebArrayBuffer buffer; + blink::WebArrayBuffer buffer; if (!SignInternal(algorithm, key, data, data_size, &buffer)) { result.completeWithError(); } else { @@ -172,13 +172,13 @@ void WebCryptoImpl::sign( } void WebCryptoImpl::verifySignature( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* signature, unsigned signature_size, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result) { + blink::WebCryptoResult result) { DCHECK(!algorithm.isNull()); bool signature_match = false; if (!VerifySignatureInternal(algorithm, diff --git a/content/renderer/webcrypto/webcrypto_impl.h b/content/renderer/webcrypto/webcrypto_impl.h index 87c611a..6c6a6b0 100644 --- a/content/renderer/webcrypto/webcrypto_impl.h +++ b/content/renderer/webcrypto/webcrypto_impl.h @@ -13,56 +13,56 @@ namespace content { class CONTENT_EXPORT WebCryptoImpl - : NON_EXPORTED_BASE(public WebKit::WebCrypto) { + : NON_EXPORTED_BASE(public blink::WebCrypto) { public: WebCryptoImpl(); virtual void encrypt( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result); + blink::WebCryptoResult result); virtual void decrypt( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result); + blink::WebCryptoResult result); virtual void digest( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result); + blink::WebCryptoResult result); virtual void generateKey( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoResult result); + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoResult result); virtual void importKey( - WebKit::WebCryptoKeyFormat format, + blink::WebCryptoKeyFormat format, const unsigned char* key_data, unsigned key_data_size, - const WebKit::WebCryptoAlgorithm& algorithm_or_null, + const blink::WebCryptoAlgorithm& algorithm_or_null, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoResult result); + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoResult result); virtual void sign( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result); + blink::WebCryptoResult result); virtual void verifySignature( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* signature, unsigned signature_size, const unsigned char* data, unsigned data_size, - WebKit::WebCryptoResult result); + blink::WebCryptoResult result); - static void ShrinkBuffer(WebKit::WebArrayBuffer* buffer, unsigned new_size); + static void ShrinkBuffer(blink::WebArrayBuffer* buffer, unsigned new_size); protected: friend class WebCryptoImplTest; @@ -70,50 +70,50 @@ class CONTENT_EXPORT WebCryptoImpl void Init(); bool EncryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer); + blink::WebArrayBuffer* buffer); bool DecryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer); + blink::WebArrayBuffer* buffer); bool DigestInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer); + blink::WebArrayBuffer* buffer); bool GenerateKeyInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key); + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key); bool GenerateKeyPairInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* public_key, - WebKit::WebCryptoKey* private_key); + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* public_key, + blink::WebCryptoKey* private_key); bool ImportKeyInternal( - WebKit::WebCryptoKeyFormat format, + blink::WebCryptoKeyFormat format, const unsigned char* key_data, unsigned key_data_size, - const WebKit::WebCryptoAlgorithm& algorithm_or_null, + const blink::WebCryptoAlgorithm& algorithm_or_null, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key); + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key); bool SignInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer); + blink::WebArrayBuffer* buffer); bool VerifySignatureInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* signature, unsigned signature_size, const unsigned char* data, diff --git a/content/renderer/webcrypto/webcrypto_impl_nss.cc b/content/renderer/webcrypto/webcrypto_impl_nss.cc index 2b143a5..1590a099 100644 --- a/content/renderer/webcrypto/webcrypto_impl_nss.cc +++ b/content/renderer/webcrypto/webcrypto_impl_nss.cc @@ -22,7 +22,7 @@ namespace content { namespace { -class SymKeyHandle : public WebKit::WebCryptoKeyHandle { +class SymKeyHandle : public blink::WebCryptoKeyHandle { public: explicit SymKeyHandle(crypto::ScopedPK11SymKey key) : key_(key.Pass()) {} @@ -34,7 +34,7 @@ class SymKeyHandle : public WebKit::WebCryptoKeyHandle { DISALLOW_COPY_AND_ASSIGN(SymKeyHandle); }; -class PublicKeyHandle : public WebKit::WebCryptoKeyHandle { +class PublicKeyHandle : public blink::WebCryptoKeyHandle { public: explicit PublicKeyHandle(crypto::ScopedSECKEYPublicKey key) : key_(key.Pass()) {} @@ -47,7 +47,7 @@ class PublicKeyHandle : public WebKit::WebCryptoKeyHandle { DISALLOW_COPY_AND_ASSIGN(PublicKeyHandle); }; -class PrivateKeyHandle : public WebKit::WebCryptoKeyHandle { +class PrivateKeyHandle : public blink::WebCryptoKeyHandle { public: explicit PrivateKeyHandle(crypto::ScopedSECKEYPrivateKey key) : key_(key.Pass()) {} @@ -61,17 +61,17 @@ class PrivateKeyHandle : public WebKit::WebCryptoKeyHandle { }; HASH_HashType WebCryptoAlgorithmToNSSHashType( - const WebKit::WebCryptoAlgorithm& algorithm) { + const blink::WebCryptoAlgorithm& algorithm) { switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: return HASH_AlgSHA1; - case WebKit::WebCryptoAlgorithmIdSha224: + case blink::WebCryptoAlgorithmIdSha224: return HASH_AlgSHA224; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: return HASH_AlgSHA256; - case WebKit::WebCryptoAlgorithmIdSha384: + case blink::WebCryptoAlgorithmIdSha384: return HASH_AlgSHA384; - case WebKit::WebCryptoAlgorithmIdSha512: + case blink::WebCryptoAlgorithmIdSha512: return HASH_AlgSHA512; default: // Not a digest algorithm. @@ -80,11 +80,11 @@ HASH_HashType WebCryptoAlgorithmToNSSHashType( } CK_MECHANISM_TYPE WebCryptoAlgorithmToHMACMechanism( - const WebKit::WebCryptoAlgorithm& algorithm) { + const blink::WebCryptoAlgorithm& algorithm) { switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: return CKM_SHA_1_HMAC; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: return CKM_SHA256_HMAC; default: // Not a supported algorithm. @@ -94,19 +94,19 @@ CK_MECHANISM_TYPE WebCryptoAlgorithmToHMACMechanism( bool AesCbcEncryptDecrypt( CK_ATTRIBUTE_TYPE operation, - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { - DCHECK_EQ(WebKit::WebCryptoAlgorithmIdAesCbc, algorithm.id()); + blink::WebArrayBuffer* buffer) { + DCHECK_EQ(blink::WebCryptoAlgorithmIdAesCbc, algorithm.id()); DCHECK_EQ(algorithm.id(), key.algorithm().id()); - DCHECK_EQ(WebKit::WebCryptoKeyTypeSecret, key.type()); + DCHECK_EQ(blink::WebCryptoKeyTypeSecret, key.type()); DCHECK(operation == CKA_ENCRYPT || operation == CKA_DECRYPT); SymKeyHandle* sym_key = reinterpret_cast<SymKeyHandle*>(key.handle()); - const WebKit::WebCryptoAesCbcParams* params = algorithm.aesCbcParams(); + const blink::WebCryptoAesCbcParams* params = algorithm.aesCbcParams(); if (params->iv().size() != AES_BLOCK_SIZE) return false; @@ -148,7 +148,7 @@ bool AesCbcEncryptDecrypt( unsigned output_max_len = data_size + AES_BLOCK_SIZE; CHECK_GT(output_max_len, data_size); - *buffer = WebKit::WebArrayBuffer::create(output_max_len, 1); + *buffer = blink::WebArrayBuffer::create(output_max_len, 1); unsigned char* buffer_data = reinterpret_cast<unsigned char*>(buffer->data()); @@ -175,14 +175,14 @@ bool AesCbcEncryptDecrypt( } CK_MECHANISM_TYPE HmacAlgorithmToGenMechanism( - const WebKit::WebCryptoAlgorithm& algorithm) { - DCHECK_EQ(algorithm.id(), WebKit::WebCryptoAlgorithmIdHmac); - const WebKit::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); + const blink::WebCryptoAlgorithm& algorithm) { + DCHECK_EQ(algorithm.id(), blink::WebCryptoAlgorithmIdHmac); + const blink::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); DCHECK(params); switch (params->hash().id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: return CKM_SHA_1_HMAC; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: return CKM_SHA256_HMAC; default: return CKM_INVALID_MECHANISM; @@ -190,11 +190,11 @@ CK_MECHANISM_TYPE HmacAlgorithmToGenMechanism( } CK_MECHANISM_TYPE WebCryptoAlgorithmToGenMechanism( - const WebKit::WebCryptoAlgorithm& algorithm) { + const blink::WebCryptoAlgorithm& algorithm) { switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdAesCbc: + case blink::WebCryptoAlgorithmIdAesCbc: return CKM_AES_KEY_GEN; - case WebKit::WebCryptoAlgorithmIdHmac: + case blink::WebCryptoAlgorithmIdHmac: return HmacAlgorithmToGenMechanism(algorithm); default: return CKM_INVALID_MECHANISM; @@ -202,14 +202,14 @@ CK_MECHANISM_TYPE WebCryptoAlgorithmToGenMechanism( } unsigned int WebCryptoHmacAlgorithmToBlockSize( - const WebKit::WebCryptoAlgorithm& algorithm) { - DCHECK_EQ(algorithm.id(), WebKit::WebCryptoAlgorithmIdHmac); - const WebKit::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); + const blink::WebCryptoAlgorithm& algorithm) { + DCHECK_EQ(algorithm.id(), blink::WebCryptoAlgorithmIdHmac); + const blink::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); DCHECK(params); switch (params->hash().id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: return 512; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: return 512; default: return 0; @@ -245,12 +245,12 @@ void WebCryptoImpl::Init() { } bool WebCryptoImpl::EncryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { - if (algorithm.id() == WebKit::WebCryptoAlgorithmIdAesCbc) { + blink::WebArrayBuffer* buffer) { + if (algorithm.id() == blink::WebCryptoAlgorithmIdAesCbc) { return AesCbcEncryptDecrypt( CKA_ENCRYPT, algorithm, key, data, data_size, buffer); } @@ -259,12 +259,12 @@ bool WebCryptoImpl::EncryptInternal( } bool WebCryptoImpl::DecryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { - if (algorithm.id() == WebKit::WebCryptoAlgorithmIdAesCbc) { + blink::WebArrayBuffer* buffer) { + if (algorithm.id() == blink::WebCryptoAlgorithmIdAesCbc) { return AesCbcEncryptDecrypt( CKA_DECRYPT, algorithm, key, data, data_size, buffer); } @@ -273,10 +273,10 @@ bool WebCryptoImpl::DecryptInternal( } bool WebCryptoImpl::DigestInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { HASH_HashType hash_type = WebCryptoAlgorithmToNSSHashType(algorithm); if (hash_type == HASH_AlgNULL) { return false; @@ -294,7 +294,7 @@ bool WebCryptoImpl::DigestInternal( unsigned hash_result_length = HASH_ResultLenContext(context); DCHECK_LE(hash_result_length, static_cast<size_t>(HASH_LENGTH_MAX)); - *buffer = WebKit::WebArrayBuffer::create(hash_result_length, 1); + *buffer = blink::WebArrayBuffer::create(hash_result_length, 1); unsigned char* digest = reinterpret_cast<unsigned char*>(buffer->data()); @@ -307,38 +307,38 @@ bool WebCryptoImpl::DigestInternal( } bool WebCryptoImpl::GenerateKeyInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key) { CK_MECHANISM_TYPE mech = WebCryptoAlgorithmToGenMechanism(algorithm); unsigned int keylen_bytes = 0; - WebKit::WebCryptoKeyType key_type = WebKit::WebCryptoKeyTypeSecret; + blink::WebCryptoKeyType key_type = blink::WebCryptoKeyTypeSecret; if (mech == CKM_INVALID_MECHANISM) { return false; } switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdAesCbc: { - const WebKit::WebCryptoAesKeyGenParams* params = + case blink::WebCryptoAlgorithmIdAesCbc: { + const blink::WebCryptoAesKeyGenParams* params = algorithm.aesKeyGenParams(); DCHECK(params); keylen_bytes = params->length() / 8; if (params->length() % 8) return false; - key_type = WebKit::WebCryptoKeyTypeSecret; + key_type = blink::WebCryptoKeyTypeSecret; break; } - case WebKit::WebCryptoAlgorithmIdHmac: { - const WebKit::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); + case blink::WebCryptoAlgorithmIdHmac: { + const blink::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); DCHECK(params); if (!params->getLength(keylen_bytes)) { keylen_bytes = WebCryptoHmacAlgorithmToBlockSize(algorithm) / 8; } - key_type = WebKit::WebCryptoKeyTypeSecret; + key_type = blink::WebCryptoKeyTypeSecret; break; } @@ -363,25 +363,25 @@ bool WebCryptoImpl::GenerateKeyInternal( return false; } - *key = WebKit::WebCryptoKey::create( + *key = blink::WebCryptoKey::create( new SymKeyHandle(pk11_key.Pass()), key_type, extractable, algorithm, usage_mask); return true; } bool WebCryptoImpl::GenerateKeyPairInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* public_key, - WebKit::WebCryptoKey* private_key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* public_key, + blink::WebCryptoKey* private_key) { // TODO(padolph): Handle other asymmetric algorithm key generation. switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5: - case WebKit::WebCryptoAlgorithmIdRsaOaep: - case WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5: { - const WebKit::WebCryptoRsaKeyGenParams* const params = + case blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5: + case blink::WebCryptoAlgorithmIdRsaOaep: + case blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5: { + const blink::WebCryptoRsaKeyGenParams* const params = algorithm.rsaKeyGenParams(); DCHECK(params); @@ -403,11 +403,11 @@ bool WebCryptoImpl::GenerateKeyPairInternal( // possible operations for the given key type. CK_FLAGS operation_flags; switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5: - case WebKit::WebCryptoAlgorithmIdRsaOaep: + case blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5: + case blink::WebCryptoAlgorithmIdRsaOaep: operation_flags = CKF_ENCRYPT | CKF_DECRYPT | CKF_WRAP | CKF_UNWRAP; break; - case WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5: + case blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5: operation_flags = CKF_SIGN | CKF_VERIFY; break; default: @@ -441,15 +441,15 @@ bool WebCryptoImpl::GenerateKeyPairInternal( // extractable apply only to the private key and make the public key // always extractable. For now implement what the spec says and track the // spec bug here: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23695 - *public_key = WebKit::WebCryptoKey::create( + *public_key = blink::WebCryptoKey::create( new PublicKeyHandle(crypto::ScopedSECKEYPublicKey(sec_public_key)), - WebKit::WebCryptoKeyTypePublic, + blink::WebCryptoKeyTypePublic, extractable, // probably should be 'true' always algorithm, usage_mask); - *private_key = WebKit::WebCryptoKey::create( + *private_key = blink::WebCryptoKey::create( new PrivateKeyHandle(scoped_sec_private_key.Pass()), - WebKit::WebCryptoKeyTypePrivate, + blink::WebCryptoKeyTypePrivate, extractable, algorithm, usage_mask); @@ -462,24 +462,24 @@ bool WebCryptoImpl::GenerateKeyPairInternal( } bool WebCryptoImpl::ImportKeyInternal( - WebKit::WebCryptoKeyFormat format, + blink::WebCryptoKeyFormat format, const unsigned char* key_data, unsigned key_data_size, - const WebKit::WebCryptoAlgorithm& algorithm_or_null, + const blink::WebCryptoAlgorithm& algorithm_or_null, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key) { // TODO(eroman): Currently expects algorithm to always be specified, as it is // required for raw format. if (algorithm_or_null.isNull()) return false; - const WebKit::WebCryptoAlgorithm& algorithm = algorithm_or_null; + const blink::WebCryptoAlgorithm& algorithm = algorithm_or_null; - WebKit::WebCryptoKeyType type; + blink::WebCryptoKeyType type; switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdHmac: - case WebKit::WebCryptoAlgorithmIdAesCbc: - type = WebKit::WebCryptoKeyTypeSecret; + case blink::WebCryptoAlgorithmIdHmac: + case blink::WebCryptoAlgorithmIdAesCbc: + type = blink::WebCryptoKeyTypeSecret; break; // TODO(bryaneyler): Support more key types. default: @@ -494,8 +494,8 @@ bool WebCryptoImpl::ImportKeyInternal( CK_FLAGS flags = 0; switch(algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdHmac: { - const WebKit::WebCryptoHmacParams* params = algorithm.hmacParams(); + case blink::WebCryptoAlgorithmIdHmac: { + const blink::WebCryptoHmacParams* params = algorithm.hmacParams(); if (!params) { return false; } @@ -509,7 +509,7 @@ bool WebCryptoImpl::ImportKeyInternal( break; } - case WebKit::WebCryptoAlgorithmIdAesCbc: { + case blink::WebCryptoAlgorithmIdAesCbc: { mechanism = CKM_AES_CBC; flags |= CKF_ENCRYPT | CKF_DECRYPT; break; @@ -524,7 +524,7 @@ bool WebCryptoImpl::ImportKeyInternal( SECItem key_item = { siBuffer, NULL, 0 }; switch (format) { - case WebKit::WebCryptoKeyFormatRaw: + case blink::WebCryptoKeyFormatRaw: key_item.data = const_cast<unsigned char*>(key_data); key_item.len = key_data_size; break; @@ -546,22 +546,22 @@ bool WebCryptoImpl::ImportKeyInternal( return false; } - *key = WebKit::WebCryptoKey::create(new SymKeyHandle(pk11_sym_key.Pass()), + *key = blink::WebCryptoKey::create(new SymKeyHandle(pk11_sym_key.Pass()), type, extractable, algorithm, usage_mask); return true; } bool WebCryptoImpl::SignInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { - WebKit::WebArrayBuffer result; + blink::WebArrayBuffer* buffer) { + blink::WebArrayBuffer result; switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdHmac: { - const WebKit::WebCryptoHmacParams* params = algorithm.hmacParams(); + case blink::WebCryptoAlgorithmIdHmac: { + const blink::WebCryptoHmacParams* params = algorithm.hmacParams(); if (!params) { return false; } @@ -570,7 +570,7 @@ bool WebCryptoImpl::SignInternal( DCHECK_EQ(PK11_GetMechanism(sym_key->key()), WebCryptoAlgorithmToHMACMechanism(params->hash())); - DCHECK_NE(0, key.usages() & WebKit::WebCryptoKeyUsageSign); + DCHECK_NE(0, key.usages() & blink::WebCryptoKeyUsageSign); SECItem param_item = { siBuffer, NULL, 0 }; SECItem data_item = { @@ -592,7 +592,7 @@ bool WebCryptoImpl::SignInternal( DCHECK_NE(0u, signature_item.len); - result = WebKit::WebArrayBuffer::create(signature_item.len, 1); + result = blink::WebArrayBuffer::create(signature_item.len, 1); signature_item.data = reinterpret_cast<unsigned char*>(result.data()); if (PK11_SignWithSymKey(sym_key->key(), @@ -617,16 +617,16 @@ bool WebCryptoImpl::SignInternal( } bool WebCryptoImpl::VerifySignatureInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* signature, unsigned signature_size, const unsigned char* data, unsigned data_size, bool* signature_match) { switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdHmac: { - WebKit::WebArrayBuffer result; + case blink::WebCryptoAlgorithmIdHmac: { + blink::WebArrayBuffer result; if (!SignInternal(algorithm, key, data, data_size, &result)) { return false; } diff --git a/content/renderer/webcrypto/webcrypto_impl_openssl.cc b/content/renderer/webcrypto/webcrypto_impl_openssl.cc index 23f89c2..f3dc397 100644 --- a/content/renderer/webcrypto/webcrypto_impl_openssl.cc +++ b/content/renderer/webcrypto/webcrypto_impl_openssl.cc @@ -23,7 +23,7 @@ namespace content { namespace { -class SymKeyHandle : public WebKit::WebCryptoKeyHandle { +class SymKeyHandle : public blink::WebCryptoKeyHandle { public: SymKeyHandle(const unsigned char* key_data, unsigned key_data_size) : key_(key_data, key_data + key_data_size) {} @@ -51,18 +51,18 @@ const EVP_CIPHER* GetAESCipherByKeyLength(unsigned key_length_bytes) { } unsigned WebCryptoHmacParamsToBlockSize( - const WebKit::WebCryptoHmacKeyParams* params) { + const blink::WebCryptoHmacKeyParams* params) { DCHECK(params); switch (params->hash().id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: return SHA_DIGEST_LENGTH / 8; - case WebKit::WebCryptoAlgorithmIdSha224: + case blink::WebCryptoAlgorithmIdSha224: return SHA224_DIGEST_LENGTH / 8; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: return SHA256_DIGEST_LENGTH / 8; - case WebKit::WebCryptoAlgorithmIdSha384: + case blink::WebCryptoAlgorithmIdSha384: return SHA384_DIGEST_LENGTH / 8; - case WebKit::WebCryptoAlgorithmIdSha512: + case blink::WebCryptoAlgorithmIdSha512: return SHA512_DIGEST_LENGTH / 8; default: return 0; @@ -76,18 +76,18 @@ enum CipherOperation { }; bool AesCbcEncryptDecrypt(CipherOperation cipher_operation, - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { // TODO(padolph): Handle other encrypt operations and then remove this gate - if (algorithm.id() != WebKit::WebCryptoAlgorithmIdAesCbc) + if (algorithm.id() != blink::WebCryptoAlgorithmIdAesCbc) return false; DCHECK_EQ(algorithm.id(), key.algorithm().id()); - DCHECK_EQ(WebKit::WebCryptoKeyTypeSecret, key.type()); + DCHECK_EQ(blink::WebCryptoKeyTypeSecret, key.type()); if (data_size >= INT_MAX - AES_BLOCK_SIZE) { // TODO(padolph): Handle this by chunking the input fed into OpenSSL. Right @@ -110,7 +110,7 @@ bool AesCbcEncryptDecrypt(CipherOperation cipher_operation, GetAESCipherByKeyLength(sym_key->key().size()); DCHECK(cipher); - const WebKit::WebCryptoAesCbcParams* const params = algorithm.aesCbcParams(); + const blink::WebCryptoAesCbcParams* const params = algorithm.aesCbcParams(); if (params->iv().size() != AES_BLOCK_SIZE) return false; @@ -132,7 +132,7 @@ bool AesCbcEncryptDecrypt(CipherOperation cipher_operation, output_max_len += AES_BLOCK_SIZE - remainder; DCHECK_GT(output_max_len, data_size); - *buffer = WebKit::WebArrayBuffer::create(output_max_len, 1); + *buffer = blink::WebArrayBuffer::create(output_max_len, 1); unsigned char* const buffer_data = reinterpret_cast<unsigned char*>(buffer->data()); @@ -160,12 +160,12 @@ bool AesCbcEncryptDecrypt(CipherOperation cipher_operation, void WebCryptoImpl::Init() { crypto::EnsureOpenSSLInit(); } -bool WebCryptoImpl::EncryptInternal(const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, +bool WebCryptoImpl::EncryptInternal(const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { - if (algorithm.id() == WebKit::WebCryptoAlgorithmIdAesCbc) { + blink::WebArrayBuffer* buffer) { + if (algorithm.id() == blink::WebCryptoAlgorithmIdAesCbc) { return AesCbcEncryptDecrypt( kDoEncrypt, algorithm, key, data, data_size, buffer); } @@ -173,12 +173,12 @@ bool WebCryptoImpl::EncryptInternal(const WebKit::WebCryptoAlgorithm& algorithm, return false; } -bool WebCryptoImpl::DecryptInternal(const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, +bool WebCryptoImpl::DecryptInternal(const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { - if (algorithm.id() == WebKit::WebCryptoAlgorithmIdAesCbc) { + blink::WebArrayBuffer* buffer) { + if (algorithm.id() == blink::WebCryptoAlgorithmIdAesCbc) { return AesCbcEncryptDecrypt( kDoDecrypt, algorithm, key, data, data_size, buffer); } @@ -186,28 +186,28 @@ bool WebCryptoImpl::DecryptInternal(const WebKit::WebCryptoAlgorithm& algorithm, return false; } -bool WebCryptoImpl::DigestInternal(const WebKit::WebCryptoAlgorithm& algorithm, +bool WebCryptoImpl::DigestInternal(const blink::WebCryptoAlgorithm& algorithm, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { crypto::OpenSSLErrStackTracer(FROM_HERE); const EVP_MD* digest_algorithm; switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: digest_algorithm = EVP_sha1(); break; - case WebKit::WebCryptoAlgorithmIdSha224: + case blink::WebCryptoAlgorithmIdSha224: digest_algorithm = EVP_sha224(); break; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: digest_algorithm = EVP_sha256(); break; - case WebKit::WebCryptoAlgorithmIdSha384: + case blink::WebCryptoAlgorithmIdSha384: digest_algorithm = EVP_sha384(); break; - case WebKit::WebCryptoAlgorithmIdSha512: + case blink::WebCryptoAlgorithmIdSha512: digest_algorithm = EVP_sha512(); break; default: @@ -232,7 +232,7 @@ bool WebCryptoImpl::DigestInternal(const WebKit::WebCryptoAlgorithm& algorithm, } DCHECK_LE(hash_expected_size, EVP_MAX_MD_SIZE); - *buffer = WebKit::WebArrayBuffer::create(hash_expected_size, 1); + *buffer = blink::WebArrayBuffer::create(hash_expected_size, 1); unsigned char* const hash_buffer = reinterpret_cast<unsigned char* const>(buffer->data()); @@ -247,16 +247,16 @@ bool WebCryptoImpl::DigestInternal(const WebKit::WebCryptoAlgorithm& algorithm, } bool WebCryptoImpl::GenerateKeyInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key) { unsigned keylen_bytes = 0; - WebKit::WebCryptoKeyType key_type; + blink::WebCryptoKeyType key_type; switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdAesCbc: { - const WebKit::WebCryptoAesKeyGenParams* params = + case blink::WebCryptoAlgorithmIdAesCbc: { + const blink::WebCryptoAesKeyGenParams* params = algorithm.aesKeyGenParams(); DCHECK(params); if (params->length() % 8) @@ -265,16 +265,16 @@ bool WebCryptoImpl::GenerateKeyInternal( if (!GetAESCipherByKeyLength(keylen_bytes)) { return false; } - key_type = WebKit::WebCryptoKeyTypeSecret; + key_type = blink::WebCryptoKeyTypeSecret; break; } - case WebKit::WebCryptoAlgorithmIdHmac: { - const WebKit::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); + case blink::WebCryptoAlgorithmIdHmac: { + const blink::WebCryptoHmacKeyParams* params = algorithm.hmacKeyParams(); DCHECK(params); if (!params->getLength(keylen_bytes)) { keylen_bytes = WebCryptoHmacParamsToBlockSize(params); } - key_type = WebKit::WebCryptoKeyTypeSecret; + key_type = blink::WebCryptoKeyTypeSecret; break; } @@ -292,7 +292,7 @@ bool WebCryptoImpl::GenerateKeyInternal( return false; } - *key = WebKit::WebCryptoKey::create( + *key = blink::WebCryptoKey::create( new SymKeyHandle(&random_bytes[0], random_bytes.size()), key_type, extractable, algorithm, usage_mask); @@ -300,33 +300,33 @@ bool WebCryptoImpl::GenerateKeyInternal( } bool WebCryptoImpl::GenerateKeyPairInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* public_key, - WebKit::WebCryptoKey* private_key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* public_key, + blink::WebCryptoKey* private_key) { // TODO(padolph): Placeholder for OpenSSL implementation. // Issue http://crbug.com/267888. return false; } bool WebCryptoImpl::ImportKeyInternal( - WebKit::WebCryptoKeyFormat format, + blink::WebCryptoKeyFormat format, const unsigned char* key_data, unsigned key_data_size, - const WebKit::WebCryptoAlgorithm& algorithm_or_null, + const blink::WebCryptoAlgorithm& algorithm_or_null, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key) { // TODO(eroman): Currently expects algorithm to always be specified, as it is // required for raw format. if (algorithm_or_null.isNull()) return false; - const WebKit::WebCryptoAlgorithm& algorithm = algorithm_or_null; + const blink::WebCryptoAlgorithm& algorithm = algorithm_or_null; // TODO(padolph): Support all relevant alg types and then remove this gate. - if (algorithm.id() != WebKit::WebCryptoAlgorithmIdHmac && - algorithm.id() != WebKit::WebCryptoAlgorithmIdAesCbc) { + if (algorithm.id() != blink::WebCryptoAlgorithmIdHmac && + algorithm.id() != blink::WebCryptoAlgorithmIdAesCbc) { return false; } @@ -339,22 +339,22 @@ bool WebCryptoImpl::ImportKeyInternal( // they differ? (jwk, probably) // Symmetric keys are always type secret - WebKit::WebCryptoKeyType type = WebKit::WebCryptoKeyTypeSecret; + blink::WebCryptoKeyType type = blink::WebCryptoKeyTypeSecret; const unsigned char* raw_key_data; unsigned raw_key_data_size; switch (format) { - case WebKit::WebCryptoKeyFormatRaw: + case blink::WebCryptoKeyFormatRaw: raw_key_data = key_data; raw_key_data_size = key_data_size; // The NSS implementation fails when importing a raw AES key with a length // incompatible with AES. The line below is to match this behavior. - if (algorithm.id() == WebKit::WebCryptoAlgorithmIdAesCbc && + if (algorithm.id() == blink::WebCryptoAlgorithmIdAesCbc && !GetAESCipherByKeyLength(raw_key_data_size)) { return false; } break; - case WebKit::WebCryptoKeyFormatJwk: + case blink::WebCryptoKeyFormatJwk: // TODO(padolph): Handle jwk format; need simple JSON parser. // break; return false; @@ -362,7 +362,7 @@ bool WebCryptoImpl::ImportKeyInternal( return false; } - *key = WebKit::WebCryptoKey::create( + *key = blink::WebCryptoKey::create( new SymKeyHandle(raw_key_data, raw_key_data_size), type, extractable, algorithm, usage_mask); @@ -370,21 +370,21 @@ bool WebCryptoImpl::ImportKeyInternal( } bool WebCryptoImpl::SignInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { - WebKit::WebArrayBuffer result; + blink::WebArrayBuffer result; switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdHmac: { + case blink::WebCryptoAlgorithmIdHmac: { - DCHECK_EQ(key.algorithm().id(), WebKit::WebCryptoAlgorithmIdHmac); - DCHECK_NE(0, key.usages() & WebKit::WebCryptoKeyUsageSign); + DCHECK_EQ(key.algorithm().id(), blink::WebCryptoAlgorithmIdHmac); + DCHECK_NE(0, key.usages() & blink::WebCryptoKeyUsageSign); - const WebKit::WebCryptoHmacParams* const params = algorithm.hmacParams(); + const blink::WebCryptoHmacParams* const params = algorithm.hmacParams(); if (!params) return false; @@ -392,23 +392,23 @@ bool WebCryptoImpl::SignInternal( unsigned int hmac_expected_length = 0; // Note that HMAC length is determined by the hash used. switch (params->hash().id()) { - case WebKit::WebCryptoAlgorithmIdSha1: + case blink::WebCryptoAlgorithmIdSha1: evp_sha = EVP_sha1(); hmac_expected_length = SHA_DIGEST_LENGTH; break; - case WebKit::WebCryptoAlgorithmIdSha224: + case blink::WebCryptoAlgorithmIdSha224: evp_sha = EVP_sha224(); hmac_expected_length = SHA224_DIGEST_LENGTH; break; - case WebKit::WebCryptoAlgorithmIdSha256: + case blink::WebCryptoAlgorithmIdSha256: evp_sha = EVP_sha256(); hmac_expected_length = SHA256_DIGEST_LENGTH; break; - case WebKit::WebCryptoAlgorithmIdSha384: + case blink::WebCryptoAlgorithmIdSha384: evp_sha = EVP_sha384(); hmac_expected_length = SHA384_DIGEST_LENGTH; break; - case WebKit::WebCryptoAlgorithmIdSha512: + case blink::WebCryptoAlgorithmIdSha512: evp_sha = EVP_sha512(); hmac_expected_length = SHA512_DIGEST_LENGTH; break; @@ -429,7 +429,7 @@ bool WebCryptoImpl::SignInternal( const unsigned char null_key[] = {}; const void* const raw_key_voidp = raw_key.size() ? &raw_key[0] : null_key; - result = WebKit::WebArrayBuffer::create(hmac_expected_length, 1); + result = blink::WebArrayBuffer::create(hmac_expected_length, 1); crypto::ScopedOpenSSLSafeSizeBuffer<EVP_MAX_MD_SIZE> hmac_result( reinterpret_cast<unsigned char*>(result.data()), hmac_expected_length); @@ -458,16 +458,16 @@ bool WebCryptoImpl::SignInternal( } bool WebCryptoImpl::VerifySignatureInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* signature, unsigned signature_size, const unsigned char* data, unsigned data_size, bool* signature_match) { switch (algorithm.id()) { - case WebKit::WebCryptoAlgorithmIdHmac: { - WebKit::WebArrayBuffer result; + case blink::WebCryptoAlgorithmIdHmac: { + blink::WebArrayBuffer result; if (!SignInternal(algorithm, key, data, data_size, &result)) { return false; } diff --git a/content/renderer/webcrypto/webcrypto_impl_unittest.cc b/content/renderer/webcrypto/webcrypto_impl_unittest.cc index cacdd7f..e0d215e 100644 --- a/content/renderer/webcrypto/webcrypto_impl_unittest.cc +++ b/content/renderer/webcrypto/webcrypto_impl_unittest.cc @@ -28,31 +28,31 @@ std::vector<uint8> HexStringToBytes(const std::string& hex) { } void ExpectArrayBufferMatchesHex(const std::string& expected_hex, - const WebKit::WebArrayBuffer& array_buffer) { + const blink::WebArrayBuffer& array_buffer) { EXPECT_STRCASEEQ( expected_hex.c_str(), base::HexEncode( array_buffer.data(), array_buffer.byteLength()).c_str()); } -WebKit::WebCryptoAlgorithm CreateAlgorithm(WebKit::WebCryptoAlgorithmId id) { - return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate(id, NULL); +blink::WebCryptoAlgorithm CreateAlgorithm(blink::WebCryptoAlgorithmId id) { + return blink::WebCryptoAlgorithm::adoptParamsAndCreate(id, NULL); } -WebKit::WebCryptoAlgorithm CreateHmacAlgorithm( - WebKit::WebCryptoAlgorithmId hashId) { - return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate( - WebKit::WebCryptoAlgorithmIdHmac, - new WebKit::WebCryptoHmacParams(CreateAlgorithm(hashId))); +blink::WebCryptoAlgorithm CreateHmacAlgorithm( + blink::WebCryptoAlgorithmId hashId) { + return blink::WebCryptoAlgorithm::adoptParamsAndCreate( + blink::WebCryptoAlgorithmIdHmac, + new blink::WebCryptoHmacParams(CreateAlgorithm(hashId))); } -WebKit::WebCryptoAlgorithm CreateHmacKeyAlgorithm( - WebKit::WebCryptoAlgorithmId hashId, +blink::WebCryptoAlgorithm CreateHmacKeyAlgorithm( + blink::WebCryptoAlgorithmId hashId, unsigned hash_length) { // hash_length < 0 means unspecified - return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate( - WebKit::WebCryptoAlgorithmIdHmac, - new WebKit::WebCryptoHmacKeyParams(CreateAlgorithm(hashId), + return blink::WebCryptoAlgorithm::adoptParamsAndCreate( + blink::WebCryptoAlgorithmIdHmac, + new blink::WebCryptoHmacKeyParams(CreateAlgorithm(hashId), (hash_length != 0), hash_length)); } @@ -66,30 +66,30 @@ const uint8* Start(const std::vector<uint8>& data) { return &data[0]; } -WebKit::WebCryptoAlgorithm CreateAesCbcAlgorithm( +blink::WebCryptoAlgorithm CreateAesCbcAlgorithm( const std::vector<uint8>& iv) { - return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate( - WebKit::WebCryptoAlgorithmIdAesCbc, - new WebKit::WebCryptoAesCbcParams(Start(iv), iv.size())); + return blink::WebCryptoAlgorithm::adoptParamsAndCreate( + blink::WebCryptoAlgorithmIdAesCbc, + new blink::WebCryptoAesCbcParams(Start(iv), iv.size())); } -WebKit::WebCryptoAlgorithm CreateAesCbcAlgorithm( +blink::WebCryptoAlgorithm CreateAesCbcAlgorithm( unsigned short key_length_bits) { // NOLINT - return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate( - WebKit::WebCryptoAlgorithmIdAesCbc, - new WebKit::WebCryptoAesKeyGenParams(key_length_bits)); + return blink::WebCryptoAlgorithm::adoptParamsAndCreate( + blink::WebCryptoAlgorithmIdAesCbc, + new blink::WebCryptoAesKeyGenParams(key_length_bits)); } -WebKit::WebCryptoAlgorithm CreateRsaAlgorithm( - WebKit::WebCryptoAlgorithmId algorithm_id, +blink::WebCryptoAlgorithm CreateRsaAlgorithm( + blink::WebCryptoAlgorithmId algorithm_id, unsigned modulus_length, const std::vector<uint8>& public_exponent) { - DCHECK(algorithm_id == WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5 || - algorithm_id == WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 || - algorithm_id == WebKit::WebCryptoAlgorithmIdRsaOaep); - return WebKit::WebCryptoAlgorithm::adoptParamsAndCreate( + DCHECK(algorithm_id == blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5 || + algorithm_id == blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 || + algorithm_id == blink::WebCryptoAlgorithmIdRsaOaep); + return blink::WebCryptoAlgorithm::adoptParamsAndCreate( algorithm_id, - new WebKit::WebCryptoRsaKeyGenParams( + new blink::WebCryptoRsaKeyGenParams( modulus_length, Start(public_exponent), public_exponent.size())); } @@ -99,15 +99,15 @@ namespace content { class WebCryptoImplTest : public testing::Test { protected: - WebKit::WebCryptoKey ImportSecretKeyFromRawHexString( + blink::WebCryptoKey ImportSecretKeyFromRawHexString( const std::string& key_hex, - const WebKit::WebCryptoAlgorithm& algorithm, - WebKit::WebCryptoKeyUsageMask usage) { + const blink::WebCryptoAlgorithm& algorithm, + blink::WebCryptoKeyUsageMask usage) { std::vector<uint8> key_raw = HexStringToBytes(key_hex); - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); bool extractable = true; - EXPECT_TRUE(crypto_.ImportKeyInternal(WebKit::WebCryptoKeyFormatRaw, + EXPECT_TRUE(crypto_.ImportKeyInternal(blink::WebCryptoKeyFormatRaw, Start(key_raw), key_raw.size(), algorithm, @@ -115,7 +115,7 @@ class WebCryptoImplTest : public testing::Test { usage, &key)); - EXPECT_EQ(WebKit::WebCryptoKeyTypeSecret, key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type()); EXPECT_FALSE(key.isNull()); EXPECT_TRUE(key.handle()); return key; @@ -125,36 +125,36 @@ class WebCryptoImplTest : public testing::Test { // WebCryptoImpl. bool DigestInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, const std::vector<uint8>& data, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { return crypto_.DigestInternal(algorithm, Start(data), data.size(), buffer); } bool GenerateKeyInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - WebKit::WebCryptoKey* key) { + const blink::WebCryptoAlgorithm& algorithm, + blink::WebCryptoKey* key) { bool extractable = true; - WebKit::WebCryptoKeyUsageMask usage_mask = 0; + blink::WebCryptoKeyUsageMask usage_mask = 0; return crypto_.GenerateKeyInternal(algorithm, extractable, usage_mask, key); } bool GenerateKeyPairInternal( - const WebKit::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoAlgorithm& algorithm, bool extractable, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* public_key, - WebKit::WebCryptoKey* private_key) { + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* public_key, + blink::WebCryptoKey* private_key) { return crypto_.GenerateKeyPairInternal( algorithm, extractable, usage_mask, public_key, private_key); } bool ImportKeyInternal( - WebKit::WebCryptoKeyFormat format, + blink::WebCryptoKeyFormat format, const std::vector<uint8>& key_data, - const WebKit::WebCryptoAlgorithm& algorithm, - WebKit::WebCryptoKeyUsageMask usage_mask, - WebKit::WebCryptoKey* key) { + const blink::WebCryptoAlgorithm& algorithm, + blink::WebCryptoKeyUsageMask usage_mask, + blink::WebCryptoKey* key) { bool extractable = true; return crypto_.ImportKeyInternal(format, Start(key_data), @@ -166,17 +166,17 @@ class WebCryptoImplTest : public testing::Test { } bool SignInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const std::vector<uint8>& data, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { return crypto_.SignInternal( algorithm, key, Start(data), data.size(), buffer); } bool VerifySignatureInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* signature, unsigned signature_size, const std::vector<uint8>& data, @@ -191,37 +191,37 @@ class WebCryptoImplTest : public testing::Test { } bool EncryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { return crypto_.EncryptInternal(algorithm, key, data, data_size, buffer); } bool EncryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const std::vector<uint8>& data, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { return crypto_.EncryptInternal( algorithm, key, Start(data), data.size(), buffer); } bool DecryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const unsigned char* data, unsigned data_size, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { return crypto_.DecryptInternal(algorithm, key, data, data_size, buffer); } bool DecryptInternal( - const WebKit::WebCryptoAlgorithm& algorithm, - const WebKit::WebCryptoKey& key, + const blink::WebCryptoAlgorithm& algorithm, + const blink::WebCryptoKey& key, const std::vector<uint8>& data, - WebKit::WebArrayBuffer* buffer) { + blink::WebArrayBuffer* buffer) { return crypto_.DecryptInternal( algorithm, key, Start(data), data.size(), buffer); } @@ -238,60 +238,60 @@ TEST_F(WebCryptoImplTest, DigestSampleSets) { // // Results were generated using the command sha{1,224,256,384,512}sum. struct TestCase { - WebKit::WebCryptoAlgorithmId algorithm; + blink::WebCryptoAlgorithmId algorithm; const std::string hex_input; const char* hex_result; }; const TestCase kTests[] = { - { WebKit::WebCryptoAlgorithmIdSha1, "", + { blink::WebCryptoAlgorithmIdSha1, "", "da39a3ee5e6b4b0d3255bfef95601890afd80709" }, - { WebKit::WebCryptoAlgorithmIdSha224, "", + { blink::WebCryptoAlgorithmIdSha224, "", "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f" }, - { WebKit::WebCryptoAlgorithmIdSha256, "", + { blink::WebCryptoAlgorithmIdSha256, "", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" }, - { WebKit::WebCryptoAlgorithmIdSha384, "", + { blink::WebCryptoAlgorithmIdSha384, "", "38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274e" "debfe76f65fbd51ad2f14898b95b" }, - { WebKit::WebCryptoAlgorithmIdSha512, "", + { blink::WebCryptoAlgorithmIdSha512, "", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0" "d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e", }, - { WebKit::WebCryptoAlgorithmIdSha1, "00", + { blink::WebCryptoAlgorithmIdSha1, "00", "5ba93c9db0cff93f52b521d7420e43f6eda2784f", }, - { WebKit::WebCryptoAlgorithmIdSha224, "00", + { blink::WebCryptoAlgorithmIdSha224, "00", "fff9292b4201617bdc4d3053fce02734166a683d7d858a7f5f59b073", }, - { WebKit::WebCryptoAlgorithmIdSha256, "00", + { blink::WebCryptoAlgorithmIdSha256, "00", "6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d", }, - { WebKit::WebCryptoAlgorithmIdSha384, "00", + { blink::WebCryptoAlgorithmIdSha384, "00", "bec021b4f368e3069134e012c2b4307083d3a9bdd206e24e5f0d86e13d6636655933" "ec2b413465966817a9c208a11717", }, - { WebKit::WebCryptoAlgorithmIdSha512, "00", + { blink::WebCryptoAlgorithmIdSha512, "00", "b8244d028981d693af7b456af8efa4cad63d282e19ff14942c246e50d9351d22704a" "802a71c3580b6370de4ceb293c324a8423342557d4e5c38438f0e36910ee", }, - { WebKit::WebCryptoAlgorithmIdSha1, "000102030405", + { blink::WebCryptoAlgorithmIdSha1, "000102030405", "868460d98d09d8bbb93d7b6cdd15cc7fbec676b9", }, - { WebKit::WebCryptoAlgorithmIdSha224, "000102030405", + { blink::WebCryptoAlgorithmIdSha224, "000102030405", "7d92e7f1cad1818ed1d13ab41f04ebabfe1fef6bb4cbeebac34c29bc", }, - { WebKit::WebCryptoAlgorithmIdSha256, "000102030405", + { blink::WebCryptoAlgorithmIdSha256, "000102030405", "17e88db187afd62c16e5debf3e6527cd006bc012bc90b51a810cd80c2d511f43", }, - { WebKit::WebCryptoAlgorithmIdSha384, "000102030405", + { blink::WebCryptoAlgorithmIdSha384, "000102030405", "79f4738706fce9650ac60266675c3cd07298b09923850d525604d040e6e448adc7dc" "22780d7e1b95bfeaa86a678e4552", }, - { WebKit::WebCryptoAlgorithmIdSha512, "000102030405", + { blink::WebCryptoAlgorithmIdSha512, "000102030405", "2f3831bccc94cf061bcfa5f8c23c1429d26e3bc6b76edad93d9025cb91c903af6cf9" "c935dc37193c04c2c66e7d9de17c358284418218afea2160147aaa912f4c", }, @@ -302,10 +302,10 @@ TEST_F(WebCryptoImplTest, DigestSampleSets) { SCOPED_TRACE(test_index); const TestCase& test = kTests[test_index]; - WebKit::WebCryptoAlgorithm algorithm = CreateAlgorithm(test.algorithm); + blink::WebCryptoAlgorithm algorithm = CreateAlgorithm(test.algorithm); std::vector<uint8> input = HexStringToBytes(test.hex_input); - WebKit::WebArrayBuffer output; + blink::WebArrayBuffer output; ASSERT_TRUE(DigestInternal(algorithm, input, &output)); ExpectArrayBufferMatchesHex(test.hex_result, output); } @@ -313,7 +313,7 @@ TEST_F(WebCryptoImplTest, DigestSampleSets) { TEST_F(WebCryptoImplTest, HMACSampleSets) { struct TestCase { - WebKit::WebCryptoAlgorithmId algorithm; + blink::WebCryptoAlgorithmId algorithm; const char* key; const char* message; const char* mac; @@ -324,14 +324,14 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { // particular results are also posted on the Wikipedia page examples: // http://en.wikipedia.org/wiki/Hash-based_message_authentication_code { - WebKit::WebCryptoAlgorithmIdSha1, + blink::WebCryptoAlgorithmIdSha1, "", "", // openssl dgst -sha1 -hmac "" < /dev/null "fbdb1d1b18aa6c08324b7d64b71fb76370690e1d", }, { - WebKit::WebCryptoAlgorithmIdSha256, + blink::WebCryptoAlgorithmIdSha256, "", "", // openssl dgst -sha256 -hmac "" < /dev/null @@ -342,7 +342,7 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { // http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip // L=20 set 45 { - WebKit::WebCryptoAlgorithmIdSha1, + blink::WebCryptoAlgorithmIdSha1, // key "59785928d72516e31272", // message @@ -355,7 +355,7 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { }, // L=20 set 299 { - WebKit::WebCryptoAlgorithmIdSha1, + blink::WebCryptoAlgorithmIdSha1, // key "ceb9aedf8d6efcf0ae52bea0fa99a9e26ae81bacea0cff4d5eecf201e3bca3c3577480" "621b818fd717ba99d6ff958ea3d59b2527b019c343bb199e648090225867d994607962" @@ -370,7 +370,7 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { }, // L=32, set 30 { - WebKit::WebCryptoAlgorithmIdSha256, + blink::WebCryptoAlgorithmIdSha256, // key "9779d9120642797f1747025d5b22b7ac607cab08e1758f2f3a46c8be1e25c53b8c6a8f" "58ffefa176", @@ -384,7 +384,7 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { }, // L=32, set 224 { - WebKit::WebCryptoAlgorithmIdSha256, + blink::WebCryptoAlgorithmIdSha256, // key "4b7ab133efe99e02fc89a28409ee187d579e774f4cba6fc223e13504e3511bef8d4f63" "8b9aca55d4a43b8fbd64cf9d74dcc8c9e8d52034898c70264ea911a3fd70813fa73b08" @@ -404,14 +404,14 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { SCOPED_TRACE(test_index); const TestCase& test = kTests[test_index]; - WebKit::WebCryptoAlgorithm algorithm = CreateHmacAlgorithm(test.algorithm); + blink::WebCryptoAlgorithm algorithm = CreateHmacAlgorithm(test.algorithm); - WebKit::WebCryptoKey key = ImportSecretKeyFromRawHexString( - test.key, algorithm, WebKit::WebCryptoKeyUsageSign); + blink::WebCryptoKey key = ImportSecretKeyFromRawHexString( + test.key, algorithm, blink::WebCryptoKeyUsageSign); std::vector<uint8> message_raw = HexStringToBytes(test.message); - WebKit::WebArrayBuffer output; + blink::WebArrayBuffer output; ASSERT_TRUE(SignInternal(algorithm, key, message_raw, &output)); @@ -451,12 +451,12 @@ TEST_F(WebCryptoImplTest, HMACSampleSets) { } TEST_F(WebCryptoImplTest, AesCbcFailures) { - WebKit::WebCryptoKey key = ImportSecretKeyFromRawHexString( + blink::WebCryptoKey key = ImportSecretKeyFromRawHexString( "2b7e151628aed2a6abf7158809cf4f3c", - CreateAlgorithm(WebKit::WebCryptoAlgorithmIdAesCbc), - WebKit::WebCryptoKeyUsageEncrypt | WebKit::WebCryptoKeyUsageDecrypt); + CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc), + blink::WebCryptoKeyUsageEncrypt | blink::WebCryptoKeyUsageDecrypt); - WebKit::WebArrayBuffer output; + blink::WebArrayBuffer output; // Use an invalid |iv| (fewer than 16 bytes) { @@ -500,11 +500,11 @@ TEST_F(WebCryptoImplTest, AesCbcFailures) { std::vector<uint8> key_raw(1); std::vector<uint8> iv(16); - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); - EXPECT_FALSE(ImportKeyInternal(WebKit::WebCryptoKeyFormatRaw, + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); + EXPECT_FALSE(ImportKeyInternal(blink::WebCryptoKeyFormatRaw, key_raw, CreateAesCbcAlgorithm(iv), - WebKit::WebCryptoKeyUsageDecrypt, + blink::WebCryptoKeyUsageDecrypt, &key)); } } @@ -591,15 +591,15 @@ TEST_F(WebCryptoImplTest, AesCbcSampleSets) { SCOPED_TRACE(index); const TestCase& test = kTests[index]; - WebKit::WebCryptoKey key = ImportSecretKeyFromRawHexString( + blink::WebCryptoKey key = ImportSecretKeyFromRawHexString( test.key, - CreateAlgorithm(WebKit::WebCryptoAlgorithmIdAesCbc), - WebKit::WebCryptoKeyUsageEncrypt | WebKit::WebCryptoKeyUsageDecrypt); + CreateAlgorithm(blink::WebCryptoAlgorithmIdAesCbc), + blink::WebCryptoKeyUsageEncrypt | blink::WebCryptoKeyUsageDecrypt); std::vector<uint8> plain_text = HexStringToBytes(test.plain_text); std::vector<uint8> iv = HexStringToBytes(test.iv); - WebKit::WebArrayBuffer output; + blink::WebArrayBuffer output; // Test encryption. EXPECT_TRUE(EncryptInternal(CreateAesCbcAlgorithm(iv), @@ -643,46 +643,46 @@ TEST_F(WebCryptoImplTest, AesCbcSampleSets) { // TODO(padolph): Add test to verify generated symmetric keys appear random. TEST_F(WebCryptoImplTest, GenerateKeyAes) { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); ASSERT_TRUE(GenerateKeyInternal(CreateAesCbcAlgorithm(128), &key)); EXPECT_TRUE(key.handle()); - EXPECT_EQ(WebKit::WebCryptoKeyTypeSecret, key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type()); } TEST_F(WebCryptoImplTest, GenerateKeyAesBadLength) { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); EXPECT_FALSE(GenerateKeyInternal(CreateAesCbcAlgorithm(0), &key)); EXPECT_FALSE(GenerateKeyInternal(CreateAesCbcAlgorithm(129), &key)); } TEST_F(WebCryptoImplTest, GenerateKeyHmac) { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); - WebKit::WebCryptoAlgorithm algorithm = - CreateHmacKeyAlgorithm(WebKit::WebCryptoAlgorithmIdSha1, 128); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); + blink::WebCryptoAlgorithm algorithm = + CreateHmacKeyAlgorithm(blink::WebCryptoAlgorithmIdSha1, 128); ASSERT_TRUE(GenerateKeyInternal(algorithm, &key)); EXPECT_FALSE(key.isNull()); EXPECT_TRUE(key.handle()); - EXPECT_EQ(WebKit::WebCryptoKeyTypeSecret, key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type()); } TEST_F(WebCryptoImplTest, GenerateKeyHmacNoLength) { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); - WebKit::WebCryptoAlgorithm algorithm = - CreateHmacKeyAlgorithm(WebKit::WebCryptoAlgorithmIdSha1, 0); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); + blink::WebCryptoAlgorithm algorithm = + CreateHmacKeyAlgorithm(blink::WebCryptoAlgorithmIdSha1, 0); ASSERT_TRUE(GenerateKeyInternal(algorithm, &key)); EXPECT_TRUE(key.handle()); - EXPECT_EQ(WebKit::WebCryptoKeyTypeSecret, key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypeSecret, key.type()); } TEST_F(WebCryptoImplTest, ImportSecretKeyNoAlgorithm) { - WebKit::WebCryptoKey key = WebKit::WebCryptoKey::createNull(); + blink::WebCryptoKey key = blink::WebCryptoKey::createNull(); // This fails because the algorithm is null. EXPECT_FALSE(ImportKeyInternal( - WebKit::WebCryptoKeyFormatRaw, + blink::WebCryptoKeyFormatRaw, HexStringToBytes("00000000000000000000"), - WebKit::WebCryptoAlgorithm::createNull(), - WebKit::WebCryptoKeyUsageSign, + blink::WebCryptoAlgorithm::createNull(), + blink::WebCryptoKeyUsageSign, &key)); } @@ -694,20 +694,20 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) { // Successful WebCryptoAlgorithmIdRsaEsPkcs1v1_5 key generation. const unsigned modulus_length = 256; const std::vector<uint8> public_exponent = HexStringToBytes("010001"); - WebKit::WebCryptoAlgorithm algorithm = - CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, + blink::WebCryptoAlgorithm algorithm = + CreateRsaAlgorithm(blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, modulus_length, public_exponent); bool extractable = false; - const WebKit::WebCryptoKeyUsageMask usage_mask = 0; - WebKit::WebCryptoKey public_key = WebKit::WebCryptoKey::createNull(); - WebKit::WebCryptoKey private_key = WebKit::WebCryptoKey::createNull(); + const blink::WebCryptoKeyUsageMask usage_mask = 0; + blink::WebCryptoKey public_key = blink::WebCryptoKey::createNull(); + blink::WebCryptoKey private_key = blink::WebCryptoKey::createNull(); EXPECT_TRUE(GenerateKeyPairInternal( algorithm, extractable, usage_mask, &public_key, &private_key)); EXPECT_FALSE(public_key.isNull()); EXPECT_FALSE(private_key.isNull()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePublic, public_key.type()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePrivate, private_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePublic, public_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePrivate, private_key.type()); EXPECT_EQ(extractable, public_key.extractable()); EXPECT_EQ(extractable, private_key.extractable()); EXPECT_EQ(usage_mask, public_key.usages()); @@ -715,14 +715,14 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) { // Fail with bad modulus. algorithm = CreateRsaAlgorithm( - WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, 0, public_exponent); + blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, 0, public_exponent); EXPECT_FALSE(GenerateKeyPairInternal( algorithm, extractable, usage_mask, &public_key, &private_key)); // Fail with bad exponent: larger than unsigned long. unsigned exponent_length = sizeof(unsigned long) + 1; // NOLINT const std::vector<uint8> long_exponent(exponent_length, 0x01); - algorithm = CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, + algorithm = CreateRsaAlgorithm(blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, modulus_length, long_exponent); EXPECT_FALSE(GenerateKeyPairInternal( @@ -730,7 +730,7 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) { // Fail with bad exponent: empty. const std::vector<uint8> empty_exponent; - algorithm = CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, + algorithm = CreateRsaAlgorithm(blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, modulus_length, empty_exponent); EXPECT_FALSE(GenerateKeyPairInternal( @@ -738,7 +738,7 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) { // Fail with bad exponent: all zeros. std::vector<uint8> exponent_with_leading_zeros(15, 0x00); - algorithm = CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, + algorithm = CreateRsaAlgorithm(blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, modulus_length, exponent_with_leading_zeros); EXPECT_FALSE(GenerateKeyPairInternal( @@ -748,15 +748,15 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) { exponent_with_leading_zeros.insert(exponent_with_leading_zeros.end(), public_exponent.begin(), public_exponent.end()); - algorithm = CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, + algorithm = CreateRsaAlgorithm(blink::WebCryptoAlgorithmIdRsaEsPkcs1v1_5, modulus_length, exponent_with_leading_zeros); EXPECT_TRUE(GenerateKeyPairInternal( algorithm, extractable, usage_mask, &public_key, &private_key)); EXPECT_FALSE(public_key.isNull()); EXPECT_FALSE(private_key.isNull()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePublic, public_key.type()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePrivate, private_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePublic, public_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePrivate, private_key.type()); EXPECT_EQ(extractable, public_key.extractable()); EXPECT_EQ(extractable, private_key.extractable()); EXPECT_EQ(usage_mask, public_key.usages()); @@ -764,28 +764,28 @@ TEST_F(WebCryptoImplTest, GenerateKeyPairRsa) { // Successful WebCryptoAlgorithmIdRsaOaep key generation. algorithm = CreateRsaAlgorithm( - WebKit::WebCryptoAlgorithmIdRsaOaep, modulus_length, public_exponent); + blink::WebCryptoAlgorithmIdRsaOaep, modulus_length, public_exponent); EXPECT_TRUE(GenerateKeyPairInternal( algorithm, extractable, usage_mask, &public_key, &private_key)); EXPECT_FALSE(public_key.isNull()); EXPECT_FALSE(private_key.isNull()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePublic, public_key.type()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePrivate, private_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePublic, public_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePrivate, private_key.type()); EXPECT_EQ(extractable, public_key.extractable()); EXPECT_EQ(extractable, private_key.extractable()); EXPECT_EQ(usage_mask, public_key.usages()); EXPECT_EQ(usage_mask, private_key.usages()); // Successful WebCryptoAlgorithmIdRsaSsaPkcs1v1_5 key generation. - algorithm = CreateRsaAlgorithm(WebKit::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, + algorithm = CreateRsaAlgorithm(blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5, modulus_length, public_exponent); EXPECT_TRUE(GenerateKeyPairInternal( algorithm, extractable, usage_mask, &public_key, &private_key)); EXPECT_FALSE(public_key.isNull()); EXPECT_FALSE(private_key.isNull()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePublic, public_key.type()); - EXPECT_EQ(WebKit::WebCryptoKeyTypePrivate, private_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePublic, public_key.type()); + EXPECT_EQ(blink::WebCryptoKeyTypePrivate, private_key.type()); EXPECT_EQ(extractable, public_key.extractable()); EXPECT_EQ(extractable, private_key.extractable()); EXPECT_EQ(usage_mask, public_key.usages()); diff --git a/content/renderer/websharedworker_proxy.cc b/content/renderer/websharedworker_proxy.cc index 190a35c..ad35f02 100644 --- a/content/renderer/websharedworker_proxy.cc +++ b/content/renderer/websharedworker_proxy.cc @@ -55,7 +55,7 @@ void WebSharedWorkerProxy::CreateWorkerContext( const string16& user_agent, const string16& source_code, const string16& content_security_policy, - WebKit::WebContentSecurityPolicyType policy_type, + blink::WebContentSecurityPolicyType policy_type, int pending_route_id, int64 script_resource_appcache_id) { DCHECK(route_id_ == MSG_ROUTING_NONE); @@ -121,12 +121,12 @@ bool WebSharedWorkerProxy::isStarted() { } void WebSharedWorkerProxy::startWorkerContext( - const WebKit::WebURL& script_url, - const WebKit::WebString& name, - const WebKit::WebString& user_agent, - const WebKit::WebString& source_code, - const WebKit::WebString& content_security_policy, - WebKit::WebContentSecurityPolicyType policy_type, + const blink::WebURL& script_url, + const blink::WebString& name, + const blink::WebString& user_agent, + const blink::WebString& source_code, + const blink::WebString& content_security_policy, + blink::WebContentSecurityPolicyType policy_type, long long script_resource_appcache_id) { DCHECK(!isStarted()); CreateWorkerContext( @@ -144,7 +144,7 @@ void WebSharedWorkerProxy::clientDestroyed() { NOTREACHED(); } -void WebSharedWorkerProxy::connect(WebKit::WebMessagePortChannel* channel, +void WebSharedWorkerProxy::connect(blink::WebMessagePortChannel* channel, ConnectListener* listener) { WebMessagePortChannelImpl* webchannel = static_cast<WebMessagePortChannelImpl*>(channel); diff --git a/content/renderer/websharedworker_proxy.h b/content/renderer/websharedworker_proxy.h index 75c7b55..92f1a20 100644 --- a/content/renderer/websharedworker_proxy.h +++ b/content/renderer/websharedworker_proxy.h @@ -23,7 +23,7 @@ class ChildThread; // thread. Once the connect event has been sent, all future communication will // happen via the WebMessagePortChannel, and the WebSharedWorker instance will // be freed. -class WebSharedWorkerProxy : public WebKit::WebSharedWorker, +class WebSharedWorkerProxy : public blink::WebSharedWorker, private IPC::Listener { public: // If the worker not loaded yet, route_id == MSG_ROUTING_NONE @@ -36,16 +36,16 @@ class WebSharedWorkerProxy : public WebKit::WebSharedWorker, // Implementations of WebSharedWorker APIs virtual bool isStarted(); - virtual void connect(WebKit::WebMessagePortChannel* channel, + virtual void connect(blink::WebMessagePortChannel* channel, ConnectListener* listener); virtual void startWorkerContext( - const WebKit::WebURL& script_url, - const WebKit::WebString& name, - const WebKit::WebString& user_agent, - const WebKit::WebString& source_code, - const WebKit::WebString& content_security_policy, - WebKit::WebContentSecurityPolicyType policy_type, + const blink::WebURL& script_url, + const blink::WebString& name, + const blink::WebString& user_agent, + const blink::WebString& source_code, + const blink::WebString& content_security_policy, + blink::WebContentSecurityPolicyType policy_type, long long script_resource_appcache_id); virtual void terminateWorkerContext(); @@ -77,7 +77,7 @@ class WebSharedWorkerProxy : public WebKit::WebSharedWorker, const string16& user_agent, const string16& source_code, const string16& content_security_policy, - WebKit::WebContentSecurityPolicyType policy_type, + blink::WebContentSecurityPolicyType policy_type, int pending_route_id, int64 script_resource_appcache_id); void OnWorkerCreated(); diff --git a/content/shell/android/shell_manager.h b/content/shell/android/shell_manager.h index f5505435..6716251 100644 --- a/content/shell/android/shell_manager.h +++ b/content/shell/android/shell_manager.h @@ -12,7 +12,7 @@ class Shell; -namespace WebKit { +namespace blink { class WebLayer; } @@ -30,8 +30,8 @@ void CloseShellView(jobject shell_view); // Registers the ShellManager native methods. bool RegisterShellManager(JNIEnv* env); -void ShellAttachLayer(WebKit::WebLayer* layer); -void ShellRemoveLayer(WebKit::WebLayer* layer); +void ShellAttachLayer(blink::WebLayer* layer); +void ShellRemoveLayer(blink::WebLayer* layer); } // namespace content #endif // CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_ diff --git a/content/shell/browser/shell_web_contents_view_delegate_gtk.cc b/content/shell/browser/shell_web_contents_view_delegate_gtk.cc index 4c98257..5020720 100644 --- a/content/shell/browser/shell_web_contents_view_delegate_gtk.cc +++ b/content/shell/browser/shell_web_contents_view_delegate_gtk.cc @@ -22,7 +22,7 @@ #include "ui/base/gtk/focus_store_gtk.h" #include "ui/base/gtk/gtk_floating_container.h" -using WebKit::WebContextMenuData; +using blink::WebContextMenuData; namespace content { diff --git a/content/shell/browser/shell_web_contents_view_delegate_mac.mm b/content/shell/browser/shell_web_contents_view_delegate_mac.mm index 00196af..1d01f90 100644 --- a/content/shell/browser/shell_web_contents_view_delegate_mac.mm +++ b/content/shell/browser/shell_web_contents_view_delegate_mac.mm @@ -22,7 +22,7 @@ #include "content/shell/common/shell_switches.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" -using WebKit::WebContextMenuData; +using blink::WebContextMenuData; enum { ShellContextMenuItemCutTag = 0, diff --git a/content/shell/browser/shell_web_contents_view_delegate_win.cc b/content/shell/browser/shell_web_contents_view_delegate_win.cc index cd387f0..63223f4 100644 --- a/content/shell/browser/shell_web_contents_view_delegate_win.cc +++ b/content/shell/browser/shell_web_contents_view_delegate_win.cc @@ -20,7 +20,7 @@ #include "content/shell/common/shell_switches.h" #include "third_party/WebKit/public/web/WebContextMenuData.h" -using WebKit::WebContextMenuData; +using blink::WebContextMenuData; namespace { diff --git a/content/shell/renderer/shell_content_renderer_client.cc b/content/shell/renderer/shell_content_renderer_client.cc index 68778b7..40b478b 100644 --- a/content/shell/renderer/shell_content_renderer_client.cc +++ b/content/shell/renderer/shell_content_renderer_client.cc @@ -24,18 +24,18 @@ #include "third_party/WebKit/public/web/WebView.h" #include "v8/include/v8.h" -using WebKit::WebAudioDevice; -using WebKit::WebClipboard; -using WebKit::WebFrame; -using WebKit::WebMIDIAccessor; -using WebKit::WebMIDIAccessorClient; -using WebKit::WebMediaStreamCenter; -using WebKit::WebMediaStreamCenterClient; -using WebKit::WebPlugin; -using WebKit::WebPluginParams; -using WebKit::WebRTCPeerConnectionHandler; -using WebKit::WebRTCPeerConnectionHandlerClient; -using WebKit::WebThemeEngine; +using blink::WebAudioDevice; +using blink::WebClipboard; +using blink::WebFrame; +using blink::WebMIDIAccessor; +using blink::WebMIDIAccessorClient; +using blink::WebMediaStreamCenter; +using blink::WebMediaStreamCenterClient; +using blink::WebPlugin; +using blink::WebPluginParams; +using blink::WebRTCPeerConnectionHandler; +using blink::WebRTCPeerConnectionHandlerClient; +using blink::WebThemeEngine; using WebTestRunner::WebTestDelegate; using WebTestRunner::WebTestInterfaces; using WebTestRunner::WebTestProxyBase; @@ -180,7 +180,7 @@ void ShellContentRendererClient::WebTestProxyCreated(RenderView* render_view, } bool ShellContentRendererClient::AllowBrowserPlugin( - WebKit::WebPluginContainer* container) { + blink::WebPluginContainer* container) { if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableBrowserPluginForAllViewTypes)) { // Allow BrowserPlugin if forced by command line flag. This is generally diff --git a/content/shell/renderer/shell_content_renderer_client.h b/content/shell/renderer/shell_content_renderer_client.h index 998e83c..f596240 100644 --- a/content/shell/renderer/shell_content_renderer_client.h +++ b/content/shell/renderer/shell_content_renderer_client.h @@ -10,7 +10,7 @@ #include "base/platform_file.h" #include "content/public/renderer/content_renderer_client.h" -namespace WebKit { +namespace blink { class WebFrame; class WebPlugin; struct WebPluginParams; @@ -37,22 +37,22 @@ class ShellContentRendererClient : public ContentRendererClient { virtual void RenderViewCreated(RenderView* render_view) OVERRIDE; virtual bool OverrideCreatePlugin( RenderView* render_view, - WebKit::WebFrame* frame, - const WebKit::WebPluginParams& params, - WebKit::WebPlugin** plugin) OVERRIDE; - virtual WebKit::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( - WebKit::WebMediaStreamCenterClient* client) OVERRIDE; - virtual WebKit::WebRTCPeerConnectionHandler* + blink::WebFrame* frame, + const blink::WebPluginParams& params, + blink::WebPlugin** plugin) OVERRIDE; + virtual blink::WebMediaStreamCenter* OverrideCreateWebMediaStreamCenter( + blink::WebMediaStreamCenterClient* client) OVERRIDE; + virtual blink::WebRTCPeerConnectionHandler* OverrideCreateWebRTCPeerConnectionHandler( - WebKit::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; - virtual WebKit::WebMIDIAccessor* OverrideCreateMIDIAccessor( - WebKit::WebMIDIAccessorClient* client) OVERRIDE; - virtual WebKit::WebAudioDevice* OverrideCreateAudioDevice( + blink::WebRTCPeerConnectionHandlerClient* client) OVERRIDE; + virtual blink::WebMIDIAccessor* OverrideCreateMIDIAccessor( + blink::WebMIDIAccessorClient* client) OVERRIDE; + virtual blink::WebAudioDevice* OverrideCreateAudioDevice( double sample_rate) OVERRIDE; - virtual WebKit::WebClipboard* OverrideWebClipboard() OVERRIDE; - virtual WebKit::WebThemeEngine* OverrideThemeEngine() OVERRIDE; + virtual blink::WebClipboard* OverrideWebClipboard() OVERRIDE; + virtual blink::WebThemeEngine* OverrideThemeEngine() OVERRIDE; virtual bool AllowBrowserPlugin( - WebKit::WebPluginContainer* container) OVERRIDE; + blink::WebPluginContainer* container) OVERRIDE; private: void WebTestProxyCreated(RenderView* render_view, diff --git a/content/shell/renderer/shell_render_process_observer.cc b/content/shell/renderer/shell_render_process_observer.cc index 4e4ede0..c4fc640 100644 --- a/content/shell/renderer/shell_render_process_observer.cc +++ b/content/shell/renderer/shell_render_process_observer.cc @@ -19,8 +19,8 @@ #include "third_party/WebKit/public/web/WebView.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebFrame; -using WebKit::WebRuntimeFeatures; +using blink::WebFrame; +using blink::WebRuntimeFeatures; using WebTestRunner::WebTestDelegate; using WebTestRunner::WebTestInterfaces; diff --git a/content/shell/renderer/shell_render_process_observer.h b/content/shell/renderer/shell_render_process_observer.h index a4e6fe8..ffe59e2 100644 --- a/content/shell/renderer/shell_render_process_observer.h +++ b/content/shell/renderer/shell_render_process_observer.h @@ -12,7 +12,7 @@ #include "content/public/renderer/render_process_observer.h" #include "ipc/ipc_platform_file.h" -namespace WebKit { +namespace blink { class WebFrame; } diff --git a/content/shell/renderer/shell_render_view_observer.cc b/content/shell/renderer/shell_render_view_observer.cc index 9758f64..b5b82cd 100644 --- a/content/shell/renderer/shell_render_view_observer.cc +++ b/content/shell/renderer/shell_render_view_observer.cc @@ -17,10 +17,10 @@ ShellRenderViewObserver::ShellRenderViewObserver(RenderView* render_view) : RenderViewObserver(render_view) { } -void ShellRenderViewObserver::DidClearWindowObject(WebKit::WebFrame* frame) { +void ShellRenderViewObserver::DidClearWindowObject(blink::WebFrame* frame) { if (CommandLine::ForCurrentProcess()->HasSwitch( switches::kExposeInternalsForTesting)) { - WebKit::WebTestingSupport::injectInternalsObject(frame); + blink::WebTestingSupport::injectInternalsObject(frame); } } diff --git a/content/shell/renderer/shell_render_view_observer.h b/content/shell/renderer/shell_render_view_observer.h index c295c34..c412779 100644 --- a/content/shell/renderer/shell_render_view_observer.h +++ b/content/shell/renderer/shell_render_view_observer.h @@ -7,7 +7,7 @@ #include "content/public/renderer/render_view_observer.h" -namespace WebKit { +namespace blink { class WebFrame; } @@ -23,7 +23,7 @@ class ShellRenderViewObserver : public RenderViewObserver { private: // RenderViewObserver implementation. - virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; + virtual void DidClearWindowObject(blink::WebFrame* frame) OVERRIDE; DISALLOW_COPY_AND_ASSIGN(ShellRenderViewObserver); }; diff --git a/content/shell/renderer/webkit_test_runner.cc b/content/shell/renderer/webkit_test_runner.cc index eca802b..3e49080 100644 --- a/content/shell/renderer/webkit_test_runner.cc +++ b/content/shell/renderer/webkit_test_runner.cc @@ -62,27 +62,27 @@ #include "webkit/common/webpreferences.h" #include "webkit/glue/webkit_glue.h" -using WebKit::Platform; -using WebKit::WebArrayBufferView; -using WebKit::WebContextMenuData; -using WebKit::WebDevToolsAgent; -using WebKit::WebDeviceMotionData; -using WebKit::WebDeviceOrientationData; -using WebKit::WebElement; -using WebKit::WebFrame; -using WebKit::WebGamepads; -using WebKit::WebHistoryItem; -using WebKit::WebPoint; -using WebKit::WebRect; -using WebKit::WebScriptSource; -using WebKit::WebSize; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLRequest; -using WebKit::WebTestingSupport; -using WebKit::WebVector; -using WebKit::WebView; +using blink::Platform; +using blink::WebArrayBufferView; +using blink::WebContextMenuData; +using blink::WebDevToolsAgent; +using blink::WebDeviceMotionData; +using blink::WebDeviceOrientationData; +using blink::WebElement; +using blink::WebFrame; +using blink::WebGamepads; +using blink::WebHistoryItem; +using blink::WebPoint; +using blink::WebRect; +using blink::WebScriptSource; +using blink::WebSize; +using blink::WebString; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLRequest; +using blink::WebTestingSupport; +using blink::WebVector; +using blink::WebView; using WebTestRunner::WebTask; using WebTestRunner::WebTestInterfaces; using WebTestRunner::WebTestProxyBase; @@ -255,7 +255,7 @@ void WebKitTestRunner::postDelayedTask(WebTask* task, long long ms) { } WebString WebKitTestRunner::registerIsolatedFileSystem( - const WebKit::WebVector<WebKit::WebString>& absolute_filenames) { + const blink::WebVector<blink::WebString>& absolute_filenames) { std::vector<base::FilePath> files; for (size_t i = 0; i < absolute_filenames.size(); ++i) files.push_back(base::FilePath::FromUTF16Unsafe(absolute_filenames[i])); @@ -514,7 +514,7 @@ bool WebKitTestRunner::allowExternalPages() { void WebKitTestRunner::captureHistoryForWindow( WebTestProxyBase* proxy, - WebVector<WebKit::WebHistoryItem>* history, + WebVector<blink::WebHistoryItem>* history, size_t* currentEntryIndex) { size_t pos = 0; std::vector<int>::iterator id; diff --git a/content/shell/renderer/webkit_test_runner.h b/content/shell/renderer/webkit_test_runner.h index 6f40bfd..4b12643 100644 --- a/content/shell/renderer/webkit_test_runner.h +++ b/content/shell/renderer/webkit_test_runner.h @@ -19,7 +19,7 @@ class SkCanvas; -namespace WebKit { +namespace blink { class WebDeviceMotionData; class WebDeviceOrientationData; struct WebRect; @@ -41,39 +41,39 @@ class WebKitTestRunner : public RenderViewObserver, // RenderViewObserver implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; - virtual void DidClearWindowObject(WebKit::WebFrame* frame) OVERRIDE; + virtual void DidClearWindowObject(blink::WebFrame* frame) OVERRIDE; virtual void Navigate(const GURL& url) OVERRIDE; - virtual void DidCommitProvisionalLoad(WebKit::WebFrame* frame, + virtual void DidCommitProvisionalLoad(blink::WebFrame* frame, bool is_new_navigation) OVERRIDE; virtual void DidFailProvisionalLoad( - WebKit::WebFrame* frame, const WebKit::WebURLError& error) OVERRIDE; + blink::WebFrame* frame, const blink::WebURLError& error) OVERRIDE; // WebTestDelegate implementation. virtual void clearEditCommand(); virtual void setEditCommand(const std::string& name, const std::string& value); - virtual void setGamepadData(const WebKit::WebGamepads& gamepads); - virtual void setDeviceMotionData(const WebKit::WebDeviceMotionData& data); + virtual void setGamepadData(const blink::WebGamepads& gamepads); + virtual void setDeviceMotionData(const blink::WebDeviceMotionData& data); virtual void setDeviceOrientationData( - const WebKit::WebDeviceOrientationData& data); + const blink::WebDeviceOrientationData& data); virtual void printMessage(const std::string& message); virtual void postTask(::WebTestRunner::WebTask* task); virtual void postDelayedTask(::WebTestRunner::WebTask* task, long long ms); - virtual WebKit::WebString registerIsolatedFileSystem( - const WebKit::WebVector<WebKit::WebString>& absolute_filenames); + virtual blink::WebString registerIsolatedFileSystem( + const blink::WebVector<blink::WebString>& absolute_filenames); virtual long long getCurrentTimeInMillisecond(); - virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path( + virtual blink::WebString getAbsoluteWebStringFromUTF8Path( const std::string& utf8_path); - virtual WebKit::WebURL localFileToDataURL(const WebKit::WebURL& file_url); - virtual WebKit::WebURL rewriteLayoutTestsURL(const std::string& utf8_url); + virtual blink::WebURL localFileToDataURL(const blink::WebURL& file_url); + virtual blink::WebURL rewriteLayoutTestsURL(const std::string& utf8_url); virtual ::WebTestRunner::WebPreferences* preferences(); virtual void applyPreferences(); - virtual std::string makeURLErrorDescription(const WebKit::WebURLError& error); + virtual std::string makeURLErrorDescription(const blink::WebURLError& error); virtual void useUnfortunateSynchronousResizeMode(bool enable); - virtual void enableAutoResizeMode(const WebKit::WebSize& min_size, - const WebKit::WebSize& max_size); - virtual void disableAutoResizeMode(const WebKit::WebSize& new_size); + virtual void enableAutoResizeMode(const blink::WebSize& min_size, + const blink::WebSize& max_size); + virtual void disableAutoResizeMode(const blink::WebSize& new_size); virtual void showDevTools(); virtual void closeDevTools(); virtual void evaluateInWebInspector(long call_id, const std::string& script); @@ -90,12 +90,12 @@ class WebKitTestRunner : public RenderViewObserver, virtual int navigationEntryCount(); virtual void goToOffset(int offset); virtual void reload(); - virtual void loadURLForFrame(const WebKit::WebURL& url, + virtual void loadURLForFrame(const blink::WebURL& url, const std::string& frame_name); virtual bool allowExternalPages(); virtual void captureHistoryForWindow( WebTestRunner::WebTestProxyBase* proxy, - WebKit::WebVector<WebKit::WebHistoryItem>* history, + blink::WebVector<blink::WebHistoryItem>* history, size_t* currentEntryIndex); void Reset(); diff --git a/content/test/accessibility_browser_test_utils.cc b/content/test/accessibility_browser_test_utils.cc index 7c8ef56..525ed30 100644 --- a/content/test/accessibility_browser_test_utils.cc +++ b/content/test/accessibility_browser_test_utils.cc @@ -20,7 +20,7 @@ namespace content { AccessibilityNotificationWaiter::AccessibilityNotificationWaiter( Shell* shell, AccessibilityMode accessibility_mode, - WebKit::WebAXEvent event_type) + blink::WebAXEvent event_type) : shell_(shell), event_to_wait_for_(event_type), loop_runner_(new MessageLoopRunner()), @@ -47,7 +47,7 @@ AccessibilityNotificationWaiter::GetAccessibilityNodeDataTree() const { } void AccessibilityNotificationWaiter::OnAccessibilityEvent( - WebKit::WebAXEvent event_type) { + blink::WebAXEvent event_type) { if (!IsAboutBlank() && event_to_wait_for_ == event_type) loop_runner_->Quit(); } diff --git a/content/test/accessibility_browser_test_utils.h b/content/test/accessibility_browser_test_utils.h index 4802780..74f0834 100644 --- a/content/test/accessibility_browser_test_utils.h +++ b/content/test/accessibility_browser_test_utils.h @@ -25,7 +25,7 @@ class AccessibilityNotificationWaiter { AccessibilityNotificationWaiter( Shell* shell, AccessibilityMode accessibility_mode, - WebKit::WebAXEvent event); + blink::WebAXEvent event); ~AccessibilityNotificationWaiter(); // Blocks until the specific accessibility notification registered in @@ -39,7 +39,7 @@ class AccessibilityNotificationWaiter { private: // Callback from RenderViewHostImpl. - void OnAccessibilityEvent(WebKit::WebAXEvent event); + void OnAccessibilityEvent(blink::WebAXEvent event); // Helper function to determine if the accessibility tree in // GetAccessibilityNodeDataTree() is about the page with the url @@ -48,7 +48,7 @@ class AccessibilityNotificationWaiter { Shell* shell_; RenderViewHostImpl* view_host_; - WebKit::WebAXEvent event_to_wait_for_; + blink::WebAXEvent event_to_wait_for_; scoped_refptr<MessageLoopRunner> loop_runner_; base::WeakPtrFactory<AccessibilityNotificationWaiter> weak_factory_; diff --git a/content/test/image_decoder_test.cc b/content/test/image_decoder_test.cc index 8387d4a..463cd0d1 100644 --- a/content/test/image_decoder_test.cc +++ b/content/test/image_decoder_test.cc @@ -51,7 +51,7 @@ base::FilePath GetMD5SumPath(const base::FilePath& path) { } #if defined(CALCULATE_MD5_SUMS) -void SaveMD5Sum(const base::FilePath& path, const WebKit::WebImage& web_image) { +void SaveMD5Sum(const base::FilePath& path, const blink::WebImage& web_image) { // Calculate MD5 sum. base::MD5Digest digest; web_image.getSkBitmap().lockPixels(); @@ -69,7 +69,7 @@ void SaveMD5Sum(const base::FilePath& path, const WebKit::WebImage& web_image) { #endif #if !defined(CALCULATE_MD5_SUMS) -void VerifyImage(const WebKit::WebImageDecoder& decoder, +void VerifyImage(const blink::WebImageDecoder& decoder, const base::FilePath& path, const base::FilePath& md5_sum_path, size_t frame_index) { @@ -81,7 +81,7 @@ void VerifyImage(const WebKit::WebImageDecoder& decoder, // Calculate MD5 sum. base::MD5Digest actual_digest; - WebKit::WebImage web_image = decoder.getFrameAtIndex(frame_index); + blink::WebImage web_image = decoder.getFrameAtIndex(frame_index); web_image.getSkBitmap().lockPixels(); base::MD5Sum(web_image.getSkBitmap().getPixels(), web_image.getSkBitmap().width() * web_image.getSkBitmap().height() * @@ -179,14 +179,14 @@ void ImageDecoderTest::TestWebKitImageDecoder(const base::FilePath& image_path, std::vector<char> image_contents; ReadFileToVector(image_path, &image_contents); EXPECT_TRUE(image_contents.size()); - scoped_ptr<WebKit::WebImageDecoder> decoder(CreateWebKitImageDecoder()); + scoped_ptr<blink::WebImageDecoder> decoder(CreateWebKitImageDecoder()); EXPECT_FALSE(decoder->isFailed()); if (should_test_chunking) { // Test chunking file into half. const int partial_size = image_contents.size()/2; - WebKit::WebData partial_data( + blink::WebData partial_data( reinterpret_cast<const char*>(&(image_contents.at(0))), partial_size); // Make Sure the image decoder doesn't fail when we ask for the frame @@ -194,14 +194,14 @@ void ImageDecoderTest::TestWebKitImageDecoder(const base::FilePath& image_path, // NOTE: We can't check that frame 0 is non-NULL, because if this is an // ICO and we haven't yet supplied enough data to read the directory, // there is no framecount and thus no first frame. - decoder->setData(const_cast<WebKit::WebData&>(partial_data), false); + decoder->setData(const_cast<blink::WebData&>(partial_data), false); EXPECT_FALSE(decoder->isFailed()) << image_path.value(); } // Make sure passing the complete image results in successful decoding. - WebKit::WebData data(reinterpret_cast<const char*>(&(image_contents.at(0))), + blink::WebData data(reinterpret_cast<const char*>(&(image_contents.at(0))), image_contents.size()); - decoder->setData(const_cast<WebKit::WebData&>(data), true); + decoder->setData(const_cast<blink::WebData&>(data), true); if (should_test_failed_images) { if (ShouldImageFail(image_path)) { @@ -217,8 +217,8 @@ void ImageDecoderTest::TestWebKitImageDecoder(const base::FilePath& image_path, // Since WebImage does not expose get data by frame, get the size // through decoder and pass it to fromData so that the closest // image dats to the size is returned. - WebKit::WebSize size(decoder->getImage(desired_frame_index).size()); - const WebKit::WebImage& image = WebKit::WebImage::fromData(data, size); + blink::WebSize size(decoder->getImage(desired_frame_index).size()); + const blink::WebImage& image = blink::WebImage::fromData(data, size); SaveMD5Sum(md5_sum_path, image); #else VerifyImage(*decoder, image_path, md5_sum_path, desired_frame_index); diff --git a/content/test/image_decoder_test.h b/content/test/image_decoder_test.h index a7130ea..5983e7aed 100644 --- a/content/test/image_decoder_test.h +++ b/content/test/image_decoder_test.h @@ -14,7 +14,7 @@ #include "testing/gtest/include/gtest/gtest.h" -namespace WebKit { class WebImageDecoder; } +namespace blink { class WebImageDecoder; } // If CALCULATE_MD5_SUMS is not defined, then this test decodes a handful of // image files and compares their MD5 sums to the stored sums on disk. @@ -70,7 +70,7 @@ class ImageDecoderTest : public testing::Test { } // Creates WebKit API's decoder. - virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const = 0; + virtual blink::WebImageDecoder* CreateWebKitImageDecoder() const = 0; // The format to be decoded, like "bmp" or "ico". std::string format_; diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index dccc77b..97eb7c4 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc @@ -26,11 +26,11 @@ #include "content/browser/renderer_host/popup_menu_helper_mac.h" #endif -using WebKit::WebDeviceMotionData; -using WebKit::WebDeviceOrientationData; -using WebKit::WebGamepads; -using WebKit::WebRect; -using WebKit::WebSize; +using blink::WebDeviceMotionData; +using blink::WebDeviceOrientationData; +using blink::WebGamepads; +using blink::WebRect; +using blink::WebSize; using WebTestRunner::WebFrameTestProxy; using WebTestRunner::WebTestProxy; using WebTestRunner::WebTestProxyBase; diff --git a/content/test/mock_webclipboard_impl.cc b/content/test/mock_webclipboard_impl.cc index 1cfac9b..a0b44bd 100644 --- a/content/test/mock_webclipboard_impl.cc +++ b/content/test/mock_webclipboard_impl.cc @@ -20,10 +20,10 @@ #include "ui/gfx/size.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebDragData; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebVector; +using blink::WebDragData; +using blink::WebString; +using blink::WebURL; +using blink::WebVector; namespace content { @@ -86,15 +86,15 @@ WebVector<WebString> MockWebClipboardImpl::readAvailableTypes( return results; } -WebKit::WebString MockWebClipboardImpl::readPlainText( - WebKit::WebClipboard::Buffer buffer) { +blink::WebString MockWebClipboardImpl::readPlainText( + blink::WebClipboard::Buffer buffer) { return m_plainText; } // TODO(wtc): set output argument *url. -WebKit::WebString MockWebClipboardImpl::readHTML( - WebKit::WebClipboard::Buffer buffer, - WebKit::WebURL* url, +blink::WebString MockWebClipboardImpl::readHTML( + blink::WebClipboard::Buffer buffer, + blink::WebURL* url, unsigned* fragmentStart, unsigned* fragmentEnd) { *fragmentStart = 0; @@ -102,8 +102,8 @@ WebKit::WebString MockWebClipboardImpl::readHTML( return m_htmlText; } -WebKit::WebData MockWebClipboardImpl::readImage( - WebKit::WebClipboard::Buffer buffer) { +blink::WebData MockWebClipboardImpl::readImage( + blink::WebClipboard::Buffer buffer) { std::string data; std::vector<unsigned char> encoded_image; // TODO(dcheng): Verify that we can assume the image is ARGB8888. Note that @@ -126,19 +126,19 @@ WebKit::WebData MockWebClipboardImpl::readImage( return data; } -WebKit::WebString MockWebClipboardImpl::readCustomData( - WebKit::WebClipboard::Buffer buffer, - const WebKit::WebString& type) { +blink::WebString MockWebClipboardImpl::readCustomData( + blink::WebClipboard::Buffer buffer, + const blink::WebString& type) { std::map<base::string16, base::string16>::const_iterator it = m_customData.find(type); if (it != m_customData.end()) return it->second; - return WebKit::WebString(); + return blink::WebString(); } -void MockWebClipboardImpl::writeHTML(const WebKit::WebString& htmlText, - const WebKit::WebURL& url, - const WebKit::WebString& plainText, +void MockWebClipboardImpl::writeHTML(const blink::WebString& htmlText, + const blink::WebURL& url, + const blink::WebString& plainText, bool writeSmartPaste) { clear(); @@ -147,23 +147,23 @@ void MockWebClipboardImpl::writeHTML(const WebKit::WebString& htmlText, m_writeSmartPaste = writeSmartPaste; } -void MockWebClipboardImpl::writePlainText(const WebKit::WebString& plain_text) { +void MockWebClipboardImpl::writePlainText(const blink::WebString& plain_text) { clear(); m_plainText = plain_text; } -void MockWebClipboardImpl::writeURL(const WebKit::WebURL& url, - const WebKit::WebString& title) { +void MockWebClipboardImpl::writeURL(const blink::WebURL& url, + const blink::WebString& title) { clear(); m_htmlText = WebString::fromUTF8(URLToMarkup(url, title)); m_plainText = url.spec().utf16(); } -void MockWebClipboardImpl::writeImage(const WebKit::WebImage& image, - const WebKit::WebURL& url, - const WebKit::WebString& title) { +void MockWebClipboardImpl::writeImage(const blink::WebImage& image, + const blink::WebURL& url, + const blink::WebString& title) { if (!image.isNull()) { clear(); diff --git a/content/test/mock_webclipboard_impl.h b/content/test/mock_webclipboard_impl.h index 9b2fcf4..7c85ec4 100644 --- a/content/test/mock_webclipboard_impl.h +++ b/content/test/mock_webclipboard_impl.h @@ -19,42 +19,42 @@ namespace content { -class MockWebClipboardImpl : public WebKit::WebClipboard { +class MockWebClipboardImpl : public blink::WebClipboard { public: MockWebClipboardImpl(); virtual ~MockWebClipboardImpl(); - virtual bool isFormatAvailable(WebKit::WebClipboard::Format format, - WebKit::WebClipboard::Buffer buffer); - virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( - WebKit::WebClipboard::Buffer buffer, bool* containsFilenames); + virtual bool isFormatAvailable(blink::WebClipboard::Format format, + blink::WebClipboard::Buffer buffer); + virtual blink::WebVector<blink::WebString> readAvailableTypes( + blink::WebClipboard::Buffer buffer, bool* containsFilenames); - virtual WebKit::WebString readPlainText(WebKit::WebClipboard::Buffer buffer); - virtual WebKit::WebString readHTML(WebKit::WebClipboard::Buffer buffer, - WebKit::WebURL* url, + virtual blink::WebString readPlainText(blink::WebClipboard::Buffer buffer); + virtual blink::WebString readHTML(blink::WebClipboard::Buffer buffer, + blink::WebURL* url, unsigned* fragmentStart, unsigned* fragmentEnd); - virtual WebKit::WebData readImage(WebKit::WebClipboard::Buffer buffer); - virtual WebKit::WebString readCustomData(WebKit::WebClipboard::Buffer buffer, - const WebKit::WebString& type); + virtual blink::WebData readImage(blink::WebClipboard::Buffer buffer); + virtual blink::WebString readCustomData(blink::WebClipboard::Buffer buffer, + const blink::WebString& type); - virtual void writePlainText(const WebKit::WebString& plain_text); + virtual void writePlainText(const blink::WebString& plain_text); virtual void writeHTML( - const WebKit::WebString& htmlText, const WebKit::WebURL& url, - const WebKit::WebString& plainText, bool writeSmartPaste); + const blink::WebString& htmlText, const blink::WebURL& url, + const blink::WebString& plainText, bool writeSmartPaste); virtual void writeURL( - const WebKit::WebURL& url, const WebKit::WebString& title); + const blink::WebURL& url, const blink::WebString& title); virtual void writeImage( - const WebKit::WebImage& image, const WebKit::WebURL& url, - const WebKit::WebString& title); - virtual void writeDataObject(const WebKit::WebDragData& data); + const blink::WebImage& image, const blink::WebURL& url, + const blink::WebString& title); + virtual void writeDataObject(const blink::WebDragData& data); private: void clear(); - WebKit::WebString m_plainText; - WebKit::WebString m_htmlText; - WebKit::WebImage m_image; + blink::WebString m_plainText; + blink::WebString m_htmlText; + blink::WebImage m_image; std::map<base::string16, base::string16> m_customData; bool m_writeSmartPaste; }; diff --git a/content/test/mock_webframeclient.h b/content/test/mock_webframeclient.h index 5683fd6..bba8aa5 100644 --- a/content/test/mock_webframeclient.h +++ b/content/test/mock_webframeclient.h @@ -9,7 +9,7 @@ namespace content { -class MockWebFrameClient : public WebKit::WebFrameClient {}; +class MockWebFrameClient : public blink::WebFrameClient {}; } // namespace content diff --git a/content/test/mock_weburlloader.h b/content/test/mock_weburlloader.h index 15698c8..db26111 100644 --- a/content/test/mock_weburlloader.h +++ b/content/test/mock_weburlloader.h @@ -10,17 +10,17 @@ namespace content { -class MockWebURLLoader : public WebKit::WebURLLoader { +class MockWebURLLoader : public blink::WebURLLoader { public: MockWebURLLoader(); virtual ~MockWebURLLoader(); - MOCK_METHOD4(loadSynchronously, void(const WebKit::WebURLRequest& request, - WebKit::WebURLResponse& response, - WebKit::WebURLError& error, - WebKit::WebData& data)); - MOCK_METHOD2(loadAsynchronously, void(const WebKit::WebURLRequest& request, - WebKit::WebURLLoaderClient* client)); + MOCK_METHOD4(loadSynchronously, void(const blink::WebURLRequest& request, + blink::WebURLResponse& response, + blink::WebURLError& error, + blink::WebData& data)); + MOCK_METHOD2(loadAsynchronously, void(const blink::WebURLRequest& request, + blink::WebURLLoaderClient* client)); MOCK_METHOD0(cancel, void()); MOCK_METHOD1(setDefersLoading, void(bool value)); diff --git a/content/test/test_media_stream_client.cc b/content/test/test_media_stream_client.cc index 5e8d946..0b7b2e3 100644 --- a/content/test/test_media_stream_client.cc +++ b/content/test/test_media_stream_client.cc @@ -11,7 +11,7 @@ #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" #include "url/gurl.h" -using namespace WebKit; +using namespace blink; namespace { diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc index 15d8a6ac..178de17 100644 --- a/content/test/test_web_contents.cc +++ b/content/test/test_web_contents.cc @@ -226,7 +226,7 @@ void TestWebContents::CreateNewWindow( } void TestWebContents::CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) { + blink::WebPopupType popup_type) { } void TestWebContents::CreateNewFullscreenWidget(int route_id) { diff --git a/content/test/test_web_contents.h b/content/test/test_web_contents.h index 55024b8..e64399b 100644 --- a/content/test/test_web_contents.h +++ b/content/test/test_web_contents.h @@ -111,7 +111,7 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester { const ViewHostMsg_CreateWindow_Params& params, SessionStorageNamespace* session_storage_namespace) OVERRIDE; virtual void CreateNewWidget(int route_id, - WebKit::WebPopupType popup_type) OVERRIDE; + blink::WebPopupType popup_type) OVERRIDE; virtual void CreateNewFullscreenWidget(int route_id) OVERRIDE; virtual void ShowCreatedWindow(int route_id, WindowOpenDisposition disposition, diff --git a/content/test/test_web_contents_view.cc b/content/test/test_web_contents_view.cc index b732a01..9bed145 100644 --- a/content/test/test_web_contents_view.cc +++ b/content/test/test_web_contents_view.cc @@ -23,13 +23,13 @@ void TestWebContentsView::ShowPopupMenu(const gfx::Rect& bounds, void TestWebContentsView::StartDragging( const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) { } -void TestWebContentsView::UpdateDragCursor(WebKit::WebDragOperation operation) { +void TestWebContentsView::UpdateDragCursor(blink::WebDragOperation operation) { } void TestWebContentsView::GotFocus() { diff --git a/content/test/test_web_contents_view.h b/content/test/test_web_contents_view.h index a087f78..707b632 100644 --- a/content/test/test_web_contents_view.h +++ b/content/test/test_web_contents_view.h @@ -26,11 +26,11 @@ class TestWebContentsView : public WebContentsViewPort, bool right_aligned, bool allow_multiple_selection) OVERRIDE; virtual void StartDragging(const DropData& drop_data, - WebKit::WebDragOperationsMask allowed_ops, + blink::WebDragOperationsMask allowed_ops, const gfx::ImageSkia& image, const gfx::Vector2d& image_offset, const DragEventSourceInfo& event_info) OVERRIDE; - virtual void UpdateDragCursor(WebKit::WebDragOperation operation) OVERRIDE; + virtual void UpdateDragCursor(blink::WebDragOperation operation) OVERRIDE; virtual void GotFocus() OVERRIDE; virtual void TakeFocus(bool reverse) OVERRIDE; diff --git a/content/test/test_webkit_platform_support.cc b/content/test/test_webkit_platform_support.cc index 4c9bf77..bc93658 100644 --- a/content/test/test_webkit_platform_support.cc +++ b/content/test/test_webkit_platform_support.cc @@ -43,7 +43,7 @@ #include "base/mac/mac_util.h" #endif -using WebKit::WebScriptController; +using blink::WebScriptController; using webkit::WebLayerTreeViewImplForTesting; namespace content { @@ -53,21 +53,21 @@ TestWebKitPlatformSupport::TestWebKitPlatformSupport() { mock_clipboard_.reset(new MockWebClipboardImpl()); v8::V8::SetCounterFunction(base::StatsTable::FindLocation); - WebKit::initialize(this); - WebKit::setLayoutTestMode(true); - WebKit::WebSecurityPolicy::registerURLSchemeAsLocal( - WebKit::WebString::fromUTF8("test-shell-resource")); - WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( - WebKit::WebString::fromUTF8("test-shell-resource")); - WebKit::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated( - WebKit::WebString::fromUTF8("test-shell-resource")); - WebKit::WebSecurityPolicy::registerURLSchemeAsEmptyDocument( - WebKit::WebString::fromUTF8("test-shell-resource")); + blink::initialize(this); + blink::setLayoutTestMode(true); + blink::WebSecurityPolicy::registerURLSchemeAsLocal( + blink::WebString::fromUTF8("test-shell-resource")); + blink::WebSecurityPolicy::registerURLSchemeAsNoAccess( + blink::WebString::fromUTF8("test-shell-resource")); + blink::WebSecurityPolicy::registerURLSchemeAsDisplayIsolated( + blink::WebString::fromUTF8("test-shell-resource")); + blink::WebSecurityPolicy::registerURLSchemeAsEmptyDocument( + blink::WebString::fromUTF8("test-shell-resource")); WebScriptController::enableV8SingleThreadMode(); - WebKit::WebRuntimeFeatures::enableApplicationCache(true); - WebKit::WebRuntimeFeatures::enableDatabase(true); - WebKit::WebRuntimeFeatures::enableNotifications(true); - WebKit::WebRuntimeFeatures::enableTouch(true); + blink::WebRuntimeFeatures::enableApplicationCache(true); + blink::WebRuntimeFeatures::enableDatabase(true); + blink::WebRuntimeFeatures::enableNotifications(true); + blink::WebRuntimeFeatures::enableTouch(true); // Load libraries for media and enable the media player. bool enable_media = false; @@ -80,12 +80,12 @@ TestWebKitPlatformSupport::TestWebKitPlatformSupport() { if (media::InitializeMediaLibrary(module_path)) enable_media = true; } - WebKit::WebRuntimeFeatures::enableMediaPlayer(enable_media); + blink::WebRuntimeFeatures::enableMediaPlayer(enable_media); LOG_IF(WARNING, !enable_media) << "Failed to initialize the media library.\n"; // TODO(joth): Make a dummy geolocation service implemenation for // test_shell, and set this to true. http://crbug.com/36451 - WebKit::WebRuntimeFeatures::enableGeolocation(false); + blink::WebRuntimeFeatures::enableGeolocation(false); file_utilities_.set_sandbox_enabled(false); @@ -109,35 +109,35 @@ TestWebKitPlatformSupport::TestWebKitPlatformSupport() { TestWebKitPlatformSupport::~TestWebKitPlatformSupport() { url_loader_factory_.reset(); mock_clipboard_.reset(); - WebKit::shutdown(); + blink::shutdown(); } -WebKit::WebMimeRegistry* TestWebKitPlatformSupport::mimeRegistry() { +blink::WebMimeRegistry* TestWebKitPlatformSupport::mimeRegistry() { return &mime_registry_; } -WebKit::WebClipboard* TestWebKitPlatformSupport::clipboard() { +blink::WebClipboard* TestWebKitPlatformSupport::clipboard() { // Mock out clipboard calls so that tests don't mess // with each other's copies/pastes when running in parallel. return mock_clipboard_.get(); } -WebKit::WebFileUtilities* TestWebKitPlatformSupport::fileUtilities() { +blink::WebFileUtilities* TestWebKitPlatformSupport::fileUtilities() { return &file_utilities_; } -WebKit::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { +blink::WebIDBFactory* TestWebKitPlatformSupport::idbFactory() { NOTREACHED() << "IndexedDB cannot be tested with in-process harnesses."; return NULL; } -WebKit::WebURLLoader* TestWebKitPlatformSupport::createURLLoader() { +blink::WebURLLoader* TestWebKitPlatformSupport::createURLLoader() { return url_loader_factory_->CreateURLLoader( webkit_glue::WebKitPlatformSupportImpl::createURLLoader()); } -WebKit::WebData TestWebKitPlatformSupport::loadResource(const char* name) { +blink::WebData TestWebKitPlatformSupport::loadResource(const char* name) { if (!strcmp(name, "deleteButton")) { // Create a red 30x30 square. const char red_square[] = @@ -152,75 +152,75 @@ WebKit::WebData TestWebKitPlatformSupport::loadResource(const char* name) { "\x18\x50\xb9\x33\x47\xf9\xa8\x01\x32\xd4\xc2\x03\x00\x33\x84\x0d" "\x02\x3a\x91\xeb\xa5\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60" "\x82"; - return WebKit::WebData(red_square, arraysize(red_square)); + return blink::WebData(red_square, arraysize(red_square)); } return webkit_glue::WebKitPlatformSupportImpl::loadResource(name); } -WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( - WebKit::WebLocalizedString::Name name) { +blink::WebString TestWebKitPlatformSupport::queryLocalizedString( + blink::WebLocalizedString::Name name) { // Returns placeholder strings to check if they are correctly localized. switch (name) { - case WebKit::WebLocalizedString::OtherDateLabel: + case blink::WebLocalizedString::OtherDateLabel: return ASCIIToUTF16("<<OtherDateLabel>>"); - case WebKit::WebLocalizedString::OtherMonthLabel: + case blink::WebLocalizedString::OtherMonthLabel: return ASCIIToUTF16("<<OtherMonthLabel>>"); - case WebKit::WebLocalizedString::OtherTimeLabel: + case blink::WebLocalizedString::OtherTimeLabel: return ASCIIToUTF16("<<OtherTimeLabel>>"); - case WebKit::WebLocalizedString::OtherWeekLabel: + case blink::WebLocalizedString::OtherWeekLabel: return ASCIIToUTF16("<<OtherWeekLabel>>"); - case WebKit::WebLocalizedString::CalendarClear: + case blink::WebLocalizedString::CalendarClear: return ASCIIToUTF16("<<CalendarClear>>"); - case WebKit::WebLocalizedString::CalendarToday: + case blink::WebLocalizedString::CalendarToday: return ASCIIToUTF16("<<CalendarToday>>"); - case WebKit::WebLocalizedString::ThisMonthButtonLabel: + case blink::WebLocalizedString::ThisMonthButtonLabel: return ASCIIToUTF16("<<ThisMonthLabel>>"); - case WebKit::WebLocalizedString::ThisWeekButtonLabel: + case blink::WebLocalizedString::ThisWeekButtonLabel: return ASCIIToUTF16("<<ThisWeekLabel>>"); - case WebKit::WebLocalizedString::WeekFormatTemplate: + case blink::WebLocalizedString::WeekFormatTemplate: return ASCIIToUTF16("Week $2, $1"); default: return WebKitPlatformSupportImpl::queryLocalizedString(name); } } -WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( - WebKit::WebLocalizedString::Name name, - const WebKit::WebString& value) { - if (name == WebKit::WebLocalizedString::ValidationRangeUnderflow) +blink::WebString TestWebKitPlatformSupport::queryLocalizedString( + blink::WebLocalizedString::Name name, + const blink::WebString& value) { + if (name == blink::WebLocalizedString::ValidationRangeUnderflow) return ASCIIToUTF16("range underflow"); - if (name == WebKit::WebLocalizedString::ValidationRangeOverflow) + if (name == blink::WebLocalizedString::ValidationRangeOverflow) return ASCIIToUTF16("range overflow"); return WebKitPlatformSupportImpl::queryLocalizedString(name, value); } -WebKit::WebString TestWebKitPlatformSupport::queryLocalizedString( - WebKit::WebLocalizedString::Name name, - const WebKit::WebString& value1, - const WebKit::WebString& value2) { - if (name == WebKit::WebLocalizedString::ValidationTooLong) +blink::WebString TestWebKitPlatformSupport::queryLocalizedString( + blink::WebLocalizedString::Name name, + const blink::WebString& value1, + const blink::WebString& value2) { + if (name == blink::WebLocalizedString::ValidationTooLong) return ASCIIToUTF16("too long"); - if (name == WebKit::WebLocalizedString::ValidationStepMismatch) + if (name == blink::WebLocalizedString::ValidationStepMismatch) return ASCIIToUTF16("step mismatch"); return WebKitPlatformSupportImpl::queryLocalizedString(name, value1, value2); } -WebKit::WebString TestWebKitPlatformSupport::defaultLocale() { +blink::WebString TestWebKitPlatformSupport::defaultLocale() { return ASCIIToUTF16("en-US"); } #if defined(OS_WIN) || defined(OS_MACOSX) -void TestWebKitPlatformSupport::SetThemeEngine(WebKit::WebThemeEngine* engine) { +void TestWebKitPlatformSupport::SetThemeEngine(blink::WebThemeEngine* engine) { active_theme_engine_ = engine ? engine : WebKitPlatformSupportChildImpl::themeEngine(); } -WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { +blink::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { return active_theme_engine_; } #endif -WebKit::WebCompositorSupport* TestWebKitPlatformSupport::compositorSupport() { +blink::WebCompositorSupport* TestWebKitPlatformSupport::compositorSupport() { return &compositor_support_; } @@ -243,39 +243,39 @@ TestWebKitPlatformSupport::CreateResourceLoader( webkit_glue::WebSocketStreamHandleBridge* TestWebKitPlatformSupport::CreateWebSocketStreamBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate) { NOTREACHED(); return NULL; } -WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( +blink::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( int device_source, - const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll) { + const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll) { // Caller will retain and release. return new WebGestureCurveMock(velocity, cumulative_scroll); } -WebKit::WebUnitTestSupport* TestWebKitPlatformSupport::unitTestSupport() { +blink::WebUnitTestSupport* TestWebKitPlatformSupport::unitTestSupport() { return this; } void TestWebKitPlatformSupport::registerMockedURL( - const WebKit::WebURL& url, - const WebKit::WebURLResponse& response, - const WebKit::WebString& file_path) { + const blink::WebURL& url, + const blink::WebURLResponse& response, + const blink::WebString& file_path) { url_loader_factory_->RegisterURL(url, response, file_path); } void TestWebKitPlatformSupport::registerMockedErrorURL( - const WebKit::WebURL& url, - const WebKit::WebURLResponse& response, - const WebKit::WebURLError& error) { + const blink::WebURL& url, + const blink::WebURLResponse& response, + const blink::WebURLError& error) { url_loader_factory_->RegisterErrorURL(url, response, error); } -void TestWebKitPlatformSupport::unregisterMockedURL(const WebKit::WebURL& url) { +void TestWebKitPlatformSupport::unregisterMockedURL(const blink::WebURL& url) { url_loader_factory_->UnregisterURL(url); } @@ -287,7 +287,7 @@ void TestWebKitPlatformSupport::serveAsynchronousMockedRequests() { url_loader_factory_->ServeAsynchronousRequests(); } -WebKit::WebString TestWebKitPlatformSupport::webKitRootDir() { +blink::WebString TestWebKitPlatformSupport::webKitRootDir() { base::FilePath path; PathService::Get(base::DIR_SOURCE_ROOT, &path); path = path.Append(FILE_PATH_LITERAL("third_party/WebKit")); @@ -295,10 +295,10 @@ WebKit::WebString TestWebKitPlatformSupport::webKitRootDir() { CHECK(!path.empty()); std::string path_ascii = path.MaybeAsASCII(); CHECK(!path_ascii.empty()); - return WebKit::WebString::fromUTF8(path_ascii.c_str()); + return blink::WebString::fromUTF8(path_ascii.c_str()); } -WebKit::WebLayerTreeView* +blink::WebLayerTreeView* TestWebKitPlatformSupport::createLayerTreeViewForTesting() { scoped_ptr<WebLayerTreeViewImplForTesting> view( new WebLayerTreeViewImplForTesting()); @@ -308,20 +308,20 @@ TestWebKitPlatformSupport::createLayerTreeViewForTesting() { return view.release(); } -WebKit::WebLayerTreeView* +blink::WebLayerTreeView* TestWebKitPlatformSupport::createLayerTreeViewForTesting(TestViewType type) { DCHECK_EQ(TestViewTypeUnitTest, type); return createLayerTreeViewForTesting(); } -WebKit::WebData TestWebKitPlatformSupport::readFromFile( - const WebKit::WebString& path) { +blink::WebData TestWebKitPlatformSupport::readFromFile( + const blink::WebString& path) { base::FilePath file_path = base::FilePath::FromUTF16Unsafe(path); std::string buffer; base::ReadFileToString(file_path, &buffer); - return WebKit::WebData(buffer.data(), buffer.size()); + return blink::WebData(buffer.data(), buffer.size()); } } // namespace content diff --git a/content/test/test_webkit_platform_support.h b/content/test/test_webkit_platform_support.h index 6c01f84..71b0300 100644 --- a/content/test/test_webkit_platform_support.h +++ b/content/test/test_webkit_platform_support.h @@ -15,7 +15,7 @@ #include "webkit/glue/webfileutilities_impl.h" #include "webkit/renderer/compositor_bindings/web_compositor_support_impl.h" -namespace WebKit { +namespace blink { class WebLayerTreeView; } @@ -23,36 +23,36 @@ namespace content { // An implementation of WebKitPlatformSupport for tests. class TestWebKitPlatformSupport - : public WebKit::WebUnitTestSupport, + : public blink::WebUnitTestSupport, public webkit_glue::WebKitPlatformSupportChildImpl { public: TestWebKitPlatformSupport(); virtual ~TestWebKitPlatformSupport(); - virtual WebKit::WebMimeRegistry* mimeRegistry(); - virtual WebKit::WebClipboard* clipboard(); - virtual WebKit::WebFileUtilities* fileUtilities(); - virtual WebKit::WebIDBFactory* idbFactory(); - - virtual WebKit::WebURLLoader* createURLLoader(); - virtual WebKit::WebData loadResource(const char* name); - virtual WebKit::WebString queryLocalizedString( - WebKit::WebLocalizedString::Name name); - virtual WebKit::WebString queryLocalizedString( - WebKit::WebLocalizedString::Name name, - const WebKit::WebString& value); - virtual WebKit::WebString queryLocalizedString( - WebKit::WebLocalizedString::Name name, - const WebKit::WebString& value1, - const WebKit::WebString& value2); - virtual WebKit::WebString defaultLocale(); + virtual blink::WebMimeRegistry* mimeRegistry(); + virtual blink::WebClipboard* clipboard(); + virtual blink::WebFileUtilities* fileUtilities(); + virtual blink::WebIDBFactory* idbFactory(); + + virtual blink::WebURLLoader* createURLLoader(); + virtual blink::WebData loadResource(const char* name); + virtual blink::WebString queryLocalizedString( + blink::WebLocalizedString::Name name); + virtual blink::WebString queryLocalizedString( + blink::WebLocalizedString::Name name, + const blink::WebString& value); + virtual blink::WebString queryLocalizedString( + blink::WebLocalizedString::Name name, + const blink::WebString& value1, + const blink::WebString& value2); + virtual blink::WebString defaultLocale(); #if defined(OS_WIN) || defined(OS_MACOSX) - void SetThemeEngine(WebKit::WebThemeEngine* engine); - virtual WebKit::WebThemeEngine* themeEngine(); + void SetThemeEngine(blink::WebThemeEngine* engine); + virtual blink::WebThemeEngine* themeEngine(); #endif - virtual WebKit::WebCompositorSupport* compositorSupport(); + virtual blink::WebCompositorSupport* compositorSupport(); WebURLLoaderMockFactory* url_loader_factory() { return url_loader_factory_.get(); @@ -70,31 +70,31 @@ class TestWebKitPlatformSupport const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) OVERRIDE; virtual webkit_glue::WebSocketStreamHandleBridge* CreateWebSocketStreamBridge( - WebKit::WebSocketStreamHandle* handle, + blink::WebSocketStreamHandle* handle, webkit_glue::WebSocketStreamHandleDelegate* delegate) OVERRIDE; - virtual WebKit::WebGestureCurve* createFlingAnimationCurve( + virtual blink::WebGestureCurve* createFlingAnimationCurve( int device_source, - const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll); + const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll); - virtual WebKit::WebUnitTestSupport* unitTestSupport(); + virtual blink::WebUnitTestSupport* unitTestSupport(); // WebUnitTestSupport implementation - virtual void registerMockedURL(const WebKit::WebURL& url, - const WebKit::WebURLResponse& response, - const WebKit::WebString& filePath); - virtual void registerMockedErrorURL(const WebKit::WebURL& url, - const WebKit::WebURLResponse& response, - const WebKit::WebURLError& error); - virtual void unregisterMockedURL(const WebKit::WebURL& url); + virtual void registerMockedURL(const blink::WebURL& url, + const blink::WebURLResponse& response, + const blink::WebString& filePath); + virtual void registerMockedErrorURL(const blink::WebURL& url, + const blink::WebURLResponse& response, + const blink::WebURLError& error); + virtual void unregisterMockedURL(const blink::WebURL& url); virtual void unregisterAllMockedURLs(); virtual void serveAsynchronousMockedRequests(); - virtual WebKit::WebString webKitRootDir(); - virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting(); - virtual WebKit::WebLayerTreeView* createLayerTreeViewForTesting( + virtual blink::WebString webKitRootDir(); + virtual blink::WebLayerTreeView* createLayerTreeViewForTesting(); + virtual blink::WebLayerTreeView* createLayerTreeViewForTesting( TestViewType type); - virtual WebKit::WebData readFromFile(const WebKit::WebString& path); + virtual blink::WebData readFromFile(const blink::WebString& path); private: webkit_glue::SimpleWebMimeRegistryImpl mime_registry_; @@ -105,7 +105,7 @@ class TestWebKitPlatformSupport webkit::WebCompositorSupportImpl compositor_support_; #if defined(OS_WIN) || defined(OS_MACOSX) - WebKit::WebThemeEngine* active_theme_engine_; + blink::WebThemeEngine* active_theme_engine_; #endif DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); }; diff --git a/content/test/web_gesture_curve_mock.cc b/content/test/web_gesture_curve_mock.cc index 0fd96df..f60733c 100644 --- a/content/test/web_gesture_curve_mock.cc +++ b/content/test/web_gesture_curve_mock.cc @@ -8,8 +8,8 @@ #include "third_party/WebKit/public/platform/WebFloatSize.h" #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" -WebGestureCurveMock::WebGestureCurveMock(const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll) +WebGestureCurveMock::WebGestureCurveMock(const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll) : velocity_(velocity), cumulative_scroll_(cumulative_scroll) { } @@ -18,12 +18,12 @@ WebGestureCurveMock::~WebGestureCurveMock() { } bool WebGestureCurveMock::apply(double time, - WebKit::WebGestureCurveTarget* target) { - WebKit::WebSize displacement(velocity_.x * time, velocity_.y * time); - WebKit::WebFloatSize increment(displacement.width - cumulative_scroll_.width, + blink::WebGestureCurveTarget* target) { + blink::WebSize displacement(velocity_.x * time, velocity_.y * time); + blink::WebFloatSize increment(displacement.width - cumulative_scroll_.width, displacement.height - cumulative_scroll_.height); cumulative_scroll_ = displacement; - target->notifyCurrentFlingVelocity(WebKit::WebFloatSize(velocity_.x, + target->notifyCurrentFlingVelocity(blink::WebFloatSize(velocity_.x, velocity_.y)); // scrollBy() could delete this curve if the animation is over, so don't // touch any member variables after making that call. diff --git a/content/test/web_gesture_curve_mock.h b/content/test/web_gesture_curve_mock.h index d58137f..e103c17 100644 --- a/content/test/web_gesture_curve_mock.h +++ b/content/test/web_gesture_curve_mock.h @@ -12,19 +12,19 @@ // A simple class for mocking a WebGestureCurve. The curve flings at velocity // indefinitely. -class WebGestureCurveMock : public WebKit::WebGestureCurve { +class WebGestureCurveMock : public blink::WebGestureCurve { public: - WebGestureCurveMock(const WebKit::WebFloatPoint& velocity, - const WebKit::WebSize& cumulative_scroll); + WebGestureCurveMock(const blink::WebFloatPoint& velocity, + const blink::WebSize& cumulative_scroll); virtual ~WebGestureCurveMock(); // Returns false if curve has finished and can no longer be applied. virtual bool apply(double time, - WebKit::WebGestureCurveTarget* target) OVERRIDE; + blink::WebGestureCurveTarget* target) OVERRIDE; private: - WebKit::WebFloatPoint velocity_; - WebKit::WebSize cumulative_scroll_; + blink::WebFloatPoint velocity_; + blink::WebSize cumulative_scroll_; DISALLOW_COPY_AND_ASSIGN(WebGestureCurveMock); }; diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc index 7858fd8..3bd6532 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.cc +++ b/content/test/web_layer_tree_view_impl_for_testing.cc @@ -24,11 +24,11 @@ #include "webkit/common/gpu/test_context_provider_factory.h" #include "webkit/renderer/compositor_bindings/web_layer_impl.h" -using WebKit::WebColor; -using WebKit::WebGraphicsContext3D; -using WebKit::WebRect; -using WebKit::WebRenderingStats; -using WebKit::WebSize; +using blink::WebColor; +using blink::WebGraphicsContext3D; +using blink::WebRect; +using blink::WebRenderingStats; +using blink::WebSize; namespace webkit { @@ -57,7 +57,7 @@ void WebLayerTreeViewImplForTesting::setSurfaceReady() { } void WebLayerTreeViewImplForTesting::setRootLayer( - const WebKit::WebLayer& root) { + const blink::WebLayer& root) { layer_tree_host_->SetRootLayer( static_cast<const WebLayerImpl*>(&root)->layer()); } @@ -111,7 +111,7 @@ void WebLayerTreeViewImplForTesting::setPageScaleFactorAndLimits( } void WebLayerTreeViewImplForTesting::startPageScaleAnimation( - const WebKit::WebPoint& scroll, + const blink::WebPoint& scroll, bool use_anchor, float new_page_scale, double duration_sec) {} diff --git a/content/test/web_layer_tree_view_impl_for_testing.h b/content/test/web_layer_tree_view_impl_for_testing.h index 6f0d4aa..311775605 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.h +++ b/content/test/web_layer_tree_view_impl_for_testing.h @@ -14,12 +14,12 @@ namespace cc { class LayerTreeHost; } -namespace WebKit { class WebLayer; } +namespace blink { class WebLayer; } namespace webkit { class WebLayerTreeViewImplForTesting - : public WebKit::WebLayerTreeView, + : public blink::WebLayerTreeView, public cc::LayerTreeHostClient, public cc::LayerTreeHostSingleThreadClient { public: @@ -28,23 +28,23 @@ class WebLayerTreeViewImplForTesting bool Initialize(); - // WebKit::WebLayerTreeView implementation. + // blink::WebLayerTreeView implementation. virtual void setSurfaceReady(); - virtual void setRootLayer(const WebKit::WebLayer& layer); + virtual void setRootLayer(const blink::WebLayer& layer); virtual void clearRootLayer(); - virtual void setViewportSize(const WebKit::WebSize& unused_deprecated, - const WebKit::WebSize& device_viewport_size); - virtual WebKit::WebSize layoutViewportSize() const; - virtual WebKit::WebSize deviceViewportSize() const; + virtual void setViewportSize(const blink::WebSize& unused_deprecated, + const blink::WebSize& device_viewport_size); + virtual blink::WebSize layoutViewportSize() const; + virtual blink::WebSize deviceViewportSize() const; virtual void setDeviceScaleFactor(float scale_factor); virtual float deviceScaleFactor() const; - virtual void setBackgroundColor(WebKit::WebColor); + virtual void setBackgroundColor(blink::WebColor); virtual void setHasTransparentBackground(bool transparent); virtual void setVisible(bool visible); virtual void setPageScaleFactorAndLimits(float page_scale_factor, float minimum, float maximum); - virtual void startPageScaleAnimation(const WebKit::WebPoint& destination, + virtual void startPageScaleAnimation(const blink::WebPoint& destination, bool use_anchor, float new_page_scale, double duration_sec); @@ -53,11 +53,11 @@ class WebLayerTreeViewImplForTesting virtual bool commitRequested() const; virtual void composite(); virtual void didStopFlinging(); - virtual bool compositeAndReadback(void* pixels, const WebKit::WebRect& rect); + virtual bool compositeAndReadback(void* pixels, const blink::WebRect& rect); virtual void finishAllRendering(); virtual void setDeferCommits(bool defer_commits); virtual void renderingStats( - WebKit::WebRenderingStats& stats) const; // NOLINT(runtime/references) + blink::WebRenderingStats& stats) const; // NOLINT(runtime/references) // cc::LayerTreeHostClient implementation. virtual void WillBeginMainFrame() OVERRIDE {} diff --git a/content/test/webkit_support.cc b/content/test/webkit_support.cc index 01f80de..bb234353 100644 --- a/content/test/webkit_support.cc +++ b/content/test/webkit_support.cc @@ -57,9 +57,9 @@ TestEnvironment* test_environment; } // namespace void SetUpTestEnvironmentForUnitTests() { - WebKit::WebRuntimeFeatures::enableStableFeatures(true); - WebKit::WebRuntimeFeatures::enableExperimentalFeatures(true); - WebKit::WebRuntimeFeatures::enableTestOnlyFeatures(true); + blink::WebRuntimeFeatures::enableStableFeatures(true); + blink::WebRuntimeFeatures::enableExperimentalFeatures(true); + blink::WebRuntimeFeatures::enableTestOnlyFeatures(true); #if defined(OS_ANDROID) JNIEnv* env = base::android::AttachCurrentThread(); @@ -85,7 +85,7 @@ void TearDownTestEnvironment() { base::RunLoop().RunUntilIdle(); if (RunningOnValgrind()) - WebKit::WebCache::clear(); + blink::WebCache::clear(); delete test_environment; test_environment = NULL; } diff --git a/content/test/weburl_loader_mock.cc b/content/test/weburl_loader_mock.cc index 4eb37be53..5503053 100644 --- a/content/test/weburl_loader_mock.cc +++ b/content/test/weburl_loader_mock.cc @@ -11,7 +11,7 @@ #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" WebURLLoaderMock::WebURLLoaderMock(WebURLLoaderMockFactory* factory, - WebKit::WebURLLoader* default_loader) + blink::WebURLLoader* default_loader) : factory_(factory), client_(NULL), default_loader_(default_loader), @@ -23,9 +23,9 @@ WebURLLoaderMock::~WebURLLoaderMock() { } void WebURLLoaderMock::ServeAsynchronousRequest( - const WebKit::WebURLResponse& response, - const WebKit::WebData& data, - const WebKit::WebURLError& error) { + const blink::WebURLResponse& response, + const blink::WebData& data, + const blink::WebURLError& error) { DCHECK(!using_default_loader_); if (!client_) return; @@ -40,9 +40,9 @@ void WebURLLoaderMock::ServeAsynchronousRequest( client_->didFinishLoading(this, 0); } -WebKit::WebURLRequest WebURLLoaderMock::ServeRedirect( - const WebKit::WebURLResponse& redirectResponse) { - WebKit::WebURLRequest newRequest; +blink::WebURLRequest WebURLLoaderMock::ServeRedirect( + const blink::WebURLResponse& redirectResponse) { + blink::WebURLRequest newRequest; newRequest.initialize(); GURL redirectURL(redirectResponse.httpHeaderField("Location")); newRequest.setURL(redirectURL); @@ -50,10 +50,10 @@ WebKit::WebURLRequest WebURLLoaderMock::ServeRedirect( return newRequest; } -void WebURLLoaderMock::loadSynchronously(const WebKit::WebURLRequest& request, - WebKit::WebURLResponse& response, - WebKit::WebURLError& error, - WebKit::WebData& data) { +void WebURLLoaderMock::loadSynchronously(const blink::WebURLRequest& request, + blink::WebURLResponse& response, + blink::WebURLError& error, + blink::WebData& data) { if (factory_->IsMockedURL(request.url())) { factory_->LoadSynchronously(request, &response, &error, &data); return; @@ -65,8 +65,8 @@ void WebURLLoaderMock::loadSynchronously(const WebKit::WebURLRequest& request, default_loader_->loadSynchronously(request, response, error, data); } -void WebURLLoaderMock::loadAsynchronously(const WebKit::WebURLRequest& request, - WebKit::WebURLLoaderClient* client) { +void WebURLLoaderMock::loadAsynchronously(const blink::WebURLRequest& request, + blink::WebURLLoaderClient* client) { if (factory_->IsMockedURL(request.url())) { client_ = client; factory_->LoadAsynchronouly(request, this); diff --git a/content/test/weburl_loader_mock.h b/content/test/weburl_loader_mock.h index 6a77fd9..ba2c078 100644 --- a/content/test/weburl_loader_mock.h +++ b/content/test/weburl_loader_mock.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "third_party/WebKit/public/platform/WebURLLoader.h" -namespace WebKit { +namespace blink { class WebData; struct WebURLError; class WebURLLoaderClient; @@ -23,29 +23,29 @@ class WebURLLoaderMockFactory; // If the WebURLLoaderMockFactory it is associated with has been configured to // mock the request it gets, it serves the mocked resource. Otherwise it just // forwards it to the default loader. -class WebURLLoaderMock : public WebKit::WebURLLoader { +class WebURLLoaderMock : public blink::WebURLLoader { public: // This object becomes the owner of |default_loader|. WebURLLoaderMock(WebURLLoaderMockFactory* factory, - WebKit::WebURLLoader* default_loader); + blink::WebURLLoader* default_loader); virtual ~WebURLLoaderMock(); // Simulates the asynchronous request being served. - void ServeAsynchronousRequest(const WebKit::WebURLResponse& response, - const WebKit::WebData& data, - const WebKit::WebURLError& error); + void ServeAsynchronousRequest(const blink::WebURLResponse& response, + const blink::WebData& data, + const blink::WebURLError& error); // Simulates the redirect being served. - WebKit::WebURLRequest ServeRedirect( - const WebKit::WebURLResponse& redirectResponse); + blink::WebURLRequest ServeRedirect( + const blink::WebURLResponse& redirectResponse); // WebURLLoader methods: - virtual void loadSynchronously(const WebKit::WebURLRequest& request, - WebKit::WebURLResponse& response, - WebKit::WebURLError& error, - WebKit::WebData& data); - virtual void loadAsynchronously(const WebKit::WebURLRequest& request, - WebKit::WebURLLoaderClient* client); + virtual void loadSynchronously(const blink::WebURLRequest& request, + blink::WebURLResponse& response, + blink::WebURLError& error, + blink::WebData& data); + virtual void loadAsynchronously(const blink::WebURLRequest& request, + blink::WebURLLoaderClient* client); virtual void cancel(); virtual void setDefersLoading(bool defer); @@ -53,8 +53,8 @@ class WebURLLoaderMock : public WebKit::WebURLLoader { private: WebURLLoaderMockFactory* factory_; - WebKit::WebURLLoaderClient* client_; - scoped_ptr<WebKit::WebURLLoader> default_loader_; + blink::WebURLLoaderClient* client_; + scoped_ptr<blink::WebURLLoader> default_loader_; bool using_default_loader_; bool is_deferred_; diff --git a/content/test/weburl_loader_mock_factory.cc b/content/test/weburl_loader_mock_factory.cc index 0b386e1..2c91e6f 100644 --- a/content/test/weburl_loader_mock_factory.cc +++ b/content/test/weburl_loader_mock_factory.cc @@ -15,14 +15,14 @@ #include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/web/WebCache.h" -using WebKit::WebCache; -using WebKit::WebData; -using WebKit::WebString; -using WebKit::WebURL; -using WebKit::WebURLError; -using WebKit::WebURLLoader; -using WebKit::WebURLRequest; -using WebKit::WebURLResponse; +using blink::WebCache; +using blink::WebData; +using blink::WebString; +using blink::WebURL; +using blink::WebURLError; +using blink::WebURLLoader; +using blink::WebURLRequest; +using blink::WebURLResponse; WebURLLoaderMockFactory::WebURLLoaderMockFactory() {} @@ -60,7 +60,7 @@ void WebURLLoaderMockFactory::RegisterErrorURL(const WebURL& url, url_to_error_info_[url] = error; } -void WebURLLoaderMockFactory::UnregisterURL(const WebKit::WebURL& url) { +void WebURLLoaderMockFactory::UnregisterURL(const blink::WebURL& url) { URLToResponseMap::iterator iter = url_to_reponse_info_.find(url); DCHECK(iter != url_to_reponse_info_.end()); url_to_reponse_info_.erase(iter); @@ -107,12 +107,12 @@ void WebURLLoaderMockFactory::ServeAsynchronousRequests() { base::RunLoop().RunUntilIdle(); } -WebKit::WebURLRequest +blink::WebURLRequest WebURLLoaderMockFactory::GetLastHandledAsynchronousRequest() { return last_handled_asynchronous_request_; } -bool WebURLLoaderMockFactory::IsMockedURL(const WebKit::WebURL& url) { +bool WebURLLoaderMockFactory::IsMockedURL(const blink::WebURL& url) { return url_to_reponse_info_.find(url) != url_to_reponse_info_.end(); } diff --git a/content/test/weburl_loader_mock_factory.h b/content/test/weburl_loader_mock_factory.h index 50d126d..a51987bc 100644 --- a/content/test/weburl_loader_mock_factory.h +++ b/content/test/weburl_loader_mock_factory.h @@ -13,7 +13,7 @@ #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" -namespace WebKit { +namespace blink { class WebData; class WebURLLoader; } @@ -34,22 +34,22 @@ class WebURLLoaderMockFactory { // Called by TestWebKitPlatformSupport to create a WebURLLoader. // Non-mocked request are forwarded to |default_loader| which should not be // NULL. - virtual WebKit::WebURLLoader* CreateURLLoader( - WebKit::WebURLLoader* default_loader); + virtual blink::WebURLLoader* CreateURLLoader( + blink::WebURLLoader* default_loader); // Registers a response and the contents to be served when the specified URL // is loaded. - void RegisterURL(const WebKit::WebURL& url, - const WebKit::WebURLResponse& response, - const WebKit::WebString& filePath); + void RegisterURL(const blink::WebURL& url, + const blink::WebURLResponse& response, + const blink::WebString& filePath); // Registers an error to be served when the specified URL is requested. - void RegisterErrorURL(const WebKit::WebURL& url, - const WebKit::WebURLResponse& response, - const WebKit::WebURLError& error); + void RegisterErrorURL(const blink::WebURL& url, + const blink::WebURLResponse& response, + const blink::WebURLError& error); // Unregisters |url| so it will no longer be mocked. - void UnregisterURL(const WebKit::WebURL& url); + void UnregisterURL(const blink::WebURL& url); // Unregister all URLs so no URL will be mocked anymore. void UnregisterAllURLs(); @@ -58,17 +58,17 @@ class WebURLLoaderMockFactory { void ServeAsynchronousRequests(); // Returns the last request handled by |ServeAsynchronousRequests()|. - WebKit::WebURLRequest GetLastHandledAsynchronousRequest(); + blink::WebURLRequest GetLastHandledAsynchronousRequest(); // Returns true if |url| was registered for being mocked. - bool IsMockedURL(const WebKit::WebURL& url); + bool IsMockedURL(const blink::WebURL& url); // Called by the loader to load a resource. - void LoadSynchronously(const WebKit::WebURLRequest& request, - WebKit::WebURLResponse* response, - WebKit::WebURLError* error, - WebKit::WebData* data); - void LoadAsynchronouly(const WebKit::WebURLRequest& request, + void LoadSynchronously(const blink::WebURLRequest& request, + blink::WebURLResponse* response, + blink::WebURLError* error, + blink::WebData* data); + void LoadAsynchronouly(const blink::WebURLRequest& request, WebURLLoaderMock* loader); // Removes the loader from the list of pending loaders. @@ -76,37 +76,37 @@ class WebURLLoaderMockFactory { private: struct ResponseInfo { - WebKit::WebURLResponse response; + blink::WebURLResponse response; base::FilePath file_path; }; // Loads the specified request and populates the response, error and data // accordingly. - void LoadRequest(const WebKit::WebURLRequest& request, - WebKit::WebURLResponse* response, - WebKit::WebURLError* error, - WebKit::WebData* data); + void LoadRequest(const blink::WebURLRequest& request, + blink::WebURLResponse* response, + blink::WebURLError* error, + blink::WebData* data); // Checks if the loader is pending. Otherwise, it may have been deleted. bool IsPending(WebURLLoaderMock* loader); // Reads |m_filePath| and puts its content in |data|. // Returns true if it successfully read the file. - static bool ReadFile(const base::FilePath& file_path, WebKit::WebData* data); + static bool ReadFile(const base::FilePath& file_path, blink::WebData* data); // The loaders that have not being served data yet. - typedef std::map<WebURLLoaderMock*, WebKit::WebURLRequest> LoaderToRequestMap; + typedef std::map<WebURLLoaderMock*, blink::WebURLRequest> LoaderToRequestMap; LoaderToRequestMap pending_loaders_; - typedef std::map<GURL, WebKit::WebURLError> URLToErrorMap; + typedef std::map<GURL, blink::WebURLError> URLToErrorMap; URLToErrorMap url_to_error_info_; // Table of the registered URLs and the responses that they should receive. typedef std::map<GURL, ResponseInfo> URLToResponseMap; URLToResponseMap url_to_reponse_info_; - WebKit::WebURLRequest last_handled_asynchronous_request_; + blink::WebURLRequest last_handled_asynchronous_request_; DISALLOW_COPY_AND_ASSIGN(WebURLLoaderMockFactory); }; diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc index ed7fbfe..6151de6 100644 --- a/content/utility/utility_thread_impl.cc +++ b/content/utility/utility_thread_impl.cc @@ -49,7 +49,7 @@ void UtilityThreadImpl::Shutdown() { ChildThread::Shutdown(); if (!single_process_) - WebKit::shutdown(); + blink::shutdown(); } bool UtilityThreadImpl::Send(IPC::Message* msg) { @@ -92,7 +92,7 @@ void UtilityThreadImpl::Init() { // needs WebKit initialized in the utility process, they need to have // another path to support single process mode. webkit_platform_support_.reset(new WebKitPlatformSupportImpl); - WebKit::initialize(webkit_platform_support_.get()); + blink::initialize(webkit_platform_support_.get()); } GetContentClient()->utility()->UtilityThreadStarted(); } diff --git a/content/worker/shared_worker_devtools_agent.cc b/content/worker/shared_worker_devtools_agent.cc index 9de9643..733dae1 100644 --- a/content/worker/shared_worker_devtools_agent.cc +++ b/content/worker/shared_worker_devtools_agent.cc @@ -10,8 +10,8 @@ #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/web/WebSharedWorker.h" -using WebKit::WebSharedWorker; -using WebKit::WebString; +using blink::WebSharedWorker; +using blink::WebString; namespace content { @@ -44,14 +44,14 @@ bool SharedWorkerDevToolsAgent::OnMessageReceived(const IPC::Message& message) { } void SharedWorkerDevToolsAgent::SendDevToolsMessage( - const WebKit::WebString& message) { + const blink::WebString& message) { Send(new DevToolsClientMsg_DispatchOnInspectorFrontend( route_id_, message.utf8())); } void SharedWorkerDevToolsAgent::SaveDevToolsAgentState( - const WebKit::WebString& state) { + const blink::WebString& state) { Send(new DevToolsHostMsg_SaveAgentRuntimeState(route_id_, state.utf8())); } diff --git a/content/worker/shared_worker_devtools_agent.h b/content/worker/shared_worker_devtools_agent.h index ad6bc7d..bfe0fef 100644 --- a/content/worker/shared_worker_devtools_agent.h +++ b/content/worker/shared_worker_devtools_agent.h @@ -13,7 +13,7 @@ namespace IPC { class Message; } -namespace WebKit { +namespace blink { class WebSharedWorker; class WebString; } @@ -22,13 +22,13 @@ namespace content { class SharedWorkerDevToolsAgent { public: - SharedWorkerDevToolsAgent(int route_id, WebKit::WebSharedWorker*); + SharedWorkerDevToolsAgent(int route_id, blink::WebSharedWorker*); ~SharedWorkerDevToolsAgent(); // Called on the Worker thread. bool OnMessageReceived(const IPC::Message& message); - void SendDevToolsMessage(const WebKit::WebString&); - void SaveDevToolsAgentState(const WebKit::WebString& state); + void SendDevToolsMessage(const blink::WebString&); + void SaveDevToolsAgentState(const blink::WebString& state); private: void OnAttach(); @@ -40,7 +40,7 @@ class SharedWorkerDevToolsAgent { bool Send(IPC::Message* message); const int route_id_; - WebKit::WebSharedWorker* webworker_; + blink::WebSharedWorker* webworker_; DISALLOW_COPY_AND_ASSIGN(SharedWorkerDevToolsAgent); }; diff --git a/content/worker/shared_worker_permission_client_proxy.cc b/content/worker/shared_worker_permission_client_proxy.cc index eb5c1d5..eb187c2 100644 --- a/content/worker/shared_worker_permission_client_proxy.cc +++ b/content/worker/shared_worker_permission_client_proxy.cc @@ -26,8 +26,8 @@ SharedWorkerPermissionClientProxy::~SharedWorkerPermissionClientProxy() { } bool SharedWorkerPermissionClientProxy::allowDatabase( - const WebKit::WebString& name, - const WebKit::WebString& display_name, + const blink::WebString& name, + const blink::WebString& display_name, unsigned long estimated_size) { if (is_unique_origin_) return false; @@ -48,7 +48,7 @@ bool SharedWorkerPermissionClientProxy::allowFileSystem() { } bool SharedWorkerPermissionClientProxy::allowIndexedDB( - const WebKit::WebString& name) { + const blink::WebString& name) { if (is_unique_origin_) return false; bool result = false; diff --git a/content/worker/shared_worker_permission_client_proxy.h b/content/worker/shared_worker_permission_client_proxy.h index bc742cd..61f58c9 100644 --- a/content/worker/shared_worker_permission_client_proxy.h +++ b/content/worker/shared_worker_permission_client_proxy.h @@ -17,7 +17,7 @@ class ThreadSafeSender; // This proxy is created on the main renderer thread then passed onto // the blink's worker thread. class SharedWorkerPermissionClientProxy - : public WebKit::WebWorkerPermissionClientProxy { + : public blink::WebWorkerPermissionClientProxy { public: SharedWorkerPermissionClientProxy( const GURL& origin_url, @@ -27,11 +27,11 @@ class SharedWorkerPermissionClientProxy virtual ~SharedWorkerPermissionClientProxy(); // WebWorkerPermissionClientProxy overrides. - virtual bool allowDatabase(const WebKit::WebString& name, - const WebKit::WebString& display_name, + virtual bool allowDatabase(const blink::WebString& name, + const blink::WebString& display_name, unsigned long estimated_size); virtual bool allowFileSystem(); - virtual bool allowIndexedDB(const WebKit::WebString& name); + virtual bool allowIndexedDB(const blink::WebString& name); private: const GURL origin_url_; diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc index 745b63c..ed65dc2 100644 --- a/content/worker/websharedworker_stub.cc +++ b/content/worker/websharedworker_stub.cc @@ -36,7 +36,7 @@ WebSharedWorkerStub::WebSharedWorkerStub( ChildProcess::current()->AddRefProcess(); // TODO(atwilson): Add support for NaCl when they support MessagePorts. - impl_ = WebKit::WebSharedWorker::create(client()); + impl_ = blink::WebSharedWorker::create(client()); worker_devtools_agent_.reset(new SharedWorkerDevToolsAgent(route_id, impl_)); client()->set_devtools_agent(worker_devtools_agent_.get()); } @@ -85,7 +85,7 @@ const GURL& WebSharedWorkerStub::url() { void WebSharedWorkerStub::OnStartWorkerContext( const GURL& url, const string16& user_agent, const string16& source_code, const string16& content_security_policy, - WebKit::WebContentSecurityPolicyType policy_type) { + blink::WebContentSecurityPolicyType policy_type) { // Ignore multiple attempts to start this worker (can happen if two pages // try to start it simultaneously). if (started_) @@ -107,7 +107,7 @@ void WebSharedWorkerStub::OnStartWorkerContext( void WebSharedWorkerStub::OnConnect(int sent_message_port_id, int routing_id) { if (started_) { - WebKit::WebMessagePortChannel* channel = + blink::WebMessagePortChannel* channel = new WebMessagePortChannelImpl(routing_id, sent_message_port_id, base::MessageLoopProxy::current().get()); diff --git a/content/worker/websharedworker_stub.h b/content/worker/websharedworker_stub.h index 8dd312d..012decd 100644 --- a/content/worker/websharedworker_stub.h +++ b/content/worker/websharedworker_stub.h @@ -12,7 +12,7 @@ #include "third_party/WebKit/public/web/WebSharedWorker.h" #include "url/gurl.h" -namespace WebKit { +namespace blink { class WebSharedWorker; } @@ -55,7 +55,7 @@ class WebSharedWorkerStub : public IPC::Listener { void OnStartWorkerContext( const GURL& url, const string16& user_agent, const string16& source_code, const string16& content_security_policy, - WebKit::WebContentSecurityPolicyType policy_type); + blink::WebContentSecurityPolicyType policy_type); void OnTerminateWorkerContext(); @@ -66,7 +66,7 @@ class WebSharedWorkerStub : public IPC::Listener { // from the worker object. WebSharedWorkerClientProxy client_; - WebKit::WebSharedWorker* impl_; + blink::WebSharedWorker* impl_; string16 name_; bool started_; GURL url_; diff --git a/content/worker/websharedworkerclient_proxy.cc b/content/worker/websharedworkerclient_proxy.cc index 769b201..1e8c92f 100644 --- a/content/worker/websharedworkerclient_proxy.cc +++ b/content/worker/websharedworkerclient_proxy.cc @@ -22,14 +22,14 @@ #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebSecurityOrigin.h" -using WebKit::WebApplicationCacheHost; -using WebKit::WebFrame; -using WebKit::WebMessagePortChannel; -using WebKit::WebMessagePortChannelArray; -using WebKit::WebSecurityOrigin; -using WebKit::WebString; -using WebKit::WebWorker; -using WebKit::WebSharedWorkerClient; +using blink::WebApplicationCacheHost; +using blink::WebFrame; +using blink::WebMessagePortChannel; +using blink::WebMessagePortChannelArray; +using blink::WebSecurityOrigin; +using blink::WebString; +using blink::WebWorker; +using blink::WebSharedWorkerClient; namespace content { @@ -59,7 +59,7 @@ void WebSharedWorkerClientProxy::workerContextDestroyed() { stub_->Shutdown(); } -WebKit::WebNotificationPresenter* +blink::WebNotificationPresenter* WebSharedWorkerClientProxy::notificationPresenter() { // TODO(johnnyg): Notifications are not yet hooked up to workers. // Coming soon. @@ -68,7 +68,7 @@ WebSharedWorkerClientProxy::notificationPresenter() { } WebApplicationCacheHost* WebSharedWorkerClientProxy::createApplicationCacheHost( - WebKit::WebApplicationCacheHostClient* client) { + blink::WebApplicationCacheHostClient* client) { WorkerWebApplicationCacheHostImpl* host = new WorkerWebApplicationCacheHostImpl(stub_->appcache_init_info(), client); @@ -78,9 +78,9 @@ WebApplicationCacheHost* WebSharedWorkerClientProxy::createApplicationCacheHost( return host; } -WebKit::WebWorkerPermissionClientProxy* +blink::WebWorkerPermissionClientProxy* WebSharedWorkerClientProxy::createWorkerPermissionClientProxy( - const WebKit::WebSecurityOrigin& origin) { + const blink::WebSecurityOrigin& origin) { return new SharedWorkerPermissionClientProxy( GURL(origin.toString()), origin.isUnique(), route_id_, ChildThread::current()->thread_safe_sender()); @@ -98,7 +98,7 @@ bool WebSharedWorkerClientProxy::allowFileSystem() { return false; } -bool WebSharedWorkerClientProxy::allowIndexedDB(const WebKit::WebString& name) { +bool WebSharedWorkerClientProxy::allowIndexedDB(const blink::WebString& name) { return false; } @@ -109,7 +109,7 @@ void WebSharedWorkerClientProxy::dispatchDevToolsMessage( } void WebSharedWorkerClientProxy::saveDevToolsAgentState( - const WebKit::WebString& state) { + const blink::WebString& state) { if (devtools_agent_) devtools_agent_->SaveDevToolsAgentState(state); } diff --git a/content/worker/websharedworkerclient_proxy.h b/content/worker/websharedworkerclient_proxy.h index bb51323..636e73f 100644 --- a/content/worker/websharedworkerclient_proxy.h +++ b/content/worker/websharedworkerclient_proxy.h @@ -10,7 +10,7 @@ #include "ipc/ipc_channel.h" #include "third_party/WebKit/public/web/WebSharedWorkerClient.h" -namespace WebKit { +namespace blink { class WebApplicationCacheHost; class WebApplicationCacheHostClient; class WebFrame; @@ -27,7 +27,7 @@ class WebSharedWorkerStub; // is also called by the worker code and converts these function calls into // IPCs that are sent to the renderer, where they're converted back to function // calls by WebWorkerProxy. -class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient { +class WebSharedWorkerClientProxy : public blink::WebSharedWorkerClient { public: WebSharedWorkerClientProxy(int route_id, WebSharedWorkerStub* stub); virtual ~WebSharedWorkerClientProxy(); @@ -36,24 +36,24 @@ class WebSharedWorkerClientProxy : public WebKit::WebSharedWorkerClient { virtual void workerContextClosed(); virtual void workerContextDestroyed(); - virtual WebKit::WebNotificationPresenter* notificationPresenter(); + virtual blink::WebNotificationPresenter* notificationPresenter(); - virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost( - WebKit::WebApplicationCacheHostClient* client); - virtual WebKit::WebWorkerPermissionClientProxy* + virtual blink::WebApplicationCacheHost* createApplicationCacheHost( + blink::WebApplicationCacheHostClient* client); + virtual blink::WebWorkerPermissionClientProxy* createWorkerPermissionClientProxy( - const WebKit::WebSecurityOrigin& origin); + const blink::WebSecurityOrigin& origin); // TODO(kinuko): Deprecate these methods. - virtual bool allowDatabase(WebKit::WebFrame* frame, - const WebKit::WebString& name, - const WebKit::WebString& display_name, + virtual bool allowDatabase(blink::WebFrame* frame, + const blink::WebString& name, + const blink::WebString& display_name, unsigned long estimated_size); virtual bool allowFileSystem(); - virtual bool allowIndexedDB(const WebKit::WebString&); + virtual bool allowIndexedDB(const blink::WebString&); - virtual void dispatchDevToolsMessage(const WebKit::WebString&); - virtual void saveDevToolsAgentState(const WebKit::WebString&); + virtual void dispatchDevToolsMessage(const blink::WebString&); + virtual void saveDevToolsAgentState(const blink::WebString&); void EnsureWorkerContextTerminates(); diff --git a/content/worker/worker_thread.cc b/content/worker/worker_thread.cc index de67978..53b483a 100644 --- a/content/worker/worker_thread.cc +++ b/content/worker/worker_thread.cc @@ -25,7 +25,7 @@ #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" #include "webkit/glue/webkit_glue.h" -using WebKit::WebRuntimeFeatures; +using blink::WebRuntimeFeatures; namespace content { @@ -38,14 +38,14 @@ WorkerThread::WorkerThread() { thread_safe_sender(), sync_message_filter(), quota_message_filter())); - WebKit::initialize(webkit_platform_support_.get()); + blink::initialize(webkit_platform_support_.get()); appcache_dispatcher_.reset( new AppCacheDispatcher(this, new AppCacheFrontendImpl())); web_database_observer_impl_.reset( new WebDatabaseObserverImpl(sync_message_filter())); - WebKit::WebDatabase::setObserver(web_database_observer_impl_.get()); + blink::WebDatabase::setObserver(web_database_observer_impl_.get()); db_message_filter_ = new DBMessageFilter(); channel()->AddFilter(db_message_filter_.get()); @@ -77,7 +77,7 @@ void WorkerThread::Shutdown() { channel()->RemoveFilter(db_message_filter_.get()); db_message_filter_ = NULL; - WebKit::shutdown(); + blink::shutdown(); lazy_tls.Pointer()->Set(NULL); } diff --git a/content/worker/worker_webapplicationcachehost_impl.cc b/content/worker/worker_webapplicationcachehost_impl.cc index 9283906..23201c8 100644 --- a/content/worker/worker_webapplicationcachehost_impl.cc +++ b/content/worker/worker_webapplicationcachehost_impl.cc @@ -11,7 +11,7 @@ namespace content { WorkerWebApplicationCacheHostImpl::WorkerWebApplicationCacheHostImpl( const WorkerAppCacheInitInfo& init_info, - WebKit::WebApplicationCacheHostClient* client) + blink::WebApplicationCacheHostClient* client) : WebApplicationCacheHostImpl(client, WorkerThread::current()->appcache_dispatcher()->backend_proxy()) { backend()->SelectCacheForSharedWorker(host_id(), @@ -19,11 +19,11 @@ WorkerWebApplicationCacheHostImpl::WorkerWebApplicationCacheHostImpl( } void WorkerWebApplicationCacheHostImpl::willStartMainResourceRequest( - WebKit::WebURLRequest&, const WebKit::WebFrame*) { + blink::WebURLRequest&, const blink::WebFrame*) { } void WorkerWebApplicationCacheHostImpl::didReceiveResponseForMainResource( - const WebKit::WebURLResponse&) { + const blink::WebURLResponse&) { } void WorkerWebApplicationCacheHostImpl::didReceiveDataForMainResource( @@ -38,7 +38,7 @@ void WorkerWebApplicationCacheHostImpl::selectCacheWithoutManifest() { } bool WorkerWebApplicationCacheHostImpl::selectCacheWithManifest( - const WebKit::WebURL&) { + const blink::WebURL&) { return true; } diff --git a/content/worker/worker_webapplicationcachehost_impl.h b/content/worker/worker_webapplicationcachehost_impl.h index 2360cb3..6f8385c 100644 --- a/content/worker/worker_webapplicationcachehost_impl.h +++ b/content/worker/worker_webapplicationcachehost_impl.h @@ -30,15 +30,15 @@ class WorkerWebApplicationCacheHostImpl : public WebApplicationCacheHostImpl { public: WorkerWebApplicationCacheHostImpl( const WorkerAppCacheInitInfo& init_info, - WebKit::WebApplicationCacheHostClient* client); + blink::WebApplicationCacheHostClient* client); // Main resource loading is different for workers. The resource is // loaded by the creator of the worker rather than the worker itself. // These overrides are stubbed out. virtual void willStartMainResourceRequest( - WebKit::WebURLRequest&, const WebKit::WebFrame*); + blink::WebURLRequest&, const blink::WebFrame*); virtual void didReceiveResponseForMainResource( - const WebKit::WebURLResponse&); + const blink::WebURLResponse&); virtual void didReceiveDataForMainResource(const char* data, int len); virtual void didFinishLoadingMainResource(bool success); @@ -46,7 +46,7 @@ class WorkerWebApplicationCacheHostImpl : public WebApplicationCacheHostImpl { // time what cache to select and do so then. // These overrides are stubbed out. virtual void selectCacheWithoutManifest(); - virtual bool selectCacheWithManifest(const WebKit::WebURL& manifestURL); + virtual bool selectCacheWithManifest(const blink::WebURL& manifestURL); }; } // namespace content diff --git a/content/worker/worker_webkitplatformsupport_impl.cc b/content/worker/worker_webkitplatformsupport_impl.cc index f3dee36..7176a77 100644 --- a/content/worker/worker_webkitplatformsupport_impl.cc +++ b/content/worker/worker_webkitplatformsupport_impl.cc @@ -30,18 +30,18 @@ #include "webkit/glue/webfileutilities_impl.h" #include "webkit/glue/webkit_glue.h" -using WebKit::Platform; -using WebKit::WebBlobRegistry; -using WebKit::WebClipboard; -using WebKit::WebFileInfo; -using WebKit::WebFileSystem; -using WebKit::WebFileUtilities; -using WebKit::WebMessagePortChannel; -using WebKit::WebMimeRegistry; -using WebKit::WebSandboxSupport; -using WebKit::WebStorageNamespace; -using WebKit::WebString; -using WebKit::WebURL; +using blink::Platform; +using blink::WebBlobRegistry; +using blink::WebClipboard; +using blink::WebFileInfo; +using blink::WebFileSystem; +using blink::WebFileUtilities; +using blink::WebMessagePortChannel; +using blink::WebMimeRegistry; +using blink::WebSandboxSupport; +using blink::WebStorageNamespace; +using blink::WebString; +using blink::WebURL; namespace content { @@ -169,7 +169,7 @@ WorkerWebKitPlatformSupportImpl::createLocalStorageNamespace() { void WorkerWebKitPlatformSupportImpl::dispatchStorageEvent( const WebString& key, const WebString& old_value, const WebString& new_value, const WebString& origin, - const WebKit::WebURL& url, bool is_local_storage) { + const blink::WebURL& url, bool is_local_storage) { NOTREACHED(); } @@ -204,7 +204,7 @@ long long WorkerWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( sync_message_filter_.get()); } -WebKit::WebIDBFactory* WorkerWebKitPlatformSupportImpl::idbFactory() { +blink::WebIDBFactory* WorkerWebKitPlatformSupportImpl::idbFactory() { if (!web_idb_factory_) web_idb_factory_.reset( new RendererWebIDBFactoryImpl(thread_safe_sender_.get())); @@ -238,7 +238,7 @@ WorkerWebKitPlatformSupportImpl::supportsMediaMIMEType( } bool WorkerWebKitPlatformSupportImpl::supportsMediaSourceMIMEType( - const WebKit::WebString& mimeType, const WebKit::WebString& codecs) { + const blink::WebString& mimeType, const blink::WebString& codecs) { NOTREACHED(); return false; } @@ -281,9 +281,9 @@ WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { } void WorkerWebKitPlatformSupportImpl::queryStorageUsageAndQuota( - const WebKit::WebURL& storage_partition, - WebKit::WebStorageQuotaType type, - WebKit::WebStorageQuotaCallbacks* callbacks) { + const blink::WebURL& storage_partition, + blink::WebStorageQuotaType type, + blink::WebStorageQuotaCallbacks* callbacks) { if (!thread_safe_sender_.get() || !quota_message_filter_.get()) return; QuotaDispatcher::ThreadSpecificInstance( diff --git a/content/worker/worker_webkitplatformsupport_impl.h b/content/worker/worker_webkitplatformsupport_impl.h index 6b78a63..5e83b5d 100644 --- a/content/worker/worker_webkitplatformsupport_impl.h +++ b/content/worker/worker_webkitplatformsupport_impl.h @@ -18,7 +18,7 @@ namespace IPC { class SyncMessageFilter; } -namespace WebKit { +namespace blink { class WebFileUtilities; } @@ -28,7 +28,7 @@ class ThreadSafeSender; class WebFileSystemImpl; class WorkerWebKitPlatformSupportImpl : public WebKitPlatformSupportImpl, - public WebKit::WebMimeRegistry { + public blink::WebMimeRegistry { public: WorkerWebKitPlatformSupportImpl( ThreadSafeSender* sender, @@ -37,76 +37,76 @@ class WorkerWebKitPlatformSupportImpl : public WebKitPlatformSupportImpl, virtual ~WorkerWebKitPlatformSupportImpl(); // WebKitPlatformSupport methods: - virtual WebKit::WebClipboard* clipboard(); - virtual WebKit::WebMimeRegistry* mimeRegistry(); - virtual WebKit::WebFileSystem* fileSystem(); - virtual WebKit::WebFileUtilities* fileUtilities(); - virtual WebKit::WebSandboxSupport* sandboxSupport(); + virtual blink::WebClipboard* clipboard(); + virtual blink::WebMimeRegistry* mimeRegistry(); + virtual blink::WebFileSystem* fileSystem(); + virtual blink::WebFileUtilities* fileUtilities(); + virtual blink::WebSandboxSupport* sandboxSupport(); virtual bool sandboxEnabled(); virtual unsigned long long visitedLinkHash(const char* canonicalURL, size_t length); virtual bool isLinkVisited(unsigned long long linkHash); - virtual WebKit::WebMessagePortChannel* createMessagePortChannel(); - virtual void setCookies(const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies, - const WebKit::WebString& value); - virtual WebKit::WebString cookies( - const WebKit::WebURL& url, - const WebKit::WebURL& first_party_for_cookies); - virtual WebKit::WebString defaultLocale(); - virtual WebKit::WebStorageNamespace* createLocalStorageNamespace(); + virtual blink::WebMessagePortChannel* createMessagePortChannel(); + virtual void setCookies(const blink::WebURL& url, + const blink::WebURL& first_party_for_cookies, + const blink::WebString& value); + virtual blink::WebString cookies( + const blink::WebURL& url, + const blink::WebURL& first_party_for_cookies); + virtual blink::WebString defaultLocale(); + virtual blink::WebStorageNamespace* createLocalStorageNamespace(); virtual void dispatchStorageEvent( - const WebKit::WebString& key, const WebKit::WebString& old_value, - const WebKit::WebString& new_value, const WebKit::WebString& origin, - const WebKit::WebURL& url, bool is_local_storage); + const blink::WebString& key, const blink::WebString& old_value, + const blink::WebString& new_value, const blink::WebString& origin, + const blink::WebURL& url, bool is_local_storage); - virtual WebKit::Platform::FileHandle databaseOpenFile( - const WebKit::WebString& vfs_file_name, int desired_flags); - virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, + virtual blink::Platform::FileHandle databaseOpenFile( + const blink::WebString& vfs_file_name, int desired_flags); + virtual int databaseDeleteFile(const blink::WebString& vfs_file_name, bool sync_dir); virtual long databaseGetFileAttributes( - const WebKit::WebString& vfs_file_name); + const blink::WebString& vfs_file_name); virtual long long databaseGetFileSize( - const WebKit::WebString& vfs_file_name); + const blink::WebString& vfs_file_name); virtual long long databaseGetSpaceAvailableForOrigin( - const WebKit::WebString& origin_identifier); + const blink::WebString& origin_identifier); - virtual WebKit::WebBlobRegistry* blobRegistry(); + virtual blink::WebBlobRegistry* blobRegistry(); - virtual WebKit::WebIDBFactory* idbFactory(); + virtual blink::WebIDBFactory* idbFactory(); // WebMimeRegistry methods: - virtual WebKit::WebMimeRegistry::SupportsType supportsMIMEType( - const WebKit::WebString&); - virtual WebKit::WebMimeRegistry::SupportsType supportsImageMIMEType( - const WebKit::WebString&); - virtual WebKit::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( - const WebKit::WebString&); - virtual WebKit::WebMimeRegistry::SupportsType supportsMediaMIMEType( - const WebKit::WebString&, - const WebKit::WebString&, - const WebKit::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsMIMEType( + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsImageMIMEType( + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsJavaScriptMIMEType( + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsMediaMIMEType( + const blink::WebString&, + const blink::WebString&, + const blink::WebString&); virtual bool supportsMediaSourceMIMEType( - const WebKit::WebString&, - const WebKit::WebString&); - virtual WebKit::WebMimeRegistry::SupportsType supportsNonImageMIMEType( - const WebKit::WebString&); - virtual WebKit::WebString mimeTypeForExtension(const WebKit::WebString&); - virtual WebKit::WebString wellKnownMimeTypeForExtension( - const WebKit::WebString&); - virtual WebKit::WebString mimeTypeFromFile(const WebKit::WebString&); + const blink::WebString&, + const blink::WebString&); + virtual blink::WebMimeRegistry::SupportsType supportsNonImageMIMEType( + const blink::WebString&); + virtual blink::WebString mimeTypeForExtension(const blink::WebString&); + virtual blink::WebString wellKnownMimeTypeForExtension( + const blink::WebString&); + virtual blink::WebString mimeTypeFromFile(const blink::WebString&); virtual void queryStorageUsageAndQuota( - const WebKit::WebURL& storage_partition, - WebKit::WebStorageQuotaType, - WebKit::WebStorageQuotaCallbacks*) OVERRIDE; + const blink::WebURL& storage_partition, + blink::WebStorageQuotaType, + blink::WebStorageQuotaCallbacks*) OVERRIDE; private: class FileUtilities; scoped_ptr<FileUtilities> file_utilities_; - scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; + scoped_ptr<blink::WebBlobRegistry> blob_registry_; scoped_ptr<WebFileSystemImpl> web_file_system_; - scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; + scoped_ptr<blink::WebIDBFactory> web_idb_factory_; scoped_refptr<ThreadSafeSender> thread_safe_sender_; scoped_refptr<base::MessageLoopProxy> child_thread_loop_; scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; |