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 12 matching lines...) Expand all Loading... |
23 //////////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////////// |
24 // NtpOverriddenBubbleDelegate | 24 // NtpOverriddenBubbleDelegate |
25 | 25 |
26 class NtpOverriddenBubbleDelegate | 26 class NtpOverriddenBubbleDelegate |
27 : public extensions::ExtensionMessageBubbleController::Delegate { | 27 : public extensions::ExtensionMessageBubbleController::Delegate { |
28 public: | 28 public: |
29 NtpOverriddenBubbleDelegate(ExtensionService* service, Profile* profile); | 29 NtpOverriddenBubbleDelegate(ExtensionService* service, Profile* profile); |
30 virtual ~NtpOverriddenBubbleDelegate(); | 30 virtual ~NtpOverriddenBubbleDelegate(); |
31 | 31 |
32 // ExtensionMessageBubbleController::Delegate methods. | 32 // ExtensionMessageBubbleController::Delegate methods. |
33 virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE; | 33 virtual bool ShouldIncludeExtension(const std::string& extension_id) override; |
34 virtual void AcknowledgeExtension( | 34 virtual void AcknowledgeExtension( |
35 const std::string& extension_id, | 35 const std::string& extension_id, |
36 extensions::ExtensionMessageBubbleController::BubbleAction | 36 extensions::ExtensionMessageBubbleController::BubbleAction |
37 user_action) OVERRIDE; | 37 user_action) override; |
38 virtual void PerformAction(const extensions::ExtensionIdList& list) OVERRIDE; | 38 virtual void PerformAction(const extensions::ExtensionIdList& list) override; |
39 virtual base::string16 GetTitle() const OVERRIDE; | 39 virtual base::string16 GetTitle() const override; |
40 virtual base::string16 GetMessageBody( | 40 virtual base::string16 GetMessageBody( |
41 bool anchored_to_browser_action) const OVERRIDE; | 41 bool anchored_to_browser_action) const override; |
42 virtual base::string16 GetOverflowText( | 42 virtual base::string16 GetOverflowText( |
43 const base::string16& overflow_count) const OVERRIDE; | 43 const base::string16& overflow_count) const override; |
44 virtual base::string16 GetLearnMoreLabel() const OVERRIDE; | 44 virtual base::string16 GetLearnMoreLabel() const override; |
45 virtual GURL GetLearnMoreUrl() const OVERRIDE; | 45 virtual GURL GetLearnMoreUrl() const override; |
46 virtual base::string16 GetActionButtonLabel() const OVERRIDE; | 46 virtual base::string16 GetActionButtonLabel() const override; |
47 virtual base::string16 GetDismissButtonLabel() const OVERRIDE; | 47 virtual base::string16 GetDismissButtonLabel() const override; |
48 virtual bool ShouldShowExtensionList() const OVERRIDE; | 48 virtual bool ShouldShowExtensionList() const override; |
49 virtual void RestrictToSingleExtension( | 49 virtual void RestrictToSingleExtension( |
50 const std::string& extension_id) OVERRIDE; | 50 const std::string& extension_id) override; |
51 virtual void LogExtensionCount(size_t count) OVERRIDE; | 51 virtual void LogExtensionCount(size_t count) override; |
52 virtual void LogAction( | 52 virtual void LogAction( |
53 extensions::ExtensionMessageBubbleController::BubbleAction | 53 extensions::ExtensionMessageBubbleController::BubbleAction |
54 action) OVERRIDE; | 54 action) override; |
55 | 55 |
56 private: | 56 private: |
57 // Our extension service. Weak, not owned by us. | 57 // Our extension service. Weak, not owned by us. |
58 ExtensionService* service_; | 58 ExtensionService* service_; |
59 | 59 |
60 // A weak pointer to the profile we are associated with. Not owned by us. | 60 // A weak pointer to the profile we are associated with. Not owned by us. |
61 Profile* profile_; | 61 Profile* profile_; |
62 | 62 |
63 // The ID of the extension we are showing the bubble for. | 63 // The ID of the extension we are showing the bubble for. |
64 std::string extension_id_; | 64 std::string extension_id_; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 delegate()->RestrictToSingleExtension(extension_id); | 192 delegate()->RestrictToSingleExtension(extension_id); |
193 return true; | 193 return true; |
194 } | 194 } |
195 | 195 |
196 bool NtpOverriddenBubbleController::CloseOnDeactivate() { | 196 bool NtpOverriddenBubbleController::CloseOnDeactivate() { |
197 return true; | 197 return true; |
198 } | 198 } |
199 | 199 |
200 } // namespace extensions | 200 } // namespace extensions |
OLD | NEW |