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

Side by Side Diff: ui/aura/window_tree_host.cc

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 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
« no previous file with comments | « ui/aura/test/test_cursor_client.cc ('k') | ui/aura/window_tree_host_platform.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/aura/window_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 compositor()->SetVisible(false); 213 compositor()->SetVisible(false);
214 } 214 }
215 215
216 //////////////////////////////////////////////////////////////////////////////// 216 ////////////////////////////////////////////////////////////////////////////////
217 // WindowTreeHost, protected: 217 // WindowTreeHost, protected:
218 218
219 WindowTreeHost::WindowTreeHost() : WindowTreeHost(nullptr) {} 219 WindowTreeHost::WindowTreeHost() : WindowTreeHost(nullptr) {}
220 220
221 WindowTreeHost::WindowTreeHost(std::unique_ptr<WindowPort> window_port) 221 WindowTreeHost::WindowTreeHost(std::unique_ptr<WindowPort> window_port)
222 : window_(new Window(nullptr, std::move(window_port))), 222 : window_(new Window(nullptr, std::move(window_port))),
223 last_cursor_(ui::kCursorNull), 223 last_cursor_(ui::CursorType::kNull),
224 input_method_(nullptr), 224 input_method_(nullptr),
225 owned_input_method_(false) {} 225 owned_input_method_(false) {}
226 226
227 void WindowTreeHost::DestroyCompositor() { 227 void WindowTreeHost::DestroyCompositor() {
228 compositor_.reset(); 228 compositor_.reset();
229 } 229 }
230 230
231 void WindowTreeHost::DestroyDispatcher() { 231 void WindowTreeHost::DestroyDispatcher() {
232 delete window_; 232 delete window_;
233 window_ = nullptr; 233 window_ = nullptr;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 client::CursorClient* cursor_client = client::GetCursorClient(window()); 343 client::CursorClient* cursor_client = client::GetCursorClient(window());
344 if (cursor_client) { 344 if (cursor_client) {
345 const display::Display& display = 345 const display::Display& display =
346 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); 346 display::Screen::GetScreen()->GetDisplayNearestWindow(window());
347 cursor_client->SetDisplay(display); 347 cursor_client->SetDisplay(display);
348 } 348 }
349 dispatcher()->OnCursorMovedToRootLocation(root_location); 349 dispatcher()->OnCursorMovedToRootLocation(root_location);
350 } 350 }
351 351
352 } // namespace aura 352 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/test_cursor_client.cc ('k') | ui/aura/window_tree_host_platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698