| OLD | NEW |
| 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 Loading... |
| 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()) |
| 939 GetWidget()->delegate()->ResetAutoResizeSize(); |
| 936 } | 940 } |
| 937 | 941 |
| 938 void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation( | 942 void RenderViewHostImpl::ExecuteMediaPlayerActionAtLocation( |
| 939 const gfx::Point& location, const blink::WebMediaPlayerAction& action) { | 943 const gfx::Point& location, const blink::WebMediaPlayerAction& action) { |
| 940 Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action)); | 944 Send(new ViewMsg_MediaPlayerActionAt(GetRoutingID(), location, action)); |
| 941 } | 945 } |
| 942 | 946 |
| 943 void RenderViewHostImpl::ExecutePluginActionAtLocation( | 947 void RenderViewHostImpl::ExecutePluginActionAtLocation( |
| 944 const gfx::Point& location, const blink::WebPluginAction& action) { | 948 const gfx::Point& location, const blink::WebPluginAction& action) { |
| 945 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); | 949 Send(new ViewMsg_PluginActionAt(GetRoutingID(), location, action)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 964 } | 968 } |
| 965 | 969 |
| 966 void RenderViewHostImpl::ClosePageTimeout() { | 970 void RenderViewHostImpl::ClosePageTimeout() { |
| 967 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) | 971 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) |
| 968 return; | 972 return; |
| 969 | 973 |
| 970 ClosePageIgnoringUnloadEvents(); | 974 ClosePageIgnoringUnloadEvents(); |
| 971 } | 975 } |
| 972 | 976 |
| 973 } // namespace content | 977 } // namespace content |
| OLD | NEW |