diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 21:50:56 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 21:50:56 +0000 |
commit | 6f4280104722d792dfea82b40ed4d299c39e7786 (patch) | |
tree | a727c801fb75943b4a63acd468a05960c6fc9f8a /views/widget/native_widget.h | |
parent | 0533b30ddf4aa297ba9f32cc832e5ac016d369bc (diff) | |
download | chromium_src-6f4280104722d792dfea82b40ed4d299c39e7786.zip chromium_src-6f4280104722d792dfea82b40ed4d299c39e7786.tar.gz chromium_src-6f4280104722d792dfea82b40ed4d299c39e7786.tar.bz2 |
Land the new functions added by 76483 - but do not use them anywhere outside of their tests.
This will help me incrementally re-deploy these functions and identify what is causing the buildbot test redness.
BUG=72040
TEST=none
TBR=sky (all code originally reviewed here: http://codereview.chromium.org/6598069/ )
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/native_widget.h')
-rw-r--r-- | views/widget/native_widget.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/views/widget/native_widget.h b/views/widget/native_widget.h index 2700f8c..aadc0da 100644 --- a/views/widget/native_widget.h +++ b/views/widget/native_widget.h @@ -6,8 +6,11 @@ #define VIEWS_WIDGET_NATIVE_WIDGET_H_ #pragma once +#include <set> + namespace views { -namespace internal { + +class Widget; //////////////////////////////////////////////////////////////////////////////// // NativeWidget interface @@ -17,10 +20,32 @@ namespace internal { // class NativeWidget { public: + typedef std::set<NativeWidget*> NativeWidgets; + virtual ~NativeWidget() {} + + // Retrieves the NativeWidget implementation associated with the given + // NativeView or Window, or NULL if the supplied handle has no associated + // NativeView. + static NativeWidget* GetNativeWidgetForNativeView( + gfx::NativeView native_view); + static NativeWidget* GetNativeWidgetForNativeWindow( + gfx::NativeWindow native_window); + + // Retrieves the top NativeWidget in the hierarchy containing the given + // NativeView, or NULL if there is no NativeWidget that contains it. + static NativeWidget* GetTopLevelNativeWidget(gfx::NativeView native_view); + + // Returns all NativeWidgets in |native_view|'s hierarchy, including itself if + // it is one. + static void GetAllNativeWidgets(gfx::NativeView native_view, + NativeWidgets* children); + + // Returns the Widget associated with this NativeWidget. This function is + // guaranteed to return non-NULL for the lifetime of the NativeWidget. + virtual Widget* GetWidget() = 0; }; -} // namespace internal } // namespace views #endif // VIEWS_WIDGET_NATIVE_WIDGET_H_ |