| 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/strings/string16.h" | 8 #include "base/strings/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" |
| 11 #include "ui/views/widget/native_widget.h" | 11 #include "ui/views/widget/native_widget.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class FontList; | 14 class FontList; |
| 15 class ImageSkia; | 15 class ImageSkia; |
| 16 class Rect; | 16 class Rect; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 class InputMethod; | 20 class InputMethod; |
| 21 class NativeTheme; | 21 class NativeTheme; |
| 22 class OSExchangeData; | 22 class OSExchangeData; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace views { | 25 namespace views { |
| 26 class InputMethod; | |
| 27 class TooltipManager; | 26 class TooltipManager; |
| 28 namespace internal { | 27 namespace internal { |
| 29 class InputMethodDelegate; | |
| 30 | 28 |
| 31 //////////////////////////////////////////////////////////////////////////////// | 29 //////////////////////////////////////////////////////////////////////////////// |
| 32 // NativeWidgetPrivate interface | 30 // NativeWidgetPrivate interface |
| 33 // | 31 // |
| 34 // A NativeWidget subclass internal to views that provides Widget a conduit for | 32 // A NativeWidget subclass internal to views that provides Widget a conduit for |
| 35 // communication with a backend-specific native widget implementation. | 33 // communication with a backend-specific native widget implementation. |
| 36 // | 34 // |
| 37 // Many of the methods here are pass-thrus for Widget, and as such there is no | 35 // Many of the methods here are pass-thrus for Widget, and as such there is no |
| 38 // documentation for them here. In that case, see methods of the same name in | 36 // documentation for them here. In that case, see methods of the same name in |
| 39 // widget.h. | 37 // widget.h. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // to update tooltips. | 124 // to update tooltips. |
| 127 virtual TooltipManager* GetTooltipManager() const = 0; | 125 virtual TooltipManager* GetTooltipManager() const = 0; |
| 128 | 126 |
| 129 // Sets or releases event capturing for this native widget. | 127 // Sets or releases event capturing for this native widget. |
| 130 virtual void SetCapture() = 0; | 128 virtual void SetCapture() = 0; |
| 131 virtual void ReleaseCapture() = 0; | 129 virtual void ReleaseCapture() = 0; |
| 132 | 130 |
| 133 // Returns true if this native widget is capturing events. | 131 // Returns true if this native widget is capturing events. |
| 134 virtual bool HasCapture() const = 0; | 132 virtual bool HasCapture() const = 0; |
| 135 | 133 |
| 136 // Returns the InputMethod for this native widget. | |
| 137 // Note that all widgets in a widget hierarchy share the same input method. | |
| 138 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation | |
| 139 // class doesn't inherit Widget anymore. | |
| 140 virtual InputMethod* CreateInputMethod() = 0; | |
| 141 | |
| 142 // Returns the InputMethodDelegate for this native widget. | |
| 143 virtual InputMethodDelegate* GetInputMethodDelegate() = 0; | |
| 144 | |
| 145 // Returns the ui::InputMethod for this native widget. | 134 // Returns the ui::InputMethod for this native widget. |
| 146 // TODO(yukishiino): Rename this method to GetInputMethod once we remove | 135 // TODO(yukishiino): Rename this method to GetInputMethod once we remove |
| 147 // views::InputMethod. | 136 // views::InputMethod. |
| 148 virtual ui::InputMethod* GetHostInputMethod() = 0; | 137 virtual ui::InputMethod* GetInputMethod() = 0; |
| 149 | 138 |
| 150 // Centers the window and sizes it to the specified size. | 139 // Centers the window and sizes it to the specified size. |
| 151 virtual void CenterWindow(const gfx::Size& size) = 0; | 140 virtual void CenterWindow(const gfx::Size& size) = 0; |
| 152 | 141 |
| 153 // Retrieves the window's current restored bounds and "show" state, for | 142 // Retrieves the window's current restored bounds and "show" state, for |
| 154 // persisting. | 143 // persisting. |
| 155 virtual void GetWindowPlacement( | 144 virtual void GetWindowPlacement( |
| 156 gfx::Rect* bounds, | 145 gfx::Rect* bounds, |
| 157 ui::WindowShowState* show_state) const = 0; | 146 ui::WindowShowState* show_state) const = 0; |
| 158 | 147 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 virtual void RepostNativeEvent(gfx::NativeEvent native_event) = 0; | 223 virtual void RepostNativeEvent(gfx::NativeEvent native_event) = 0; |
| 235 | 224 |
| 236 // Overridden from NativeWidget: | 225 // Overridden from NativeWidget: |
| 237 internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override; | 226 internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override; |
| 238 }; | 227 }; |
| 239 | 228 |
| 240 } // namespace internal | 229 } // namespace internal |
| 241 } // namespace views | 230 } // namespace views |
| 242 | 231 |
| 243 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ | 232 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ |
| OLD | NEW |