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

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

Issue 1796293003: Image decode color: Push color profile from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows tests Created 4 years, 9 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
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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 const blink::WebURL& top_origin) { 789 const blink::WebURL& top_origin) {
790 std::string signed_public_key; 790 std::string signed_public_key;
791 RenderThread::Get()->Send(new RenderProcessHostMsg_Keygen( 791 RenderThread::Get()->Send(new RenderProcessHostMsg_Keygen(
792 static_cast<uint32_t>(key_size_index), challenge.utf8(), GURL(url), 792 static_cast<uint32_t>(key_size_index), challenge.utf8(), GURL(url),
793 GURL(top_origin), &signed_public_key)); 793 GURL(top_origin), &signed_public_key));
794 return WebString::fromUTF8(signed_public_key); 794 return WebString::fromUTF8(signed_public_key);
795 } 795 }
796 796
797 //------------------------------------------------------------------------------ 797 //------------------------------------------------------------------------------
798 798
799 void RendererBlinkPlatformImpl::screenColorProfile(
800 WebVector<char>* to_profile) {
801 #if defined(OS_WIN)
802 // On Windows screen color profile is only available in the browser.
803 std::vector<char> profile;
804 // This Send() can be called from any impl-side thread. Use a thread
805 // safe send to avoid crashing trying to access RenderThread::Get(),
806 // which is not accessible from arbitrary threads.
807 thread_safe_sender_->Send(
808 new RenderProcessHostMsg_GetMonitorColorProfile(&profile));
809 *to_profile = profile;
810 #else
811 // On other platforms, the primary monitor color profile can be read
812 // directly.
813 gfx::ColorProfile profile;
814 *to_profile = profile.profile();
815 #endif
816 }
817
818 //------------------------------------------------------------------------------
819
820 blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() { 799 blink::WebScrollbarBehavior* RendererBlinkPlatformImpl::scrollbarBehavior() {
821 return web_scrollbar_behavior_.get(); 800 return web_scrollbar_behavior_.get();
822 } 801 }
823 802
824 //------------------------------------------------------------------------------ 803 //------------------------------------------------------------------------------
825 804
826 WebBlobRegistry* RendererBlinkPlatformImpl::blobRegistry() { 805 WebBlobRegistry* RendererBlinkPlatformImpl::blobRegistry() {
827 // blob_registry_ can be NULL when running some tests. 806 // blob_registry_ can be NULL when running some tests.
828 return blob_registry_.get(); 807 return blob_registry_.get();
829 } 808 }
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 } 1245 }
1267 1246
1268 //------------------------------------------------------------------------------ 1247 //------------------------------------------------------------------------------
1269 1248
1270 blink::WebTrialTokenValidator* 1249 blink::WebTrialTokenValidator*
1271 RendererBlinkPlatformImpl::trialTokenValidator() { 1250 RendererBlinkPlatformImpl::trialTokenValidator() {
1272 return &trial_token_validator_; 1251 return &trial_token_validator_;
1273 } 1252 }
1274 1253
1275 } // namespace content 1254 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698