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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // extensions::WebstoreInstaller::Delegate implementation. | 87 // extensions::WebstoreInstaller::Delegate implementation. |
88 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE; | 88 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE; |
89 virtual void OnExtensionInstallFailure(const std::string& id, | 89 virtual void OnExtensionInstallFailure(const std::string& id, |
90 const std::string& error) OVERRIDE; | 90 const std::string& error) OVERRIDE; |
91 | 91 |
92 private: | 92 private: |
93 friend class WebIntentPickerControllerTest; | 93 friend class WebIntentPickerControllerTest; |
94 friend class WebIntentPickerControllerBrowserTest; | 94 friend class WebIntentPickerControllerBrowserTest; |
95 friend class WebIntentPickerControllerIncognitoBrowserTest; | 95 friend class WebIntentPickerControllerIncognitoBrowserTest; |
96 | 96 |
| 97 // Adds a service to the data model. |
| 98 void AddServiceToModel(const webkit_glue::WebIntentServiceData& service); |
| 99 |
97 // Gets a notification when the return message is sent to the source tab, | 100 // Gets a notification when the return message is sent to the source tab, |
98 // so we can close the picker dialog or service tab. | 101 // so we can close the picker dialog or service tab. |
99 void OnSendReturnMessage(webkit_glue::WebIntentReplyType reply_type); | 102 void OnSendReturnMessage(webkit_glue::WebIntentReplyType reply_type); |
100 | 103 |
101 // Exposed for tests only. | 104 // Exposed for tests only. |
102 void set_picker(WebIntentPicker* picker) { picker_ = picker; } | 105 void set_picker(WebIntentPicker* picker) { picker_ = picker; } |
103 | 106 |
104 // Exposed for tests only. | 107 // Exposed for tests only. |
105 void set_model_observer(WebIntentPickerModelObserver* observer) { | 108 void set_model_observer(WebIntentPickerModelObserver* observer) { |
106 picker_model_->set_observer(observer); | 109 picker_model_->set_observer(observer); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 | 229 |
227 // Request consumer used when asynchronously loading favicons. | 230 // Request consumer used when asynchronously loading favicons. |
228 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; | 231 CancelableRequestConsumerTSimple<size_t> favicon_consumer_; |
229 | 232 |
230 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; | 233 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; |
231 | 234 |
232 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); | 235 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
233 }; | 236 }; |
234 | 237 |
235 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 238 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
OLD | NEW |