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" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.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/extensions/webstore_installer.h" | 15 #include "chrome/browser/extensions/webstore_installer.h" |
16 #include "chrome/browser/favicon/favicon_service.h" | 16 #include "chrome/browser/favicon/favicon_service.h" |
17 #include "chrome/browser/intents/cws_intents_registry.h" | 17 #include "chrome/browser/intents/cws_intents_registry.h" |
18 #include "chrome/browser/intents/web_intents_registry.h" | 18 #include "chrome/browser/intents/web_intents_registry.h" |
19 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" | 19 #include "chrome/browser/ui/intents/web_intent_picker_delegate.h" |
20 #include "content/public/browser/notification_observer.h" | 20 #include "content/public/browser/notification_observer.h" |
21 #include "content/public/browser/notification_registrar.h" | 21 #include "content/public/browser/notification_registrar.h" |
22 #include "webkit/glue/web_intent_data.h" | 22 #include "webkit/glue/web_intent_data.h" |
23 #include "webkit/glue/web_intent_reply_data.h" | 23 #include "webkit/glue/web_intent_reply_data.h" |
| 24 #include "webkit/glue/web_intent_service_data.h" |
24 | 25 |
25 class Browser; | 26 class Browser; |
26 struct DefaultWebIntentService; | 27 struct DefaultWebIntentService; |
27 class GURL; | 28 class GURL; |
28 class TabContents; | 29 class TabContents; |
29 class WebIntentPicker; | 30 class WebIntentPicker; |
30 class WebIntentPickerModel; | 31 class WebIntentPickerModel; |
31 | 32 |
32 namespace content { | 33 namespace content { |
33 class WebContents; | 34 class WebContents; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // that the source WebContents has been destroyed. | 85 // that the source WebContents has been destroyed. |
85 void SourceWebContentsDestroyed(content::WebContents* source); | 86 void SourceWebContentsDestroyed(content::WebContents* source); |
86 | 87 |
87 protected: | 88 protected: |
88 // content::NotificationObserver implementation. | 89 // content::NotificationObserver implementation. |
89 virtual void Observe(int type, | 90 virtual void Observe(int type, |
90 const content::NotificationSource& source, | 91 const content::NotificationSource& source, |
91 const content::NotificationDetails& details) OVERRIDE; | 92 const content::NotificationDetails& details) OVERRIDE; |
92 | 93 |
93 // WebIntentPickerDelegate implementation. | 94 // WebIntentPickerDelegate implementation. |
94 virtual void OnServiceChosen(const GURL& url, | 95 virtual void OnServiceChosen( |
95 Disposition disposition) OVERRIDE; | 96 const GURL& url, |
| 97 webkit_glue::WebIntentServiceData::Disposition disposition) OVERRIDE; |
96 virtual void OnInlineDispositionWebContentsCreated( | 98 virtual void OnInlineDispositionWebContentsCreated( |
97 content::WebContents* web_contents) OVERRIDE; | 99 content::WebContents* web_contents) OVERRIDE; |
98 virtual void OnExtensionInstallRequested(const std::string& id) OVERRIDE; | 100 virtual void OnExtensionInstallRequested(const std::string& id) OVERRIDE; |
99 virtual void OnExtensionLinkClicked(const std::string& id) OVERRIDE; | 101 virtual void OnExtensionLinkClicked(const std::string& id) OVERRIDE; |
100 virtual void OnSuggestionsLinkClicked() OVERRIDE; | 102 virtual void OnSuggestionsLinkClicked() OVERRIDE; |
101 virtual void OnPickerClosed() OVERRIDE; | 103 virtual void OnPickerClosed() OVERRIDE; |
102 virtual void OnChooseAnotherService() OVERRIDE; | 104 virtual void OnChooseAnotherService() OVERRIDE; |
103 virtual void OnClosing() OVERRIDE; | 105 virtual void OnClosing() OVERRIDE; |
104 | 106 |
105 // extensions::WebstoreInstaller::Delegate implementation. | 107 // extensions::WebstoreInstaller::Delegate implementation. |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 266 |
265 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; | 267 base::WeakPtrFactory<WebIntentPickerController> weak_ptr_factory_; |
266 | 268 |
267 // Timer factory for minimum display time of "waiting" dialog. | 269 // Timer factory for minimum display time of "waiting" dialog. |
268 base::WeakPtrFactory<WebIntentPickerController> timer_factory_; | 270 base::WeakPtrFactory<WebIntentPickerController> timer_factory_; |
269 | 271 |
270 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); | 272 DISALLOW_COPY_AND_ASSIGN(WebIntentPickerController); |
271 }; | 273 }; |
272 | 274 |
273 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ | 275 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_CONTROLLER_H_ |
OLD | NEW |