| OLD | NEW |
| 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 "content/common/cursors/webcursor.h" | 5 #include "content/common/cursors/webcursor.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 9 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| 10 #include "ui/gfx/icon_util.h" | 10 #include "ui/gfx/icon_util.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 custom_size, | 30 custom_size, |
| 31 hotspot, | 31 hotspot, |
| 32 !custom_data.empty() ? &custom_data[0] : NULL, | 32 !custom_data.empty() ? &custom_data[0] : NULL, |
| 33 custom_data.size()) | 33 custom_data.size()) |
| 34 .release(); | 34 .release(); |
| 35 return custom_cursor_; | 35 return custom_cursor_; |
| 36 } | 36 } |
| 37 | 37 |
| 38 void WebCursor::InitPlatformData() { | 38 void WebCursor::InitPlatformData() { |
| 39 custom_cursor_ = NULL; | 39 custom_cursor_ = NULL; |
| 40 device_scale_factor_ = 1.f; |
| 40 } | 41 } |
| 41 | 42 |
| 42 bool WebCursor::SerializePlatformData(base::Pickle* pickle) const { | 43 bool WebCursor::SerializePlatformData(base::Pickle* pickle) const { |
| 43 return true; | 44 return true; |
| 44 } | 45 } |
| 45 | 46 |
| 46 bool WebCursor::DeserializePlatformData(base::PickleIterator* iter) { | 47 bool WebCursor::DeserializePlatformData(base::PickleIterator* iter) { |
| 47 return true; | 48 return true; |
| 48 } | 49 } |
| 49 | 50 |
| 50 bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const { | 51 bool WebCursor::IsPlatformDataEqual(const WebCursor& other) const { |
| 51 return true; | 52 return true; |
| 52 } | 53 } |
| 53 | 54 |
| 54 void WebCursor::CleanupPlatformData() { | 55 void WebCursor::CleanupPlatformData() { |
| 55 if (custom_cursor_) { | 56 if (custom_cursor_) { |
| 56 DestroyIcon(custom_cursor_); | 57 DestroyIcon(custom_cursor_); |
| 57 custom_cursor_ = NULL; | 58 custom_cursor_ = NULL; |
| 58 } | 59 } |
| 59 } | 60 } |
| 60 | 61 |
| 61 void WebCursor::CopyPlatformData(const WebCursor& other) { | 62 void WebCursor::CopyPlatformData(const WebCursor& other) { |
| 63 device_scale_factor_ = other.device_scale_factor_; |
| 62 } | 64 } |
| 63 | 65 |
| 64 } // namespace content | 66 } // namespace content |
| OLD | NEW |