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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2832093003: Implement screen orientation for out-of-process iframes. (Closed)
Patch Set: add comments 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 3f21403e359259cfde64d065611d1f2f69344044..42953f4e77f7295463699c857473d9696bcfdd4d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1252,6 +1252,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,
@@ -2133,11 +2134,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())
@@ -2278,6 +2274,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.
+ if (!main_render_frame_)
+ screen_info_ = screen_info;
+}
+
GURL RenderViewImpl::GetURLForGraphicsContext3D() {
DCHECK(webview());
if (webview()->MainFrame()->IsWebLocalFrame())
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698