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

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

Issue 2914013004: Propagate auto-resize viewport values to OOPIF processes (Closed)
Patch Set: Change SendScreenRects call to WasResized; fixed test breakage 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 const gfx::Size& max_size) { 926 const gfx::Size& max_size) {
927 GetWidget()->SetAutoResize(true, min_size, max_size); 927 GetWidget()->SetAutoResize(true, min_size, max_size);
928 Send(new ViewMsg_EnableAutoResize(GetRoutingID(), min_size, max_size)); 928 Send(new ViewMsg_EnableAutoResize(GetRoutingID(), min_size, max_size));
929 } 929 }
930 930
931 void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) { 931 void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) {
932 GetWidget()->SetAutoResize(false, gfx::Size(), gfx::Size()); 932 GetWidget()->SetAutoResize(false, gfx::Size(), gfx::Size());
933 Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size)); 933 Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size));
934 if (!new_size.IsEmpty()) 934 if (!new_size.IsEmpty())
935 GetWidget()->GetView()->SetSize(new_size); 935 GetWidget()->GetView()->SetSize(new_size);
936 // This clears the cached value in the WebContents, so that OOPIFs will
937 // stop using it.
938 if (GetWidget()->delegate()) {
alexmos 2017/06/02 17:31:16 nit: {} not necessary anymore
939 GetWidget()->delegate()->ResetAutoResizeSize();
940 }
936 } 941 }
937 942
938 void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation( 943 void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation(
939 const gfx::Point& location, const blink::WebMediaPlayerAction& action) { 944 const gfx::Point& location, const blink::WebMediaPlayerAction& action) {
940 Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action)); 945 Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action));
941 } 946 }
942 947
943 void RenderViewHostImpl::ExecutePluginActionAtLocation( 948 void RenderViewHostImpl::ExecutePluginActionAtLocation(
944 const gfx::Point& location, const blink::WebPluginAction& action) { 949 const gfx::Point& location, const blink::WebPluginAction& action) {
945 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); 950 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action));
(...skipping 18 matching lines...) Expand all
964 } 969 }
965 970
966 void RenderViewHostImpl::ClosePageTimeout() { 971 void RenderViewHostImpl::ClosePageTimeout() {
967 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 972 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
968 return; 973 return;
969 974
970 ClosePageIgnoringUnloadEvents(); 975 ClosePageIgnoringUnloadEvents();
971 } 976 }
972 977
973 } // namespace content 978 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698