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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 // Tells the View to size and move itself to the specified size and point in | 77 // Tells the View to size and move itself to the specified size and point in |
74 // screen space. | 78 // screen space. |
75 virtual void SetBounds(const gfx::Rect& rect) = 0; | 79 virtual void SetBounds(const gfx::Rect& rect) = 0; |
76 | 80 |
77 // Retrieves the native view used to contain plugins and identify the | 81 // Retrieves the native view used to contain plugins and identify the |
78 // renderer in IPC messages. | 82 // renderer in IPC messages. |
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 |
87 // Returns a ui::TextInputClient to support text input or NULL if this RWHV | |
88 // doesn't support text input. | |
msw
2014/04/18 19:57:57
nit: should this note that certain platforms are n
Yuki
2014/04/22 09:09:02
Added a note.
| |
89 virtual ui::TextInputClient* GetTextInputClient() = 0; | |
90 | |
83 // Set focus to the associated View component. | 91 // Set focus to the associated View component. |
84 virtual void Focus() = 0; | 92 virtual void Focus() = 0; |
85 // Returns true if the View currently has the focus. | 93 // Returns true if the View currently has the focus. |
86 virtual bool HasFocus() const = 0; | 94 virtual bool HasFocus() const = 0; |
87 // Returns true is the current display surface is available. | 95 // Returns true is the current display surface is available. |
88 virtual bool IsSurfaceAvailableForCopy() const = 0; | 96 virtual bool IsSurfaceAvailableForCopy() const = 0; |
89 | 97 |
90 // Shows/hides the view. These must always be called together in pairs. | 98 // 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. | 99 // It is not legal to call Hide() multiple times in a row. |
92 virtual void Show() = 0; | 100 virtual void Show() = 0; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 // Gets the event for the last mouse down. | 164 // Gets the event for the last mouse down. |
157 virtual GdkEventButton* GetLastMouseDown() = 0; | 165 virtual GdkEventButton* GetLastMouseDown() = 0; |
158 // Builds a submenu containing all the gtk input method commands. | 166 // Builds a submenu containing all the gtk input method commands. |
159 virtual gfx::NativeView BuildInputMethodsGtkMenu() = 0; | 167 virtual gfx::NativeView BuildInputMethodsGtkMenu() = 0; |
160 #endif // defined(TOOLKIT_GTK) | 168 #endif // defined(TOOLKIT_GTK) |
161 }; | 169 }; |
162 | 170 |
163 } // namespace content | 171 } // namespace content |
164 | 172 |
165 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 173 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |