Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(740)

Side by Side Diff: ui/views/widget/native_widget_private.h

Issue 173803002: Redesigns the text input focus handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/ime/input_method_delegate.h"
12 #include "ui/views/widget/native_widget.h" 11 #include "ui/views/widget/native_widget.h"
13 12
14 namespace gfx { 13 namespace gfx {
15 class ImageSkia; 14 class ImageSkia;
16 class Rect; 15 class Rect;
17 } 16 }
18 17
19 namespace ui { 18 namespace ui {
19 class InputMethod;
20 class NativeTheme; 20 class NativeTheme;
21 class OSExchangeData; 21 class OSExchangeData;
22 } 22 }
23 23
24 namespace views { 24 namespace views {
25 class InputMethod; 25 class InputMethod;
26 class InputMethodDelegate;
26 class TooltipManager; 27 class TooltipManager;
27 namespace internal { 28 namespace internal {
28 29
29 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
30 // NativeWidgetPrivate interface 31 // NativeWidgetPrivate interface
31 // 32 //
32 // A NativeWidget subclass internal to views that provides Widget a conduit for 33 // A NativeWidget subclass internal to views that provides Widget a conduit for
33 // communication with a backend-specific native widget implementation. 34 // communication with a backend-specific native widget implementation.
34 // 35 //
35 // Many of the methods here are pass-thrus for Widget, and as such there is no 36 // Many of the methods here are pass-thrus for Widget, and as such there is no
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 136
136 // Returns the InputMethod for this native widget. 137 // Returns the InputMethod for this native widget.
137 // Note that all widgets in a widget hierarchy share the same input method. 138 // Note that all widgets in a widget hierarchy share the same input method.
138 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation 139 // TODO(suzhe): rename to GetInputMethod() when NativeWidget implementation
139 // class doesn't inherit Widget anymore. 140 // class doesn't inherit Widget anymore.
140 virtual InputMethod* CreateInputMethod() = 0; 141 virtual InputMethod* CreateInputMethod() = 0;
141 142
142 // Returns the InputMethodDelegate for this native widget. 143 // Returns the InputMethodDelegate for this native widget.
143 virtual InputMethodDelegate* GetInputMethodDelegate() = 0; 144 virtual InputMethodDelegate* GetInputMethodDelegate() = 0;
144 145
146 // Returns the ui::InputMethod for this native widget.
147 // TODO(yukishiino): Rename this method to GetInputMethod once we remove
148 // views::InputMethod.
149 virtual ui::InputMethod* GetHostInputMethod() = 0;
145 150
146 // Centers the window and sizes it to the specified size. 151 // Centers the window and sizes it to the specified size.
147 virtual void CenterWindow(const gfx::Size& size) = 0; 152 virtual void CenterWindow(const gfx::Size& size) = 0;
148 153
149 // Retrieves the window's current restored bounds and "show" state, for 154 // Retrieves the window's current restored bounds and "show" state, for
150 // persisting. 155 // persisting.
151 virtual void GetWindowPlacement( 156 virtual void GetWindowPlacement(
152 gfx::Rect* bounds, 157 gfx::Rect* bounds,
153 ui::WindowShowState* show_state) const = 0; 158 ui::WindowShowState* show_state) const = 0;
154 159
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 227
223 // Overridden from NativeWidget: 228 // Overridden from NativeWidget:
224 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE; 229 virtual internal::NativeWidgetPrivate* AsNativeWidgetPrivate() OVERRIDE;
225 virtual ui::EventHandler* GetEventHandler() = 0; 230 virtual ui::EventHandler* GetEventHandler() = 0;
226 }; 231 };
227 232
228 } // namespace internal 233 } // namespace internal
229 } // namespace views 234 } // namespace views
230 235
231 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_ 236 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698