| 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_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 const blink::WebURL& top_origin) { | 812 const blink::WebURL& top_origin) { |
| 813 std::string signed_public_key; | 813 std::string signed_public_key; |
| 814 RenderThread::Get()->Send(new RenderProcessHostMsg_Keygen( | 814 RenderThread::Get()->Send(new RenderProcessHostMsg_Keygen( |
| 815 static_cast<uint32_t>(key_size_index), challenge.utf8(), GURL(url), | 815 static_cast<uint32_t>(key_size_index), challenge.utf8(), GURL(url), |
| 816 GURL(top_origin), &signed_public_key)); | 816 GURL(top_origin), &signed_public_key)); |
| 817 return WebString::fromUTF8(signed_public_key); | 817 return WebString::fromUTF8(signed_public_key); |
| 818 } | 818 } |
| 819 | 819 |
| 820 //------------------------------------------------------------------------------ | 820 //------------------------------------------------------------------------------ |
| 821 | 821 |
| 822 void RendererBlinkPlatformImpl::screenColorProfile( | |
| 823 WebVector<char>* to_profile) { | |
| 824 #if defined(OS_WIN) | |
| 825 // On Windows screen color profile is only available in the browser. | |
| 826 std::vector<char> profile; | |
| 827 // This Send() can be called from any impl-side thread. Use a thread | |
| 828 // safe send to avoid crashing trying to access RenderThread::Get(), | |
| 829 // which is not accessible from arbitrary threads. | |
| 830 thread_safe_sender_->Send( | |
| 831 new RenderProcessHostMsg_GetMonitorColorProfile(&profile)); | |
| 832 *to_profile = profile; | |
| 833 #else | |
| 834 // On other platforms, the primary monitor color profile can be read | |
| 835 // directly. | |
| 836 gfx::ColorProfile profile; | |
| 837 *to_profile = profile.profile(); | |
| 838 #endif | |
| 839 } | |
| 840 | |
| 841 //------------------------------------------------------------------------------ | |
| 842 | |
| 843 blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() { | 822 blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() { |
| 844 return web_scrollbar_behavior_.get(); | 823 return web_scrollbar_behavior_.get(); |
| 845 } | 824 } |
| 846 | 825 |
| 847 //------------------------------------------------------------------------------ | 826 //------------------------------------------------------------------------------ |
| 848 | 827 |
| 849 WebBlobRegistry* RendererBlinkPlatformImpl::blobRegistry() { | 828 WebBlobRegistry* RendererBlinkPlatformImpl::blobRegistry() { |
| 850 // blob_registry_ can be NULL when running some tests. | 829 // blob_registry_ can be NULL when running some tests. |
| 851 return blob_registry_.get(); | 830 return blob_registry_.get(); |
| 852 } | 831 } |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 } | 1283 } |
| 1305 | 1284 |
| 1306 //------------------------------------------------------------------------------ | 1285 //------------------------------------------------------------------------------ |
| 1307 | 1286 |
| 1308 blink::WebTrialTokenValidator* | 1287 blink::WebTrialTokenValidator* |
| 1309 RendererBlinkPlatformImpl::trialTokenValidator() { | 1288 RendererBlinkPlatformImpl::trialTokenValidator() { |
| 1310 return &trial_token_validator_; | 1289 return &trial_token_validator_; |
| 1311 } | 1290 } |
| 1312 | 1291 |
| 1313 } // namespace content | 1292 } // namespace content |
| OLD | NEW |