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 |