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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "ui/aura/window_tree_host_observer.h" | 31 #include "ui/aura/window_tree_host_observer.h" |
32 #include "ui/base/ime/text_input_client.h" | 32 #include "ui/base/ime/text_input_client.h" |
33 #include "ui/base/touch/selection_bound.h" | 33 #include "ui/base/touch/selection_bound.h" |
34 #include "ui/base/touch/touch_editing_controller.h" | 34 #include "ui/base/touch/touch_editing_controller.h" |
35 #include "ui/events/gestures/motion_event_aura.h" | 35 #include "ui/events/gestures/motion_event_aura.h" |
36 #include "ui/gfx/display_observer.h" | 36 #include "ui/gfx/display_observer.h" |
37 #include "ui/gfx/geometry/insets.h" | 37 #include "ui/gfx/geometry/insets.h" |
38 #include "ui/gfx/geometry/rect.h" | 38 #include "ui/gfx/geometry/rect.h" |
39 #include "ui/wm/public/activation_delegate.h" | 39 #include "ui/wm/public/activation_delegate.h" |
40 | 40 |
| 41 struct ViewHostMsg_TextInputState_Params; |
| 42 |
41 namespace aura { | 43 namespace aura { |
42 class WindowTracker; | 44 class WindowTracker; |
43 namespace client { | 45 namespace client { |
44 class ScopedTooltipDisabler; | 46 class ScopedTooltipDisabler; |
45 } | 47 } |
46 } | 48 } |
47 | 49 |
48 namespace cc { | 50 namespace cc { |
49 class CopyOutputRequest; | 51 class CopyOutputRequest; |
50 class CopyOutputResult; | 52 class CopyOutputResult; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } | 136 } |
135 | 137 |
136 // When |is_guest_view_hack| is true, this view isn't really the view for | 138 // When |is_guest_view_hack| is true, this view isn't really the view for |
137 // the |widget|, a RenderWidgetHostViewGuest is. | 139 // the |widget|, a RenderWidgetHostViewGuest is. |
138 // | 140 // |
139 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated | 141 // TODO(lazyboy): Remove |is_guest_view_hack| once BrowserPlugin has migrated |
140 // to use RWHVChildFrame (http://crbug.com/330264). | 142 // to use RWHVChildFrame (http://crbug.com/330264). |
141 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack); | 143 RenderWidgetHostViewAura(RenderWidgetHost* host, bool is_guest_view_hack); |
142 | 144 |
143 // RenderWidgetHostView implementation. | 145 // RenderWidgetHostView implementation. |
144 bool OnMessageReceived(const IPC::Message& msg) override; | |
145 void InitAsChild(gfx::NativeView parent_view) override; | 146 void InitAsChild(gfx::NativeView parent_view) override; |
146 RenderWidgetHost* GetRenderWidgetHost() const override; | 147 RenderWidgetHost* GetRenderWidgetHost() const override; |
147 void SetSize(const gfx::Size& size) override; | 148 void SetSize(const gfx::Size& size) override; |
148 void SetBounds(const gfx::Rect& rect) override; | 149 void SetBounds(const gfx::Rect& rect) override; |
149 gfx::Vector2dF GetLastScrollOffset() const override; | 150 gfx::Vector2dF GetLastScrollOffset() const override; |
150 gfx::NativeView GetNativeView() const override; | 151 gfx::NativeView GetNativeView() const override; |
151 gfx::NativeViewId GetNativeViewId() const override; | 152 gfx::NativeViewId GetNativeViewId() const override; |
152 gfx::NativeViewAccessible GetNativeViewAccessible() override; | 153 gfx::NativeViewAccessible GetNativeViewAccessible() override; |
153 ui::TextInputClient* GetTextInputClient() override; | 154 ui::TextInputClient* GetTextInputClient() override; |
154 bool HasFocus() const override; | 155 bool HasFocus() const override; |
155 bool IsSurfaceAvailableForCopy() const override; | 156 bool IsSurfaceAvailableForCopy() const override; |
156 void Show() override; | 157 void Show() override; |
157 void Hide() override; | 158 void Hide() override; |
158 bool IsShowing() override; | 159 bool IsShowing() override; |
159 gfx::Rect GetViewBounds() const override; | 160 gfx::Rect GetViewBounds() const override; |
160 void SetBackgroundColor(SkColor color) override; | 161 void SetBackgroundColor(SkColor color) override; |
161 gfx::Size GetVisibleViewportSize() const override; | 162 gfx::Size GetVisibleViewportSize() const override; |
162 void SetInsets(const gfx::Insets& insets) override; | 163 void SetInsets(const gfx::Insets& insets) override; |
163 | 164 |
164 // Overridden from RenderWidgetHostViewBase: | 165 // Overridden from RenderWidgetHostViewBase: |
165 void InitAsPopup(RenderWidgetHostView* parent_host_view, | 166 void InitAsPopup(RenderWidgetHostView* parent_host_view, |
166 const gfx::Rect& pos) override; | 167 const gfx::Rect& pos) override; |
167 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; | 168 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; |
168 void MovePluginWindows(const std::vector<WebPluginGeometry>& moves) override; | 169 void MovePluginWindows(const std::vector<WebPluginGeometry>& moves) override; |
169 void Focus() override; | 170 void Focus() override; |
170 void UpdateCursor(const WebCursor& cursor) override; | 171 void UpdateCursor(const WebCursor& cursor) override; |
171 void SetIsLoading(bool is_loading) override; | 172 void SetIsLoading(bool is_loading) override; |
172 void TextInputTypeChanged(ui::TextInputType type, | 173 void TextInputStateChanged( |
173 ui::TextInputMode input_mode, | 174 const ViewHostMsg_TextInputState_Params& params) override; |
174 bool can_compose_inline, | |
175 int flags) override; | |
176 void ImeCancelComposition() override; | 175 void ImeCancelComposition() override; |
177 void ImeCompositionRangeChanged( | 176 void ImeCompositionRangeChanged( |
178 const gfx::Range& range, | 177 const gfx::Range& range, |
179 const std::vector<gfx::Rect>& character_bounds) override; | 178 const std::vector<gfx::Rect>& character_bounds) override; |
180 void RenderProcessGone(base::TerminationStatus status, | 179 void RenderProcessGone(base::TerminationStatus status, |
181 int error_code) override; | 180 int error_code) override; |
182 void Destroy() override; | 181 void Destroy() override; |
183 void SetTooltipText(const base::string16& tooltip_text) override; | 182 void SetTooltipText(const base::string16& tooltip_text) override; |
184 void SelectionChanged(const base::string16& text, | 183 void SelectionChanged(const base::string16& text, |
185 size_t offset, | 184 size_t offset, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 void OnCursorVisibilityChanged(bool is_visible) override; | 302 void OnCursorVisibilityChanged(bool is_visible) override; |
304 | 303 |
305 // Overridden from aura::client::FocusChangeObserver: | 304 // Overridden from aura::client::FocusChangeObserver: |
306 void OnWindowFocused(aura::Window* gained_focus, | 305 void OnWindowFocused(aura::Window* gained_focus, |
307 aura::Window* lost_focus) override; | 306 aura::Window* lost_focus) override; |
308 | 307 |
309 // Overridden from aura::WindowTreeHostObserver: | 308 // Overridden from aura::WindowTreeHostObserver: |
310 void OnHostMoved(const aura::WindowTreeHost* host, | 309 void OnHostMoved(const aura::WindowTreeHost* host, |
311 const gfx::Point& new_origin) override; | 310 const gfx::Point& new_origin) override; |
312 | 311 |
313 void OnTextInputStateChanged(const ViewHostMsg_TextInputState_Params& params); | |
314 | |
315 #if defined(OS_WIN) | 312 #if defined(OS_WIN) |
316 // Sets the cutout rects from constrained windows. These are rectangles that | 313 // Sets the cutout rects from constrained windows. These are rectangles that |
317 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout | 314 // windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout |
318 // rects. | 315 // rects. |
319 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); | 316 void UpdateConstrainedWindowRects(const std::vector<gfx::Rect>& rects); |
320 | 317 |
321 // Updates the cursor clip region. Used for mouse locking. | 318 // Updates the cursor clip region. Used for mouse locking. |
322 void UpdateMouseLockRegion(); | 319 void UpdateMouseLockRegion(); |
323 | 320 |
324 // Notification that the LegacyRenderWidgetHostHWND was destroyed. | 321 // Notification that the LegacyRenderWidgetHostHWND was destroyed. |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 670 |
674 BeginFrameObserverProxy begin_frame_observer_proxy_; | 671 BeginFrameObserverProxy begin_frame_observer_proxy_; |
675 | 672 |
676 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 673 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
677 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 674 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
678 }; | 675 }; |
679 | 676 |
680 } // namespace content | 677 } // namespace content |
681 | 678 |
682 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 679 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |