| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 gfx::NativeWindow native_window); | 57 gfx::NativeWindow native_window); |
| 58 | 58 |
| 59 // Retrieves the top NativeWidgetPrivate in the hierarchy containing the given | 59 // Retrieves the top NativeWidgetPrivate in the hierarchy containing the given |
| 60 // NativeView, or NULL if there is no NativeWidgetPrivate that contains it. | 60 // NativeView, or NULL if there is no NativeWidgetPrivate that contains it. |
| 61 static NativeWidgetPrivate* GetTopLevelNativeWidget( | 61 static NativeWidgetPrivate* GetTopLevelNativeWidget( |
| 62 gfx::NativeView native_view); | 62 gfx::NativeView native_view); |
| 63 | 63 |
| 64 static void GetAllChildWidgets(gfx::NativeView native_view, | 64 static void GetAllChildWidgets(gfx::NativeView native_view, |
| 65 Widget::Widgets* children); | 65 Widget::Widgets* children); |
| 66 static void GetAllOwnedWidgets(gfx::NativeView native_view, | 66 static void GetAllOwnedWidgets(gfx::NativeView native_view, |
| 67 Widget::Widgets* owned); | 67 Widget::Widgets* owned, |
| 68 bool include_toplevel); |
| 68 static void ReparentNativeView(gfx::NativeView native_view, | 69 static void ReparentNativeView(gfx::NativeView native_view, |
| 69 gfx::NativeView new_parent); | 70 gfx::NativeView new_parent); |
| 70 | 71 |
| 71 // Returns true if any mouse button is currently down. | 72 // Returns true if any mouse button is currently down. |
| 72 static bool IsMouseButtonDown(); | 73 static bool IsMouseButtonDown(); |
| 73 | 74 |
| 74 static gfx::FontList GetWindowTitleFontList(); | 75 static gfx::FontList GetWindowTitleFontList(); |
| 75 | 76 |
| 76 // Returns the NativeView with capture, otherwise NULL if there is no current | 77 // Returns the NativeView with capture, otherwise NULL if there is no current |
| 77 // capture set, or if |native_view| has no root. | 78 // capture set, or if |native_view| has no root. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 virtual void OnSizeConstraintsChanged() = 0; | 227 virtual void OnSizeConstraintsChanged() = 0; |
| 227 | 228 |
| 228 // Repost an unhandled event to the native widget for default OS processing. | 229 // Repost an unhandled event to the native widget for default OS processing. |
| 229 virtual void RepostNativeEvent(gfx::NativeEvent native_event) = 0; | 230 virtual void RepostNativeEvent(gfx::NativeEvent native_event) = 0; |
| 230 | 231 |
| 231 // Returns an internal name that matches the name of the associated Widget. | 232 // Returns an internal name that matches the name of the associated Widget. |
| 232 virtual std::string GetName() const = 0; | 233 virtual std::string GetName() const = 0; |
| 233 | 234 |
| 234 // Overridden from NativeWidget: | 235 // Overridden from NativeWidget: |
| 235 internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override; | 236 internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override; |
| 237 |
| 238 private: |
| 239 // Returns the set of top-level Widgets directly owned by |this|. Called |
| 240 // recursively by GetAllOwnedWidgets() to find Widgets indirectly owned. |
| 241 virtual Widget::Widgets GetAllOwnedTopLevelWidgets() const = 0; |
| 236 }; | 242 }; |
| 237 | 243 |
| 238 } // namespace internal | 244 } // namespace internal |
| 239 } // namespace views | 245 } // namespace views |
| 240 | 246 |
| 241 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ | 247 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ |
| OLD | NEW |