| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
| 19 #include "content/browser/accessibility/browser_accessibility_manager.h" | 19 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 20 #include "content/browser/compositor/delegated_frame_host.h" | 20 #include "content/browser/compositor/delegated_frame_host.h" |
| 21 #include "content/browser/compositor/image_transport_factory.h" | 21 #include "content/browser/compositor/image_transport_factory.h" |
| 22 #include "content/browser/compositor/owned_mailbox.h" | 22 #include "content/browser/compositor/owned_mailbox.h" |
| 23 #include "content/browser/renderer_host/begin_frame_observer_proxy.h" |
| 23 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 24 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 24 #include "content/common/content_export.h" | 25 #include "content/common/content_export.h" |
| 25 #include "content/common/cursors/webcursor.h" | 26 #include "content/common/cursors/webcursor.h" |
| 26 #include "third_party/skia/include/core/SkRegion.h" | 27 #include "third_party/skia/include/core/SkRegion.h" |
| 27 #include "ui/aura/client/cursor_client_observer.h" | 28 #include "ui/aura/client/cursor_client_observer.h" |
| 28 #include "ui/aura/client/focus_change_observer.h" | 29 #include "ui/aura/client/focus_change_observer.h" |
| 29 #include "ui/aura/window_delegate.h" | 30 #include "ui/aura/window_delegate.h" |
| 30 #include "ui/aura/window_tree_host_observer.h" | 31 #include "ui/aura/window_tree_host_observer.h" |
| 31 #include "ui/base/ime/text_input_client.h" | 32 #include "ui/base/ime/text_input_client.h" |
| 32 #include "ui/base/touch/selection_bound.h" | 33 #include "ui/base/touch/selection_bound.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 75 |
| 75 class OverscrollController; | 76 class OverscrollController; |
| 76 class RenderFrameHostImpl; | 77 class RenderFrameHostImpl; |
| 77 class RenderWidgetHostImpl; | 78 class RenderWidgetHostImpl; |
| 78 class RenderWidgetHostView; | 79 class RenderWidgetHostView; |
| 79 | 80 |
| 80 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 81 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
| 81 class CONTENT_EXPORT RenderWidgetHostViewAura | 82 class CONTENT_EXPORT RenderWidgetHostViewAura |
| 82 : public RenderWidgetHostViewBase, | 83 : public RenderWidgetHostViewBase, |
| 83 public DelegatedFrameHostClient, | 84 public DelegatedFrameHostClient, |
| 85 public BeginFrameObserverProxyClient, |
| 84 public ui::TextInputClient, | 86 public ui::TextInputClient, |
| 85 public gfx::DisplayObserver, | 87 public gfx::DisplayObserver, |
| 86 public aura::WindowTreeHostObserver, | 88 public aura::WindowTreeHostObserver, |
| 87 public aura::WindowDelegate, | 89 public aura::WindowDelegate, |
| 88 public aura::client::ActivationDelegate, | 90 public aura::client::ActivationDelegate, |
| 89 public aura::client::ActivationChangeObserver, | 91 public aura::client::ActivationChangeObserver, |
| 90 public aura::client::FocusChangeObserver, | 92 public aura::client::FocusChangeObserver, |
| 91 public aura::client::CursorClientObserver { | 93 public aura::client::CursorClientObserver { |
| 92 public: | 94 public: |
| 93 // Displays and controls touch editing elements such as selection handles. | 95 // Displays and controls touch editing elements such as selection handles. |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 int output_surface_id, | 470 int output_surface_id, |
| 469 const cc::CompositorFrameAck& ack) override; | 471 const cc::CompositorFrameAck& ack) override; |
| 470 void DelegatedFrameHostSendReclaimCompositorResources( | 472 void DelegatedFrameHostSendReclaimCompositorResources( |
| 471 int output_surface_id, | 473 int output_surface_id, |
| 472 const cc::CompositorFrameAck& ack) override; | 474 const cc::CompositorFrameAck& ack) override; |
| 473 void DelegatedFrameHostOnLostCompositorResources() override; | 475 void DelegatedFrameHostOnLostCompositorResources() override; |
| 474 void DelegatedFrameHostUpdateVSyncParameters( | 476 void DelegatedFrameHostUpdateVSyncParameters( |
| 475 const base::TimeTicks& timebase, | 477 const base::TimeTicks& timebase, |
| 476 const base::TimeDelta& interval) override; | 478 const base::TimeDelta& interval) override; |
| 477 | 479 |
| 480 // BeginFrameObserverProxyClient implementation. |
| 481 void SendBeginFrame(const cc::BeginFrameArgs& args) override; |
| 482 |
| 478 // Detaches |this| from the input method object. | 483 // Detaches |this| from the input method object. |
| 479 void DetachFromInputMethod(); | 484 void DetachFromInputMethod(); |
| 480 | 485 |
| 481 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method | 486 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method |
| 482 // calls our keybindings handler against the event and send matched | 487 // calls our keybindings handler against the event and send matched |
| 483 // edit commands to renderer instead. | 488 // edit commands to renderer instead. |
| 484 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); | 489 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 485 | 490 |
| 486 // Dismisses a Web Popup on a mouse or touch press outside the popup and its | 491 // Dismisses a Web Popup on a mouse or touch press outside the popup and its |
| 487 // parent. | 492 // parent. |
| 488 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); | 493 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); |
| 489 | 494 |
| 490 // Converts |rect| from window coordinate to screen coordinate. | 495 // Converts |rect| from window coordinate to screen coordinate. |
| 491 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; | 496 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; |
| 492 | 497 |
| 493 // Converts |rect| from screen coordinate to window coordinate. | 498 // Converts |rect| from screen coordinate to window coordinate. |
| 494 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; | 499 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; |
| 495 | 500 |
| 496 // Helper function to set keyboard focus to the main window. | 501 // Helper function to set keyboard focus to the main window. |
| 497 void SetKeyboardFocus(); | 502 void SetKeyboardFocus(); |
| 498 | 503 |
| 504 // Called when RenderWidget wants to start BeginFrame scheduling or stop. |
| 505 void OnSetNeedsBeginFrames(bool needs_begin_frames); |
| 506 |
| 499 RenderFrameHostImpl* GetFocusedFrame(); | 507 RenderFrameHostImpl* GetFocusedFrame(); |
| 500 | 508 |
| 501 // The model object. | 509 // The model object. |
| 502 RenderWidgetHostImpl* host_; | 510 RenderWidgetHostImpl* host_; |
| 503 | 511 |
| 504 aura::Window* window_; | 512 aura::Window* window_; |
| 505 | 513 |
| 506 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; | 514 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; |
| 507 | 515 |
| 508 scoped_ptr<WindowObserver> window_observer_; | 516 scoped_ptr<WindowObserver> window_observer_; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 // RenderWidgetHostViewGuest. | 653 // RenderWidgetHostViewGuest. |
| 646 bool is_guest_view_hack_; | 654 bool is_guest_view_hack_; |
| 647 | 655 |
| 648 gfx::Rect disambiguation_target_rect_; | 656 gfx::Rect disambiguation_target_rect_; |
| 649 | 657 |
| 650 // The last scroll offset when we start to render the link disambiguation | 658 // The last scroll offset when we start to render the link disambiguation |
| 651 // view, so we can ensure the window hasn't moved between copying from the | 659 // view, so we can ensure the window hasn't moved between copying from the |
| 652 // compositing surface and showing the disambiguation popup. | 660 // compositing surface and showing the disambiguation popup. |
| 653 gfx::Vector2dF disambiguation_scroll_offset_; | 661 gfx::Vector2dF disambiguation_scroll_offset_; |
| 654 | 662 |
| 663 scoped_ptr<BeginFrameObserverProxy> begin_frame_observer_proxy_; |
| 664 |
| 655 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 665 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
| 656 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 666 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 657 }; | 667 }; |
| 658 | 668 |
| 659 } // namespace content | 669 } // namespace content |
| 660 | 670 |
| 661 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 671 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |