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

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

Issue 2652643004: Make PageScaleFactor work for oopif subframes.
Patch Set: Put function prototype in correct place. Created 3 years, 11 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 DCHECK(result.second); 1008 DCHECK(result.second);
1009 return base::Bind(&WebContentsImpl::RemoveBindingSet, 1009 return base::Bind(&WebContentsImpl::RemoveBindingSet,
1010 weak_factory_.GetWeakPtr(), interface_name); 1010 weak_factory_.GetWeakPtr(), interface_name);
1011 } 1011 }
1012 1012
1013 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) { 1013 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
1014 SendPageMessage( 1014 SendPageMessage(
1015 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor)); 1015 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor));
1016 } 1016 }
1017 1017
1018 void WebContentsImpl::SetPageScaleFactorForSubframes(double page_scale_factor) {
1019 RenderWidgetHostView* main_frame_view = GetMainFrame()->GetView();
1020 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) {
1021 if (view && view != main_frame_view) {
1022 RenderWidgetHost* host = view->GetRenderWidgetHost();
1023 host->Send(new FrameMsg_SetPageScaleFactor(host->GetRoutingID(),
1024 page_scale_factor));
1025 }
1026 }
1027 }
1028
1018 void WebContentsImpl::GetScreenInfo(ScreenInfo* screen_info) { 1029 void WebContentsImpl::GetScreenInfo(ScreenInfo* screen_info) {
1019 if (GetView()) 1030 if (GetView())
1020 GetView()->GetScreenInfo(screen_info); 1031 GetView()->GetScreenInfo(screen_info);
1021 } 1032 }
1022 1033
1023 std::unique_ptr<WebUI> WebContentsImpl::CreateSubframeWebUI( 1034 std::unique_ptr<WebUI> WebContentsImpl::CreateSubframeWebUI(
1024 const GURL& url, 1035 const GURL& url,
1025 const std::string& frame_name) { 1036 const std::string& frame_name) {
1026 DCHECK(!frame_name.empty()); 1037 DCHECK(!frame_name.empty());
1027 return CreateWebUI(url, frame_name); 1038 return CreateWebUI(url, frame_name);
(...skipping 4391 matching lines...) Expand 10 before | Expand all | Expand 10 after
5419 GetMainFrame()->AddMessageToConsole( 5430 GetMainFrame()->AddMessageToConsole(
5420 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5431 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5421 base::StringPrintf("This site does not have a valid SSL " 5432 base::StringPrintf("This site does not have a valid SSL "
5422 "certificate! Without SSL, your site's and " 5433 "certificate! Without SSL, your site's and "
5423 "visitors' data is vulnerable to theft and " 5434 "visitors' data is vulnerable to theft and "
5424 "tampering. Get a valid SSL certificate before" 5435 "tampering. Get a valid SSL certificate before"
5425 " releasing your website to the public.")); 5436 " releasing your website to the public."));
5426 } 5437 }
5427 5438
5428 } // namespace content 5439 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698