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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1000503002: Add BeginFrameObserverProxy (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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 9da28aa7d28c30409d895ebee210f9a7a99e5e28..264f815cef4dba108f60bde90ab88a05ce0ab1eb 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -63,7 +63,6 @@
#include "ui/base/hit_test.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/ui_base_types.h"
-#include "ui/compositor/compositor_vsync_manager.h"
#include "ui/compositor/dip_util.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
@@ -418,7 +417,7 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host,
bool is_guest_view_hack)
: host_(RenderWidgetHostImpl::From(host)),
window_(new aura::Window(this)),
- delegated_frame_host_(new DelegatedFrameHost(this)),
+ delegated_frame_host_(new DelegatedFrameHost(this, false)),
in_shutdown_(false),
in_bounds_changed_(false),
is_fullscreen_(false),
@@ -471,6 +470,8 @@ bool RenderWidgetHostViewAura::OnMessageReceived(
// RenderWidgetHostViewAndroid should also be moved at the same time.
IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
OnTextInputStateChanged)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
+ OnSetNeedsBeginFrames)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -2602,8 +2603,12 @@ SkColorType RenderWidgetHostViewAura::PreferredReadbackFormat() {
return kN32_SkColorType;
}
+void RenderWidgetHostViewAura::OnSetNeedsBeginFrames(bool needs_begin_frames) {
+ delegated_frame_host_->OnSetNeedsBeginFrames(needs_begin_frames);
+}
+
////////////////////////////////////////////////////////////////////////////////
-// DelegatedFrameHost, public:
+// DelegatedFrameHostClient, public:
ui::Layer* RenderWidgetHostViewAura::DelegatedFrameHostGetLayer() const {
return window_->layer();
@@ -2671,6 +2676,11 @@ void RenderWidgetHostViewAura::DelegatedFrameHostUpdateVSyncParameters(
host_->UpdateVSyncParameters(timebase, interval);
}
+void RenderWidgetHostViewAura::DelegatedFrameHostSendBeginFrame(
+ const cc::BeginFrameArgs& args) {
+ host_->Send(new ViewMsg_BeginFrame(host_->GetRoutingID(), args));
+}
+
void RenderWidgetHostViewAura::OnDidNavigateMainFrameToNewPage() {
ui::GestureRecognizer::Get()->CancelActiveTouches(window_);
}

Powered by Google App Engine
This is Rietveld 408576698