| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/glue/webcursor.h" | 5 #include "webkit/glue/webcursor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
| 9 #include "webkit/api/public/WebCursorInfo.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" |
| 10 #include "webkit/api/public/WebImage.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" |
| 11 | 11 |
| 12 using WebKit::WebCursorInfo; | 12 using WebKit::WebCursorInfo; |
| 13 using WebKit::WebImage; | 13 using WebKit::WebImage; |
| 14 | 14 |
| 15 static const int kMaxCursorDimension = 1024; | 15 static const int kMaxCursorDimension = 1024; |
| 16 | 16 |
| 17 WebCursor::WebCursor() | 17 WebCursor::WebCursor() |
| 18 : type_(WebCursorInfo::TypePointer) { | 18 : type_(WebCursorInfo::TypePointer) { |
| 19 InitPlatformData(); | 19 InitPlatformData(); |
| 20 } | 20 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 bitmap.setConfig(SkBitmap::kARGB_8888_Config, | 185 bitmap.setConfig(SkBitmap::kARGB_8888_Config, |
| 186 custom_size_.width(), | 186 custom_size_.width(), |
| 187 custom_size_.height()); | 187 custom_size_.height()); |
| 188 if (!bitmap.allocPixels()) | 188 if (!bitmap.allocPixels()) |
| 189 return; | 189 return; |
| 190 memcpy(bitmap.getPixels(), &custom_data_[0], custom_data_.size()); | 190 memcpy(bitmap.getPixels(), &custom_data_[0], custom_data_.size()); |
| 191 | 191 |
| 192 image->assign(bitmap); | 192 image->assign(bitmap); |
| 193 } | 193 } |
| 194 #endif | 194 #endif |
| OLD | NEW |