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