diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-23 18:06:36 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-23 18:06:36 +0000 |
commit | 0aed2f55c27f391d56f4d2e027578e5722d3b3bc (patch) | |
tree | 6261a825a2afb58f1b82f477d3ecd7e966a322af /chrome/browser/accessibility | |
parent | 43bf4fa977612da47f84b4f56ac7cf38256f52f5 (diff) | |
download | chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.zip chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.tar.gz chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.tar.bz2 |
Move a bunch of renderer->browser messages to content.
TBR=tsepez
Review URL: http://codereview.chromium.org/6721021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/accessibility')
4 files changed, 21 insertions, 26 deletions
diff --git a/chrome/browser/accessibility/browser_accessibility.h b/chrome/browser/accessibility/browser_accessibility.h index e75b9cb..6f42911 100644 --- a/chrome/browser/accessibility/browser_accessibility.h +++ b/chrome/browser/accessibility/browser_accessibility.h @@ -143,7 +143,7 @@ class BrowserAccessibility { return html_attributes_; } int32 index_in_parent() const { return index_in_parent_; } - WebKit::WebRect location() const { return location_; } + gfx::Rect location() const { return location_; } BrowserAccessibilityManager* manager() const { return manager_; } const string16& name() const { return name_; } int32 renderer_id() const { return renderer_id_; } @@ -208,7 +208,7 @@ class BrowserAccessibility { int32 role_; int32 state_; string16 role_name_; - WebKit::WebRect location_; + gfx::Rect location_; std::vector<int32> indirect_child_ids_; // BrowserAccessibility objects are reference-counted on some platforms. diff --git a/chrome/browser/accessibility/browser_accessibility_cocoa.mm b/chrome/browser/accessibility/browser_accessibility_cocoa.mm index 411e4c4..0df73af 100644 --- a/chrome/browser/accessibility/browser_accessibility_cocoa.mm +++ b/chrome/browser/accessibility/browser_accessibility_cocoa.mm @@ -127,8 +127,8 @@ bool GetState(BrowserAccessibility* accessibility, int state) { // This is relative to webkit's top-left origin, not Cocoa's // bottom-left origin. - (NSPoint)origin { - return NSMakePoint(browserAccessibility_->location().x, - browserAccessibility_->location().y); + return NSMakePoint(browserAccessibility_->location().x(), + browserAccessibility_->location().y()); } // Returns a string indicating the role of this object. @@ -171,8 +171,8 @@ bool GetState(BrowserAccessibility* accessibility, int state) { // Returns the size of this object. - (NSSize)size { - return NSMakeSize(browserAccessibility_->location().width, - browserAccessibility_->location().height); + return NSMakeSize(browserAccessibility_->location().width(), + browserAccessibility_->location().height()); } // Returns the accessibility value for the given attribute. If the value isn't diff --git a/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm b/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm index aea75d7..2b7cbba 100644 --- a/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm +++ b/chrome/browser/accessibility/browser_accessibility_mac_unittest.mm @@ -47,26 +47,21 @@ class BrowserAccessibilityTest : public CocoaTest { virtual void SetUp() { CocoaTest::SetUp(); WebAccessibility root; - root.location.x = 0; - root.location.y = 0; - root.location.width = 500; - root.location.height = 100; + root.location.set_width(500); + root.location.set_height(100); root.role = WebAccessibility::ROLE_WEB_AREA; root.attributes[WebAccessibility::ATTR_HELP] = ASCIIToUTF16("HelpText"); WebAccessibility child1; child1.name = ASCIIToUTF16("Child1"); - child1.location.x = 0; - child1.location.y = 0; - child1.location.width = 250; - child1.location.height = 100; + child1.location.set_width(250); + child1.location.set_height(100); child1.role = WebAccessibility::ROLE_BUTTON; WebAccessibility child2; - child2.location.x = 250; - child2.location.y = 0; - child2.location.width = 250; - child2.location.height = 100; + child2.location.set_x(250); + child2.location.set_width(250); + child2.location.set_height(100); child2.role = WebAccessibility::ROLE_HEADING; root.children.push_back(child1); diff --git a/chrome/browser/accessibility/browser_accessibility_win.cc b/chrome/browser/accessibility/browser_accessibility_win.cc index 5b17979..5f38a03 100644 --- a/chrome/browser/accessibility/browser_accessibility_win.cc +++ b/chrome/browser/accessibility/browser_accessibility_win.cc @@ -509,14 +509,14 @@ STDMETHODIMP BrowserAccessibilityWin::get_imagePosition( HWND parent_hwnd = manager_->GetParentView(); POINT top_left = {0, 0}; ::ClientToScreen(parent_hwnd, &top_left); - *x = location_.x + top_left.x; - *y = location_.y + top_left.y; + *x = location_.x() + top_left.x; + *y = location_.y() + top_left.y; } else if (coordinate_type == IA2_COORDTYPE_PARENT_RELATIVE) { - *x = location_.x; - *y = location_.y; + *x = location_.x(); + *y = location_.y(); if (parent_) { - *x -= parent_->location().x; - *y -= parent_->location().y; + *x -= parent_->location().x(); + *y -= parent_->location().y(); } } else { return E_INVALIDARG; @@ -532,8 +532,8 @@ STDMETHODIMP BrowserAccessibilityWin::get_imageSize(LONG* height, LONG* width) { if (!height || !width) return E_INVALIDARG; - *height = location_.height; - *width = location_.width; + *height = location_.height(); + *width = location_.width(); return S_OK; } |