Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1257)

Unified Diff: views/widget/widget_win.cc

Issue 338067: Gets AutomationProxyVisibleTest.WindowGetViewBounds to pass on... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/widget_win.cc
===================================================================
--- views/widget/widget_win.cc (revision 30355)
+++ views/widget/widget_win.cc (working copy)
@@ -362,30 +362,7 @@
}
}
-static BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM l_param) {
- RootView* root_view =
- reinterpret_cast<RootView*>(GetProp(hwnd, kRootViewWindowProperty));
- if (root_view) {
- *reinterpret_cast<RootView**>(l_param) = root_view;
- return FALSE; // Stop enumerating.
- }
- return TRUE; // Keep enumerating.
-}
-
// static
-RootView* WidgetWin::FindRootView(HWND hwnd) {
- RootView* root_view =
- reinterpret_cast<RootView*>(GetProp(hwnd, kRootViewWindowProperty));
- if (root_view)
- return root_view;
-
- // Enumerate all children and check if they have a RootView.
- EnumChildWindows(hwnd, EnumChildProc, reinterpret_cast<LPARAM>(&root_view));
-
- return root_view;
-}
-
-// static
WidgetWin* WidgetWin::GetWidget(HWND hwnd) {
return reinterpret_cast<WidgetWin*>(win_util::GetWindowUserData(hwnd));
}
@@ -1184,4 +1161,27 @@
return popup;
}
+static BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM l_param) {
+ RootView* root_view =
+ reinterpret_cast<RootView*>(GetProp(hwnd, kRootViewWindowProperty));
+ if (root_view) {
+ *reinterpret_cast<RootView**>(l_param) = root_view;
+ return FALSE; // Stop enumerating.
+ }
+ return TRUE; // Keep enumerating.
+}
+
+// static
+RootView* Widget::FindRootView(HWND hwnd) {
+ RootView* root_view =
+ reinterpret_cast<RootView*>(GetProp(hwnd, kRootViewWindowProperty));
+ if (root_view)
+ return root_view;
+
+ // Enumerate all children and check if they have a RootView.
+ EnumChildWindows(hwnd, EnumChildProc, reinterpret_cast<LPARAM>(&root_view));
+
+ return root_view;
+}
+
} // namespace views
« no previous file with comments | « views/widget/widget_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698