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

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

Issue 2605743002: Use consistent types for ICC profiles (Closed)
Patch Set: No export for static lib Created 3 years, 11 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/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 webview()->setDisplayMode(display_mode_); 610 webview()->setDisplayMode(display_mode_);
611 webview()->settings()->setPreferCompositingToLCDTextEnabled( 611 webview()->settings()->setPreferCompositingToLCDTextEnabled(
612 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 612 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
613 webview()->settings()->setThreadedScrollingEnabled( 613 webview()->settings()->setThreadedScrollingEnabled(
614 !command_line.HasSwitch(switches::kDisableThreadedScrolling)); 614 !command_line.HasSwitch(switches::kDisableThreadedScrolling));
615 webview()->setShowFPSCounter( 615 webview()->setShowFPSCounter(
616 command_line.HasSwitch(cc::switches::kShowFPSCounter)); 616 command_line.HasSwitch(cc::switches::kShowFPSCounter));
617 617
618 if (auto overridden_color_profile = 618 if (auto overridden_color_profile =
619 GetContentClient()->renderer()->GetImageDecodeColorProfile()) { 619 GetContentClient()->renderer()->GetImageDecodeColorProfile()) {
620 webview()->setDeviceColorProfile(overridden_color_profile->GetData()); 620 webview()->setDeviceColorSpace(overridden_color_profile->GetColorSpace());
621 } else { 621 } else {
622 webview()->setDeviceColorProfile(params.image_decode_color_space.GetData()); 622 webview()->setDeviceColorSpace(
623 params.image_decode_color_space.GetColorSpace());
623 } 624 }
624 625
625 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); 626 ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_);
626 627
627 if (switches::IsTouchDragDropEnabled()) 628 if (switches::IsTouchDragDropEnabled())
628 webview()->settings()->setTouchDragDropEnabled(true); 629 webview()->settings()->setTouchDragDropEnabled(true);
629 630
630 webview()->settings()->setBrowserSideNavigationEnabled( 631 webview()->settings()->setBrowserSideNavigationEnabled(
631 IsBrowserSideNavigationEnabled()); 632 IsBrowserSideNavigationEnabled());
632 633
(...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 } 2401 }
2401 2402
2402 void RenderViewImpl::SetFocus(bool enable) { 2403 void RenderViewImpl::SetFocus(bool enable) {
2403 RenderWidget::OnSetFocus(enable); 2404 RenderWidget::OnSetFocus(enable);
2404 2405
2405 // Notify all BrowserPlugins of the RenderView's focus state. 2406 // Notify all BrowserPlugins of the RenderView's focus state.
2406 if (BrowserPluginManager::Get()) 2407 if (BrowserPluginManager::Get())
2407 BrowserPluginManager::Get()->UpdateFocusState(); 2408 BrowserPluginManager::Get()->UpdateFocusState();
2408 } 2409 }
2409 2410
2410 void RenderViewImpl::RenderWidgetDidSetColorProfile( 2411 void RenderViewImpl::RenderWidgetDidSetColorSpace(
2411 const std::vector<char>& profile) { 2412 const gfx::ColorSpace& color_space) {
2412 if (webview()) { 2413 if (webview()) {
2413 WebVector<char> colorProfile = profile; 2414 webview()->setDeviceColorSpace(color_space);
2414 webview()->setDeviceColorProfile(colorProfile);
2415 } 2415 }
2416 } 2416 }
2417 2417
2418 void RenderViewImpl::DidCompletePageScaleAnimation() { 2418 void RenderViewImpl::DidCompletePageScaleAnimation() {
2419 GetWidget()->FocusChangeComplete(); 2419 GetWidget()->FocusChangeComplete();
2420 } 2420 }
2421 2421
2422 void RenderViewImpl::OnDeviceScaleFactorChanged() { 2422 void RenderViewImpl::OnDeviceScaleFactorChanged() {
2423 RenderWidget::OnDeviceScaleFactorChanged(); 2423 RenderWidget::OnDeviceScaleFactorChanged();
2424 UpdateWebViewWithDeviceScaleFactor(); 2424 UpdateWebViewWithDeviceScaleFactor();
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2791 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2792 } 2792 }
2793 2793
2794 std::unique_ptr<InputEventAck> ack( 2794 std::unique_ptr<InputEventAck> ack(
2795 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2795 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2796 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2796 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2797 OnInputEventAck(std::move(ack)); 2797 OnInputEventAck(std::move(ack));
2798 } 2798 }
2799 2799
2800 } // namespace content 2800 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698