| 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/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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 984 |
| 985 GURL url = HostZoomMap::GetURLFromEntry(entry); | 985 GURL url = HostZoomMap::GetURLFromEntry(entry); |
| 986 if (host != net::GetHostOrSpecFromURL(url) || | 986 if (host != net::GetHostOrSpecFromURL(url) || |
| 987 (!scheme.empty() && !url.SchemeIs(scheme))) { | 987 (!scheme.empty() && !url.SchemeIs(scheme))) { |
| 988 return; | 988 return; |
| 989 } | 989 } |
| 990 | 990 |
| 991 UpdateZoom(level); | 991 UpdateZoom(level); |
| 992 } | 992 } |
| 993 | 993 |
| 994 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) { |
| 995 SendPageMessage( |
| 996 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor)); |
| 997 } |
| 998 |
| 999 void WebContentsImpl::GetScreenInfo(blink::WebScreenInfo* web_screen_info) { |
| 1000 if (GetView()) |
| 1001 GetView()->GetScreenInfo(web_screen_info); |
| 1002 } |
| 1003 |
| 994 WebUI* WebContentsImpl::CreateSubframeWebUI(const GURL& url, | 1004 WebUI* WebContentsImpl::CreateSubframeWebUI(const GURL& url, |
| 995 const std::string& frame_name) { | 1005 const std::string& frame_name) { |
| 996 DCHECK(!frame_name.empty()); | 1006 DCHECK(!frame_name.empty()); |
| 997 return CreateWebUI(url, frame_name); | 1007 return CreateWebUI(url, frame_name); |
| 998 } | 1008 } |
| 999 | 1009 |
| 1000 WebUI* WebContentsImpl::GetWebUI() const { | 1010 WebUI* WebContentsImpl::GetWebUI() const { |
| 1001 WebUI* commited_web_ui = GetCommittedWebUI(); | 1011 WebUI* commited_web_ui = GetCommittedWebUI(); |
| 1002 return commited_web_ui ? commited_web_ui | 1012 return commited_web_ui ? commited_web_ui |
| 1003 : GetRenderManager()->GetNavigatingWebUI(); | 1013 : GetRenderManager()->GetNavigatingWebUI(); |
| (...skipping 4225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5229 for (RenderViewHost* render_view_host : render_view_host_set) | 5239 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5230 render_view_host->OnWebkitPreferencesChanged(); | 5240 render_view_host->OnWebkitPreferencesChanged(); |
| 5231 } | 5241 } |
| 5232 | 5242 |
| 5233 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5243 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 5234 JavaScriptDialogManager* dialog_manager) { | 5244 JavaScriptDialogManager* dialog_manager) { |
| 5235 dialog_manager_ = dialog_manager; | 5245 dialog_manager_ = dialog_manager; |
| 5236 } | 5246 } |
| 5237 | 5247 |
| 5238 } // namespace content | 5248 } // namespace content |
| OLD | NEW |