OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 VIEWS_WIDGET_NATIVE_WIDGET_H_ | 5 #ifndef VIEWS_WIDGET_NATIVE_WIDGET_H_ |
6 #define VIEWS_WIDGET_NATIVE_WIDGET_H_ | 6 #define VIEWS_WIDGET_NATIVE_WIDGET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // class doesn't inherit Widget anymore. | 117 // class doesn't inherit Widget anymore. |
118 virtual InputMethod* GetInputMethodNative() = 0; | 118 virtual InputMethod* GetInputMethodNative() = 0; |
119 | 119 |
120 // Sets a different InputMethod instance to this native widget. The instance | 120 // Sets a different InputMethod instance to this native widget. The instance |
121 // must not be initialized, the ownership will be assumed by the native | 121 // must not be initialized, the ownership will be assumed by the native |
122 // widget. It's only for testing purpose. | 122 // widget. It's only for testing purpose. |
123 virtual void ReplaceInputMethod(InputMethod* input_method) = 0; | 123 virtual void ReplaceInputMethod(InputMethod* input_method) = 0; |
124 | 124 |
125 protected: | 125 protected: |
126 friend class Widget; | 126 friend class Widget; |
| 127 friend class NativeWidgetViews; |
127 | 128 |
128 // Returns a handle for the underlying native widget that can be used for | 129 // Returns a handle for the underlying native widget that can be used for |
129 // accelerated drawing. | 130 // accelerated drawing. |
130 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; | 131 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; |
131 | 132 |
132 // Widget pass-thrus, private to Views. -------------------------------------- | 133 // Widget pass-thrus, private to Views. -------------------------------------- |
133 // See method documentation in Widget. | 134 // See method documentation in Widget. |
134 virtual gfx::Rect GetWindowScreenBounds() const = 0; | 135 virtual gfx::Rect GetWindowScreenBounds() const = 0; |
135 virtual gfx::Rect GetClientAreaScreenBounds() const = 0; | 136 virtual gfx::Rect GetClientAreaScreenBounds() const = 0; |
136 virtual void SetBounds(const gfx::Rect& bounds) = 0; | 137 virtual void SetBounds(const gfx::Rect& bounds) = 0; |
(...skipping 13 matching lines...) Expand all Loading... |
150 virtual void RunShellDrag(View* view, | 151 virtual void RunShellDrag(View* view, |
151 const ui::OSExchangeData& data, | 152 const ui::OSExchangeData& data, |
152 int operation) = 0; | 153 int operation) = 0; |
153 virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0; | 154 virtual void SchedulePaintInRect(const gfx::Rect& rect) = 0; |
154 virtual void SetCursor(gfx::NativeCursor cursor) = 0; | 155 virtual void SetCursor(gfx::NativeCursor cursor) = 0; |
155 }; | 156 }; |
156 | 157 |
157 } // namespace views | 158 } // namespace views |
158 | 159 |
159 #endif // VIEWS_WIDGET_NATIVE_WIDGET_H_ | 160 #endif // VIEWS_WIDGET_NATIVE_WIDGET_H_ |
OLD | NEW |