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

Side by Side Diff: chrome/browser/extensions/proxy_overridden_bubble_controller.cc

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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/extensions/proxy_overridden_bubble_controller.h" 5 #include "chrome/browser/extensions/proxy_overridden_bubble_controller.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_toolbar_model.h" 9 #include "chrome/browser/extensions/extension_toolbar_model.h"
10 #include "chrome/browser/extensions/settings_api_helpers.h" 10 #include "chrome/browser/extensions/settings_api_helpers.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void PerformAction(const ExtensionIdList& list) override; 44 void PerformAction(const ExtensionIdList& list) override;
45 void OnClose() override; 45 void OnClose() override;
46 base::string16 GetTitle() const override; 46 base::string16 GetTitle() const override;
47 base::string16 GetMessageBody(bool anchored_to_browser_action) const override; 47 base::string16 GetMessageBody(bool anchored_to_browser_action) const override;
48 base::string16 GetOverflowText( 48 base::string16 GetOverflowText(
49 const base::string16& overflow_count) const override; 49 const base::string16& overflow_count) const override;
50 GURL GetLearnMoreUrl() const override; 50 GURL GetLearnMoreUrl() const override;
51 base::string16 GetActionButtonLabel() const override; 51 base::string16 GetActionButtonLabel() const override;
52 base::string16 GetDismissButtonLabel() const override; 52 base::string16 GetDismissButtonLabel() const override;
53 bool ShouldShowExtensionList() const override; 53 bool ShouldShowExtensionList() const override;
54 bool ShouldHighlightExtensions() const override;
55 void RestrictToSingleExtension(const std::string& extension_id) override; 54 void RestrictToSingleExtension(const std::string& extension_id) override;
56 void LogExtensionCount(size_t count) override; 55 void LogExtensionCount(size_t count) override;
57 void LogAction( 56 void LogAction(
58 ExtensionMessageBubbleController::BubbleAction action) override; 57 ExtensionMessageBubbleController::BubbleAction action) override;
59 58
60 private: 59 private:
61 // Our extension service. Weak, not owned by us. 60 // Our extension service. Weak, not owned by us.
62 ExtensionService* service_; 61 ExtensionService* service_;
63 62
64 // The ID of the extension we are showing the bubble for. 63 // The ID of the extension we are showing the bubble for.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 154 }
156 155
157 base::string16 ProxyOverriddenBubbleDelegate::GetDismissButtonLabel() const { 156 base::string16 ProxyOverriddenBubbleDelegate::GetDismissButtonLabel() const {
158 return l10n_util::GetStringUTF16(IDS_EXTENSION_CONTROLLED_KEEP_CHANGES); 157 return l10n_util::GetStringUTF16(IDS_EXTENSION_CONTROLLED_KEEP_CHANGES);
159 } 158 }
160 159
161 bool ProxyOverriddenBubbleDelegate::ShouldShowExtensionList() const { 160 bool ProxyOverriddenBubbleDelegate::ShouldShowExtensionList() const {
162 return false; 161 return false;
163 } 162 }
164 163
165 bool ProxyOverriddenBubbleDelegate::ShouldHighlightExtensions() const {
166 return true;
167 }
168
169 void ProxyOverriddenBubbleDelegate::RestrictToSingleExtension( 164 void ProxyOverriddenBubbleDelegate::RestrictToSingleExtension(
170 const std::string& extension_id) { 165 const std::string& extension_id) {
171 extension_id_ = extension_id; 166 extension_id_ = extension_id;
172 } 167 }
173 168
174 void ProxyOverriddenBubbleDelegate::LogExtensionCount(size_t count) { 169 void ProxyOverriddenBubbleDelegate::LogExtensionCount(size_t count) {
175 UMA_HISTOGRAM_COUNTS_100("ProxyOverriddenBubble.ExtensionCount", count); 170 UMA_HISTOGRAM_COUNTS_100("ProxyOverriddenBubble.ExtensionCount", count);
176 } 171 }
177 172
178 void ProxyOverriddenBubbleDelegate::LogAction( 173 void ProxyOverriddenBubbleDelegate::LogAction(
(...skipping 26 matching lines...) Expand all
205 200
206 delegate()->RestrictToSingleExtension(extension_id); 201 delegate()->RestrictToSingleExtension(extension_id);
207 return true; 202 return true;
208 } 203 }
209 204
210 bool ProxyOverriddenBubbleController::CloseOnDeactivate() { 205 bool ProxyOverriddenBubbleController::CloseOnDeactivate() {
211 return false; 206 return false;
212 } 207 }
213 208
214 } // namespace extensions 209 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698