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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2832093003: Implement screen orientation for out-of-process iframes. (Closed)
Patch Set: fix dcheck Created 3 years, 8 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/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index f526f7ecbd7dcf78b081974a879ef5aab921677c..5bf4e450beef2d5119d8e9de52e1e22d8fbbb37e 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1251,6 +1251,7 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength,
OnSetHistoryOffsetAndLength)
IPC_MESSAGE_HANDLER(PageMsg_AudioStateChanged, OnAudioStateChanged)
+ IPC_MESSAGE_HANDLER(PageMsg_UpdateScreenInfo, OnUpdateScreenInfo)
#if defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateBrowserControlsState,
@@ -2153,11 +2154,6 @@ void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location,
webview()->PerformMediaPlayerAction(action, location);
}
-void RenderViewImpl::OnOrientationChange() {
- if (webview() && webview()->MainFrame()->IsWebLocalFrame())
- webview()->MainFrame()->ToWebLocalFrame()->SendOrientationChangeEvent();
-}
-
void RenderViewImpl::OnPluginActionAt(const gfx::Point& location,
const WebPluginAction& action) {
if (webview())
@@ -2298,6 +2294,14 @@ void RenderViewImpl::OnPageWasShown() {
}
}
+void RenderViewImpl::OnUpdateScreenInfo(const ScreenInfo& screen_info) {
+ // This IPC only updates the screen info on RenderViews that have a remote
+ // main frame. For local main frames, the ScreenInfo is updated in
+ // ViewMsg_Resize.
dcheng 2017/04/25 13:10:44 Is this something we'll be able to consolidate eve
lfg 2017/04/25 15:44:31 I've implemented it this way so the OOPIF-change w
dcheng 2017/04/25 23:32:05 It's not clear to me from the CL description how s
+ if (!main_render_frame_)
+ screen_info_ = screen_info;
+}
+
GURL RenderViewImpl::GetURLForGraphicsContext3D() {
DCHECK(webview());
if (webview()->MainFrame()->IsWebLocalFrame())

Powered by Google App Engine
This is Rietveld 408576698