OLD | NEW |
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_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 void OnCWSIntentServicesAvailable( | 172 void OnCWSIntentServicesAvailable( |
173 const CWSIntentsRegistry::IntentExtensionList& extensions); | 173 const CWSIntentsRegistry::IntentExtensionList& extensions); |
174 | 174 |
175 // Called when a suggested extension's icon is fetched. | 175 // Called when a suggested extension's icon is fetched. |
176 void OnExtensionIconURLFetchComplete(const string16& extension_id, | 176 void OnExtensionIconURLFetchComplete(const string16& extension_id, |
177 const net::URLFetcher* source); | 177 const net::URLFetcher* source); |
178 | 178 |
179 // Called whenever intent data (both from registry and CWS) arrives. | 179 // Called whenever intent data (both from registry and CWS) arrives. |
180 void OnIntentDataArrived(); | 180 void OnIntentDataArrived(); |
181 | 181 |
| 182 // Reset internal state to default values. |
| 183 void Reset(); |
| 184 |
182 typedef base::Callback<void(const gfx::Image&)> | 185 typedef base::Callback<void(const gfx::Image&)> |
183 ExtensionIconAvailableCallback; | 186 ExtensionIconAvailableCallback; |
184 // Called on a worker thread to decode and resize the extension's icon. | 187 // Called on a worker thread to decode and resize the extension's icon. |
185 static void DecodeExtensionIconAndResize( | 188 static void DecodeExtensionIconAndResize( |
186 scoped_ptr<std::string> icon_response, | 189 scoped_ptr<std::string> icon_response, |
187 const ExtensionIconAvailableCallback& callback, | 190 const ExtensionIconAvailableCallback& callback, |
188 const base::Closure& unavailable_callback); | 191 const base::Closure& unavailable_callback); |
189 | 192 |
190 // Called when an extension's icon is successfully decoded and resized. | 193 // Called when an extension's icon is successfully decoded and resized. |
191 void OnExtensionIconAvailable(const string16& extension_id, | 194 void OnExtensionIconAvailable(const string16& extension_id, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 269 |
267 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; | 270 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; |
268 | 271 |
269 // Timer factory for minimum display time of "waiting" dialog. | 272 // Timer factory for minimum display time of "waiting" dialog. |
270 base::WeakPtrFactory<WebIntentPickerController> timer_factory_; | 273 base::WeakPtrFactory<WebIntentPickerController> timer_factory_; |
271 | 274 |
272 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); | 275 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
273 }; | 276 }; |
274 | 277 |
275 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 278 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
OLD | NEW |