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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2122023002: Cross-process frames should be notified of device scale factor changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix RenderWidgetHostTest.ResizeScreenInfo. Created 4 years, 4 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 963
964 GURL url = HostZoomMap::GetURLFromEntry(entry); 964 GURL url = HostZoomMap::GetURLFromEntry(entry);
965 if (host != net::GetHostOrSpecFromURL(url) || 965 if (host != net::GetHostOrSpecFromURL(url) ||
966 (!scheme.empty() && !url.SchemeIs(scheme))) { 966 (!scheme.empty() && !url.SchemeIs(scheme))) {
967 return; 967 return;
968 } 968 }
969 969
970 UpdateZoom(level); 970 UpdateZoom(level);
971 } 971 }
972 972
973 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
974 SendPageMessage(
975 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor));
976 }
977
978 void WebContentsImpl::GetScreenInfo(blink::WebScreenInfo* web_screen_info) {
979 if (GetView())
980 GetView()->GetScreenInfo(web_screen_info);
oshima 2016/07/29 18:11:46 indent
wjmaclean 2016/07/29 18:40:04 Done.
981 }
982
973 WebUI* WebContentsImpl::CreateSubframeWebUI(const GURL& url, 983 WebUI* WebContentsImpl::CreateSubframeWebUI(const GURL& url,
974 const std::string& frame_name) { 984 const std::string& frame_name) {
975 DCHECK(!frame_name.empty()); 985 DCHECK(!frame_name.empty());
976 return CreateWebUI(url, frame_name); 986 return CreateWebUI(url, frame_name);
977 } 987 }
978 988
979 WebUI* WebContentsImpl::GetWebUI() const { 989 WebUI* WebContentsImpl::GetWebUI() const {
980 WebUI* commited_web_ui = GetCommittedWebUI(); 990 WebUI* commited_web_ui = GetCommittedWebUI();
981 return commited_web_ui ? commited_web_ui 991 return commited_web_ui ? commited_web_ui
982 : GetRenderManager()->GetNavigatingWebUI(); 992 : GetRenderManager()->GetNavigatingWebUI();
(...skipping 4170 matching lines...) Expand 10 before | Expand all | Expand 10 after
5153 for (RenderViewHost* render_view_host : render_view_host_set) 5163 for (RenderViewHost* render_view_host : render_view_host_set)
5154 render_view_host->OnWebkitPreferencesChanged(); 5164 render_view_host->OnWebkitPreferencesChanged();
5155 } 5165 }
5156 5166
5157 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5167 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5158 JavaScriptDialogManager* dialog_manager) { 5168 JavaScriptDialogManager* dialog_manager) {
5159 dialog_manager_ = dialog_manager; 5169 dialog_manager_ = dialog_manager;
5160 } 5170 }
5161 5171
5162 } // namespace content 5172 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698