Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/intents/web_intent_picker_model.h" | |
| 10 | |
| 11 namespace content { | |
| 12 class WebContents; | |
| 13 } | |
| 14 | |
| 9 // 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 |
| 10 // service. | 16 // service. |
| 11 class WebIntentPickerDelegate { | 17 class WebIntentPickerDelegate { |
| 12 public: | 18 public: |
| 19 typedef WebIntentPickerModel::Disposition Disposition; | |
| 20 | |
| 13 // Base destructor. | 21 // Base destructor. |
| 14 virtual ~WebIntentPickerDelegate() {} | 22 virtual ~WebIntentPickerDelegate() {} |
| 15 | 23 |
| 16 // Callback called when the user has chosen a service. | 24 // Callback called when the user has chosen a service. |
| 17 virtual void OnServiceChosen(size_t index) = 0; | 25 virtual void OnServiceChosen(size_t index, Disposition disposition) = 0; |
| 26 | |
| 27 // Callback called when the picker has created WebContents to use for inline | |
|
groby-ooo-7-16
2012/01/25 22:03:13
nit: Callback called when -> Callback when
binji
2012/01/26 00:27:41
Looks like "Called when" is most common.
| |
| 28 // disposition. | |
| 29 virtual void OnInlineDispositionWebContentsCreated( | |
| 30 content::WebContents* web_contents) = 0; | |
| 18 | 31 |
| 19 // Callback called when the user cancels out of the dialog, whether by closing | 32 // Callback called when the user cancels out of the dialog, whether by closing |
| 20 // it manually or otherwise purposefully. | 33 // it manually or otherwise purposefully. |
| 21 virtual void OnCancelled() = 0; | 34 virtual void OnCancelled() = 0; |
| 22 | 35 |
| 23 // Callback called when the dialog stops showing. | 36 // Callback called when the dialog stops showing. |
| 24 virtual void OnClosing() = 0; | 37 virtual void OnClosing() = 0; |
| 25 }; | 38 }; |
| 26 | 39 |
| 27 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ | 40 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ |
| OLD | NEW |