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 CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "third_party/skia/include/core/SkBitmap.h" | 11 #include "third_party/skia/include/core/SkBitmap.h" |
12 #include "third_party/skia/include/core/SkRegion.h" | 12 #include "third_party/skia/include/core/SkRegion.h" |
13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
14 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
15 | 15 |
16 #if defined(TOOLKIT_GTK) | 16 #if defined(TOOLKIT_GTK) |
17 #include <gdk/gdk.h> | 17 #include <gdk/gdk.h> |
18 #endif | 18 #endif |
19 | 19 |
20 class GURL; | 20 class GURL; |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Rect; | 23 class Rect; |
24 class Size; | 24 class Size; |
25 } | 25 } |
26 | 26 |
27 namespace ui { | |
28 class TextInputClient; | |
29 } | |
30 | |
27 namespace content { | 31 namespace content { |
28 | 32 |
29 class BrowserAccessibilityManager; | 33 class BrowserAccessibilityManager; |
30 class RenderWidgetHost; | 34 class RenderWidgetHost; |
31 | 35 |
32 // RenderWidgetHostView is an interface implemented by an object that acts as | 36 // RenderWidgetHostView is an interface implemented by an object that acts as |
33 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its | 37 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its |
34 // associated RenderProcessHost own the "Model" in this case which is the | 38 // associated RenderProcessHost own the "Model" in this case which is the |
35 // child renderer process. The View is responsible for receiving events from | 39 // child renderer process. The View is responsible for receiving events from |
36 // the surrounding environment and passing them to the RenderWidgetHost, and | 40 // the surrounding environment and passing them to the RenderWidgetHost, and |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 virtual gfx::NativeView GetNativeView() const = 0; | 83 virtual gfx::NativeView GetNativeView() const = 0; |
80 virtual gfx::NativeViewId GetNativeViewId() const = 0; | 84 virtual gfx::NativeViewId GetNativeViewId() const = 0; |
81 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; | 85 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; |
82 | 86 |
83 // Set focus to the associated View component. | 87 // Set focus to the associated View component. |
84 virtual void Focus() = 0; | 88 virtual void Focus() = 0; |
85 // Returns true if the View currently has the focus. | 89 // Returns true if the View currently has the focus. |
86 virtual bool HasFocus() const = 0; | 90 virtual bool HasFocus() const = 0; |
87 // Returns true is the current display surface is available. | 91 // Returns true is the current display surface is available. |
88 virtual bool IsSurfaceAvailableForCopy() const = 0; | 92 virtual bool IsSurfaceAvailableForCopy() const = 0; |
93 // Returns a ui::TextInputClient to support text input or NULL if this RWHV | |
msw
2014/03/11 00:58:50
nit: order after GetNativeView* or GetSelectedText
Yuki
2014/03/11 15:27:37
Done.
| |
94 // doesn't support text input. | |
95 virtual ui::TextInputClient* GetTextInputClient() = 0; | |
89 | 96 |
90 // Shows/hides the view. These must always be called together in pairs. | 97 // Shows/hides the view. These must always be called together in pairs. |
91 // It is not legal to call Hide() multiple times in a row. | 98 // It is not legal to call Hide() multiple times in a row. |
92 virtual void Show() = 0; | 99 virtual void Show() = 0; |
93 virtual void Hide() = 0; | 100 virtual void Hide() = 0; |
94 | 101 |
95 // Whether the view is showing. | 102 // Whether the view is showing. |
96 virtual bool IsShowing() = 0; | 103 virtual bool IsShowing() = 0; |
97 | 104 |
98 // Retrieve the bounds of the View, in screen coordinates. | 105 // Retrieve the bounds of the View, in screen coordinates. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 // Gets the event for the last mouse down. | 163 // Gets the event for the last mouse down. |
157 virtual GdkEventButton* GetLastMouseDown() = 0; | 164 virtual GdkEventButton* GetLastMouseDown() = 0; |
158 // Builds a submenu containing all the gtk input method commands. | 165 // Builds a submenu containing all the gtk input method commands. |
159 virtual gfx::NativeView BuildInputMethodsGtkMenu() = 0; | 166 virtual gfx::NativeView BuildInputMethodsGtkMenu() = 0; |
160 #endif // defined(TOOLKIT_GTK) | 167 #endif // defined(TOOLKIT_GTK) |
161 }; | 168 }; |
162 | 169 |
163 } // namespace content | 170 } // namespace content |
164 | 171 |
165 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 172 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |