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

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

Issue 2874833002: Don't compile code for desktop zoom or GuestViews on mobile platforms. (Closed)
Patch Set: Update CastBrowserContext Created 3 years, 7 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 19 matching lines...) Expand all
30 #include "build/build_config.h" 30 #include "build/build_config.h"
31 #include "cc/base/switches.h" 31 #include "cc/base/switches.h"
32 #include "components/variations/variations_associated_data.h" 32 #include "components/variations/variations_associated_data.h"
33 #include "content/browser/bad_message.h" 33 #include "content/browser/bad_message.h"
34 #include "content/browser/child_process_security_policy_impl.h" 34 #include "content/browser/child_process_security_policy_impl.h"
35 #include "content/browser/dom_storage/session_storage_namespace_impl.h" 35 #include "content/browser/dom_storage/session_storage_namespace_impl.h"
36 #include "content/browser/frame_host/frame_tree.h" 36 #include "content/browser/frame_host/frame_tree.h"
37 #include "content/browser/gpu/compositor_util.h" 37 #include "content/browser/gpu/compositor_util.h"
38 #include "content/browser/gpu/gpu_data_manager_impl.h" 38 #include "content/browser/gpu/gpu_data_manager_impl.h"
39 #include "content/browser/gpu/gpu_process_host.h" 39 #include "content/browser/gpu/gpu_process_host.h"
40 #include "content/browser/host_zoom_map_impl.h"
41 #include "content/browser/loader/resource_dispatcher_host_impl.h" 40 #include "content/browser/loader/resource_dispatcher_host_impl.h"
42 #include "content/browser/renderer_host/input/timeout_monitor.h" 41 #include "content/browser/renderer_host/input/timeout_monitor.h"
43 #include "content/browser/renderer_host/render_process_host_impl.h" 42 #include "content/browser/renderer_host/render_process_host_impl.h"
44 #include "content/browser/renderer_host/render_view_host_delegate.h" 43 #include "content/browser/renderer_host/render_view_host_delegate.h"
45 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 44 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
46 #include "content/browser/renderer_host/render_widget_host_delegate.h" 45 #include "content/browser/renderer_host/render_widget_host_delegate.h"
47 #include "content/browser/renderer_host/render_widget_host_view_base.h" 46 #include "content/browser/renderer_host/render_widget_host_view_base.h"
48 #include "content/common/browser_plugin/browser_plugin_messages.h" 47 #include "content/common/browser_plugin/browser_plugin_messages.h"
49 #include "content/common/content_switches_internal.h" 48 #include "content/common/content_switches_internal.h"
50 #include "content/common/frame_messages.h" 49 #include "content/common/frame_messages.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #include "ui/gfx/native_widget_types.h" 92 #include "ui/gfx/native_widget_types.h"
94 #include "ui/native_theme/native_theme_features.h" 93 #include "ui/native_theme/native_theme_features.h"
95 #include "url/url_constants.h" 94 #include "url/url_constants.h"
96 95
97 #if defined(OS_WIN) 96 #if defined(OS_WIN)
98 #include "ui/display/win/screen_win.h" 97 #include "ui/display/win/screen_win.h"
99 #include "ui/gfx/geometry/dip_util.h" 98 #include "ui/gfx/geometry/dip_util.h"
100 #include "ui/gfx/platform_font_win.h" 99 #include "ui/gfx/platform_font_win.h"
101 #endif 100 #endif
102 101
102 #if !defined(OS_ANDROID)
103 #include "content/browser/host_zoom_map_impl.h"
104 #endif
105
103 using base::TimeDelta; 106 using base::TimeDelta;
104 using blink::WebConsoleMessage; 107 using blink::WebConsoleMessage;
105 using blink::WebInputEvent; 108 using blink::WebInputEvent;
106 using blink::WebMediaPlayerAction; 109 using blink::WebMediaPlayerAction;
107 using blink::WebPluginAction; 110 using blink::WebPluginAction;
108 111
109 namespace content { 112 namespace content {
110 namespace { 113 namespace {
111 114
112 void GetPlatformSpecificPrefs(RendererPreferences* prefs) { 115 void GetPlatformSpecificPrefs(RendererPreferences* prefs) {
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 Send(new ViewMsg_Move_ACK(GetRoutingID())); 824 Send(new ViewMsg_Move_ACK(GetRoutingID()));
822 } 825 }
823 826
824 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( 827 void RenderViewHostImpl::OnDocumentAvailableInMainFrame(
825 bool uses_temporary_zoom_level) { 828 bool uses_temporary_zoom_level) {
826 delegate_->DocumentAvailableInMainFrame(this); 829 delegate_->DocumentAvailableInMainFrame(this);
827 830
828 if (!uses_temporary_zoom_level) 831 if (!uses_temporary_zoom_level)
829 return; 832 return;
830 833
834 #if !defined(OS_ANDROID)
831 HostZoomMapImpl* host_zoom_map = 835 HostZoomMapImpl* host_zoom_map =
832 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance())); 836 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance()));
833 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), 837 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(),
834 GetRoutingID(), 838 GetRoutingID(),
835 host_zoom_map->GetDefaultZoomLevel()); 839 host_zoom_map->GetDefaultZoomLevel());
840 #endif // !defined(OS_ANDROID)
836 } 841 }
837 842
838 void RenderViewHostImpl::OnDidContentsPreferredSizeChange( 843 void RenderViewHostImpl::OnDidContentsPreferredSizeChange(
839 const gfx::Size& new_size) { 844 const gfx::Size& new_size) {
840 delegate_->UpdatePreferredSize(new_size); 845 delegate_->UpdatePreferredSize(new_size);
841 } 846 }
842 847
843 void RenderViewHostImpl::OnRouteCloseEvent() { 848 void RenderViewHostImpl::OnRouteCloseEvent() {
844 // Have the delegate route this to the active RenderViewHost. 849 // Have the delegate route this to the active RenderViewHost.
845 delegate_->RouteCloseEvent(this); 850 delegate_->RouteCloseEvent(this);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 } 963 }
959 964
960 void RenderViewHostImpl::ClosePageTimeout() { 965 void RenderViewHostImpl::ClosePageTimeout() {
961 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 966 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
962 return; 967 return;
963 968
964 ClosePageIgnoringUnloadEvents(); 969 ClosePageIgnoringUnloadEvents();
965 } 970 }
966 971
967 } // namespace content 972 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698