| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |