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

Unified Diff: ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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/ozone/OWNERS ('k') | ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
diff --git a/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h b/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
deleted file mode 100644
index 037fd0865d3c23f77c6af6fd528712121ba312e3..0000000000000000000000000000000000000000
--- a/ui/base/cursor/ozone/bitmap_cursor_factory_ozone.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// 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_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_
-#define UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_
-
-#include <map>
-
-#include "base/memory/ref_counted.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/base/cursor/cursor.h"
-#include "ui/base/ui_base_export.h"
-#include "ui/gfx/geometry/point.h"
-#include "ui/ozone/public/cursor_factory_ozone.h"
-
-namespace ui {
-
-// A cursor that is an SkBitmap combined with a gfx::Point hotspot.
-class UI_BASE_EXPORT BitmapCursorOzone
- : public base::RefCounted<BitmapCursorOzone> {
- public:
- BitmapCursorOzone(const SkBitmap& bitmap, const gfx::Point& hotspot);
- BitmapCursorOzone(const std::vector<SkBitmap>& bitmaps,
- const gfx::Point& hotspot,
- int frame_delay_ms);
-
- const gfx::Point& hotspot();
- const SkBitmap& bitmap();
-
- // For animated cursors.
- const std::vector<SkBitmap>& bitmaps();
- int frame_delay_ms();
-
- private:
- friend class base::RefCounted<BitmapCursorOzone>;
- ~BitmapCursorOzone();
-
- std::vector<SkBitmap> bitmaps_;
- gfx::Point hotspot_;
- int frame_delay_ms_;
-
- DISALLOW_COPY_AND_ASSIGN(BitmapCursorOzone);
-};
-
-// CursorFactoryOzone implementation for bitmapped cursors.
-//
-// This is a base class for platforms where PlatformCursor is an SkBitmap
-// combined with a gfx::Point for the hotspot.
-//
-// Subclasses need only implement SetBitmapCursor() as everything else is
-// implemented here.
-class UI_BASE_EXPORT BitmapCursorFactoryOzone : public CursorFactoryOzone {
- public:
- BitmapCursorFactoryOzone();
- virtual ~BitmapCursorFactoryOzone();
-
- // Convert PlatformCursor to BitmapCursorOzone.
- static scoped_refptr<BitmapCursorOzone> GetBitmapCursor(
- PlatformCursor platform_cursor);
-
- // CursorFactoryOzone:
- virtual PlatformCursor GetDefaultCursor(int type) override;
- virtual PlatformCursor CreateImageCursor(const SkBitmap& bitmap,
- const gfx::Point& hotspot) override;
- virtual PlatformCursor CreateAnimatedCursor(
- const std::vector<SkBitmap>& bitmaps,
- const gfx::Point& hotspot,
- int frame_delay_ms) override;
- virtual void RefImageCursor(PlatformCursor cursor) override;
- virtual void UnrefImageCursor(PlatformCursor cursor) override;
-
- private:
- // Get cached BitmapCursorOzone for a default cursor.
- scoped_refptr<BitmapCursorOzone> GetDefaultCursorInternal(int type);
-
- // Default cursors are cached & owned by the factory.
- typedef std::map<int, scoped_refptr<BitmapCursorOzone> > DefaultCursorMap;
- DefaultCursorMap default_cursors_;
-
- DISALLOW_COPY_AND_ASSIGN(BitmapCursorFactoryOzone);
-};
-
-} // namespace ui
-
-#endif // UI_BASE_CURSOR_OZONE_BITMAP_CURSOR_FACTORY_OZONE_H_
« no previous file with comments | « ui/base/cursor/ozone/OWNERS ('k') | ui/base/cursor/ozone/bitmap_cursor_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698