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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_model.h

Issue 10827238: [WebIntents, Gtk] "Waiting for Suggestion" dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Gtk dialog to look decent. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Set the icon image for the suggested extension with |id|. 136 // Set the icon image for the suggested extension with |id|.
137 void SetSuggestedExtensionIconWithId(const string16& id, 137 void SetSuggestedExtensionIconWithId(const string16& id,
138 const gfx::Image& image); 138 const gfx::Image& image);
139 139
140 // Set the picker to display the intent service with |url| inline. 140 // Set the picker to display the intent service with |url| inline.
141 void SetInlineDisposition(const GURL& url); 141 void SetInlineDisposition(const GURL& url);
142 142
143 // Returns true if the picker is currently displaying an inline service. 143 // Returns true if the picker is currently displaying an inline service.
144 bool IsInlineDisposition() const; 144 bool IsInlineDisposition() const;
145 145
146 // Returns true if there is still a pending request for suggestions from CWS.
147 bool IsWaitingForSuggestions() const;
148
149 // Set the "waiting for suggestions" status to |waiting|
150 void SetWaitingForSuggestions(bool waiting);
151
146 // Returns the url of the intent service that is being displayed inline, or 152 // Returns the url of the intent service that is being displayed inline, or
147 // GURL::EmptyGURL() if none. 153 // GURL::EmptyGURL() if none.
148 GURL inline_disposition_url() const { return inline_disposition_url_; } 154 GURL inline_disposition_url() const { return inline_disposition_url_; }
149 155
150 private: 156 private:
151 // Delete all elements in |installed_services_| and |suggested_extensions_|. 157 // Delete all elements in |installed_services_| and |suggested_extensions_|.
152 // Note that this method does not reset the observer. 158 // Note that this method does not reset the observer.
153 void DestroyAll(); 159 void DestroyAll();
154 160
155 // A vector of all installed services in the picker. Each installed service 161 // A vector of all installed services in the picker. Each installed service
(...skipping 14 matching lines...) Expand all
170 // A cached copy of the action that instantiated the picker. 176 // A cached copy of the action that instantiated the picker.
171 string16 action_; 177 string16 action_;
172 178
173 // A cached copy of the mimetype that instantiated the picker. 179 // A cached copy of the mimetype that instantiated the picker.
174 string16 mimetype_; 180 string16 mimetype_;
175 181
176 // The non-empty url of the default service if the WebIntentsRegistry 182 // The non-empty url of the default service if the WebIntentsRegistry
177 // finds a default service matching the intent being dispatched. 183 // finds a default service matching the intent being dispatched.
178 GURL default_service_url_; 184 GURL default_service_url_;
179 185
186 // Indicates that there are still open requests to CWS.
187 bool waiting_for_suggestions_;
188
180 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerModel); 189 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerModel);
181 }; 190 };
182 191
183 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_ 192 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698