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

Unified 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: address dana's comment 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.h
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index a2c24a18f237fdbbc8e9a4d38b489a15ea7ceb5e..8f6b7bc4fd46af0530204fd3a5b06ea56c18122c 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -20,6 +20,7 @@
#include "content/browser/compositor/delegated_frame_host.h"
#include "content/browser/compositor/image_transport_factory.h"
#include "content/browser/compositor/owned_mailbox.h"
+#include "content/browser/renderer_host/begin_frame_observer_proxy.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/common/content_export.h"
#include "content/common/cursors/webcursor.h"
@@ -81,6 +82,7 @@ class RenderWidgetHostView;
class CONTENT_EXPORT RenderWidgetHostViewAura
: public RenderWidgetHostViewBase,
public DelegatedFrameHostClient,
+ public BeginFrameObserverProxyClient,
public ui::TextInputClient,
public gfx::DisplayObserver,
public aura::WindowTreeHostObserver,
@@ -471,9 +473,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
int output_surface_id,
const cc::CompositorFrameAck& ack) override;
void DelegatedFrameHostOnLostCompositorResources() override;
- void DelegatedFrameHostUpdateVSyncParameters(
- const base::TimeTicks& timebase,
- const base::TimeDelta& interval) override;
+
+ // BeginFrameObserverProxyClient implementation.
+ void SendBeginFrame(const cc::BeginFrameArgs& args) override;
// Detaches |this| from the input method object.
void DetachFromInputMethod();
@@ -496,6 +498,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
// Helper function to set keyboard focus to the main window.
void SetKeyboardFocus();
+ // Called when RenderWidget wants to start BeginFrame scheduling or stop.
+ void OnSetNeedsBeginFrames(bool needs_begin_frames);
+
RenderFrameHostImpl* GetFocusedFrame();
// The model object.
@@ -652,6 +657,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
// compositing surface and showing the disambiguation popup.
gfx::Vector2dF disambiguation_scroll_offset_;
+ scoped_ptr<BeginFrameObserverProxy> begin_frame_observer_proxy_;
brianderson 2015/03/25 20:25:54 Can this be a straight up BeginFrameObserverProxy
simonhong 2015/03/25 23:21:49 Yep, scoped_ptr is not needed in this case because
+
base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
};

Powered by Google App Engine
This is Rietveld 408576698