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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "chrome/browser/extensions/webstore_installer.h" | 16 #include "chrome/browser/extensions/webstore_installer.h" |
17 #include "chrome/browser/favicon/favicon_service.h" | 17 #include "chrome/browser/favicon/favicon_service.h" |
| 18 #include "chrome/browser/intents/cws_intents_registry.h" |
18 #include "chrome/browser/intents/web_intents_registry.h" | 19 #include "chrome/browser/intents/web_intents_registry.h" |
19 #include "chrome/browser/intents/cws_intents_registry.h" | |
20 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" | 20 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" |
21 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
22 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
23 #include "webkit/glue/web_intent_data.h" | 23 #include "webkit/glue/web_intent_data.h" |
24 #include "webkit/glue/web_intent_reply_data.h" | 24 #include "webkit/glue/web_intent_reply_data.h" |
25 | 25 |
26 class Browser; | 26 class Browser; |
27 struct DefaultWebIntentService; | 27 struct DefaultWebIntentService; |
28 class GURL; | 28 class GURL; |
29 class TabContentsWrapper; | 29 class TabContentsWrapper; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Called when FaviconData is returned from the FaviconService. | 125 // Called when FaviconData is returned from the FaviconService. |
126 void OnFaviconDataAvailable(FaviconService::Handle handle, | 126 void OnFaviconDataAvailable(FaviconService::Handle handle, |
127 history::FaviconData favicon_data); | 127 history::FaviconData favicon_data); |
128 | 128 |
129 // Called when IntentExtensionInfo is returned from the CWSIntentsRegistry. | 129 // Called when IntentExtensionInfo is returned from the CWSIntentsRegistry. |
130 void OnCWSIntentServicesAvailable( | 130 void OnCWSIntentServicesAvailable( |
131 const CWSIntentsRegistry::IntentExtensionList& extensions); | 131 const CWSIntentsRegistry::IntentExtensionList& extensions); |
132 | 132 |
133 // Called when a suggested extension's icon is fetched. | 133 // Called when a suggested extension's icon is fetched. |
134 void OnExtensionIconURLFetchComplete(const string16& extension_id, | 134 void OnExtensionIconURLFetchComplete(const string16& extension_id, |
135 const content::URLFetcher* source); | 135 const net::URLFetcher* source); |
136 | 136 |
137 typedef base::Callback<void(const gfx::Image&)> | 137 typedef base::Callback<void(const gfx::Image&)> |
138 ExtensionIconAvailableCallback; | 138 ExtensionIconAvailableCallback; |
139 // Called on a worker thread to decode and resize the extension's icon. | 139 // Called on a worker thread to decode and resize the extension's icon. |
140 static void DecodeExtensionIconAndResize( | 140 static void DecodeExtensionIconAndResize( |
141 scoped_ptr<std::string> icon_response, | 141 scoped_ptr<std::string> icon_response, |
142 const ExtensionIconAvailableCallback& callback, | 142 const ExtensionIconAvailableCallback& callback, |
143 const base::Closure& unavailable_callback); | 143 const base::Closure& unavailable_callback); |
144 | 144 |
145 // Called when an extension's icon is successfully decoded and resized. | 145 // Called when an extension's icon is successfully decoded and resized. |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 201 |
202 // Request consumer used when asynchronously loading favicons. | 202 // Request consumer used when asynchronously loading favicons. |
203 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; | 203 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; |
204 | 204 |
205 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; | 205 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; |
206 | 206 |
207 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); | 207 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
208 }; | 208 }; |
209 | 209 |
210 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 210 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
OLD | NEW |