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

Unified Diff: chrome/browser/android/webapps/add_to_homescreen_manager.h

Issue 2968693003: [Android Webapps] Make AddToHomescreenDataFetcher easier to test (Closed)
Patch Set: Merge branch 'master' into homescreen_fetcher_weak_ptr2 Created 3 years, 5 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: chrome/browser/android/webapps/add_to_homescreen_manager.h
diff --git a/chrome/browser/android/webapps/add_to_homescreen_manager.h b/chrome/browser/android/webapps/add_to_homescreen_manager.h
index 3d7af4db27b5e68a7d7b13db23242c301210deb1..7cdefa412c916f0ea2316066112e1b26f082e494 100644
--- a/chrome/browser/android/webapps/add_to_homescreen_manager.h
+++ b/chrome/browser/android/webapps/add_to_homescreen_manager.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_
#define CHROME_BROWSER_ANDROID_WEBAPPS_ADD_TO_HOMESCREEN_MANAGER_H_
+#include <memory>
+
#include "base/android/jni_android.h"
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
@@ -14,7 +16,6 @@ namespace content {
class WebContents;
}
-class GURL;
class SkBitmap;
struct ShortcutInfo;
@@ -60,9 +61,6 @@ class AddToHomescreenManager : public AddToHomescreenDataFetcher::Observer {
void OnDataAvailable(const ShortcutInfo& info,
const SkBitmap& primary_icon,
const SkBitmap& badge_icon) override;
- SkBitmap FinalizeLauncherIconInBackground(const SkBitmap& icon,
- const GURL& url,
- bool* is_generated) override;
// Points to the Java object.
base::android::ScopedJavaGlobalRef<jobject> java_ref_;
@@ -71,7 +69,7 @@ class AddToHomescreenManager : public AddToHomescreenDataFetcher::Observer {
bool is_webapk_compatible_;
// Fetches data required to add a shortcut.
- scoped_refptr<AddToHomescreenDataFetcher> data_fetcher_;
+ std::unique_ptr<AddToHomescreenDataFetcher> data_fetcher_;
DISALLOW_COPY_AND_ASSIGN(AddToHomescreenManager);
};

Powered by Google App Engine
This is Rietveld 408576698