summaryrefslogtreecommitdiffstats
path: root/chrome/test/accessibility
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-01 17:05:27 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-01 17:05:27 +0000
commita533eb4a0e924b8c0cab7a3964c127ce0d5f8185 (patch)
tree86c1755b210da306c6f0f938741e4c0c63039586 /chrome/test/accessibility
parentcb4996397f1857ada4419fd166abf4567aa3556e (diff)
downloadchromium_src-a533eb4a0e924b8c0cab7a3964c127ce0d5f8185.zip
chromium_src-a533eb4a0e924b8c0cab7a3964c127ce0d5f8185.tar.gz
chromium_src-a533eb4a0e924b8c0cab7a3964c127ce0d5f8185.tar.bz2
Adds the BrowserView to the XPFrame/VistaFrame, and moves the BrowserToolbarView and StatusBubble into it.
Also restructures the creation of the Frame. This is significant! The Browser now constructs a frame via a new static BrowserWindow::CreateBrowserWindow method (see browser_window_factory.cc). Recall the diagram in the architectural overview doc - the BrowserView object is the one that implements the interface that the Browser object uses to communicate with the UI. The Browser object communicates to the BrowserView directly through this interface, but not directly to the frame. What actually happens right now in CreateBrowserWindow is that an XP/VistaFrame is constructed, but this is _not_ the object returned to the Browser, rather when the XP/VistaFrame is init'ed, it constructs a BrowserView that also implements BrowserWindow. This is the object that's returned to the Browser. Since both BrowserView and XP/VistaFrame implement BrowserWindow, I am now able to gradually migrate functionality from the frames to BrowserView. During this process BrowserWindow functions not handled yet by BrowserView will be forwarded to the appropriate frame. Modifies the Accessibility UI tests to account for this extra level of indirection (should only be temporary while I'm moving things around). This does actually pass the UI tests. See the whiteboard in my office for a diagram. This is a bit confusing right now since there's so much going on. Sadly the only way to get where we need to go incrementally is to make a mess on the way. B=1031854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/accessibility')
-rw-r--r--chrome/test/accessibility/accessibility_util.cc8
-rw-r--r--chrome/test/accessibility/accessibility_util.h3
-rw-r--r--chrome/test/accessibility/constants.h6
3 files changed, 15 insertions, 2 deletions
diff --git a/chrome/test/accessibility/accessibility_util.cc b/chrome/test/accessibility/accessibility_util.cc
index 43a79a8..0f4bbd6 100644
--- a/chrome/test/accessibility/accessibility_util.cc
+++ b/chrome/test/accessibility/accessibility_util.cc
@@ -181,6 +181,8 @@ HRESULT GetChildWndOf(std::wstring parent_name, unsigned int child_index,
IAccessible *pi_parent = NULL;
if (0 == parent_name.compare(BROWSER_STR))
GetChromeBrowserWnd(&pi_parent);
+ if (0 == parent_name.compare(BROWSER_VIEW_STR))
+ GetBrowserViewWnd(&pi_parent);
if (0 == parent_name.compare(TOOLBAR_STR))
GetToolbarWnd(&pi_parent);
if (0 == parent_name.compare(TABSTRIP_STR))
@@ -223,8 +225,12 @@ HRESULT GetTabStripWnd(IAccessible** ppi_access) {
return GetChildWndOf(BROWSER_STR, TABSTRIP_ACC_INDEX, ppi_access, NULL);
}
+HRESULT GetBrowserViewWnd(IAccessible** ppi_access) {
+ return GetChildWndOf(BROWSER_STR, BROWSER_VIEW_ACC_INDEX, ppi_access, NULL);
+}
+
HRESULT GetToolbarWnd(IAccessible** ppi_access) {
- return GetChildWndOf(BROWSER_STR, TOOLBAR_ACC_INDEX, ppi_access, NULL);
+ return GetChildWndOf(BROWSER_VIEW_STR, TOOLBAR_ACC_INDEX, ppi_access, NULL);
}
HRESULT GetBrowserMinimizeButton(IAccessible** ppi_access,
diff --git a/chrome/test/accessibility/accessibility_util.h b/chrome/test/accessibility/accessibility_util.h
index 77d0f03..40ba183 100644
--- a/chrome/test/accessibility/accessibility_util.h
+++ b/chrome/test/accessibility/accessibility_util.h
@@ -54,6 +54,9 @@ HRESULT GetChildWndOf(std::wstring parent_name, unsigned int child_index,
// Returns IAccessible pointer for Tabstrip. It does not have window handle.
HRESULT GetTabStripWnd(IAccessible** ppi_access);
+// Returns IAccessible pointer for BrowserView. It does not have window handle.
+HRESULT GetBrowserViewWnd(IAccessible** ppi_access);
+
// Returns IAccessible pointer for Toolbar. It does not have window handle.
HRESULT GetToolbarWnd(IAccessible** ppi_access);
diff --git a/chrome/test/accessibility/constants.h b/chrome/test/accessibility/constants.h
index bb60d9e..3e2947a 100644
--- a/chrome/test/accessibility/constants.h
+++ b/chrome/test/accessibility/constants.h
@@ -60,13 +60,16 @@
#define CHROME_CLIENT_ACC_INDEX (0)
// Chrome Client chidren.
-#define TOOLBAR_ACC_INDEX (0)
+#define BROWSER_VIEW_ACC_INDEX (0)
#define TABSTRIP_ACC_INDEX (1)
#define CHROME_MIN_ACC_INDEX (3)
#define CHROME_MAX_ACC_INDEX (4)
#define CHROME_RESTORE_ACC_INDEX (5)
#define CHROME_CLOSE_ACC_INDEX (6)
+// Browser View children.
+#define TOOLBAR_ACC_INDEX (0)
+
// Toolbar children.
#define BACK_BTN_INDEX (0)
#define FORWARD_BTN_INDEX (1)
@@ -85,6 +88,7 @@
#define TOOLBAR_STR _T("toolbar")
#define TABSTRIP_STR _T("tabstrip")
#define TAB_STR _T("tab")
+#define BROWSER_VIEW_STR _T("browser_view")
// Enums for keyboard keys. These values are directed to virtual-key values.
enum KEYBD_KEYS {