summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 19:24:31 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-14 19:24:31 +0000
commit2d46c8462c1c9104c100ee1f3414db754b897a8f (patch)
treed97575e12d73eaee70516a069bebcde26804a28c /chrome/browser/automation
parent5190d28cbce355d98236bd06beee5099f4da3790 (diff)
downloadchromium_src-2d46c8462c1c9104c100ee1f3414db754b897a8f.zip
chromium_src-2d46c8462c1c9104c100ee1f3414db754b897a8f.tar.gz
chromium_src-2d46c8462c1c9104c100ee1f3414db754b897a8f.tar.bz2
Rid most of the Browser object of HWND dependencies.
Review URL: http://codereview.chromium.org/10929 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/automation_provider.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 3304de1..aaf7978 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -1407,7 +1407,8 @@ void AutomationProvider::WindowSimulateDrag(const IPC::Message& message,
// since SendInput is system-wide.
Browser* browser = browser_tracker_->GetResource(handle);
DCHECK(browser);
- HWND browser_hwnd = browser->GetTopLevelHWND();
+ HWND browser_hwnd =
+ reinterpret_cast<HWND>(browser->window()->GetNativeHandle());
// We can't simulate drags to the non-client area of the window, because
// Windows spawns a nested modal message loop in cases where drags occur
@@ -1967,7 +1968,7 @@ void AutomationProvider::GetWindowForBrowser(const IPC::Message& message,
if (browser_tracker_->ContainsHandle(browser_handle)) {
Browser* browser = browser_tracker_->GetResource(browser_handle);
- HWND hwnd = browser->GetTopLevelHWND();
+ HWND hwnd = reinterpret_cast<HWND>(browser->window()->GetNativeHandle());
// Add() returns the existing handle for the resource if any.
window_handle = window_tracker_->Add(hwnd);
success = true;
@@ -2004,7 +2005,8 @@ void AutomationProvider::GetBrowserForWindow(const IPC::Message& message,
BrowserList::const_iterator iter = BrowserList::begin();
Browser* browser = NULL;
for (;iter != BrowserList::end(); ++iter) {
- if (window == (*iter)->GetTopLevelHWND()) {
+ HWND hwnd = reinterpret_cast<HWND>((*iter)->window()->GetNativeHandle());
+ if (window == hwnd) {
browser = *iter;
break;
}