| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ui/views/mus/desktop_window_tree_host_mus.h" | 5 #include "ui/views/mus/desktop_window_tree_host_mus.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // wm::NativeCursorManager: | 124 // wm::NativeCursorManager: |
| 125 void SetDisplay(const display::Display& display, | 125 void SetDisplay(const display::Display& display, |
| 126 wm::NativeCursorManagerDelegate* delegate) override { | 126 wm::NativeCursorManagerDelegate* delegate) override { |
| 127 // We ignore this entirely, as cursor are set on the client. | 127 // We ignore this entirely, as cursor are set on the client. |
| 128 } | 128 } |
| 129 | 129 |
| 130 void SetCursor(gfx::NativeCursor cursor, | 130 void SetCursor(gfx::NativeCursor cursor, |
| 131 wm::NativeCursorManagerDelegate* delegate) override { | 131 wm::NativeCursorManagerDelegate* delegate) override { |
| 132 aura::WindowPortMus::Get(window_)->SetPredefinedCursor( | 132 aura::WindowPortMus::Get(window_)->SetPredefinedCursor( |
| 133 ui::mojom::Cursor(cursor.native_type())); | 133 ui::mojom::CursorType(cursor.native_type())); |
| 134 delegate->CommitCursor(cursor); | 134 delegate->CommitCursor(cursor); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void SetVisibility(bool visible, | 137 void SetVisibility(bool visible, |
| 138 wm::NativeCursorManagerDelegate* delegate) override { | 138 wm::NativeCursorManagerDelegate* delegate) override { |
| 139 delegate->CommitVisibility(visible); | 139 delegate->CommitVisibility(visible); |
| 140 | 140 |
| 141 if (visible) { | 141 if (visible) { |
| 142 SetCursor(delegate->GetCursor(), delegate); | 142 SetCursor(delegate->GetCursor(), delegate); |
| 143 } else { | 143 } else { |
| 144 aura::WindowPortMus::Get(window_)->SetPredefinedCursor( | 144 aura::WindowPortMus::Get(window_)->SetPredefinedCursor( |
| 145 ui::mojom::Cursor::NONE); | 145 ui::mojom::CursorType::NONE); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 void SetCursorSet(ui::CursorSetType cursor_set, | 149 void SetCursorSet(ui::CursorSetType cursor_set, |
| 150 wm::NativeCursorManagerDelegate* delegate) override { | 150 wm::NativeCursorManagerDelegate* delegate) override { |
| 151 // TODO(erg): For now, ignore the difference between SET_NORMAL and | 151 // TODO(erg): For now, ignore the difference between SET_NORMAL and |
| 152 // SET_LARGE here. This feels like a thing that mus should decide instead. | 152 // SET_LARGE here. This feels like a thing that mus should decide instead. |
| 153 // | 153 // |
| 154 // Also, it's NOTIMPLEMENTED() in the desktop version!? Including not | 154 // Also, it's NOTIMPLEMENTED() in the desktop version!? Including not |
| 155 // acknowledging the call in the delegate. | 155 // acknowledging the call in the delegate. |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 aura::client::FocusClient* focus_client, | 795 aura::client::FocusClient* focus_client, |
| 796 aura::Window* window) { | 796 aura::Window* window) { |
| 797 if (window == this->window()) { | 797 if (window == this->window()) { |
| 798 desktop_native_widget_aura_->HandleActivationChanged(true); | 798 desktop_native_widget_aura_->HandleActivationChanged(true); |
| 799 } else if (is_active_) { | 799 } else if (is_active_) { |
| 800 desktop_native_widget_aura_->HandleActivationChanged(false); | 800 desktop_native_widget_aura_->HandleActivationChanged(false); |
| 801 } | 801 } |
| 802 } | 802 } |
| 803 | 803 |
| 804 } // namespace views | 804 } // namespace views |
| OLD | NEW |