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

Side by Side Diff: chrome/browser/android/download/ui/thumbnail_provider.h

Issue 2475543003: Introduce the image_decoder service (Closed)
Patch Set: . Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_DOWNLOAD_UI_THUMBNAIL_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_UI_THUMBNAIL_PROVIDER_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_UI_THUMBNAIL_PROVIDER_H_ 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_UI_THUMBNAIL_PROVIDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/image_decoder.h" 12 #include "chrome/browser/image_decoder.h"
12 13
13 // Kicks off asynchronous pipelines for creating thumbnails for local files. 14 // Kicks off asynchronous pipelines for creating thumbnails for local files.
14 // The native-side ThumbnailProvider is owned by the Java-side and can be 15 // The native-side ThumbnailProvider is owned by the Java-side and can be
15 // safely destroyed while a request is being processed. 16 // safely destroyed while a request is being processed.
16 class ThumbnailProvider { 17 class ThumbnailProvider {
17 public: 18 public:
18 explicit ThumbnailProvider(const base::android::JavaParamRef<jobject>& jobj); 19 explicit ThumbnailProvider(const base::android::JavaParamRef<jobject>& jobj);
19 20
20 // Destroys the ThumbnailProvider. Any currently running ImageRequest will 21 // Destroys the ThumbnailProvider. Any currently running ImageRequest will
(...skipping 17 matching lines...) Expand all
38 private: 39 private:
39 ~ThumbnailProvider(); 40 ~ThumbnailProvider();
40 41
41 base::android::ScopedJavaGlobalRef<jobject> java_delegate_; 42 base::android::ScopedJavaGlobalRef<jobject> java_delegate_;
42 base::WeakPtrFactory<ThumbnailProvider> weak_factory_; 43 base::WeakPtrFactory<ThumbnailProvider> weak_factory_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(ThumbnailProvider); 45 DISALLOW_COPY_AND_ASSIGN(ThumbnailProvider);
45 }; 46 };
46 47
47 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_UI_THUMBNAIL_PROVIDER_H_ 48 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_UI_THUMBNAIL_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/browser_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698