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

Side by Side Diff: extensions/shell/browser/shell_desktop_controller_aura.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, 8 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 | « content/common/cursors/webcursor_aura.cc ('k') | mash/simple_wm/move_event_handler.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/shell/browser/shell_desktop_controller_aura.h" 5 #include "extensions/shell/browser/shell_desktop_controller_aura.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ApplyCursor(cursor); 121 ApplyCursor(cursor);
122 } 122 }
123 123
124 void SetVisibility(bool visible, 124 void SetVisibility(bool visible,
125 wm::NativeCursorManagerDelegate* delegate) override { 125 wm::NativeCursorManagerDelegate* delegate) override {
126 delegate->CommitVisibility(visible); 126 delegate->CommitVisibility(visible);
127 127
128 if (visible) { 128 if (visible) {
129 SetCursor(delegate->GetCursor(), delegate); 129 SetCursor(delegate->GetCursor(), delegate);
130 } else { 130 } else {
131 gfx::NativeCursor invisible_cursor(ui::kCursorNone); 131 gfx::NativeCursor invisible_cursor(ui::CursorType::kNone);
132 image_cursors_->SetPlatformCursor(&invisible_cursor); 132 image_cursors_->SetPlatformCursor(&invisible_cursor);
133 ApplyCursor(invisible_cursor); 133 ApplyCursor(invisible_cursor);
134 } 134 }
135 } 135 }
136 136
137 void SetCursorSet(ui::CursorSetType cursor_set, 137 void SetCursorSet(ui::CursorSetType cursor_set,
138 wm::NativeCursorManagerDelegate* delegate) override { 138 wm::NativeCursorManagerDelegate* delegate) override {
139 image_cursors_->SetCursorSet(cursor_set); 139 image_cursors_->SetCursorSet(cursor_set);
140 delegate->CommitCursorSet(cursor_set); 140 delegate->CommitCursorSet(cursor_set);
141 if (delegate->IsCursorVisible()) 141 if (delegate->IsCursorVisible())
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 new aura::client::DefaultCaptureClient(host_->window())); 301 new aura::client::DefaultCaptureClient(host_->window()));
302 302
303 // Ensure new windows fill the display. 303 // Ensure new windows fill the display.
304 host_->window()->SetLayoutManager(new FillLayout); 304 host_->window()->SetLayoutManager(new FillLayout);
305 305
306 cursor_manager_.reset( 306 cursor_manager_.reset(
307 new wm::CursorManager(std::unique_ptr<wm::NativeCursorManager>( 307 new wm::CursorManager(std::unique_ptr<wm::NativeCursorManager>(
308 new ShellNativeCursorManager(host_.get())))); 308 new ShellNativeCursorManager(host_.get()))));
309 cursor_manager_->SetDisplay( 309 cursor_manager_->SetDisplay(
310 display::Screen::GetScreen()->GetPrimaryDisplay()); 310 display::Screen::GetScreen()->GetPrimaryDisplay());
311 cursor_manager_->SetCursor(ui::kCursorPointer); 311 cursor_manager_->SetCursor(ui::CursorType::kPointer);
312 aura::client::SetCursorClient(host_->window(), cursor_manager_.get()); 312 aura::client::SetCursorClient(host_->window(), cursor_manager_.get());
313 313
314 user_activity_detector_.reset(new ui::UserActivityDetector); 314 user_activity_detector_.reset(new ui::UserActivityDetector);
315 #if defined(OS_CHROMEOS) 315 #if defined(OS_CHROMEOS)
316 user_activity_notifier_.reset( 316 user_activity_notifier_.reset(
317 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get())); 317 new ui::UserActivityPowerManagerNotifier(user_activity_detector_.get()));
318 #endif 318 #endif
319 } 319 }
320 320
321 void ShellDesktopControllerAura::CreateRootWindow() { 321 void ShellDesktopControllerAura::CreateRootWindow() {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (displays.empty()) 390 if (displays.empty())
391 return gfx::Size(); 391 return gfx::Size();
392 const display::DisplayMode* mode = displays[0]->current_mode(); 392 const display::DisplayMode* mode = displays[0]->current_mode();
393 return mode ? mode->size() : gfx::Size(); 393 return mode ? mode->size() : gfx::Size();
394 #else 394 #else
395 return gfx::Size(); 395 return gfx::Size();
396 #endif 396 #endif
397 } 397 }
398 398
399 } // namespace extensions 399 } // namespace extensions
OLDNEW
« no previous file with comments | « content/common/cursors/webcursor_aura.cc ('k') | mash/simple_wm/move_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698