OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h
" | 5 #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_auralinux.h
" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" |
10 #include "ui/aura/window_event_dispatcher.h" | 11 #include "ui/aura/window_event_dispatcher.h" |
11 #include "ui/base/cursor/cursor_loader.h" | 12 #include "ui/base/cursor/cursor_loader.h" |
12 #include "ui/base/cursor/cursors_aura.h" | 13 #include "ui/base/cursor/cursors_aura.h" |
13 #include "ui/gfx/display.h" | 14 #include "ui/gfx/display.h" |
14 | 15 |
15 namespace views { | 16 namespace views { |
16 namespace { | 17 namespace { |
17 | 18 |
18 // Cursors that we need to supply our own image resources for. This was | 19 // Cursors that we need to supply our own image resources for. This was |
19 // generated from webcursor_gtk.cc; any cursor that either was NOTIMPLEMENTED() | 20 // generated from webcursor_gtk.cc; any cursor that either was NOTIMPLEMENTED() |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 LoadImageCursors(device_scale_factor, loader); | 62 LoadImageCursors(device_scale_factor, loader); |
62 } | 63 } |
63 | 64 |
64 void DesktopCursorLoaderUpdaterAuraLinux::OnDisplayUpdated( | 65 void DesktopCursorLoaderUpdaterAuraLinux::OnDisplayUpdated( |
65 const gfx::Display& display, | 66 const gfx::Display& display, |
66 ui::CursorLoader* loader) { | 67 ui::CursorLoader* loader) { |
67 LoadImageCursors(display.device_scale_factor(), loader); | 68 LoadImageCursors(display.device_scale_factor(), loader); |
68 } | 69 } |
69 | 70 |
70 // static | 71 // static |
71 scoped_ptr<DesktopCursorLoaderUpdater> DesktopCursorLoaderUpdater::Create() { | 72 std::unique_ptr<DesktopCursorLoaderUpdater> |
72 return make_scoped_ptr(new DesktopCursorLoaderUpdaterAuraLinux); | 73 DesktopCursorLoaderUpdater::Create() { |
| 74 return base::WrapUnique(new DesktopCursorLoaderUpdaterAuraLinux); |
73 } | 75 } |
74 | 76 |
75 } // namespace views | 77 } // namespace views |
OLD | NEW |