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

Unified Diff: content/common/cursors/webcursor_mac.mm

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/cursors/webcursor_gtk_data.h ('k') | content/common/cursors/webcursor_null.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cursors/webcursor_mac.mm
diff --git a/webkit/common/cursors/webcursor_mac.mm b/content/common/cursors/webcursor_mac.mm
similarity index 98%
rename from webkit/common/cursors/webcursor_mac.mm
rename to content/common/cursors/webcursor_mac.mm
index 4358be086dff106db98a6e6c97eae776b6b95db1..d32d8b7c9822df78cfeb0d076f62c00379f5b629 100644
--- a/webkit/common/cursors/webcursor_mac.mm
+++ b/content/common/cursors/webcursor_mac.mm
@@ -2,18 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/common/cursors/webcursor.h"
+#include "content/common/cursors/webcursor.h"
#import <AppKit/AppKit.h>
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
+#include "content/public/common/content_client.h"
#include "grit/webkit_resources.h"
#include "skia/ext/skia_utils_mac.h"
#include "third_party/WebKit/public/platform/WebCursorInfo.h"
#include "third_party/WebKit/public/platform/WebSize.h"
-#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/image/image.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/size_conversions.h"
@@ -116,7 +117,7 @@ namespace {
NSCursor* LoadCursor(int resource_id, int hotspot_x, int hotspot_y) {
const gfx::Image& cursor_image =
- ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
+ content::GetContentClient()->GetNativeImageNamed(resource_id);
DCHECK(!cursor_image.IsEmpty());
return [[[NSCursor alloc] initWithImage:cursor_image.ToNSImage()
hotSpot:NSMakePoint(hotspot_x,
@@ -190,6 +191,8 @@ NSCursor* CreateCustomCursor(const std::vector<char>& custom_data,
} // namespace
+namespace content {
+
// Match Safari's cursor choices; see platform/mac/CursorMac.mm .
gfx::NativeCursor WebCursor::GetNativeCursor() {
switch (type_) {
@@ -393,3 +396,5 @@ void WebCursor::CleanupPlatformData() {
void WebCursor::CopyPlatformData(const WebCursor& other) {
return;
}
+
+} // namespace content
« no previous file with comments | « content/common/cursors/webcursor_gtk_data.h ('k') | content/common/cursors/webcursor_null.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698