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_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "chrome/browser/ui/intents/web_intent_picker_model.h" | 9 #include "chrome/browser/ui/intents/web_intent_picker_model.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 class WebContents; | 12 class WebContents; |
13 } | 13 } |
14 | 14 |
15 // A class used to notify the delegate when the user has chosen a web intent | 15 // A class used to notify the delegate when the user has chosen a web intent |
16 // service. | 16 // service. |
17 class WebIntentPickerDelegate { | 17 class WebIntentPickerDelegate { |
18 public: | 18 public: |
19 typedef WebIntentPickerModel::Disposition Disposition; | |
20 | |
21 // Base destructor. | 19 // Base destructor. |
22 virtual ~WebIntentPickerDelegate() {} | 20 virtual ~WebIntentPickerDelegate() {} |
23 | 21 |
24 // Called when the user has chosen a service. | 22 // Called when the user has chosen a service. |
25 virtual void OnServiceChosen(const GURL& url, Disposition disposition) = 0; | 23 virtual void OnServiceChosen( |
| 24 const GURL& url, |
| 25 webkit_glue::WebIntentServiceData::Disposition disposition) = 0; |
26 | 26 |
27 // Called when the picker has created WebContents to use for inline | 27 // Called when the picker has created WebContents to use for inline |
28 // disposition. | 28 // disposition. |
29 virtual void OnInlineDispositionWebContentsCreated( | 29 virtual void OnInlineDispositionWebContentsCreated( |
30 content::WebContents* web_contents) = 0; | 30 content::WebContents* web_contents) = 0; |
31 | 31 |
32 // Called when the user has chosen to install a suggested extension. | 32 // Called when the user has chosen to install a suggested extension. |
33 virtual void OnExtensionInstallRequested(const std::string& id) = 0; | 33 virtual void OnExtensionInstallRequested(const std::string& id) = 0; |
34 | 34 |
35 // Called when the user has chosen to visit the CWS entry for an extension. | 35 // Called when the user has chosen to visit the CWS entry for an extension. |
36 virtual void OnExtensionLinkClicked(const std::string& id) = 0; | 36 virtual void OnExtensionLinkClicked(const std::string& id) = 0; |
37 | 37 |
38 // Called when the user chooses to get more suggestions from CWS. | 38 // Called when the user chooses to get more suggestions from CWS. |
39 virtual void OnSuggestionsLinkClicked() = 0; | 39 virtual void OnSuggestionsLinkClicked() = 0; |
40 | 40 |
41 // Called when the user cancels out of the dialog. | 41 // Called when the user cancels out of the dialog. |
42 virtual void OnPickerClosed() = 0; | 42 virtual void OnPickerClosed() = 0; |
43 | 43 |
44 // Called when the user wants to pick another service from within inline | 44 // Called when the user wants to pick another service from within inline |
45 // disposition. | 45 // disposition. |
46 virtual void OnChooseAnotherService() = 0; | 46 virtual void OnChooseAnotherService() = 0; |
47 | 47 |
48 // Called when the dialog stops showing. | 48 // Called when the dialog stops showing. |
49 virtual void OnClosing() = 0; | 49 virtual void OnClosing() = 0; |
50 }; | 50 }; |
51 | 51 |
52 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ | 52 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ |
OLD | NEW |