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

Unified Diff: chrome/browser/ui/intents/web_intent_picker_controller.h

Issue 9430025: [Web Intents] WebIntentsPickerController will now fetch icon for suggested extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 10 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/ui/intents/web_intent_picker_controller.h
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.h b/chrome/browser/ui/intents/web_intent_picker_controller.h
index c5cec6e8dc67f70b62a8b6266003d1e03be8e5ce..a6ed04b8518d8c74e290f16af6e1a953abd6eb8e 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.h
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.h
@@ -23,7 +23,6 @@
class Browser;
class GURL;
-class TabContents;
class TabContentsWrapper;
class WebIntentPicker;
class WebIntentPickerModel;
@@ -33,10 +32,6 @@ class WebContents;
class WebIntentsDispatcher;
}
-namespace gfx {
-class Image;
-}
-
namespace webkit_glue {
struct WebIntentServiceData;
}
@@ -105,6 +100,25 @@ class WebIntentPickerController : public content::NotificationObserver,
void OnCWSIntentServicesAvailable(
const CWSIntentsRegistry::IntentExtensionList& extensions);
+ // Called when a suggested extension's icon is fetched.
+ void OnExtensionIconURLFetchComplete(const string16& extension_id,
+ const content::URLFetcher* source);
+
+ typedef base::Callback<void(const gfx::Image&)>
+ ExtensionIconAvailableCallback;
+ // Called on a worker thread to decode and resize the extension's icon.
+ static void DecodeExtensionIconAndResize(
+ scoped_ptr<std::string> icon_response,
+ const ExtensionIconAvailableCallback& callback,
+ const base::Closure& unavailable_callback);
+
+ // Called when an extension's icon is successfully decoded and resized.
+ void OnExtensionIconAvailable(const string16& extension_id,
+ const gfx::Image& icon_image);
+
+ // Called when an extension's icon failed to be decoded or resized.
+ void OnExtensionIconUnavailable(const string16& extension_id);
+
// Decrements the |pending_async_count_| and notifies the picker if it
// reaches zero.
void AsyncOperationFinished();
« no previous file with comments | « chrome/browser/ui/gtk/web_intent_picker_gtk.cc ('k') | chrome/browser/ui/intents/web_intent_picker_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698