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

Side by Side Diff: extensions/shell/browser/shell_desktop_controller_aura.cc

Issue 2932563002: Implement cursor changing on Mushrome (Closed)
Patch Set: oshima patch take 2 Created 3 years, 6 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 | « chrome/test/BUILD.gn ('k') | testing/buildbot/filters/ash_unittests_mash.filter » ('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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | testing/buildbot/filters/ash_unittests_mash.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698