Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: chrome/browser/extensions/extension_message_bubble_controller.h

Issue 1081113002: Revert of [Extensions] Make extension message bubble factory platform-abstract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual base::string16 GetOverflowText( 52 virtual base::string16 GetOverflowText(
53 const base::string16& overflow_count) const = 0; 53 const base::string16& overflow_count) const = 0;
54 virtual base::string16 GetLearnMoreLabel() const; 54 virtual base::string16 GetLearnMoreLabel() const;
55 virtual GURL GetLearnMoreUrl() const = 0; 55 virtual GURL GetLearnMoreUrl() const = 0;
56 virtual base::string16 GetActionButtonLabel() const = 0; 56 virtual base::string16 GetActionButtonLabel() const = 0;
57 virtual base::string16 GetDismissButtonLabel() const = 0; 57 virtual base::string16 GetDismissButtonLabel() const = 0;
58 58
59 // Whether to show a list of extensions in the bubble. 59 // Whether to show a list of extensions in the bubble.
60 virtual bool ShouldShowExtensionList() const = 0; 60 virtual bool ShouldShowExtensionList() const = 0;
61 61
62 // Returns true if the set of affected extensions should be highlighted in
63 // the toolbar.
64 virtual bool ShouldHighlightExtensions() const = 0;
65
66 // In some cases, we want the delegate only to handle a single extension 62 // In some cases, we want the delegate only to handle a single extension
67 // and this sets which extension. 63 // and this sets which extension.
68 virtual void RestrictToSingleExtension(const std::string& extension_id); 64 virtual void RestrictToSingleExtension(const std::string& extension_id);
69 65
70 // Record, through UMA, how many extensions were found. 66 // Record, through UMA, how many extensions were found.
71 virtual void LogExtensionCount(size_t count) = 0; 67 virtual void LogExtensionCount(size_t count) = 0;
72 virtual void LogAction(BubbleAction action) = 0; 68 virtual void LogAction(BubbleAction action) = 0;
73 69
74 // Has the user acknowledged info about the extension the bubble reports. 70 // Has the user acknowledged info about the extension the bubble reports.
75 virtual bool HasBubbleInfoBeenAcknowledged(const std::string& extension_id); 71 virtual bool HasBubbleInfoBeenAcknowledged(const std::string& extension_id);
(...skipping 22 matching lines...) Expand all
98 94
99 // Obtains a list of all extensions (by name) the controller knows about. 95 // Obtains a list of all extensions (by name) the controller knows about.
100 std::vector<base::string16> GetExtensionList(); 96 std::vector<base::string16> GetExtensionList();
101 97
102 // Obtains a list of all extensions (by id) the controller knows about. 98 // Obtains a list of all extensions (by id) the controller knows about.
103 const ExtensionIdList& GetExtensionIdList(); 99 const ExtensionIdList& GetExtensionIdList();
104 100
105 // Whether to close the bubble when it loses focus. 101 // Whether to close the bubble when it loses focus.
106 virtual bool CloseOnDeactivate(); 102 virtual bool CloseOnDeactivate();
107 103
108 // Highlights the affected extensions if appropriate.
109 void HighlightExtensionsIfNecessary();
110
111 // Sets up the callbacks and shows the bubble. 104 // Sets up the callbacks and shows the bubble.
112 virtual void Show(ExtensionMessageBubble* bubble); 105 virtual void Show(ExtensionMessageBubble* bubble);
113 106
114 // Callbacks from bubble. Declared virtual for testing purposes. 107 // Callbacks from bubble. Declared virtual for testing purposes.
115 virtual void OnBubbleAction(); 108 virtual void OnBubbleAction();
116 virtual void OnBubbleDismiss(); 109 virtual void OnBubbleDismiss();
117 virtual void OnLinkClicked(); 110 virtual void OnLinkClicked();
118 111
119 private: 112 private:
120 // Iterate over the known extensions and acknowledge each one. 113 // Iterate over the known extensions and acknowledge each one.
(...skipping 16 matching lines...) Expand all
137 130
138 // Whether this class has initialized. 131 // Whether this class has initialized.
139 bool initialized_; 132 bool initialized_;
140 133
141 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleController); 134 DISALLOW_COPY_AND_ASSIGN(ExtensionMessageBubbleController);
142 }; 135 };
143 136
144 } // namespace extensions 137 } // namespace extensions
145 138
146 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_ 139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MESSAGE_BUBBLE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_message_bubble.h ('k') | chrome/browser/extensions/extension_message_bubble_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698