Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2665 if (HasFocus()) { | 2665 if (HasFocus()) { |
| 2666 ui::InputMethod* input_method = GetInputMethod(); | 2666 ui::InputMethod* input_method = GetInputMethod(); |
| 2667 if (input_method) | 2667 if (input_method) |
| 2668 input_method->SetFocusedTextInputClient(this); | 2668 input_method->SetFocusedTextInputClient(this); |
| 2669 } | 2669 } |
| 2670 | 2670 |
| 2671 #if defined(OS_WIN) | 2671 #if defined(OS_WIN) |
| 2672 UpdateLegacyWin(); | 2672 UpdateLegacyWin(); |
| 2673 #endif | 2673 #endif |
| 2674 | 2674 |
| 2675 gfx::ICCProfile icc_profile = gfx::ICCProfile::FromBestMonitor(); | |
| 2676 if (!(icc_profile == gfx::ICCProfile())) { | |
|
ccameron
2016/09/02 21:10:32
We don't need to check icc_profile == gfx::ICCProf
hubbe
2016/09/02 21:35:49
Done.
| |
| 2677 window_->GetHost()->compositor()->SetDisplayColorSpace( | |
| 2678 icc_profile.GetColorSpace()); | |
| 2679 } | |
| 2675 delegated_frame_host_->SetCompositor(window_->GetHost()->compositor()); | 2680 delegated_frame_host_->SetCompositor(window_->GetHost()->compositor()); |
| 2676 } | 2681 } |
| 2677 | 2682 |
| 2678 void RenderWidgetHostViewAura::RemovingFromRootWindow() { | 2683 void RenderWidgetHostViewAura::RemovingFromRootWindow() { |
| 2679 aura::client::CursorClient* cursor_client = | 2684 aura::client::CursorClient* cursor_client = |
| 2680 aura::client::GetCursorClient(window_->GetRootWindow()); | 2685 aura::client::GetCursorClient(window_->GetRootWindow()); |
| 2681 if (cursor_client) | 2686 if (cursor_client) |
| 2682 cursor_client->RemoveObserver(this); | 2687 cursor_client->RemoveObserver(this); |
| 2683 | 2688 |
| 2684 DetachFromInputMethod(); | 2689 DetachFromInputMethod(); |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3044 ->GetTextSelection(focused_view) | 3049 ->GetTextSelection(focused_view) |
| 3045 ->GetSelectedText(&selected_text)) { | 3050 ->GetSelectedText(&selected_text)) { |
| 3046 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. | 3051 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. |
| 3047 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); | 3052 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION); |
| 3048 clipboard_writer.WriteText(selected_text); | 3053 clipboard_writer.WriteText(selected_text); |
| 3049 } | 3054 } |
| 3050 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) | 3055 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) |
| 3051 } | 3056 } |
| 3052 | 3057 |
| 3053 } // namespace content | 3058 } // namespace content |
| OLD | NEW |