| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Called when the inline disposition experiences an auto-resize. | 96 // Called when the inline disposition experiences an auto-resize. |
| 97 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0; | 97 virtual void OnInlineDispositionAutoResize(const gfx::Size& size) = 0; |
| 98 | 98 |
| 99 virtual void OnInlineDispositionHandleKeyboardEvent( | 99 virtual void OnInlineDispositionHandleKeyboardEvent( |
| 100 const content::NativeWebKeyboardEvent& event) {} | 100 const content::NativeWebKeyboardEvent& event) {} |
| 101 | 101 |
| 102 // Called when the controller has finished all pending asynchronous | 102 // Called when the controller has finished all pending asynchronous |
| 103 // activities. | 103 // activities. |
| 104 virtual void OnPendingAsyncCompleted() = 0; | 104 virtual void OnPendingAsyncCompleted() = 0; |
| 105 | 105 |
| 106 // Called once the delegate gets destroyed/invalid. This should only be |
| 107 // called during a shut down sequence that will tear down the picker, too. |
| 108 virtual void InvalidateDelegate() = 0; |
| 109 |
| 106 // Called when the inline disposition's web contents have been loaded. | 110 // Called when the inline disposition's web contents have been loaded. |
| 107 virtual void OnInlineDispositionWebContentsLoaded( | 111 virtual void OnInlineDispositionWebContentsLoaded( |
| 108 content::WebContents* web_contents) {} | 112 content::WebContents* web_contents) {} |
| 109 | 113 |
| 110 // Get the minimum size of the inline disposition content container. | 114 // Get the minimum size of the inline disposition content container. |
| 111 virtual gfx::Size GetMinInlineDispositionSize(); | 115 virtual gfx::Size GetMinInlineDispositionSize(); |
| 112 | 116 |
| 113 // Get the maximum size of the inline disposition content container. | 117 // Get the maximum size of the inline disposition content container. |
| 114 virtual gfx::Size GetMaxInlineDispositionSize(); | 118 virtual gfx::Size GetMaxInlineDispositionSize(); |
| 115 | 119 |
| 116 // Get the star image IDs to use for the nth star (out of 5), given a | 120 // Get the star image IDs to use for the nth star (out of 5), given a |
| 117 // |rating| in the range [0, 5]. | 121 // |rating| in the range [0, 5]. |
| 118 static int GetNthStarImageIdFromCWSRating(double rating, int index); | 122 static int GetNthStarImageIdFromCWSRating(double rating, int index); |
| 119 | 123 |
| 120 // Returns the action-specific string to display for |action|. | 124 // Returns the action-specific string to display for |action|. |
| 121 static string16 GetDisplayStringForIntentAction(const string16& action16); | 125 static string16 GetDisplayStringForIntentAction(const string16& action16); |
| 122 | 126 |
| 123 protected: | 127 protected: |
| 124 virtual ~WebIntentPicker() {} | 128 virtual ~WebIntentPicker() {} |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ | 131 #endif // CHROME_BROWSER_UI_INTENTS_WEB_INTENT_PICKER_H_ |
| OLD | NEW |