rdevlin.cronin | 690e44f | 2015-11-06 00:27:14 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_DELEGATE_H_ |
| 6 | #define CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_DELEGATE_H_ |
| 7 | |
avi | a2f4804a | 2015-12-24 23:11:13 | [diff] [blame] | 8 | #include <stddef.h> |
| 9 | |
rdevlin.cronin | 690e44f | 2015-11-06 00:27:14 | [diff] [blame] | 10 | #include <string> |
| 11 | |
| 12 | #include "base/macros.h" |
| 13 | #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
| 14 | |
| 15 | namespace extensions { |
| 16 | |
| 17 | class Extension; |
| 18 | |
| 19 | class DevModeBubbleDelegate |
| 20 | : public ExtensionMessageBubbleController::Delegate { |
| 21 | public: |
| 22 | explicit DevModeBubbleDelegate(Profile* profile); |
| 23 | ~DevModeBubbleDelegate() override; |
| 24 | |
| 25 | // ExtensionMessageBubbleController::Delegate methods. |
| 26 | bool ShouldIncludeExtension(const Extension* extension) override; |
| 27 | void AcknowledgeExtension( |
| 28 | const std::string& extension_id, |
| 29 | ExtensionMessageBubbleController::BubbleAction user_action) override; |
| 30 | void PerformAction(const ExtensionIdList& list) override; |
| 31 | base::string16 GetTitle() const override; |
| 32 | base::string16 GetMessageBody(bool anchored_to_browser_action, |
| 33 | int extension_count) const override; |
| 34 | base::string16 GetOverflowText( |
| 35 | const base::string16& overflow_count) const override; |
Tim Judkins | 0c0936f5 | 2019-08-05 19:29:25 | [diff] [blame] | 36 | base::string16 GetLearnMoreLabel() const override; |
rdevlin.cronin | 690e44f | 2015-11-06 00:27:14 | [diff] [blame] | 37 | GURL GetLearnMoreUrl() const override; |
| 38 | base::string16 GetActionButtonLabel() const override; |
| 39 | base::string16 GetDismissButtonLabel() const override; |
| 40 | bool ShouldCloseOnDeactivate() const override; |
rdevlin.cronin | cf27f866a | 2017-02-01 16:34:39 | [diff] [blame] | 41 | bool ShouldAcknowledgeOnDeactivate() const override; |
Catherine Mullings | 478a043 | 2017-11-22 07:06:06 | [diff] [blame] | 42 | bool ShouldShow(const ExtensionIdList& extensions) const override; |
| 43 | void OnShown(const ExtensionIdList& extensions) override; |
| 44 | void OnAction() override; |
| 45 | void ClearProfileSetForTesting() override; |
rdevlin.cronin | 690e44f | 2015-11-06 00:27:14 | [diff] [blame] | 46 | bool ShouldShowExtensionList() const override; |
| 47 | bool ShouldHighlightExtensions() const override; |
| 48 | bool ShouldLimitToEnabledExtensions() const override; |
| 49 | void LogExtensionCount(size_t count) override; |
| 50 | void LogAction(ExtensionMessageBubbleController::BubbleAction) override; |
catmullings | 22bc237 | 2016-11-02 19:59:35 | [diff] [blame] | 51 | bool SupportsPolicyIndicator() override; |
rdevlin.cronin | 690e44f | 2015-11-06 00:27:14 | [diff] [blame] | 52 | |
| 53 | private: |
Catherine Mullings | 478a043 | 2017-11-22 07:06:06 | [diff] [blame] | 54 | Profile* profile_; |
| 55 | |
rdevlin.cronin | 690e44f | 2015-11-06 00:27:14 | [diff] [blame] | 56 | DISALLOW_COPY_AND_ASSIGN(DevModeBubbleDelegate); |
| 57 | }; |
| 58 | |
| 59 | } // namespace extensions |
| 60 | |
| 61 | #endif // CHROME_BROWSER_EXTENSIONS_DEV_MODE_BUBBLE_DELEGATE_H_ |