| 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/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/string16.h" | 14 #include "base/string16.h" |
| 15 #include "chrome/browser/favicon/favicon_service.h" | 15 #include "chrome/browser/favicon/favicon_service.h" |
| 16 #include "chrome/browser/intents/web_intents_registry.h" | 16 #include "chrome/browser/intents/web_intents_registry.h" |
| 17 #include "chrome/browser/intents/cws_intents_registry.h" | 17 #include "chrome/browser/intents/cws_intents_registry.h" |
| 18 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" | 18 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" |
| 19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
| 20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
| 21 #include "webkit/glue/web_intent_data.h" | 21 #include "webkit/glue/web_intent_data.h" |
| 22 #include "webkit/glue/web_intent_reply_data.h" | 22 #include "webkit/glue/web_intent_reply_data.h" |
| 23 | 23 |
| 24 class Browser; | 24 class Browser; |
| 25 struct DefaultWebIntentService; |
| 25 class GURL; | 26 class GURL; |
| 26 class TabContentsWrapper; | 27 class TabContentsWrapper; |
| 27 class WebIntentPicker; | 28 class WebIntentPicker; |
| 28 class WebIntentPickerModel; | 29 class WebIntentPickerModel; |
| 29 | 30 |
| 30 namespace content { | 31 namespace content { |
| 31 class WebContents; | 32 class WebContents; |
| 32 class WebIntentsDispatcher; | 33 class WebIntentsDispatcher; |
| 33 } | 34 } |
| 34 | 35 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Exposed for tests only. | 86 // Exposed for tests only. |
| 86 void set_model_observer(WebIntentPickerModelObserver* observer) { | 87 void set_model_observer(WebIntentPickerModelObserver* observer) { |
| 87 picker_model_->set_observer(observer); | 88 picker_model_->set_observer(observer); |
| 88 } | 89 } |
| 89 | 90 |
| 90 // Called when WebIntentServiceData is returned from the WebIntentsRegistry. | 91 // Called when WebIntentServiceData is returned from the WebIntentsRegistry. |
| 91 virtual void OnIntentsQueryDone( | 92 virtual void OnIntentsQueryDone( |
| 92 WebIntentsRegistry::QueryID, | 93 WebIntentsRegistry::QueryID, |
| 93 const std::vector<webkit_glue::WebIntentServiceData>& services) OVERRIDE; | 94 const std::vector<webkit_glue::WebIntentServiceData>& services) OVERRIDE; |
| 94 | 95 |
| 96 // Called when the WebIntentsRegistry returns responses to a defaults request. |
| 97 virtual void OnIntentsDefaultsQueryDone( |
| 98 WebIntentsRegistry::QueryID, |
| 99 const DefaultWebIntentService& default_service) OVERRIDE; |
| 100 |
| 95 // Called when FaviconData is returned from the FaviconService. | 101 // Called when FaviconData is returned from the FaviconService. |
| 96 void OnFaviconDataAvailable(FaviconService::Handle handle, | 102 void OnFaviconDataAvailable(FaviconService::Handle handle, |
| 97 history::FaviconData favicon_data); | 103 history::FaviconData favicon_data); |
| 98 | 104 |
| 99 // Called when IntentExtensionInfo is returned from the CWSIntentsRegistry. | 105 // Called when IntentExtensionInfo is returned from the CWSIntentsRegistry. |
| 100 void OnCWSIntentServicesAvailable( | 106 void OnCWSIntentServicesAvailable( |
| 101 const CWSIntentsRegistry::IntentExtensionList& extensions); | 107 const CWSIntentsRegistry::IntentExtensionList& extensions); |
| 102 | 108 |
| 103 // Called when a suggested extension's icon is fetched. | 109 // Called when a suggested extension's icon is fetched. |
| 104 void OnExtensionIconURLFetchComplete(const string16& extension_id, | 110 void OnExtensionIconURLFetchComplete(const string16& extension_id, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 165 |
| 160 // Request consumer used when asynchronously loading favicons. | 166 // Request consumer used when asynchronously loading favicons. |
| 161 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; | 167 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; |
| 162 | 168 |
| 163 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; | 169 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; |
| 164 | 170 |
| 165 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); | 171 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
| 166 }; | 172 }; |
| 167 | 173 |
| 168 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 174 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
| OLD | NEW |