OLD | NEW |
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 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2955 { | 2955 { |
2956 if (!page()) | 2956 if (!page()) |
2957 return; | 2957 return; |
2958 | 2958 |
2959 page()->setDeviceScaleFactor(scaleFactor); | 2959 page()->setDeviceScaleFactor(scaleFactor); |
2960 | 2960 |
2961 if (m_layerTreeView) | 2961 if (m_layerTreeView) |
2962 updateLayerTreeDeviceScaleFactor(); | 2962 updateLayerTreeDeviceScaleFactor(); |
2963 } | 2963 } |
2964 | 2964 |
| 2965 void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile) |
| 2966 { |
| 2967 if (!page()) |
| 2968 return; |
| 2969 |
| 2970 Vector<char> deviceProfile; |
| 2971 deviceProfile.append(colorProfile.data(), colorProfile.size()); |
| 2972 |
| 2973 page()->setDeviceColorProfile(deviceProfile); |
| 2974 } |
| 2975 |
| 2976 void WebViewImpl::resetDeviceColorProfile() |
| 2977 { |
| 2978 if (!page()) |
| 2979 return; |
| 2980 |
| 2981 page()->resetDeviceColorProfile(); |
| 2982 } |
| 2983 |
2965 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma
xSize) | 2984 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& ma
xSize) |
2966 { | 2985 { |
2967 m_shouldAutoResize = true; | 2986 m_shouldAutoResize = true; |
2968 m_minAutoSize = minSize; | 2987 m_minAutoSize = minSize; |
2969 m_maxAutoSize = maxSize; | 2988 m_maxAutoSize = maxSize; |
2970 configureAutoResizeMode(); | 2989 configureAutoResizeMode(); |
2971 } | 2990 } |
2972 | 2991 |
2973 void WebViewImpl::disableAutoResizeMode() | 2992 void WebViewImpl::disableAutoResizeMode() |
2974 { | 2993 { |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4280 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); | 4299 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi
nedConstraints(); |
4281 | 4300 |
4282 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4301 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4283 return false; | 4302 return false; |
4284 | 4303 |
4285 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4304 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4286 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4305 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
4287 } | 4306 } |
4288 | 4307 |
4289 } // namespace blink | 4308 } // namespace blink |
OLD | NEW |