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

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

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 5 years, 5 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
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/native_widget_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DELEGATE_H_ 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 10 matching lines...) Expand all
21 class GestureEvent; 21 class GestureEvent;
22 class KeyEvent; 22 class KeyEvent;
23 class Layer; 23 class Layer;
24 class MouseEvent; 24 class MouseEvent;
25 class PaintContext; 25 class PaintContext;
26 class ScrollEvent; 26 class ScrollEvent;
27 class TouchEvent; 27 class TouchEvent;
28 } 28 }
29 29
30 namespace views { 30 namespace views {
31 class InputMethod;
32 class Widget; 31 class Widget;
33 32
34 namespace internal { 33 namespace internal {
35 34
36 //////////////////////////////////////////////////////////////////////////////// 35 ////////////////////////////////////////////////////////////////////////////////
37 // NativeWidgetDelegate 36 // NativeWidgetDelegate
38 // 37 //
39 // An interface implemented by the object that handles events sent by a 38 // An interface implemented by the object that handles events sent by a
40 // NativeWidget implementation. 39 // NativeWidget implementation.
41 // 40 //
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 virtual void OnKeyEvent(ui::KeyEvent* event) = 0; 117 virtual void OnKeyEvent(ui::KeyEvent* event) = 0;
119 virtual void OnMouseEvent(ui::MouseEvent* event) = 0; 118 virtual void OnMouseEvent(ui::MouseEvent* event) = 0;
120 virtual void OnMouseCaptureLost() = 0; 119 virtual void OnMouseCaptureLost() = 0;
121 120
122 virtual void OnScrollEvent(ui::ScrollEvent* event) = 0; 121 virtual void OnScrollEvent(ui::ScrollEvent* event) = 0;
123 virtual void OnGestureEvent(ui::GestureEvent* event) = 0; 122 virtual void OnGestureEvent(ui::GestureEvent* event) = 0;
124 123
125 // Runs the specified native command. Returns true if the command is handled. 124 // Runs the specified native command. Returns true if the command is handled.
126 virtual bool ExecuteCommand(int command_id) = 0; 125 virtual bool ExecuteCommand(int command_id) = 0;
127 126
128 // Returns the input method of the widget this delegate is associated with.
129 // Note that this does not use the top level widget, so may return NULL
130 // if the widget doesn't have input method.
131 virtual InputMethod* GetInputMethodDirect() = 0;
132
133 // Returns the child Layers of the Widgets layer that were created by Views. 127 // Returns the child Layers of the Widgets layer that were created by Views.
134 virtual const std::vector<ui::Layer*>& GetRootLayers() = 0; 128 virtual const std::vector<ui::Layer*>& GetRootLayers() = 0;
135 129
136 // Returns true if window has a hit-test mask. 130 // Returns true if window has a hit-test mask.
137 virtual bool HasHitTestMask() const = 0; 131 virtual bool HasHitTestMask() const = 0;
138 132
139 // Provides the hit-test mask if HasHitTestMask above returns true. 133 // Provides the hit-test mask if HasHitTestMask above returns true.
140 virtual void GetHitTestMask(gfx::Path* mask) const = 0; 134 virtual void GetHitTestMask(gfx::Path* mask) const = 0;
141 135
142 // 136 //
143 virtual Widget* AsWidget() = 0; 137 virtual Widget* AsWidget() = 0;
144 virtual const Widget* AsWidget() const = 0; 138 virtual const Widget* AsWidget() const = 0;
145 139
146 // Sets-up the focus manager with the view that should have focus when the 140 // Sets-up the focus manager with the view that should have focus when the
147 // window is shown the first time. It takes the intended |show_state| of the 141 // window is shown the first time. It takes the intended |show_state| of the
148 // window in order to decide whether the window should be focused now or 142 // window in order to decide whether the window should be focused now or
149 // later. Returns true if the initial focus has been set or the window should 143 // later. Returns true if the initial focus has been set or the window should
150 // not set the initial focus, or false if the caller should set the initial 144 // not set the initial focus, or false if the caller should set the initial
151 // focus (if any). 145 // focus (if any).
152 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0; 146 virtual bool SetInitialFocus(ui::WindowShowState show_state) = 0;
153 }; 147 };
154 148
155 } // namespace internal 149 } // namespace internal
156 } // namespace views 150 } // namespace views
157 151
158 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ 152 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/native_widget_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698