OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 16 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
18 #include "content/common/cursors/webcursor.h" | 18 #include "content/common/cursors/webcursor.h" |
19 #include "third_party/WebKit/public/web/WebInputEvent.h" | 19 #include "third_party/WebKit/public/web/WebInputEvent.h" |
20 #include "ui/events/event.h" | 20 #include "ui/events/event.h" |
21 #include "ui/events/gestures/gesture_recognizer.h" | 21 #include "ui/events/gestures/gesture_recognizer.h" |
22 #include "ui/events/gestures/gesture_types.h" | 22 #include "ui/events/gestures/gesture_types.h" |
23 #include "ui/gfx/geometry/rect.h" | 23 #include "ui/gfx/geometry/rect.h" |
24 #include "ui/gfx/geometry/vector2d_f.h" | 24 #include "ui/gfx/geometry/vector2d_f.h" |
25 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
26 | 26 |
27 struct ViewHostMsg_TextInputState_Params; | |
28 | |
29 namespace content { | 27 namespace content { |
30 class BrowserPluginGuest; | 28 class BrowserPluginGuest; |
31 class RenderWidgetHost; | 29 class RenderWidgetHost; |
32 class RenderWidgetHostImpl; | 30 class RenderWidgetHostImpl; |
33 struct NativeWebKeyboardEvent; | 31 struct NativeWebKeyboardEvent; |
| 32 struct TextInputState; |
34 | 33 |
35 // See comments in render_widget_host_view.h about this class and its members. | 34 // See comments in render_widget_host_view.h about this class and its members. |
36 // This version is for the BrowserPlugin which handles a lot of the | 35 // This version is for the BrowserPlugin which handles a lot of the |
37 // functionality in a diffent place and isn't platform specific. | 36 // functionality in a diffent place and isn't platform specific. |
38 // The BrowserPlugin is currently a special case for out-of-process rendered | 37 // The BrowserPlugin is currently a special case for out-of-process rendered |
39 // content and therefore inherits from RenderWidgetHostViewChildFrame. | 38 // content and therefore inherits from RenderWidgetHostViewChildFrame. |
40 // Eventually all RenderWidgetHostViewGuest code will be subsumed by | 39 // Eventually all RenderWidgetHostViewGuest code will be subsumed by |
41 // RenderWidgetHostViewChildFrame and this class will be removed. | 40 // RenderWidgetHostViewChildFrame and this class will be removed. |
42 // | 41 // |
43 // Some elements that are platform specific will be deal with by delegating | 42 // Some elements that are platform specific will be deal with by delegating |
(...skipping 27 matching lines...) Expand all Loading... |
71 gfx::Rect GetBoundsInRootWindow() override; | 70 gfx::Rect GetBoundsInRootWindow() override; |
72 gfx::Size GetPhysicalBackingSize() const override; | 71 gfx::Size GetPhysicalBackingSize() const override; |
73 base::string16 GetSelectedText() const override; | 72 base::string16 GetSelectedText() const override; |
74 | 73 |
75 // RenderWidgetHostViewBase implementation. | 74 // RenderWidgetHostViewBase implementation. |
76 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 75 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
77 const gfx::Rect& bounds) override; | 76 const gfx::Rect& bounds) override; |
78 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; | 77 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; |
79 void UpdateCursor(const WebCursor& cursor) override; | 78 void UpdateCursor(const WebCursor& cursor) override; |
80 void SetIsLoading(bool is_loading) override; | 79 void SetIsLoading(bool is_loading) override; |
81 void TextInputStateChanged( | 80 void TextInputStateChanged(const TextInputState& params) override; |
82 const ViewHostMsg_TextInputState_Params& params) override; | |
83 void ImeCancelComposition() override; | 81 void ImeCancelComposition() override; |
84 #if defined(OS_MACOSX) || defined(USE_AURA) | 82 #if defined(OS_MACOSX) || defined(USE_AURA) |
85 void ImeCompositionRangeChanged( | 83 void ImeCompositionRangeChanged( |
86 const gfx::Range& range, | 84 const gfx::Range& range, |
87 const std::vector<gfx::Rect>& character_bounds) override; | 85 const std::vector<gfx::Rect>& character_bounds) override; |
88 #endif | 86 #endif |
89 void RenderProcessGone(base::TerminationStatus status, | 87 void RenderProcessGone(base::TerminationStatus status, |
90 int error_code) override; | 88 int error_code) override; |
91 void Destroy() override; | 89 void Destroy() override; |
92 void SetTooltipText(const base::string16& tooltip_text) override; | 90 void SetTooltipText(const base::string16& tooltip_text) override; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // The platform view for this RenderWidgetHostView. | 150 // The platform view for this RenderWidgetHostView. |
153 // RenderWidgetHostViewGuest mostly only cares about stuff related to | 151 // RenderWidgetHostViewGuest mostly only cares about stuff related to |
154 // compositing, the rest are directly forwarded to this |platform_view_|. | 152 // compositing, the rest are directly forwarded to this |platform_view_|. |
155 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; | 153 base::WeakPtr<RenderWidgetHostViewBase> platform_view_; |
156 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); | 154 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewGuest); |
157 }; | 155 }; |
158 | 156 |
159 } // namespace content | 157 } // namespace content |
160 | 158 |
161 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ | 159 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_ |
OLD | NEW |