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 c418b50a2da96acb88cf7b4aa27e818c419e260b..781e888ce8e5338090b6a2399d70d844cc5a4cc7 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.h |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h |
@@ -16,6 +16,7 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
+#include "cc/scheduler/begin_frame_manager.h" |
#include "content/browser/accessibility/browser_accessibility_manager.h" |
#include "content/browser/compositor/delegated_frame_host.h" |
#include "content/browser/compositor/image_transport_factory.h" |
@@ -88,6 +89,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura |
public aura::client::ActivationChangeObserver, |
public aura::client::FocusChangeObserver, |
public aura::client::CursorClientObserver, |
+ public cc::BeginFrameManager::Observer, |
public base::SupportsWeakPtr<RenderWidgetHostViewAura> { |
public: |
// Displays and controls touch editing elements such as selection handles. |
@@ -150,6 +152,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAura |
virtual void SetInsets(const gfx::Insets& insets) OVERRIDE; |
// Overridden from RenderWidgetHostViewBase: |
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, |
const gfx::Rect& pos) OVERRIDE; |
virtual void InitAsFullscreen( |
@@ -319,6 +322,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura |
virtual void OnHostMoved(const aura::WindowTreeHost* host, |
const gfx::Point& new_origin) OVERRIDE; |
+ // Overridden from cc::BeginFrameManager::Observer: |
+ virtual void OnSendBeginFrame(const cc::BeginFrameArgs& args) OVERRIDE; |
+ |
#if defined(OS_WIN) |
// Sets the cutout rects from constrained windows. These are rectangles that |
// windowed NPAPI plugins shouldn't paint in. Overwrites any previous cutout |
@@ -463,6 +469,9 @@ class CONTENT_EXPORT RenderWidgetHostViewAura |
// Helper function to set keyboard focus to the main window. |
void SetKeyboardFocus(); |
+ // Called when RenderWidget want to start BeginFrame scheduling or stop. |
+ void OnSetNeedsBeginFrame(bool enabled); |
+ |
RenderFrameHostImpl* GetFocusedFrame(); |
// The model object. |
@@ -604,6 +613,17 @@ class CONTENT_EXPORT RenderWidgetHostViewAura |
scoped_ptr<aura::client::ScopedTooltipDisabler> tooltip_disabler_; |
+ // True when RenderWidget needs a BeginFrame. |
+ bool needs_begin_frame_; |
+ |
+ // True when --enable-begin-frame-scheduling is used. |
+ bool begin_frame_scheduling_is_enabled_; |
+ |
+ // Pass |last_begin_frame_args_| to BeginFrameManager when |this| is added |
+ // as its observer. With this, BeginFrameManager can determine whether latest |
+ // BeginFrameArgs is used immediately or not. |
+ cc::BeginFrameArgs last_begin_frame_args_; |
+ |
base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |