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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 void SetChildBounds(aura::Window* child, | 91 void SetChildBounds(aura::Window* child, |
92 const gfx::Rect& requested_bounds) override { | 92 const gfx::Rect& requested_bounds) override { |
93 SetChildBoundsDirect(child, requested_bounds); | 93 SetChildBoundsDirect(child, requested_bounds); |
94 } | 94 } |
95 | 95 |
96 DISALLOW_COPY_AND_ASSIGN(FillLayout); | 96 DISALLOW_COPY_AND_ASSIGN(FillLayout); |
97 }; | 97 }; |
98 | 98 |
99 // A class that bridges the gap between CursorManager and Aura. It borrows | 99 // A class that bridges the gap between CursorManager and Aura. It borrows |
100 // heavily from AshNativeCursorManager. | 100 // heavily from NativeCursorManagerAsh. |
101 class ShellNativeCursorManager : public wm::NativeCursorManager { | 101 class ShellNativeCursorManager : public wm::NativeCursorManager { |
102 public: | 102 public: |
103 explicit ShellNativeCursorManager(aura::WindowTreeHost* host) | 103 explicit ShellNativeCursorManager(aura::WindowTreeHost* host) |
104 : host_(host), image_cursors_(new ui::ImageCursors) {} | 104 : host_(host), image_cursors_(new ui::ImageCursors) {} |
105 ~ShellNativeCursorManager() override {} | 105 ~ShellNativeCursorManager() override {} |
106 | 106 |
107 // wm::NativeCursorManager overrides. | 107 // wm::NativeCursorManager overrides. |
108 void SetDisplay(const display::Display& display, | 108 void SetDisplay(const display::Display& display, |
109 wm::NativeCursorManagerDelegate* delegate) override { | 109 wm::NativeCursorManagerDelegate* delegate) override { |
110 if (image_cursors_->SetDisplay(display, display.device_scale_factor())) | 110 if (image_cursors_->SetDisplay(display, display.device_scale_factor())) |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 if (displays.empty()) | 373 if (displays.empty()) |
374 return gfx::Size(); | 374 return gfx::Size(); |
375 const display::DisplayMode* mode = displays[0]->current_mode(); | 375 const display::DisplayMode* mode = displays[0]->current_mode(); |
376 return mode ? mode->size() : gfx::Size(); | 376 return mode ? mode->size() : gfx::Size(); |
377 #else | 377 #else |
378 return gfx::Size(); | 378 return gfx::Size(); |
379 #endif | 379 #endif |
380 } | 380 } |
381 | 381 |
382 } // namespace extensions | 382 } // namespace extensions |
OLD | NEW |