| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | |
| 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <vector> | |
| 10 | |
| 11 class GURL; | |
| 12 class SkBitmap; | |
| 13 class TabContents; | |
| 14 class WebIntentPickerDelegate; | |
| 15 | |
| 16 // Base class for the web intent picker dialog. | |
| 17 class WebIntentPicker { | |
| 18 public: | |
| 19 class Delegate; | |
| 20 | |
| 21 // Platform specific factory function. | |
| 22 static WebIntentPicker* Create(TabContents* tab_contents, | |
| 23 WebIntentPickerDelegate* delegate); | |
| 24 | |
| 25 // Initalizes this picker with the |urls|. | |
| 26 virtual void SetServiceURLs(const std::vector<GURL>& urls) = 0; | |
| 27 | |
| 28 // Sets the icon for a service at |index|. | |
| 29 virtual void SetServiceIcon(size_t index, const SkBitmap& icon) = 0; | |
| 30 | |
| 31 // Sets the icon for a service at |index| to be the default favicon. | |
| 32 virtual void SetDefaultServiceIcon(size_t index) = 0; | |
| 33 | |
| 34 // Shows the UI for this picker. | |
| 35 virtual void Show() = 0; | |
| 36 | |
| 37 // Hides the UI for this picker, and destroys its UI. | |
| 38 virtual void Close() = 0; | |
| 39 | |
| 40 protected: | |
| 41 virtual ~WebIntentPicker() {} | |
| 42 }; | |
| 43 | |
| 44 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | |
| OLD | NEW |