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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 void ClearCompositorFrame() override; | 184 void ClearCompositorFrame() override; |
185 void DidStopFlinging() override; | 185 void DidStopFlinging() override; |
186 void OnDidNavigateMainFrameToNewPage() override; | 186 void OnDidNavigateMainFrameToNewPage() override; |
187 void LockCompositingSurface() override; | 187 void LockCompositingSurface() override; |
188 void UnlockCompositingSurface() override; | 188 void UnlockCompositingSurface() override; |
189 uint32_t GetSurfaceIdNamespace() override; | 189 uint32_t GetSurfaceIdNamespace() override; |
190 uint32_t SurfaceIdNamespaceAtPoint(const gfx::Point& point, | 190 uint32_t SurfaceIdNamespaceAtPoint(const gfx::Point& point, |
191 gfx::Point* transformed_point) override; | 191 gfx::Point* transformed_point) override; |
192 void ProcessMouseEvent(const blink::WebMouseEvent& event) override; | 192 void ProcessMouseEvent(const blink::WebMouseEvent& event) override; |
193 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event) override; | 193 void ProcessMouseWheelEvent(const blink::WebMouseWheelEvent& event) override; |
| 194 void ProcessTouchEvent(const blink::WebTouchEvent& event, |
| 195 const ui::LatencyInfo& latency) override; |
194 | 196 |
195 #if defined(OS_WIN) | 197 #if defined(OS_WIN) |
196 void SetParentNativeViewAccessible( | 198 void SetParentNativeViewAccessible( |
197 gfx::NativeViewAccessible accessible_parent) override; | 199 gfx::NativeViewAccessible accessible_parent) override; |
198 gfx::NativeViewId GetParentForWindowlessPlugin() const override; | 200 gfx::NativeViewId GetParentForWindowlessPlugin() const override; |
199 #endif | 201 #endif |
200 | 202 |
201 // Overridden from ui::TextInputClient: | 203 // Overridden from ui::TextInputClient: |
202 void SetCompositionText(const ui::CompositionText& composition) override; | 204 void SetCompositionText(const ui::CompositionText& composition) override; |
203 void ConfirmCompositionText() override; | 205 void ConfirmCompositionText() override; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 // Called when RenderWidget wants to start BeginFrame scheduling or stop. | 474 // Called when RenderWidget wants to start BeginFrame scheduling or stop. |
473 void OnSetNeedsBeginFrames(bool needs_begin_frames); | 475 void OnSetNeedsBeginFrames(bool needs_begin_frames); |
474 | 476 |
475 RenderFrameHostImpl* GetFocusedFrame(); | 477 RenderFrameHostImpl* GetFocusedFrame(); |
476 | 478 |
477 // Returns true if the |event| passed in can be forwarded to the renderer. | 479 // Returns true if the |event| passed in can be forwarded to the renderer. |
478 bool CanRendererHandleEvent(const ui::MouseEvent* event, | 480 bool CanRendererHandleEvent(const ui::MouseEvent* event, |
479 bool mouse_locked, | 481 bool mouse_locked, |
480 bool selection_popup); | 482 bool selection_popup); |
481 | 483 |
| 484 // Returns true when we can do SurfaceHitTesting for the event type. |
| 485 bool ShouldRouteEvent(const ui::Event* event) const; |
| 486 |
482 // Called when the parent window bounds change. | 487 // Called when the parent window bounds change. |
483 void HandleParentBoundsChanged(); | 488 void HandleParentBoundsChanged(); |
484 | 489 |
485 // Called when the parent window hierarchy for our window changes. | 490 // Called when the parent window hierarchy for our window changes. |
486 void ParentHierarchyChanged(); | 491 void ParentHierarchyChanged(); |
487 | 492 |
488 // Helper function to be called whenever new selection information is | 493 // Helper function to be called whenever new selection information is |
489 // received. It will update selection controller. | 494 // received. It will update selection controller. |
490 void SelectionUpdated(bool is_editable, | 495 void SelectionUpdated(bool is_editable, |
491 bool is_empty_text_form_control, | 496 bool is_empty_text_form_control, |
492 const ui::SelectionBound& start, | 497 const ui::SelectionBound& start, |
493 const ui::SelectionBound& end); | 498 const ui::SelectionBound& end); |
494 | 499 |
495 // Helper function to create a selection controller. | 500 // Helper function to create a selection controller. |
496 void CreateSelectionController(); | 501 void CreateSelectionController(); |
497 | 502 |
498 // Performs gesture handling needed for touch text selection. Sets event as | 503 // Performs gesture handling needed for touch text selection. Sets event as |
499 // handled if it should not be further processed. | 504 // handled if it should not be further processed. |
500 void HandleGestureForTouchSelection(ui::GestureEvent* event); | 505 void HandleGestureForTouchSelection(ui::GestureEvent* event); |
501 | 506 |
502 // The model object. | 507 // The model object. |
503 RenderWidgetHostImpl* const host_; | 508 RenderWidgetHostImpl* const host_; |
504 | 509 |
505 aura::Window* window_; | 510 aura::Window* window_; |
506 | 511 |
507 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; | 512 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; |
| 513 bool has_started_rendering_; |
508 | 514 |
509 scoped_ptr<WindowObserver> window_observer_; | 515 scoped_ptr<WindowObserver> window_observer_; |
510 | 516 |
511 // Tracks the ancestors of the RWHVA window for window location changes. | 517 // Tracks the ancestors of the RWHVA window for window location changes. |
512 scoped_ptr<WindowAncestorObserver> ancestor_window_observer_; | 518 scoped_ptr<WindowAncestorObserver> ancestor_window_observer_; |
513 | 519 |
514 // Are we in the process of closing? Tracked so fullscreen views can avoid | 520 // Are we in the process of closing? Tracked so fullscreen views can avoid |
515 // sending a second shutdown request to the host when they lose the focus | 521 // sending a second shutdown request to the host when they lose the focus |
516 // after requesting shutdown for another reason (e.g. Escape key). | 522 // after requesting shutdown for another reason (e.g. Escape key). |
517 bool in_shutdown_; | 523 bool in_shutdown_; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 bool set_focus_on_mouse_down_; | 674 bool set_focus_on_mouse_down_; |
669 | 675 |
670 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 676 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
671 | 677 |
672 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 678 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
673 }; | 679 }; |
674 | 680 |
675 } // namespace content | 681 } // namespace content |
676 | 682 |
677 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 683 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |