| 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_H_ | 5 #ifndef CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ |
| 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | 6 #define CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Platform specific factory function. This function will automatically show | 25 // Platform specific factory function. This function will automatically show |
| 26 // the picker. | 26 // the picker. |
| 27 static WebIntentPicker* Create(Browser* browser, | 27 static WebIntentPicker* Create(Browser* browser, |
| 28 TabContentsWrapper* wrapper, | 28 TabContentsWrapper* wrapper, |
| 29 WebIntentPickerDelegate* delegate, | 29 WebIntentPickerDelegate* delegate, |
| 30 WebIntentPickerModel* model); | 30 WebIntentPickerModel* model); |
| 31 | 31 |
| 32 // Hides the UI for this picker, and destroys its UI. | 32 // Hides the UI for this picker, and destroys its UI. |
| 33 virtual void Close() = 0; | 33 virtual void Close() = 0; |
| 34 | 34 |
| 35 // Called when an extension is successfully installed via the picker. | |
| 36 virtual void OnExtensionInstallSuccess(const std::string& id) {} | |
| 37 | |
| 38 // Called when an extension installation started via the picker has failed. | |
| 39 virtual void OnExtensionInstallFailure(const std::string& id) {} | |
| 40 | |
| 41 // Called when the controller has finished all pending asynchronous | 35 // Called when the controller has finished all pending asynchronous |
| 42 // activities. | 36 // activities. |
| 43 virtual void OnPendingAsyncCompleted() {} | 37 virtual void OnPendingAsyncCompleted() {} |
| 44 | 38 |
| 45 // Get the default size of the inline disposition tab container. | 39 // Get the default size of the inline disposition tab container. |
| 46 static gfx::Size GetDefaultInlineDispositionSize( | 40 static gfx::Size GetDefaultInlineDispositionSize( |
| 47 content::WebContents* web_contents); | 41 content::WebContents* web_contents); |
| 48 | 42 |
| 49 // Get the star image IDs to use for the nth star (out of 5), given a | 43 // Get the star image IDs to use for the nth star (out of 5), given a |
| 50 // |rating| in the range [0, 5]. | 44 // |rating| in the range [0, 5]. |
| 51 static int GetNthStarImageIdFromCWSRating(double rating, int index); | 45 static int GetNthStarImageIdFromCWSRating(double rating, int index); |
| 52 | 46 |
| 53 protected: | 47 protected: |
| 54 virtual ~WebIntentPicker() {} | 48 virtual ~WebIntentPicker() {} |
| 55 }; | 49 }; |
| 56 | 50 |
| 57 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | 51 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ |
| OLD | NEW |