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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 virtual bool ShouldIncludeExtension(const std::string& extension_id) = 0; | 36 virtual bool ShouldIncludeExtension(const std::string& extension_id) = 0; |
37 virtual void AcknowledgeExtension( | 37 virtual void AcknowledgeExtension( |
38 const std::string& extension_id, | 38 const std::string& extension_id, |
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 virtual void OnClose() {} | 41 virtual void OnClose() {} |
42 | 42 |
43 // Text for various UI labels shown in the bubble. | 43 // Text for various UI labels shown in the bubble. |
44 virtual base::string16 GetTitle() const = 0; | 44 virtual base::string16 GetTitle() const = 0; |
45 // Fetches the message to show in the body. |anchored_to_browser_action| | 45 virtual base::string16 GetMessageBody() const = 0; |
46 // will be true if the bubble is anchored against a specific extension | |
47 // icon, allowing the bubble to show a different message than when it is | |
48 // anchored against something else (e.g. show "This extension has..." | |
49 // instead of "An extension has..."). | |
50 virtual base::string16 GetMessageBody( | |
51 bool anchored_to_browser_action) const = 0; | |
52 virtual base::string16 GetOverflowText( | 46 virtual base::string16 GetOverflowText( |
53 const base::string16& overflow_count) const = 0; | 47 const base::string16& overflow_count) const = 0; |
54 virtual base::string16 GetLearnMoreLabel() const = 0; | 48 virtual base::string16 GetLearnMoreLabel() const = 0; |
55 virtual GURL GetLearnMoreUrl() const = 0; | 49 virtual GURL GetLearnMoreUrl() const = 0; |
56 virtual base::string16 GetActionButtonLabel() const = 0; | 50 virtual base::string16 GetActionButtonLabel() const = 0; |
57 virtual base::string16 GetDismissButtonLabel() const = 0; | 51 virtual base::string16 GetDismissButtonLabel() const = 0; |
58 | 52 |
59 // Whether to show a list of extensions in the bubble. | 53 // Whether to show a list of extensions in the bubble. |
60 virtual bool ShouldShowExtensionList() const = 0; | 54 virtual bool ShouldShowExtensionList() const = 0; |
61 | 55 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 105 |
112 // Whether this class has initialized. | 106 // Whether this class has initialized. |
113 bool initialized_; | 107 bool initialized_; |
114 | 108 |
115 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleController); | 109 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleController); |
116 }; | 110 }; |
117 | 111 |
118 } // namespace extensions | 112 } // namespace extensions |
119 | 113 |
120 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ | 114 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ |
OLD | NEW |