Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include "chrome/browser/extensions/extension_message_bubble.h" | 9 #include "chrome/browser/extensions/extension_message_bubble.h" |
| 10 #include "extensions/browser/browser_context_keyed_api_factory.h" | 10 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 BubbleAction action) = 0; | 39 BubbleAction action) = 0; |
| 40 virtual void PerformAction(const ExtensionIdList& list) = 0; | 40 virtual void PerformAction(const ExtensionIdList& list) = 0; |
| 41 | 41 |
| 42 // Text for various UI labels shown in the bubble. | 42 // Text for various UI labels shown in the bubble. |
| 43 virtual base::string16 GetTitle() const = 0; | 43 virtual base::string16 GetTitle() const = 0; |
| 44 // Fetches the message to show in the body. |anchored_to_browser_action| | 44 // Fetches the message to show in the body. |anchored_to_browser_action| |
| 45 // will be true if the bubble is anchored against a specific extension | 45 // will be true if the bubble is anchored against a specific extension |
| 46 // icon, allowing the bubble to show a different message than when it is | 46 // icon, allowing the bubble to show a different message than when it is |
| 47 // anchored against something else (e.g. show "This extension has..." | 47 // anchored against something else (e.g. show "This extension has..." |
| 48 // instead of "An extension has..."). | 48 // instead of "An extension has..."). |
| 49 // |for_single_extension| is true if there is only one extension being | |
| 50 // referenced. | |
| 49 virtual base::string16 GetMessageBody( | 51 virtual base::string16 GetMessageBody( |
| 50 bool anchored_to_browser_action) const = 0; | 52 bool anchored_to_browser_action, |
| 53 bool for_single_extension) const = 0; | |
|
Finnur
2015/05/15 15:58:47
nit: I would have made this take an int extension_
Devlin
2015/05/15 16:12:41
Yeah, that's probably better. Done.
| |
| 51 virtual base::string16 GetOverflowText( | 54 virtual base::string16 GetOverflowText( |
| 52 const base::string16& overflow_count) const = 0; | 55 const base::string16& overflow_count) const = 0; |
| 53 virtual base::string16 GetLearnMoreLabel() const; | 56 virtual base::string16 GetLearnMoreLabel() const; |
| 54 virtual GURL GetLearnMoreUrl() const = 0; | 57 virtual GURL GetLearnMoreUrl() const = 0; |
| 55 virtual base::string16 GetActionButtonLabel() const = 0; | 58 virtual base::string16 GetActionButtonLabel() const = 0; |
| 56 virtual base::string16 GetDismissButtonLabel() const = 0; | 59 virtual base::string16 GetDismissButtonLabel() const = 0; |
| 57 | 60 |
| 58 // Whether to show a list of extensions in the bubble. | 61 // Whether to show a list of extensions in the bubble. |
| 59 virtual bool ShouldShowExtensionList() const = 0; | 62 virtual bool ShouldShowExtensionList() const = 0; |
| 60 | 63 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 | 151 |
| 149 // Whether or not the bubble is highlighting extensions. | 152 // Whether or not the bubble is highlighting extensions. |
| 150 bool did_highlight_; | 153 bool did_highlight_; |
| 151 | 154 |
| 152 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleController); | 155 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleController); |
| 153 }; | 156 }; |
| 154 | 157 |
| 155 } // namespace extensions | 158 } // namespace extensions |
| 156 | 159 |
| 157 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ | 160 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ |
| OLD | NEW |