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

Side by Side Diff: ui/base/cursor/cursor_loader_x11.cc

Issue 832953002: Cleanup: Update the path to gfx size headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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 | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | ui/base/cursor/cursor_util.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/cursor/cursor_loader_x11.h" 5 #include "ui/base/cursor/cursor_loader_x11.h"
6 6
7 #include <float.h> 7 #include <float.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "skia/ext/image_operations.h" 12 #include "skia/ext/image_operations.h"
13 #include "ui/base/cursor/cursor.h" 13 #include "ui/base/cursor/cursor.h"
14 #include "ui/base/cursor/cursor_util.h" 14 #include "ui/base/cursor/cursor_util.h"
15 #include "ui/base/x/x11_util.h" 15 #include "ui/base/x/x11_util.h"
16 #include "ui/gfx/geometry/point_conversions.h" 16 #include "ui/gfx/geometry/point_conversions.h"
17 #include "ui/gfx/geometry/size_conversions.h"
17 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
18 #include "ui/gfx/size_conversions.h"
19 #include "ui/gfx/skbitmap_operations.h" 19 #include "ui/gfx/skbitmap_operations.h"
20 #include "ui/gfx/skia_util.h" 20 #include "ui/gfx/skia_util.h"
21 21
22 namespace { 22 namespace {
23 23
24 // Returns X font cursor shape from an Aura cursor. 24 // Returns X font cursor shape from an Aura cursor.
25 int CursorShapeFromNative(const gfx::NativeCursor& native_cursor) { 25 int CursorShapeFromNative(const gfx::NativeCursor& native_cursor) {
26 switch (native_cursor.native_type()) { 26 switch (native_cursor.native_type()) {
27 case ui::kCursorMiddlePanning: 27 case ui::kCursorMiddlePanning:
28 return XC_fleur; 28 return XC_fleur;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (animated_cursors_.count(type)) 232 if (animated_cursors_.count(type))
233 return animated_cursors_[type].first; 233 return animated_cursors_[type].first;
234 234
235 ImageCursorMap::iterator find = cursors_.find(type); 235 ImageCursorMap::iterator find = cursors_.find(type);
236 if (find != cursors_.end()) 236 if (find != cursors_.end())
237 return cursors_[type]; 237 return cursors_[type];
238 return GetXCursor(CursorShapeFromNative(native_cursor)); 238 return GetXCursor(CursorShapeFromNative(native_cursor));
239 } 239 }
240 240
241 } // namespace ui 241 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/scoped_clipboard_writer.cc ('k') | ui/base/cursor/cursor_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698