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

Side by Side Diff: webkit/common/cursors/webcursor_aurawin.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 | « webkit/common/cursors/webcursor_aura.cc ('k') | webkit/common/cursors/webcursor_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "webkit/common/cursors/webcursor.h"
6
7 #include <windows.h>
8
9 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
10 #include "ui/gfx/icon_util.h"
11
12 const ui::PlatformCursor WebCursor::GetPlatformCursor() {
13 if (!IsCustom())
14 return LoadCursor(NULL, IDC_ARROW);
15
16 if (custom_cursor_)
17 return custom_cursor_;
18
19 custom_cursor_ =
20 IconUtil::CreateCursorFromDIB(
21 custom_size_,
22 hotspot_,
23 !custom_data_.empty() ? &custom_data_[0] : NULL,
24 custom_data_.size());
25 return custom_cursor_;
26 }
27
28 void WebCursor::SetDisplayInfo(const gfx::Display& display) {
29 // TODO(winguru): Add support for scaling the cursor.
30 }
31
32 void WebCursor::InitPlatformData() {
33 custom_cursor_ = NULL;
34 }
35
36 bool WebCursor::SerializePlatformData(Pickle* pickle) const {
37 return true;
38 }
39
40 bool WebCursor::DeserializePlatformData(PickleIterator* iter) {
41 return true;
42 }
43
44 bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const {
45 return true;
46 }
47
48 void WebCursor::CleanupPlatformData() {
49 if (custom_cursor_) {
50 DestroyIcon(custom_cursor_);
51 custom_cursor_ = NULL;
52 }
53 }
54
55 void WebCursor::CopyPlatformData(const WebCursor& other) {
56 }
OLDNEW
« no previous file with comments | « webkit/common/cursors/webcursor_aura.cc ('k') | webkit/common/cursors/webcursor_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698