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

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 comments 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
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 52%
rename from ui/base/cursor/cursor_loader_null.h
rename to ui/base/cursor/cursor_loader_ozone.h
index 5cb9ced1f201deaeef0a5d653ec249ac124309ba..94df10054194dba6090f2f50f5d720dc828cf0eb 100644
--- a/ui/base/cursor/cursor_loader_null.h
+++ b/ui/base/cursor/cursor_loader_ozone.h
@@ -1,36 +1,48 @@
-// 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:
virtual void LoadImageCursor(int id,
int resource_id,
const gfx::Point& hot) OVERRIDE;
+
sky 2014/02/12 21:47:22 note: Style on right side is correct here. Prefix
dnicoara 2014/02/12 21:57:40 Done.
virtual void LoadAnimatedCursor(int id,
int resource_id,
const gfx::Point& hot,
int frame_delay_ms) OVERRIDE;
+
virtual void UnloadAll() OVERRIDE;
+
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_

Powered by Google App Engine
This is Rietveld 408576698