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

Side by Side Diff: chrome/browser/android/thumbnail/thumbnail.h

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Florin's nits Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_ 5 #ifndef CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_
6 #define CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_ 6 #define CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "cc/resources/ui_resource_bitmap.h" 11 #include "cc/resources/ui_resource_bitmap.h"
12 #include "cc/resources/ui_resource_client.h" 12 #include "cc/resources/ui_resource_client.h"
13 #include "third_party/skia/include/core/SkRefCnt.h"
13 #include "ui/gfx/geometry/size_f.h" 14 #include "ui/gfx/geometry/size_f.h"
14 15
15 namespace base { 16 namespace base {
16 class Time; 17 class Time;
17 } 18 }
18 19
19 namespace gfx { 20 namespace gfx {
20 class Size; 21 class Size;
21 } 22 }
22 23
(...skipping 22 matching lines...) Expand all
45 ~Thumbnail() override; 46 ~Thumbnail() override;
46 47
47 TabId tab_id() const { return tab_id_; } 48 TabId tab_id() const { return tab_id_; }
48 base::Time time_stamp() const { return time_stamp_; } 49 base::Time time_stamp() const { return time_stamp_; }
49 float scale() const { return scale_; } 50 float scale() const { return scale_; }
50 cc::UIResourceId ui_resource_id() const { return ui_resource_id_; } 51 cc::UIResourceId ui_resource_id() const { return ui_resource_id_; }
51 const gfx::SizeF& scaled_content_size() const { return scaled_content_size_; } 52 const gfx::SizeF& scaled_content_size() const { return scaled_content_size_; }
52 const gfx::SizeF& scaled_data_size() const { return scaled_data_size_; } 53 const gfx::SizeF& scaled_data_size() const { return scaled_data_size_; }
53 54
54 void SetBitmap(const SkBitmap& bitmap); 55 void SetBitmap(const SkBitmap& bitmap);
55 void SetCompressedBitmap(skia::RefPtr<SkPixelRef> compressed_bitmap, 56 void SetCompressedBitmap(sk_sp<SkPixelRef> compressed_bitmap,
56 const gfx::Size& content_size); 57 const gfx::Size& content_size);
57 void CreateUIResource(); 58 void CreateUIResource();
58 59
59 // cc::UIResourceClient implementation. 60 // cc::UIResourceClient implementation.
60 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid, 61 cc::UIResourceBitmap GetBitmap(cc::UIResourceId uid,
61 bool resource_lost) override; 62 bool resource_lost) override;
62 63
63 private: 64 private:
64 Thumbnail(TabId tab_id, 65 Thumbnail(TabId tab_id,
65 const base::Time& time_stamp, 66 const base::Time& time_stamp,
(...skipping 17 matching lines...) Expand all
83 bool retrieved_; 84 bool retrieved_;
84 85
85 ui::UIResourceProvider* ui_resource_provider_; 86 ui::UIResourceProvider* ui_resource_provider_;
86 ThumbnailDelegate* thumbnail_delegate_; 87 ThumbnailDelegate* thumbnail_delegate_;
87 88
88 base::WeakPtrFactory<Thumbnail> weak_factory_; 89 base::WeakPtrFactory<Thumbnail> weak_factory_;
89 DISALLOW_COPY_AND_ASSIGN(Thumbnail); 90 DISALLOW_COPY_AND_ASSIGN(Thumbnail);
90 }; 91 };
91 92
92 #endif // CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_ 93 #endif // CHROME_BROWSER_ANDROID_THUMBNAIL_THUMBNAIL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_pixeltest_tiles.cc ('k') | chrome/browser/android/thumbnail/thumbnail.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698