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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 void ProcessMouseEvent(const blink::WebMouseEvent& event) override; | 197 void ProcessMouseEvent(const blink::WebMouseEvent& event) override; |
198 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event) override; | 198 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event) override; |
199 void ProcessTouchEvent(const blink::WebTouchEvent& event, | 199 void ProcessTouchEvent(const blink::WebTouchEvent& event, |
200 const ui::LatencyInfo& latency) override; | 200 const ui::LatencyInfo& latency) override; |
201 void ProcessGestureEvent(const blink::WebGestureEvent& event, | 201 void ProcessGestureEvent(const blink::WebGestureEvent& event, |
202 const ui::LatencyInfo& latency) override; | 202 const ui::LatencyInfo& latency) override; |
203 void TransformPointToLocalCoordSpace(const gfx::Point& point, | 203 void TransformPointToLocalCoordSpace(const gfx::Point& point, |
204 cc::SurfaceId original_surface, | 204 cc::SurfaceId original_surface, |
205 gfx::Point* transformed_point) override; | 205 gfx::Point* transformed_point) override; |
206 | 206 |
| 207 #if defined(OS_WIN) |
| 208 void SetLegacyRenderWidgetHostHWND(LegacyRenderWidgetHostHWND* legacy_hwnd); |
| 209 #endif |
| 210 |
207 // Overridden from ui::TextInputClient: | 211 // Overridden from ui::TextInputClient: |
208 void SetCompositionText(const ui::CompositionText& composition) override; | 212 void SetCompositionText(const ui::CompositionText& composition) override; |
209 void ConfirmCompositionText() override; | 213 void ConfirmCompositionText() override; |
210 void ClearCompositionText() override; | 214 void ClearCompositionText() override; |
211 void InsertText(const base::string16& text) override; | 215 void InsertText(const base::string16& text) override; |
212 void InsertChar(const ui::KeyEvent& event) override; | 216 void InsertChar(const ui::KeyEvent& event) override; |
213 ui::TextInputType GetTextInputType() const override; | 217 ui::TextInputType GetTextInputType() const override; |
214 ui::TextInputMode GetTextInputMode() const override; | 218 ui::TextInputMode GetTextInputMode() const override; |
215 int GetTextInputFlags() const override; | 219 int GetTextInputFlags() const override; |
216 bool CanComposeInline() const override; | 220 bool CanComposeInline() const override; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // Overridden from aura::WindowTreeHostObserver: | 283 // Overridden from aura::WindowTreeHostObserver: |
280 void OnHostMoved(const aura::WindowTreeHost* host, | 284 void OnHostMoved(const aura::WindowTreeHost* host, |
281 const gfx::Point& new_origin) override; | 285 const gfx::Point& new_origin) override; |
282 | 286 |
283 #if defined(OS_WIN) | 287 #if defined(OS_WIN) |
284 // Gets the HWND of the host window. | 288 // Gets the HWND of the host window. |
285 HWND GetHostWindowHWND() const; | 289 HWND GetHostWindowHWND() const; |
286 | 290 |
287 // Updates the cursor clip region. Used for mouse locking. | 291 // Updates the cursor clip region. Used for mouse locking. |
288 void UpdateMouseLockRegion(); | 292 void UpdateMouseLockRegion(); |
289 | |
290 // Notification that the LegacyRenderWidgetHostHWND was destroyed. | |
291 void OnLegacyWindowDestroyed(); | |
292 #endif | 293 #endif |
293 | 294 |
294 // Method to indicate if this instance is shutting down or closing. | 295 // Method to indicate if this instance is shutting down or closing. |
295 // TODO(shrikant): Discuss around to see if it makes sense to add this method | 296 // TODO(shrikant): Discuss around to see if it makes sense to add this method |
296 // as part of RenderWidgetHostView. | 297 // as part of RenderWidgetHostView. |
297 bool IsClosing() const { return in_shutdown_; } | 298 bool IsClosing() const { return in_shutdown_; } |
298 | 299 |
299 // Sets whether the overscroll controller should be enabled for this page. | 300 // Sets whether the overscroll controller should be enabled for this page. |
300 void SetOverscrollControllerEnabled(bool enabled); | 301 void SetOverscrollControllerEnabled(bool enabled); |
301 | 302 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 VISIBLE, | 617 VISIBLE, |
617 NOT_VISIBLE, | 618 NOT_VISIBLE, |
618 }; | 619 }; |
619 CursorVisibilityState cursor_visibility_state_in_renderer_; | 620 CursorVisibilityState cursor_visibility_state_in_renderer_; |
620 | 621 |
621 #if defined(OS_WIN) | 622 #if defined(OS_WIN) |
622 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used | 623 // The LegacyRenderWidgetHostHWND class provides a dummy HWND which is used |
623 // for accessibility, as the container for windowless plugins like | 624 // for accessibility, as the container for windowless plugins like |
624 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, | 625 // Flash/Silverlight, etc and for legacy drivers for trackpoints/trackpads, |
625 // etc. | 626 // etc. |
626 // The LegacyRenderWidgetHostHWND instance is created during the first call | |
627 // to RenderWidgetHostViewAura::InternalSetBounds. The instance is destroyed | |
628 // when the LegacyRenderWidgetHostHWND hwnd is destroyed. | |
629 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; | 627 content::LegacyRenderWidgetHostHWND* legacy_render_widget_host_HWND_; |
630 | 628 |
631 // Set to true if the legacy_render_widget_host_HWND_ instance was destroyed | |
632 // by Windows. This could happen if the browser window was destroyed by | |
633 // DestroyWindow for e.g. This flag helps ensure that we don't try to create | |
634 // the LegacyRenderWidgetHostHWND instance again as that would be a futile | |
635 // exercise. | |
636 bool legacy_window_destroyed_; | |
637 | |
638 // Contains a copy of the last context menu request parameters. Only set when | 629 // Contains a copy of the last context menu request parameters. Only set when |
639 // we receive a request to show the context menu on a long press. | 630 // we receive a request to show the context menu on a long press. |
640 std::unique_ptr<ContextMenuParams> last_context_menu_params_; | 631 std::unique_ptr<ContextMenuParams> last_context_menu_params_; |
641 #endif | 632 #endif |
642 | 633 |
643 bool has_snapped_to_boundary_; | 634 bool has_snapped_to_boundary_; |
644 | 635 |
645 std::unique_ptr<TouchSelectionControllerClientAura> | 636 std::unique_ptr<TouchSelectionControllerClientAura> |
646 selection_controller_client_; | 637 selection_controller_client_; |
647 std::unique_ptr<ui::TouchSelectionController> selection_controller_; | 638 std::unique_ptr<ui::TouchSelectionController> selection_controller_; |
(...skipping 25 matching lines...) Expand all Loading... |
673 bool disable_input_event_router_for_testing_; | 664 bool disable_input_event_router_for_testing_; |
674 | 665 |
675 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 666 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
676 | 667 |
677 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 668 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
678 }; | 669 }; |
679 | 670 |
680 } // namespace content | 671 } // namespace content |
681 | 672 |
682 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 673 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |