Roll src/third_party/WebKit 48de1d8:ada7a3d (svn 202597:202598)
[chromium-blink-merge.git] / components / enhanced_bookmarks / image_record.h
blobe93f3b83ff422f7ff2ee3091c686f0cd912fef82
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_RECORD_H_
6 #define COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_RECORD_H_
8 #include "base/memory/ref_counted.h"
9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/image/image.h"
11 #include "url/gurl.h"
13 namespace enhanced_bookmarks {
15 // Defines a record of a bookmark image in the ImageStore.
16 class ImageRecord : public base::RefCountedThreadSafe<ImageRecord> {
17 public:
18 ImageRecord(scoped_ptr<gfx::Image> image,
19 const GURL& url,
20 SkColor dominant_color);
21 ImageRecord(scoped_ptr<gfx::Image> image, const GURL& url);
22 ImageRecord();
24 // The image data.
25 scoped_ptr<gfx::Image> image;
26 // The URL that hosts the image.
27 GURL url;
28 // The dominant color of the image.
29 SkColor dominant_color;
31 private:
32 friend class base::RefCountedThreadSafe<ImageRecord>;
34 ~ImageRecord();
37 } // namespace enhanced_bookmarks
39 #endif // COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_RECORD_H_