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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_data.h

Issue 2778053002: Fetch ARC Kiosk app name and icon from Android side. (Closed)
Patch Set: Created 3 years, 9 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/chromeos/app_mode/kiosk_app_data.h
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_data.h b/chrome/browser/chromeos/app_mode/kiosk_app_data.h
index 7f5d5c9dd596a2237fac5a75899c358425674afe..293658a6a38b60068d1fc661322ba7bc8b6a7594 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_data.h
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_data.h
@@ -10,8 +10,8 @@
#include "base/files/file_path.h"
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/app_mode/kiosk_app_icon_loader.h"
#include "chrome/browser/extensions/webstore_data_fetcher_delegate.h"
#include "components/signin/core/account_id/account_id.h"
#include "ui/gfx/image/image_skia.h"
@@ -39,7 +39,8 @@ class KioskAppDataDelegate;
// Fetches an app's web store data and manages the cached info such as name
// and icon.
class KioskAppData : public base::SupportsWeakPtr<KioskAppData>,
- public extensions::WebstoreDataFetcherDelegate {
+ public extensions::WebstoreDataFetcherDelegate,
+ public KioskAppIconLoader::Delegate {
public:
enum Status {
STATUS_INIT, // Data initialized with app id.
@@ -94,9 +95,12 @@ class KioskAppData : public base::SupportsWeakPtr<KioskAppData>,
const GURL& update_url,
const std::string& required_platform_version);
+ // Callbacks for KioskAppIconLoader.
+ void OnIconLoadSuccess(const gfx::ImageSkia& icon) override;
+ void OnIconLoadFailure() override;
+
private:
class CrxLoader;
- class IconLoader;
class WebstoreDataParser;
void SetStatus(Status status);
@@ -120,10 +124,6 @@ class KioskAppData : public base::SupportsWeakPtr<KioskAppData>,
// Callback for extensions::ImageLoader.
void OnExtensionIconLoaded(const gfx::Image& icon);
- // Callbacks for IconLoader.
- void OnIconLoadSuccess(const gfx::ImageSkia& icon);
- void OnIconLoadFailure();
-
// Callbacks for WebstoreDataParser
void OnWebstoreParseSuccess(const SkBitmap& icon,
const std::string& required_platform_version);

Powered by Google App Engine
This is Rietveld 408576698