| 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 "base/memory/ptr_util.h" |
| 11 #include "ui/aura/window_event_dispatcher.h" | 11 #include "ui/aura/window_event_dispatcher.h" |
| 12 #include "ui/base/cursor/cursor_loader.h" | 12 #include "ui/base/cursor/cursor_loader.h" |
| 13 #include "ui/base/cursor/cursors_aura.h" | 13 #include "ui/base/cursor/cursors_aura.h" |
| 14 #include "ui/gfx/display.h" | 14 #include "ui/display/display.h" |
| 15 | 15 |
| 16 namespace views { | 16 namespace views { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // 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 |
| 20 // generated from webcursor_gtk.cc; any cursor that either was NOTIMPLEMENTED() | 20 // generated from webcursor_gtk.cc; any cursor that either was NOTIMPLEMENTED() |
| 21 // or already was implemented with a pixmap is on this list. | 21 // or already was implemented with a pixmap is on this list. |
| 22 const int kImageCursorIds[] = { | 22 const int kImageCursorIds[] = { |
| 23 ui::kCursorNorthEastSouthWestResize, | 23 ui::kCursorNorthEastSouthWestResize, |
| 24 ui::kCursorNorthWestSouthEastResize, | 24 ui::kCursorNorthWestSouthEastResize, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 DesktopCursorLoaderUpdaterAuraLinux::~DesktopCursorLoaderUpdaterAuraLinux() {} | 57 DesktopCursorLoaderUpdaterAuraLinux::~DesktopCursorLoaderUpdaterAuraLinux() {} |
| 58 | 58 |
| 59 void DesktopCursorLoaderUpdaterAuraLinux::OnCreate( | 59 void DesktopCursorLoaderUpdaterAuraLinux::OnCreate( |
| 60 float device_scale_factor, | 60 float device_scale_factor, |
| 61 ui::CursorLoader* loader) { | 61 ui::CursorLoader* loader) { |
| 62 LoadImageCursors(device_scale_factor, loader); | 62 LoadImageCursors(device_scale_factor, loader); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void DesktopCursorLoaderUpdaterAuraLinux::OnDisplayUpdated( | 65 void DesktopCursorLoaderUpdaterAuraLinux::OnDisplayUpdated( |
| 66 const gfx::Display& display, | 66 const display::Display& display, |
| 67 ui::CursorLoader* loader) { | 67 ui::CursorLoader* loader) { |
| 68 LoadImageCursors(display.device_scale_factor(), loader); | 68 LoadImageCursors(display.device_scale_factor(), loader); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // static | 71 // static |
| 72 std::unique_ptr<DesktopCursorLoaderUpdater> | 72 std::unique_ptr<DesktopCursorLoaderUpdater> |
| 73 DesktopCursorLoaderUpdater::Create() { | 73 DesktopCursorLoaderUpdater::Create() { |
| 74 return base::WrapUnique(new DesktopCursorLoaderUpdaterAuraLinux); | 74 return base::WrapUnique(new DesktopCursorLoaderUpdaterAuraLinux); |
| 75 } | 75 } |
| 76 | 76 |
| 77 } // namespace views | 77 } // namespace views |
| OLD | NEW |