| 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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 std::vector<char> profile; | 851 std::vector<char> profile; |
| 852 // This Send() can be called from any impl-side thread. Use a thread | 852 // This Send() can be called from any impl-side thread. Use a thread |
| 853 // safe send to avoid crashing trying to access RenderThread::Get(), | 853 // safe send to avoid crashing trying to access RenderThread::Get(), |
| 854 // which is not accessible from arbitrary threads. | 854 // which is not accessible from arbitrary threads. |
| 855 thread_safe_sender_->Send( | 855 thread_safe_sender_->Send( |
| 856 new RenderProcessHostMsg_GetMonitorColorProfile(&profile)); | 856 new RenderProcessHostMsg_GetMonitorColorProfile(&profile)); |
| 857 *to_profile = profile; | 857 *to_profile = profile; |
| 858 #else | 858 #else |
| 859 // On other platforms, the primary monitor color profile can be read | 859 // On other platforms, the primary monitor color profile can be read |
| 860 // directly. | 860 // directly. |
| 861 gfx::ColorProfile profile; | 861 gfx::ColorProfile profile = gfx::ColorProfile::GetFromBestMonitor(); |
| 862 *to_profile = profile.profile(); | 862 *to_profile = profile.profile(); |
| 863 #endif | 863 #endif |
| 864 } | 864 } |
| 865 | 865 |
| 866 //------------------------------------------------------------------------------ | 866 //------------------------------------------------------------------------------ |
| 867 | 867 |
| 868 blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() { | 868 blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() { |
| 869 return web_scrollbar_behavior_.get(); | 869 return web_scrollbar_behavior_.get(); |
| 870 } | 870 } |
| 871 | 871 |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 return &trial_token_validator_; | 1331 return &trial_token_validator_; |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 void RendererBlinkPlatformImpl::workerContextCreated( | 1334 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1335 const v8::Local<v8::Context>& worker) { | 1335 const v8::Local<v8::Context>& worker) { |
| 1336 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1336 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1337 worker); | 1337 worker); |
| 1338 } | 1338 } |
| 1339 | 1339 |
| 1340 } // namespace content | 1340 } // namespace content |
| OLD | NEW |