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 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 19 matching lines...) Expand all Loading... |
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 // Sets the action string of the picker, e.g., | 35 // Sets the action string of the picker, e.g., |
36 // "Which service should be used for sharing?". | 36 // "Which service should be used for sharing?". |
37 virtual void SetActionString(const string16& action) = 0; | 37 virtual void SetActionString(const string16& action) = 0; |
38 | 38 |
39 // Called when an extension is successfully installed via the picker. | 39 // Called when an extension is successfully installed via the picker. |
40 virtual void OnExtensionInstallSuccess(const std::string& id) {} | 40 virtual void OnExtensionInstallSuccess(const std::string& id) = 0; |
41 | 41 |
42 // Called when an extension installation started via the picker has failed. | 42 // Called when an extension installation started via the picker has failed. |
43 virtual void OnExtensionInstallFailure(const std::string& id) {} | 43 virtual void OnExtensionInstallFailure(const std::string& id) = 0; |
44 | 44 |
45 // Called when the inline disposition experiences an auto-resize. | 45 // Called when the inline disposition experiences an auto-resize. |
46 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) {} | 46 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0; |
47 | 47 |
48 // Called when the controller has finished all pending asynchronous | 48 // Called when the controller has finished all pending asynchronous |
49 // activities. | 49 // activities. |
50 virtual void OnPendingAsyncCompleted() {} | 50 virtual void OnPendingAsyncCompleted() = 0; |
51 | 51 |
52 // Called when the inline disposition's web contents have been loaded. | 52 // Called when the inline disposition's web contents have been loaded. |
53 virtual void OnInlineDispositionWebContentsLoaded( | 53 virtual void OnInlineDispositionWebContentsLoaded( |
54 content::WebContents* web_contents) {} | 54 content::WebContents* web_contents) {} |
55 | 55 |
56 // Get the default size of the inline disposition tab container. | |
57 static gfx::Size GetDefaultInlineDispositionSize( | |
58 content::WebContents* web_contents); | |
59 | |
60 // Get the minimum size of the inline disposition content container. | 56 // Get the minimum size of the inline disposition content container. |
61 static gfx::Size GetMinInlineDispositionSize(); | 57 static gfx::Size GetMinInlineDispositionSize(); |
62 | 58 |
63 // Get the maximum size of the inline disposition content container. | 59 // Get the maximum size of the inline disposition content container. |
64 static gfx::Size GetMaxInlineDispositionSize(); | 60 static gfx::Size GetMaxInlineDispositionSize(); |
65 | 61 |
66 // Get the star image IDs to use for the nth star (out of 5), given a | 62 // Get the star image IDs to use for the nth star (out of 5), given a |
67 // |rating| in the range [0, 5]. | 63 // |rating| in the range [0, 5]. |
68 static int GetNthStarImageIdFromCWSRating(double rating, int index); | 64 static int GetNthStarImageIdFromCWSRating(double rating, int index); |
69 | 65 |
70 protected: | 66 protected: |
71 virtual ~WebIntentPicker() {} | 67 virtual ~WebIntentPicker() {} |
72 }; | 68 }; |
73 | 69 |
74 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | 70 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ |
OLD | NEW |