Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 2092533002: Clean up gfx::ColorProfile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl try Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698