OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/ntp_overridden_bubble_controller.h" | 5 #include "chrome/browser/extensions/ntp_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/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 override; | 40 override; |
41 void PerformAction(const extensions::ExtensionIdList& list) override; | 41 void PerformAction(const extensions::ExtensionIdList& list) override; |
42 base::string16 GetTitle() const override; | 42 base::string16 GetTitle() const override; |
43 base::string16 GetMessageBody(bool anchored_to_browser_action) const override; | 43 base::string16 GetMessageBody(bool anchored_to_browser_action) const override; |
44 base::string16 GetOverflowText( | 44 base::string16 GetOverflowText( |
45 const base::string16& overflow_count) const override; | 45 const base::string16& overflow_count) const override; |
46 GURL GetLearnMoreUrl() const override; | 46 GURL GetLearnMoreUrl() const override; |
47 base::string16 GetActionButtonLabel() const override; | 47 base::string16 GetActionButtonLabel() const override; |
48 base::string16 GetDismissButtonLabel() const override; | 48 base::string16 GetDismissButtonLabel() const override; |
49 bool ShouldShowExtensionList() const override; | 49 bool ShouldShowExtensionList() const override; |
50 bool ShouldHighlightExtensions() const override; | |
51 void RestrictToSingleExtension(const std::string& extension_id) override; | 50 void RestrictToSingleExtension(const std::string& extension_id) override; |
52 void LogExtensionCount(size_t count) override; | 51 void LogExtensionCount(size_t count) override; |
53 void LogAction(extensions::ExtensionMessageBubbleController::BubbleAction | 52 void LogAction(extensions::ExtensionMessageBubbleController::BubbleAction |
54 action) override; | 53 action) override; |
55 | 54 |
56 private: | 55 private: |
57 // Our extension service. Weak, not owned by us. | 56 // Our extension service. Weak, not owned by us. |
58 ExtensionService* service_; | 57 ExtensionService* service_; |
59 | 58 |
60 // The ID of the extension we are showing the bubble for. | 59 // The ID of the extension we are showing the bubble for. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 135 } |
137 | 136 |
138 base::string16 NtpOverriddenBubbleDelegate::GetDismissButtonLabel() const { | 137 base::string16 NtpOverriddenBubbleDelegate::GetDismissButtonLabel() const { |
139 return l10n_util::GetStringUTF16(IDS_EXTENSION_CONTROLLED_KEEP_CHANGES); | 138 return l10n_util::GetStringUTF16(IDS_EXTENSION_CONTROLLED_KEEP_CHANGES); |
140 } | 139 } |
141 | 140 |
142 bool NtpOverriddenBubbleDelegate::ShouldShowExtensionList() const { | 141 bool NtpOverriddenBubbleDelegate::ShouldShowExtensionList() const { |
143 return false; | 142 return false; |
144 } | 143 } |
145 | 144 |
146 bool NtpOverriddenBubbleDelegate::ShouldHighlightExtensions() const { | |
147 return false; | |
148 } | |
149 | |
150 void NtpOverriddenBubbleDelegate::RestrictToSingleExtension( | 145 void NtpOverriddenBubbleDelegate::RestrictToSingleExtension( |
151 const std::string& extension_id) { | 146 const std::string& extension_id) { |
152 extension_id_ = extension_id; | 147 extension_id_ = extension_id; |
153 } | 148 } |
154 | 149 |
155 void NtpOverriddenBubbleDelegate::LogExtensionCount(size_t count) { | 150 void NtpOverriddenBubbleDelegate::LogExtensionCount(size_t count) { |
156 } | 151 } |
157 | 152 |
158 void NtpOverriddenBubbleDelegate::LogAction( | 153 void NtpOverriddenBubbleDelegate::LogAction( |
159 ExtensionMessageBubbleController::BubbleAction action) { | 154 ExtensionMessageBubbleController::BubbleAction action) { |
(...skipping 27 matching lines...) Expand all Loading... |
187 | 182 |
188 delegate()->RestrictToSingleExtension(extension_id); | 183 delegate()->RestrictToSingleExtension(extension_id); |
189 return true; | 184 return true; |
190 } | 185 } |
191 | 186 |
192 bool NtpOverriddenBubbleController::CloseOnDeactivate() { | 187 bool NtpOverriddenBubbleController::CloseOnDeactivate() { |
193 return true; | 188 return true; |
194 } | 189 } |
195 | 190 |
196 } // namespace extensions | 191 } // namespace extensions |
OLD | NEW |