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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2216073002: Color: Add ColorCorrectRendering flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decoder_profile
Patch Set: Rebase Created 4 years, 4 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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after
3319 void WebViewImpl::setZoomFactorForDeviceScaleFactor(float zoomFactorForDeviceSca leFactor) 3319 void WebViewImpl::setZoomFactorForDeviceScaleFactor(float zoomFactorForDeviceSca leFactor)
3320 { 3320 {
3321 m_zoomFactorForDeviceScaleFactor = zoomFactorForDeviceScaleFactor; 3321 m_zoomFactorForDeviceScaleFactor = zoomFactorForDeviceScaleFactor;
3322 if (!m_layerTreeView) 3322 if (!m_layerTreeView)
3323 return; 3323 return;
3324 setZoomLevel(m_zoomLevel); 3324 setZoomLevel(m_zoomLevel);
3325 } 3325 }
3326 3326
3327 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile) 3327 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile)
3328 { 3328 {
3329 if (!page())
3330 return;
3331
3332 Vector<char> deviceProfile; 3329 Vector<char> deviceProfile;
3333 deviceProfile.append(colorProfile.data(), colorProfile.size()); 3330 deviceProfile.append(colorProfile.data(), colorProfile.size());
3334 ImageDecoder::setTargetColorProfile(deviceProfile); 3331 ImageDecoder::setTargetColorProfile(deviceProfile);
3335
3336 page()->setDeviceColorProfile(deviceProfile);
3337 }
3338
3339 void WebViewImpl::resetDeviceColorProfileForTesting()
3340 {
3341 if (!page())
3342 return;
3343
3344 page()->resetDeviceColorProfileForTesting();
3345 } 3332 }
3346 3333
3347 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma xSize) 3334 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma xSize)
3348 { 3335 {
3349 m_shouldAutoResize = true; 3336 m_shouldAutoResize = true;
3350 m_minAutoSize = minSize; 3337 m_minAutoSize = minSize;
3351 m_maxAutoSize = maxSize; 3338 m_maxAutoSize = maxSize;
3352 configureAutoResizeMode(); 3339 configureAutoResizeMode();
3353 } 3340 }
3354 3341
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
4624 return nullptr; 4611 return nullptr;
4625 return focusedFrame; 4612 return focusedFrame;
4626 } 4613 }
4627 4614
4628 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const 4615 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const
4629 { 4616 {
4630 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4617 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4631 } 4618 }
4632 4619
4633 } // namespace blink 4620 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.h ('k') | third_party/WebKit/public/web/WebRuntimeFeatures.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698