| 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 "webkit/common/cursors/webcursor.h" | 5 #include "content/common/cursors/webcursor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/WebKit/public/platform/WebCursorInfo.h" | 8 #include "third_party/WebKit/public/platform/WebCursorInfo.h" |
| 9 #include "ui/base/cursor/cursor.h" | 9 #include "ui/base/cursor/cursor.h" |
| 10 | 10 |
| 11 using blink::WebCursorInfo; | 11 using blink::WebCursorInfo; |
| 12 | 12 |
| 13 namespace content { |
| 14 |
| 13 gfx::NativeCursor WebCursor::GetNativeCursor() { | 15 gfx::NativeCursor WebCursor::GetNativeCursor() { |
| 14 switch (type_) { | 16 switch (type_) { |
| 15 case WebCursorInfo::TypePointer: | 17 case WebCursorInfo::TypePointer: |
| 16 return ui::kCursorPointer; | 18 return ui::kCursorPointer; |
| 17 case WebCursorInfo::TypeCross: | 19 case WebCursorInfo::TypeCross: |
| 18 return ui::kCursorCross; | 20 return ui::kCursorCross; |
| 19 case WebCursorInfo::TypeHand: | 21 case WebCursorInfo::TypeHand: |
| 20 return ui::kCursorHand; | 22 return ui::kCursorHand; |
| 21 case WebCursorInfo::TypeIBeam: | 23 case WebCursorInfo::TypeIBeam: |
| 22 return ui::kCursorIBeam; | 24 return ui::kCursorIBeam; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 case WebCursorInfo::TypeCustom: { | 103 case WebCursorInfo::TypeCustom: { |
| 102 ui::Cursor cursor(ui::kCursorCustom); | 104 ui::Cursor cursor(ui::kCursorCustom); |
| 103 cursor.SetPlatformCursor(GetPlatformCursor()); | 105 cursor.SetPlatformCursor(GetPlatformCursor()); |
| 104 return cursor; | 106 return cursor; |
| 105 } | 107 } |
| 106 default: | 108 default: |
| 107 NOTREACHED(); | 109 NOTREACHED(); |
| 108 return gfx::kNullCursor; | 110 return gfx::kNullCursor; |
| 109 } | 111 } |
| 110 } | 112 } |
| 113 |
| 114 } // namespace content |
| OLD | NEW |