| 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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 const std::string& interface_name, | 1014 const std::string& interface_name, |
| 1015 WebContentsBindingSet* binding_set) { | 1015 WebContentsBindingSet* binding_set) { |
| 1016 auto result = | 1016 auto result = |
| 1017 binding_sets_.insert(std::make_pair(interface_name, binding_set)); | 1017 binding_sets_.insert(std::make_pair(interface_name, binding_set)); |
| 1018 DCHECK(result.second); | 1018 DCHECK(result.second); |
| 1019 return base::Bind(&WebContentsImpl::RemoveBindingSet, | 1019 return base::Bind(&WebContentsImpl::RemoveBindingSet, |
| 1020 weak_factory_.GetWeakPtr(), interface_name); | 1020 weak_factory_.GetWeakPtr(), interface_name); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) { | 1023 void WebContentsImpl::UpdateDeviceScaleFactor(double device_scale_factor) { |
| 1024 LOG(ERROR) << "WebContentsImpl::UpdateDeviceScaleFactor(" |
| 1025 << device_scale_factor << ")"; |
| 1024 SendPageMessage( | 1026 SendPageMessage( |
| 1025 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor)); | 1027 new PageMsg_SetDeviceScaleFactor(MSG_ROUTING_NONE, device_scale_factor)); |
| 1026 } | 1028 } |
| 1027 | 1029 |
| 1028 void WebContentsImpl::GetScreenInfo(ScreenInfo* screen_info) { | 1030 void WebContentsImpl::GetScreenInfo(ScreenInfo* screen_info) { |
| 1029 if (GetView()) | 1031 if (GetView()) |
| 1030 GetView()->GetScreenInfo(screen_info); | 1032 GetView()->GetScreenInfo(screen_info); |
| 1031 } | 1033 } |
| 1032 | 1034 |
| 1033 std::unique_ptr<WebUI> WebContentsImpl::CreateSubframeWebUI( | 1035 std::unique_ptr<WebUI> WebContentsImpl::CreateSubframeWebUI( |
| (...skipping 4180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5214 dialog_manager_ = dialog_manager; | 5216 dialog_manager_ = dialog_manager; |
| 5215 } | 5217 } |
| 5216 | 5218 |
| 5217 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5219 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5218 auto it = binding_sets_.find(interface_name); | 5220 auto it = binding_sets_.find(interface_name); |
| 5219 if (it != binding_sets_.end()) | 5221 if (it != binding_sets_.end()) |
| 5220 binding_sets_.erase(it); | 5222 binding_sets_.erase(it); |
| 5221 } | 5223 } |
| 5222 | 5224 |
| 5223 } // namespace content | 5225 } // namespace content |
| OLD | NEW |