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

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

Issue 261633002: Add RenderView / Widget setDeviceColorProfile interface to Page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge to tip. Created 6 years, 7 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 | Annotate | Revision Log
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 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2826 { 2826 {
2827 if (!page()) 2827 if (!page())
2828 return; 2828 return;
2829 2829
2830 page()->setDeviceScaleFactor(scaleFactor); 2830 page()->setDeviceScaleFactor(scaleFactor);
2831 2831
2832 if (m_layerTreeView) 2832 if (m_layerTreeView)
2833 updateLayerTreeDeviceScaleFactor(); 2833 updateLayerTreeDeviceScaleFactor();
2834 } 2834 }
2835 2835
2836 void WebViewImpl::deviceColorProfileChanged(const char* profile, size_t size)
2837 {
2838 if (!page())
2839 return;
2840
2841 page()->deviceColorProfileChanged(profile, size);
2842 }
2843
2836 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma xSize) 2844 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma xSize)
2837 { 2845 {
2838 m_shouldAutoResize = true; 2846 m_shouldAutoResize = true;
2839 m_minAutoSize = minSize; 2847 m_minAutoSize = minSize;
2840 m_maxAutoSize = maxSize; 2848 m_maxAutoSize = maxSize;
2841 configureAutoResizeMode(); 2849 configureAutoResizeMode();
2842 } 2850 }
2843 2851
2844 void WebViewImpl::disableAutoResizeMode() 2852 void WebViewImpl::disableAutoResizeMode()
2845 { 2853 {
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
4109 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4117 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4110 4118
4111 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4119 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4112 return false; 4120 return false;
4113 4121
4114 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4122 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4115 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4123 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4116 } 4124 }
4117 4125
4118 } // namespace blink 4126 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | public/web/WebView.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698