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

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: Rebase. 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 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 #include "ui/gfx/switches.h" 93 #include "ui/gfx/switches.h"
95 #include "ui/native_theme/native_theme_features.h" 94 #include "ui/native_theme/native_theme_features.h"
96 #include "url/url_constants.h" 95 #include "url/url_constants.h"
97 96
98 #if defined(OS_WIN) 97 #if defined(OS_WIN)
99 #include "ui/display/win/screen_win.h" 98 #include "ui/display/win/screen_win.h"
100 #include "ui/gfx/geometry/dip_util.h" 99 #include "ui/gfx/geometry/dip_util.h"
101 #include "ui/gfx/platform_font_win.h" 100 #include "ui/gfx/platform_font_win.h"
102 #endif 101 #endif
103 102
103 #if !defined(OS_ANDROID)
104 #include "content/browser/host_zoom_map_impl.h"
105 #endif
106
104 using base::TimeDelta; 107 using base::TimeDelta;
105 using blink::WebConsoleMessage; 108 using blink::WebConsoleMessage;
106 using blink::WebInputEvent; 109 using blink::WebInputEvent;
107 using blink::WebMediaPlayerAction; 110 using blink::WebMediaPlayerAction;
108 using blink::WebPluginAction; 111 using blink::WebPluginAction;
109 112
110 namespace content { 113 namespace content {
111 namespace { 114 namespace {
112 115
113 void GetPlatformSpecificPrefs(RendererPreferences* prefs) { 116 void GetPlatformSpecificPrefs(RendererPreferences* prefs) {
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 Send(new ViewMsg_Move_ACK(GetRoutingID())); 835 Send(new ViewMsg_Move_ACK(GetRoutingID()));
833 } 836 }
834 837
835 void RenderViewHostImpl::OnDocumentAvailableInMainFrame( 838 void RenderViewHostImpl::OnDocumentAvailableInMainFrame(
836 bool uses_temporary_zoom_level) { 839 bool uses_temporary_zoom_level) {
837 delegate_->DocumentAvailableInMainFrame(this); 840 delegate_->DocumentAvailableInMainFrame(this);
838 841
839 if (!uses_temporary_zoom_level) 842 if (!uses_temporary_zoom_level)
840 return; 843 return;
841 844
845 #if !defined(OS_ANDROID)
842 HostZoomMapImpl* host_zoom_map = 846 HostZoomMapImpl* host_zoom_map =
843 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance())); 847 static_cast<HostZoomMapImpl*>(HostZoomMap::Get(GetSiteInstance()));
844 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(), 848 host_zoom_map->SetTemporaryZoomLevel(GetProcess()->GetID(),
845 GetRoutingID(), 849 GetRoutingID(),
846 host_zoom_map->GetDefaultZoomLevel()); 850 host_zoom_map->GetDefaultZoomLevel());
851 #endif // !defined(OS_ANDROID)
847 } 852 }
848 853
849 void RenderViewHostImpl::OnDidContentsPreferredSizeChange( 854 void RenderViewHostImpl::OnDidContentsPreferredSizeChange(
850 const gfx::Size& new_size) { 855 const gfx::Size& new_size) {
851 delegate_->UpdatePreferredSize(new_size); 856 delegate_->UpdatePreferredSize(new_size);
852 } 857 }
853 858
854 void RenderViewHostImpl::OnRouteCloseEvent() { 859 void RenderViewHostImpl::OnRouteCloseEvent() {
855 // Have the delegate route this to the active RenderViewHost. 860 // Have the delegate route this to the active RenderViewHost.
856 delegate_->RouteCloseEvent(this); 861 delegate_->RouteCloseEvent(this);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 } 968 }
964 969
965 void RenderViewHostImpl::ClosePageTimeout() { 970 void RenderViewHostImpl::ClosePageTimeout() {
966 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 971 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
967 return; 972 return;
968 973
969 ClosePageIgnoringUnloadEvents(); 974 ClosePageIgnoringUnloadEvents();
970 } 975 }
971 976
972 } // namespace content 977 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/storage_partition_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698