summaryrefslogtreecommitdiffstats
path: root/chrome/views/accessibility
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 23:51:38 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 23:51:38 +0000
commitc2dacc9ec41232903ba700c6aef5ef98bfcb8af8 (patch)
tree4aa4d7100862c64bdd92d70e6323001beb19edb7 /chrome/views/accessibility
parentd66e710ec668e34271def44d7f0416260657171c (diff)
downloadchromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.zip
chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.tar.gz
chromium_src-c2dacc9ec41232903ba700c6aef5ef98bfcb8af8.tar.bz2
Rename ChromeViews namespace to views
http://crbug.com/2188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/accessibility')
-rw-r--r--chrome/views/accessibility/accessible_wrapper.cc2
-rw-r--r--chrome/views/accessibility/accessible_wrapper.h8
-rw-r--r--chrome/views/accessibility/view_accessibility.cc33
-rw-r--r--chrome/views/accessibility/view_accessibility.h10
4 files changed, 26 insertions, 27 deletions
diff --git a/chrome/views/accessibility/accessible_wrapper.cc b/chrome/views/accessibility/accessible_wrapper.cc
index cc61690..bc7a792 100644
--- a/chrome/views/accessibility/accessible_wrapper.cc
+++ b/chrome/views/accessibility/accessible_wrapper.cc
@@ -13,7 +13,7 @@
//
////////////////////////////////////////////////////////////////////////////////
-AccessibleWrapper::AccessibleWrapper(ChromeViews::View* view) :
+AccessibleWrapper::AccessibleWrapper(views::View* view) :
accessibility_info_(NULL),
view_(view) {
}
diff --git a/chrome/views/accessibility/accessible_wrapper.h b/chrome/views/accessibility/accessible_wrapper.h
index d9e19ac..2785dfe4 100644
--- a/chrome/views/accessibility/accessible_wrapper.h
+++ b/chrome/views/accessibility/accessible_wrapper.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
-namespace ChromeViews {
- class View;
+namespace views {
+class View;
}
////////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ namespace ChromeViews {
////////////////////////////////////////////////////////////////////////////////
class AccessibleWrapper {
public:
- explicit AccessibleWrapper(ChromeViews::View* view);
+ explicit AccessibleWrapper(views::View* view);
~AccessibleWrapper() {}
STDMETHODIMP CreateDefaultInstance(REFIID iid);
@@ -47,7 +47,7 @@ class AccessibleWrapper {
CComPtr<IAccessible> accessibility_info_;
// View needed to initialize IAccessible.
- ChromeViews::View* view_;
+ views::View* view_;
DISALLOW_COPY_AND_ASSIGN(AccessibleWrapper);
};
diff --git a/chrome/views/accessibility/view_accessibility.cc b/chrome/views/accessibility/view_accessibility.cc
index 838995a..af2d933 100644
--- a/chrome/views/accessibility/view_accessibility.cc
+++ b/chrome/views/accessibility/view_accessibility.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/views/location_bar_view.h"
#include "chrome/views/accessibility/accessible_wrapper.h"
-HRESULT ViewAccessibility::Initialize(ChromeViews::View* view) {
+HRESULT ViewAccessibility::Initialize(views::View* view) {
if (!view) {
return E_INVALIDARG;
}
@@ -39,7 +39,7 @@ STDMETHODIMP ViewAccessibility::get_accChild(VARIANT var_child,
return S_OK;
}
- ChromeViews::View* child = NULL;
+ views::View* child = NULL;
bool get_iaccessible = false;
// Check to see if child is out-of-bounds.
@@ -60,7 +60,7 @@ STDMETHODIMP ViewAccessibility::get_accChild(VARIANT var_child,
// Sprecial case to handle the AutocompleteEdit MSAA.
if (child->GetID() == VIEW_ID_AUTOCOMPLETE) {
- ChromeViews::View* parent = child->GetParent();
+ views::View* parent = child->GetParent();
// Paranoia check, to make sure we are making a correct cast.
if (parent->GetID() == VIEW_ID_LOCATION_BAR) {
@@ -106,7 +106,7 @@ STDMETHODIMP ViewAccessibility::get_accParent(IDispatch** disp_parent) {
return E_INVALIDARG;
}
- ChromeViews::View* parent = view_->GetParent();
+ views::View* parent = view_->GetParent();
if (!parent) {
// This function can get called during teardown of ContainerWin so we
@@ -168,7 +168,7 @@ STDMETHODIMP ViewAccessibility::accNavigate(LONG nav_dir, VARIANT start,
child_id = view_->GetChildViewCount() - 1;
}
- ChromeViews::View* child = view_->GetChildViewAt(child_id);
+ views::View* child = view_->GetChildViewAt(child_id);
if (child->GetChildViewCount() != 0) {
end->vt = VT_DISPATCH;
@@ -196,7 +196,7 @@ STDMETHODIMP ViewAccessibility::accNavigate(LONG nav_dir, VARIANT start,
case NAVDIR_DOWN:
case NAVDIR_NEXT: {
// Retrieve parent to access view index and perform bounds checking.
- ChromeViews::View* parent = view_->GetParent();
+ views::View* parent = view_->GetParent();
if (!parent) {
return E_FAIL;
}
@@ -218,7 +218,7 @@ STDMETHODIMP ViewAccessibility::accNavigate(LONG nav_dir, VARIANT start,
}
}
- ChromeViews::View* child = parent->GetChildViewAt(view_index);
+ views::View* child = parent->GetChildViewAt(view_index);
if (child->GetChildViewCount() != 0) {
end->vt = VT_DISPATCH;
// Retrieve IDispatch for non-leaf child.
@@ -449,7 +449,7 @@ STDMETHODIMP ViewAccessibility::accLocation(LONG* x_left, LONG* y_top,
gfx::Rect view_bounds;
// Retrieving the parent View to be used for converting from view-to-screen
// coordinates.
- ChromeViews::View* parent = view_->GetParent();
+ views::View* parent = view_->GetParent();
if (parent == NULL) {
// If no parent, remain within the same View.
@@ -475,7 +475,7 @@ STDMETHODIMP ViewAccessibility::accLocation(LONG* x_left, LONG* y_top,
*height = view_bounds.height();
gfx::Point topleft(view_bounds.origin());
- ChromeViews::View::ConvertPointToScreen(parent, &topleft);
+ views::View::ConvertPointToScreen(parent, &topleft);
*x_left = topleft.x();
*y_top = topleft.y();
} else {
@@ -493,7 +493,7 @@ STDMETHODIMP ViewAccessibility::accHitTest(LONG x_left, LONG y_top,
}
gfx::Point pt(x_left, y_top);
- ChromeViews::View::ConvertPointToView(NULL, view_, &pt);
+ views::View::ConvertPointToView(NULL, view_, &pt);
if (!view_->HitTest(pt)) {
// If containing parent is not hit, return with failure.
@@ -503,11 +503,11 @@ STDMETHODIMP ViewAccessibility::accHitTest(LONG x_left, LONG y_top,
int child_count = view_->GetChildViewCount();
bool child_hit = false;
- ChromeViews::View* child_view = NULL;
+ views::View* child_view = NULL;
for (int child_id = 0; child_id < child_count; ++child_id) {
// Search for hit within any of the children.
child_view = view_->GetChildViewAt(child_id);
- ChromeViews::View::ConvertPointToView(view_, child_view, &pt);
+ views::View::ConvertPointToView(view_, child_view, &pt);
if (child_view->HitTest(pt)) {
// Store child_id (adjusted with +1 to convert to MSAA indexing).
child->lVal = child_id + 1;
@@ -515,7 +515,7 @@ STDMETHODIMP ViewAccessibility::accHitTest(LONG x_left, LONG y_top,
break;
}
// Convert point back to parent view to test next child.
- ChromeViews::View::ConvertPointToView(child_view, view_, &pt);
+ views::View::ConvertPointToView(child_view, view_, &pt);
}
child->vt = VT_I4;
@@ -573,8 +573,7 @@ STDMETHODIMP ViewAccessibility::get_accKeyboardShortcut(VARIANT var_id,
// Helper functions.
-bool ViewAccessibility::IsValidChild(int child_id,
- ChromeViews::View* view) const {
+bool ViewAccessibility::IsValidChild(int child_id, views::View* view) const {
if (((child_id) < 0) ||
((child_id) >= view->GetChildViewCount())) {
return false;
@@ -604,7 +603,7 @@ bool ViewAccessibility::IsValidNav(int nav_dir, int start_id, int lower_bound,
return true;
}
-void ViewAccessibility::SetState(VARIANT* state, ChromeViews::View* view) {
+void ViewAccessibility::SetState(VARIANT* state, views::View* view) {
// Default state; all views can have accessibility focus.
state->lVal |= STATE_SYSTEM_FOCUSABLE;
@@ -624,7 +623,7 @@ void ViewAccessibility::SetState(VARIANT* state, ChromeViews::View* view) {
state->lVal |= STATE_SYSTEM_PRESSED;
}
// Check both for actual View focus, as well as accessibility focus.
- ChromeViews::View* parent = view->GetParent();
+ views::View* parent = view->GetParent();
if (view->HasFocus() ||
(parent && parent->GetAccFocusedChildView() == view)) {
diff --git a/chrome/views/accessibility/view_accessibility.h b/chrome/views/accessibility/view_accessibility.h
index 4c173d9..d61ab47 100644
--- a/chrome/views/accessibility/view_accessibility.h
+++ b/chrome/views/accessibility/view_accessibility.h
@@ -33,7 +33,7 @@ class ATL_NO_VTABLE ViewAccessibility
ViewAccessibility() {}
~ViewAccessibility() {}
- HRESULT Initialize(ChromeViews::View* view);
+ HRESULT Initialize(views::View* view);
// Supported IAccessible methods.
@@ -101,7 +101,7 @@ class ATL_NO_VTABLE ViewAccessibility
private:
// Checks to see if child_id is within the child bounds of view. Returns true
// if the child is within the bounds, false otherwise.
- bool IsValidChild(int child_id, ChromeViews::View* view) const;
+ bool IsValidChild(int child_id, views::View* view) const;
// Determines navigation direction for accNavigate, based on left, up and
// previous being mapped all to previous and right, down, next being mapped
@@ -114,15 +114,15 @@ class ATL_NO_VTABLE ViewAccessibility
int upper_bound) const;
// Wrapper to retrieve the view's instance of IAccessible.
- AccessibleWrapper* GetAccessibleWrapper(ChromeViews::View* view) const {
+ AccessibleWrapper* GetAccessibleWrapper(views::View* view) const {
return view->GetAccessibleWrapper();
}
// Helper function which sets applicable states of view.
- void SetState(VARIANT* state, ChromeViews::View* view);
+ void SetState(VARIANT* state, views::View* view);
// Member View needed for view-specific calls.
- ChromeViews::View* view_;
+ views::View* view_;
DISALLOW_EVIL_CONSTRUCTORS(ViewAccessibility);
};