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

Unified Diff: ui/base/cursor/cursor_loader_ozone.h

Issue 158023006: Adding Ozone CursorLoader and necessary API functions to allow setting the cursor in SoftwareFactor… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix style Created 6 years, 10 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 | « ui/base/cursor/cursor_loader_null.cc ('k') | ui/base/cursor/cursor_loader_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/cursor_loader_ozone.h
diff --git a/ui/base/cursor/cursor_loader_null.h b/ui/base/cursor/cursor_loader_ozone.h
similarity index 51%
rename from ui/base/cursor/cursor_loader_null.h
rename to ui/base/cursor/cursor_loader_ozone.h
index 5cb9ced1f201deaeef0a5d653ec249ac124309ba..0f38934451a2fdffdbad998312860d2eeaf64cd9 100644
--- a/ui/base/cursor/cursor_loader_null.h
+++ b/ui/base/cursor/cursor_loader_ozone.h
@@ -1,22 +1,27 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_
-#define UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_
+#ifndef UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_
+#define UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_
-#include "base/compiler_specific.h"
+#include <map>
+
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/cursor/cursor_loader.h"
-#include "ui/base/ui_base_export.h"
+
+namespace gfx {
+class ImageSkia;
+}
namespace ui {
-class UI_BASE_EXPORT CursorLoaderNull : public CursorLoader {
+class UI_BASE_EXPORT CursorLoaderOzone : public CursorLoader {
public:
- CursorLoaderNull();
- virtual ~CursorLoaderNull();
+ CursorLoaderOzone();
+ virtual ~CursorLoaderOzone();
- // Overridden from CursorLoader:
+ // CursorLoader overrides:
virtual void LoadImageCursor(int id,
int resource_id,
const gfx::Point& hot) OVERRIDE;
@@ -28,9 +33,14 @@ class UI_BASE_EXPORT CursorLoaderNull : public CursorLoader {
virtual void SetPlatformCursor(gfx::NativeCursor* cursor) OVERRIDE;
private:
- DISALLOW_COPY_AND_ASSIGN(CursorLoaderNull);
+ // Pointers are owned by ResourceBundle and must not be freed here.
+ std::map<int, const gfx::ImageSkia*> cursors_;
+
+ SkBitmap invisible_cursor_;
+
+ DISALLOW_COPY_AND_ASSIGN(CursorLoaderOzone);
};
} // namespace ui
-#endif // UI_BASE_CURSOR_CURSOR_LOADER_NULL_H_
+#endif // UI_BASE_CURSOR_CURSOR_LOADER_OZONE_H_
« no previous file with comments | « ui/base/cursor/cursor_loader_null.cc ('k') | ui/base/cursor/cursor_loader_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698