Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 1016033006: Enable BeginFrame scheduling on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock( 464 scoped_ptr<ResizeLock> DelegatedFrameHostCreateResizeLock(
463 bool defer_compositor_lock) override; 465 bool defer_compositor_lock) override;
464 void DelegatedFrameHostResizeLockWasReleased() override; 466 void DelegatedFrameHostResizeLockWasReleased() override;
465 void DelegatedFrameHostSendCompositorSwapAck( 467 void DelegatedFrameHostSendCompositorSwapAck(
466 int output_surface_id, 468 int output_surface_id,
467 const cc::CompositorFrameAck& ack) override; 469 const cc::CompositorFrameAck& ack) override;
468 void DelegatedFrameHostSendReclaimCompositorResources( 470 void DelegatedFrameHostSendReclaimCompositorResources(
469 int output_surface_id, 471 int output_surface_id,
470 const cc::CompositorFrameAck& ack) override; 472 const cc::CompositorFrameAck& ack) override;
471 void DelegatedFrameHostOnLostCompositorResources() override; 473 void DelegatedFrameHostOnLostCompositorResources() override;
472 void DelegatedFrameHostUpdateVSyncParameters( 474
473 const base::TimeTicks& timebase, 475 // BeginFrameObserverProxyClient implementation.
474 const base::TimeDelta& interval) override; 476 void SendBeginFrame(const cc::BeginFrameArgs& args) override;
475 477
476 // Detaches |this| from the input method object. 478 // Detaches |this| from the input method object.
477 void DetachFromInputMethod(); 479 void DetachFromInputMethod();
478 480
479 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method 481 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method
480 // calls our keybindings handler against the event and send matched 482 // calls our keybindings handler against the event and send matched
481 // edit commands to renderer instead. 483 // edit commands to renderer instead.
482 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); 484 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event);
483 485
484 // Dismisses a Web Popup on a mouse or touch press outside the popup and its 486 // Dismisses a Web Popup on a mouse or touch press outside the popup and its
485 // parent. 487 // parent.
486 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); 488 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event);
487 489
488 // Converts |rect| from window coordinate to screen coordinate. 490 // Converts |rect| from window coordinate to screen coordinate.
489 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; 491 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const;
490 492
491 // Converts |rect| from screen coordinate to window coordinate. 493 // Converts |rect| from screen coordinate to window coordinate.
492 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; 494 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const;
493 495
494 // Helper function to set keyboard focus to the main window. 496 // Helper function to set keyboard focus to the main window.
495 void SetKeyboardFocus(); 497 void SetKeyboardFocus();
496 498
499 // Called when RenderWidget wants to start BeginFrame scheduling or stop.
500 void OnSetNeedsBeginFrames(bool needs_begin_frames);
501
497 RenderFrameHostImpl* GetFocusedFrame(); 502 RenderFrameHostImpl* GetFocusedFrame();
498 503
499 // The model object. 504 // The model object.
500 RenderWidgetHostImpl* host_; 505 RenderWidgetHostImpl* host_;
501 506
502 aura::Window* window_; 507 aura::Window* window_;
503 508
504 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; 509 scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
505 510
506 scoped_ptr<WindowObserver> window_observer_; 511 scoped_ptr<WindowObserver> window_observer_;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 // RenderWidgetHostViewGuest. 648 // RenderWidgetHostViewGuest.
644 bool is_guest_view_hack_; 649 bool is_guest_view_hack_;
645 650
646 gfx::Rect disambiguation_target_rect_; 651 gfx::Rect disambiguation_target_rect_;
647 652
648 // The last scroll offset when we start to render the link disambiguation 653 // The last scroll offset when we start to render the link disambiguation
649 // view, so we can ensure the window hasn't moved between copying from the 654 // view, so we can ensure the window hasn't moved between copying from the
650 // compositing surface and showing the disambiguation popup. 655 // compositing surface and showing the disambiguation popup.
651 gfx::Vector2dF disambiguation_scroll_offset_; 656 gfx::Vector2dF disambiguation_scroll_offset_;
652 657
658 BeginFrameObserverProxy begin_frame_observer_proxy_;
659
653 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; 660 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
654 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); 661 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
655 }; 662 };
656 663
657 } // namespace content 664 } // namespace content
658 665
659 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ 666 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698