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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2928643003: Propagate auto-resize viewport values to OOPIF processes (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 const gfx::Size& max_size) { 930 const gfx::Size& max_size) {
931 GetWidget()->SetAutoResize(true, min_size, max_size); 931 GetWidget()->SetAutoResize(true, min_size, max_size);
932 Send(new ViewMsg_EnableAutoResize(GetRoutingID(), min_size, max_size)); 932 Send(new ViewMsg_EnableAutoResize(GetRoutingID(), min_size, max_size));
933 } 933 }
934 934
935 void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) { 935 void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) {
936 GetWidget()->SetAutoResize(false, gfx::Size(), gfx::Size()); 936 GetWidget()->SetAutoResize(false, gfx::Size(), gfx::Size());
937 Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size)); 937 Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size));
938 if (!new_size.IsEmpty()) 938 if (!new_size.IsEmpty())
939 GetWidget()->GetView()->SetSize(new_size); 939 GetWidget()->GetView()->SetSize(new_size);
940 // This clears the cached value in the WebContents, so that OOPIFs will
941 // stop using it.
942 if (GetWidget()->delegate())
943 GetWidget()->delegate()->ResetAutoResizeSize();
940 } 944 }
941 945
942 void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation( 946 void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation(
943 const gfx::Point& location, const blink::WebMediaPlayerAction& action) { 947 const gfx::Point& location, const blink::WebMediaPlayerAction& action) {
944 Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action)); 948 Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action));
945 } 949 }
946 950
947 void RenderViewHostImpl::ExecutePluginActionAtLocation( 951 void RenderViewHostImpl::ExecutePluginActionAtLocation(
948 const gfx::Point& location, const blink::WebPluginAction& action) { 952 const gfx::Point& location, const blink::WebPluginAction& action) {
949 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); 953 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action));
(...skipping 18 matching lines...) Expand all
968 } 972 }
969 973
970 void RenderViewHostImpl::ClosePageTimeout() { 974 void RenderViewHostImpl::ClosePageTimeout() {
971 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 975 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
972 return; 976 return;
973 977
974 ClosePageIgnoringUnloadEvents(); 978 ClosePageIgnoringUnloadEvents();
975 } 979 }
976 980
977 } // namespace content 981 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698