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

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

Issue 10825352: Change picker model API to allow less notification messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_model.h
diff --git a/chrome/browser/ui/intents/web_intent_picker_model.h b/chrome/browser/ui/intents/web_intent_picker_model.h
index 41a5adc656793a8be7dc160658a74be4ebc98a09..c370f99b1b834bec3bdda0ac994ccdf644e38f09 100644
--- a/chrome/browser/ui/intents/web_intent_picker_model.h
+++ b/chrome/browser/ui/intents/web_intent_picker_model.h
@@ -108,14 +108,9 @@ class WebIntentPickerModel {
// Update the favicon for the intent service at |index| to |image|.
void UpdateFaviconAt(size_t index, const gfx::Image& image);
- // Add a new suggested extension with |id|, |title| and |average_rating| to
- // the picker.
- void AddSuggestedExtension(const string16& title,
- const string16& id,
- double average_rating);
-
- // Remove a suggested extension from the picker at |index|.
- void RemoveSuggestedExtensionAt(size_t index);
+ // Add a list of suggested extensions to the model.
+ void AddSuggestedExtensions(
+ const std::vector<SuggestedExtension>& suggestions);
// Return the suggested extension at |index|.
const SuggestedExtension& GetSuggestedExtensionAt(size_t index) const;
@@ -150,9 +145,8 @@ class WebIntentPickerModel {
// is owned by this model.
std::vector<InstalledService*> installed_services_;
- // A vector of all suggested extensions in the picker. Each element is owned
- // by this model.
- std::vector<SuggestedExtension*> suggested_extensions_;
+ // A vector of all suggested extensions in the picker.
+ std::vector<SuggestedExtension> suggested_extensions_;
// The observer to send notifications to, or NULL if none. Not owned.
WebIntentPickerModelObserver* observer_;

Powered by Google App Engine
This is Rietveld 408576698