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

Side by Side Diff: content/common/cursors/webcursor_aurax11.cc

Issue 201473002: Move webcursors code from webkit/ to content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gfx image include Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « content/common/cursors/webcursor_aurawin.cc ('k') | content/common/cursors/webcursor_gtk.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 "webkit/common/cursors/webcursor.h" 5 #include "content/common/cursors/webcursor.h"
6 6
7 #include <X11/cursorfont.h>
7 #include <X11/Xcursor/Xcursor.h> 8 #include <X11/Xcursor/Xcursor.h>
8 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
9 #include <X11/cursorfont.h>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "third_party/WebKit/public/platform/WebCursorInfo.h" 12 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
13 #include "ui/base/cursor/cursor.h" 13 #include "ui/base/cursor/cursor.h"
14 #include "ui/base/cursor/cursor_loader_x11.h" 14 #include "ui/base/cursor/cursor_loader_x11.h"
15 #include "ui/base/x/x11_util.h" 15 #include "ui/base/x/x11_util.h"
16 16
17 namespace content {
18
17 const ui::PlatformCursor WebCursor::GetPlatformCursor() { 19 const ui::PlatformCursor WebCursor::GetPlatformCursor() {
18 if (platform_cursor_) 20 if (platform_cursor_)
19 return platform_cursor_; 21 return platform_cursor_;
20 22
21 if (custom_data_.size() == 0) 23 if (custom_data_.size() == 0)
22 return 0; 24 return 0;
23 25
24 SkBitmap bitmap; 26 SkBitmap bitmap;
25 bitmap.setConfig(SkBitmap::kARGB_8888_Config, 27 bitmap.setConfig(SkBitmap::kARGB_8888_Config,
26 custom_size_.width(), custom_size_.height()); 28 custom_size_.width(), custom_size_.height());
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 78
77 void WebCursor::CopyPlatformData(const WebCursor& other) { 79 void WebCursor::CopyPlatformData(const WebCursor& other) {
78 if (platform_cursor_) 80 if (platform_cursor_)
79 ui::UnrefCustomXCursor(platform_cursor_); 81 ui::UnrefCustomXCursor(platform_cursor_);
80 platform_cursor_ = other.platform_cursor_; 82 platform_cursor_ = other.platform_cursor_;
81 if (platform_cursor_) 83 if (platform_cursor_)
82 ui::RefCustomXCursor(platform_cursor_); 84 ui::RefCustomXCursor(platform_cursor_);
83 85
84 device_scale_factor_ = other.device_scale_factor_; 86 device_scale_factor_ = other.device_scale_factor_;
85 } 87 }
88
89 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cursors/webcursor_aurawin.cc ('k') | content/common/cursors/webcursor_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698