| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A class used to notify the delegate when the user has chosen a web intent | 9 // A class used to notify the delegate when the user has chosen a web intent |
| 10 // service. | 10 // service. |
| 11 class WebIntentPickerDelegate { | 11 class WebIntentPickerDelegate { |
| 12 public: | 12 public: |
| 13 // Base destructor. | 13 // Base destructor. |
| 14 virtual ~WebIntentPickerDelegate() {} | 14 virtual ~WebIntentPickerDelegate() {} |
| 15 | 15 |
| 16 // Callback called when the user has chosen a service. | 16 // Callback called when the user has chosen a service. |
| 17 virtual void OnServiceChosen(size_t index) = 0; | 17 virtual void OnServiceChosen(size_t index) = 0; |
| 18 | 18 |
| 19 // Callback called when the user cancels out of the dialog, whether by closing | 19 // Callback called when the user cancels out of the dialog, whether by closing |
| 20 // it manually or otherwise purposefully. | 20 // it manually or otherwise purposefully. |
| 21 virtual void OnCancelled() = 0; | 21 virtual void OnCancelled() = 0; |
| 22 | 22 |
| 23 // Callback called when the dialog wants to stop showing (can happen by | 23 // Callback called when the dialog stops showing. |
| 24 // cancellation or by the user choosing a service). | |
| 25 virtual void OnClosing() = 0; | 24 virtual void OnClosing() = 0; |
| 26 }; | 25 }; |
| 27 | 26 |
| 28 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ | 27 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_DELEGATE_H_ |
| OLD | NEW |