| 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/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 RenderThread::Get()->Send(new ViewHostMsg_Keygen( | 825 RenderThread::Get()->Send(new ViewHostMsg_Keygen( |
| 826 static_cast<uint32>(key_size_index), | 826 static_cast<uint32>(key_size_index), |
| 827 challenge.utf8(), | 827 challenge.utf8(), |
| 828 GURL(url), | 828 GURL(url), |
| 829 &signed_public_key)); | 829 &signed_public_key)); |
| 830 return WebString::fromUTF8(signed_public_key); | 830 return WebString::fromUTF8(signed_public_key); |
| 831 } | 831 } |
| 832 | 832 |
| 833 //------------------------------------------------------------------------------ | 833 //------------------------------------------------------------------------------ |
| 834 | 834 |
| 835 blink::WebContentDecryptionModule::KeySystemSupportedResult |
| 836 RendererWebKitPlatformSupportImpl::isKeySystemSupported( |
| 837 const WebString& key_system, |
| 838 const WebString& init_data_type, |
| 839 const WebString& container, |
| 840 const WebString& codecs, |
| 841 const WebString& capability) { |
| 842 return WebContentDecryptionModuleImpl::IsKeySystemSupported( |
| 843 key_system, init_data_type, container, codecs, capability); |
| 844 } |
| 845 |
| 846 //------------------------------------------------------------------------------ |
| 847 |
| 835 void RendererWebKitPlatformSupportImpl::screenColorProfile( | 848 void RendererWebKitPlatformSupportImpl::screenColorProfile( |
| 836 WebVector<char>* to_profile) { | 849 WebVector<char>* to_profile) { |
| 837 #if defined(OS_WIN) | 850 #if defined(OS_WIN) |
| 838 // On Windows screen color profile is only available in the browser. | 851 // On Windows screen color profile is only available in the browser. |
| 839 std::vector<char> profile; | 852 std::vector<char> profile; |
| 840 // This Send() can be called from any impl-side thread. Use a thread | 853 // This Send() can be called from any impl-side thread. Use a thread |
| 841 // safe send to avoid crashing trying to access RenderThread::Get(), | 854 // safe send to avoid crashing trying to access RenderThread::Get(), |
| 842 // which is not accessible from arbitrary threads. | 855 // which is not accessible from arbitrary threads. |
| 843 thread_safe_sender_->Send( | 856 thread_safe_sender_->Send( |
| 844 new ViewHostMsg_GetMonitorColorProfile(&profile)); | 857 new ViewHostMsg_GetMonitorColorProfile(&profile)); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( | 1195 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( |
| 1183 const blink::WebBatteryStatus& status) { | 1196 const blink::WebBatteryStatus& status) { |
| 1184 PlatformEventObserverBase* observer = | 1197 PlatformEventObserverBase* observer = |
| 1185 platform_event_observers_.Lookup(blink::WebPlatformEventBattery); | 1198 platform_event_observers_.Lookup(blink::WebPlatformEventBattery); |
| 1186 if (!observer) | 1199 if (!observer) |
| 1187 return; | 1200 return; |
| 1188 observer->SendFakeDataForTesting((void*)&status); | 1201 observer->SendFakeDataForTesting((void*)&status); |
| 1189 } | 1202 } |
| 1190 | 1203 |
| 1191 } // namespace content | 1204 } // namespace content |
| OLD | NEW |