| 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 "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "ui/base/ui_base_types.h" | 9 #include "ui/base/ui_base_types.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // communication with a backend-specific native widget implementation. | 32 // communication with a backend-specific native widget implementation. |
| 33 // | 33 // |
| 34 // Many of the methods here are pass-thrus for Widget, and as such there is no | 34 // Many of the methods here are pass-thrus for Widget, and as such there is no |
| 35 // documentation for them here. In that case, see methods of the same name in | 35 // documentation for them here. In that case, see methods of the same name in |
| 36 // widget.h. | 36 // widget.h. |
| 37 // | 37 // |
| 38 // IMPORTANT: This type is intended for use only by the views system and for | 38 // IMPORTANT: This type is intended for use only by the views system and for |
| 39 // NativeWidget implementations. This file should not be included | 39 // NativeWidget implementations. This file should not be included |
| 40 // in code that does not fall into one of these use cases. | 40 // in code that does not fall into one of these use cases. |
| 41 // | 41 // |
| 42 class VIEWS_EXPORT NativeWidgetPrivate : public NativeWidget, | 42 class VIEWS_EXPORT NativeWidgetPrivate : public NativeWidget { |
| 43 public internal::InputMethodDelegate { | |
| 44 public: | 43 public: |
| 45 virtual ~NativeWidgetPrivate() {} | 44 virtual ~NativeWidgetPrivate() {} |
| 46 | 45 |
| 47 // Creates an appropriate default NativeWidgetPrivate implementation for the | 46 // Creates an appropriate default NativeWidgetPrivate implementation for the |
| 48 // current OS/circumstance. | 47 // current OS/circumstance. |
| 49 static NativeWidgetPrivate* CreateNativeWidget( | 48 static NativeWidgetPrivate* CreateNativeWidget( |
| 50 internal::NativeWidgetDelegate* delegate); | 49 internal::NativeWidgetDelegate* delegate); |
| 51 | 50 |
| 52 static NativeWidgetPrivate* GetNativeWidgetForNativeView( | 51 static NativeWidgetPrivate* GetNativeWidgetForNativeView( |
| 53 gfx::NativeView native_view); | 52 gfx::NativeView native_view); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 129 |
| 131 // Returns true if this native widget is capturing events. | 130 // Returns true if this native widget is capturing events. |
| 132 virtual bool HasCapture() const = 0; | 131 virtual bool HasCapture() const = 0; |
| 133 | 132 |
| 134 // Returns the InputMethod for this native widget. | 133 // Returns the InputMethod for this native widget. |
| 135 // Note that all widgets in a widget hierarchy share the same input method. | 134 // Note that all widgets in a widget hierarchy share the same input method. |
| 136 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation | 135 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation |
| 137 // class doesn't inherit Widget anymore. | 136 // class doesn't inherit Widget anymore. |
| 138 virtual InputMethod* CreateInputMethod() = 0; | 137 virtual InputMethod* CreateInputMethod() = 0; |
| 139 | 138 |
| 139 // Returns the InputMethodDelegate for this native widget. |
| 140 virtual InputMethodDelegate* GetInputMethodDelegate() = 0; |
| 141 |
| 140 | 142 |
| 141 // Centers the window and sizes it to the specified size. | 143 // Centers the window and sizes it to the specified size. |
| 142 virtual void CenterWindow(const gfx::Size& size) = 0; | 144 virtual void CenterWindow(const gfx::Size& size) = 0; |
| 143 | 145 |
| 144 // Retrieves the window's current restored bounds and "show" state, for | 146 // Retrieves the window's current restored bounds and "show" state, for |
| 145 // persisting. | 147 // persisting. |
| 146 virtual void GetWindowPlacement( | 148 virtual void GetWindowPlacement( |
| 147 gfx::Rect* bounds, | 149 gfx::Rect* bounds, |
| 148 ui::WindowShowState* show_state) const = 0; | 150 ui::WindowShowState* show_state) const = 0; |
| 149 | 151 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 virtual void SetVisibilityChangedAnimationsEnabled(bool value) = 0; | 217 virtual void SetVisibilityChangedAnimationsEnabled(bool value) = 0; |
| 216 | 218 |
| 217 // Overridden from NativeWidget: | 219 // Overridden from NativeWidget: |
| 218 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE; | 220 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE; |
| 219 }; | 221 }; |
| 220 | 222 |
| 221 } // namespace internal | 223 } // namespace internal |
| 222 } // namespace views | 224 } // namespace views |
| 223 | 225 |
| 224 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ | 226 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ |
| OLD | NEW |