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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
751 OnDidDisplayContentWithCertificateErrors) | 751 OnDidDisplayContentWithCertificateErrors) |
752 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunContentWithCertificateErrors, | 752 IPC_MESSAGE_HANDLER(FrameHostMsg_DidRunContentWithCertificateErrors, |
753 OnDidRunContentWithCertificateErrors) | 753 OnDidRunContentWithCertificateErrors) |
754 IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler, | 754 IPC_MESSAGE_HANDLER(FrameHostMsg_RegisterProtocolHandler, |
755 OnRegisterProtocolHandler) | 755 OnRegisterProtocolHandler) |
756 IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler, | 756 IPC_MESSAGE_HANDLER(FrameHostMsg_UnregisterProtocolHandler, |
757 OnUnregisterProtocolHandler) | 757 OnUnregisterProtocolHandler) |
758 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals, | 758 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdatePageImportanceSignals, |
759 OnUpdatePageImportanceSignals) | 759 OnUpdatePageImportanceSignals) |
760 IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply) | 760 IPC_MESSAGE_HANDLER(FrameHostMsg_Find_Reply, OnFindReply) |
761 IPC_MESSAGE_HANDLER(FrameHostMsg_RestorePageScaleFactorOnLoad, | |
762 SetPageScaleFactorForSubframes) | |
kenrb
2017/01/24 17:13:27
This message should only ever come from the top-le
wjmaclean
2017/01/24 18:24:26
Sure, I'll look into doing that and include it in
wjmaclean
2017/01/24 21:48:47
Done.
| |
761 #if BUILDFLAG(ENABLE_PLUGINS) | 763 #if BUILDFLAG(ENABLE_PLUGINS) |
762 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated, | 764 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceCreated, |
763 OnPepperInstanceCreated) | 765 OnPepperInstanceCreated) |
764 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceDeleted, | 766 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperInstanceDeleted, |
765 OnPepperInstanceDeleted) | 767 OnPepperInstanceDeleted) |
766 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) | 768 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperPluginHung, OnPepperPluginHung) |
767 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperStartsPlayback, | 769 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperStartsPlayback, |
768 OnPepperStartsPlayback) | 770 OnPepperStartsPlayback) |
769 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperStopsPlayback, | 771 IPC_MESSAGE_HANDLER(FrameHostMsg_PepperStopsPlayback, |
770 OnPepperStopsPlayback) | 772 OnPepperStopsPlayback) |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1008 DCHECK(result.second); | 1010 DCHECK(result.second); |
1009 return base::Bind(&WebContentsImpl::RemoveBindingSet, | 1011 return base::Bind(&WebContentsImpl::RemoveBindingSet, |
1010 weak_factory_.GetWeakPtr(), interface_name); | 1012 weak_factory_.GetWeakPtr(), interface_name); |
1011 } | 1013 } |
1012 | 1014 |
1013 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) { | 1015 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) { |
1014 SendPageMessage( | 1016 SendPageMessage( |
1015 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor)); | 1017 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor)); |
1016 } | 1018 } |
1017 | 1019 |
1020 void WebContentsImpl::SetPageScaleFactorForSubframes(double page_scale_factor) { | |
1021 SendPageMessage( | |
1022 new PageMsg_SetPageScaleFactor(MSG_ROUTING_NONE, page_scale_factor)); | |
1023 } | |
1024 | |
1018 void WebContentsImpl::GetScreenInfo(ScreenInfo* screen_info) { | 1025 void WebContentsImpl::GetScreenInfo(ScreenInfo* screen_info) { |
1019 if (GetView()) | 1026 if (GetView()) |
1020 GetView()->GetScreenInfo(screen_info); | 1027 GetView()->GetScreenInfo(screen_info); |
1021 } | 1028 } |
1022 | 1029 |
1023 std::unique_ptr<WebUI> WebContentsImpl::CreateSubframeWebUI( | 1030 std::unique_ptr<WebUI> WebContentsImpl::CreateSubframeWebUI( |
1024 const GURL& url, | 1031 const GURL& url, |
1025 const std::string& frame_name) { | 1032 const std::string& frame_name) { |
1026 DCHECK(!frame_name.empty()); | 1033 DCHECK(!frame_name.empty()); |
1027 return CreateWebUI(url, frame_name); | 1034 return CreateWebUI(url, frame_name); |
(...skipping 4391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5419 GetMainFrame()->AddMessageToConsole( | 5426 GetMainFrame()->AddMessageToConsole( |
5420 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5427 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
5421 base::StringPrintf("This site does not have a valid SSL " | 5428 base::StringPrintf("This site does not have a valid SSL " |
5422 "certificate! Without SSL, your site's and " | 5429 "certificate! Without SSL, your site's and " |
5423 "visitors' data is vulnerable to theft and " | 5430 "visitors' data is vulnerable to theft and " |
5424 "tampering. Get a valid SSL certificate before" | 5431 "tampering. Get a valid SSL certificate before" |
5425 " releasing your website to the public.")); | 5432 " releasing your website to the public.")); |
5426 } | 5433 } |
5427 | 5434 |
5428 } // namespace content | 5435 } // namespace content |
OLD | NEW |