OLD | NEW |
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 16 matching lines...) Expand all Loading... |
27 //////////////////////////////////////////////////////////////////////////////// | 27 //////////////////////////////////////////////////////////////////////////////// |
28 // ProxyOverriddenBubbleDelegate | 28 // ProxyOverriddenBubbleDelegate |
29 | 29 |
30 class ProxyOverriddenBubbleDelegate | 30 class ProxyOverriddenBubbleDelegate |
31 : public ExtensionMessageBubbleController::Delegate { | 31 : public ExtensionMessageBubbleController::Delegate { |
32 public: | 32 public: |
33 ProxyOverriddenBubbleDelegate(ExtensionService* service, Profile* profile); | 33 ProxyOverriddenBubbleDelegate(ExtensionService* service, Profile* profile); |
34 virtual ~ProxyOverriddenBubbleDelegate(); | 34 virtual ~ProxyOverriddenBubbleDelegate(); |
35 | 35 |
36 // ExtensionMessageBubbleController::Delegate methods. | 36 // ExtensionMessageBubbleController::Delegate methods. |
37 virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE; | 37 virtual bool ShouldIncludeExtension(const std::string& extension_id) override; |
38 virtual void AcknowledgeExtension( | 38 virtual void AcknowledgeExtension( |
39 const std::string& extension_id, | 39 const std::string& extension_id, |
40 ExtensionMessageBubbleController::BubbleAction | 40 ExtensionMessageBubbleController::BubbleAction |
41 user_action) OVERRIDE; | 41 user_action) override; |
42 virtual void PerformAction(const ExtensionIdList& list) OVERRIDE; | 42 virtual void PerformAction(const ExtensionIdList& list) override; |
43 virtual void OnClose() OVERRIDE; | 43 virtual void OnClose() override; |
44 virtual base::string16 GetTitle() const OVERRIDE; | 44 virtual base::string16 GetTitle() const override; |
45 virtual base::string16 GetMessageBody( | 45 virtual base::string16 GetMessageBody( |
46 bool anchored_to_browser_action) const OVERRIDE; | 46 bool anchored_to_browser_action) const override; |
47 virtual base::string16 GetOverflowText( | 47 virtual base::string16 GetOverflowText( |
48 const base::string16& overflow_count) const OVERRIDE; | 48 const base::string16& overflow_count) const override; |
49 virtual base::string16 GetLearnMoreLabel() const OVERRIDE; | 49 virtual base::string16 GetLearnMoreLabel() const override; |
50 virtual GURL GetLearnMoreUrl() const OVERRIDE; | 50 virtual GURL GetLearnMoreUrl() const override; |
51 virtual base::string16 GetActionButtonLabel() const OVERRIDE; | 51 virtual base::string16 GetActionButtonLabel() const override; |
52 virtual base::string16 GetDismissButtonLabel() const OVERRIDE; | 52 virtual base::string16 GetDismissButtonLabel() const override; |
53 virtual bool ShouldShowExtensionList() const OVERRIDE; | 53 virtual bool ShouldShowExtensionList() const override; |
54 virtual void RestrictToSingleExtension( | 54 virtual void RestrictToSingleExtension( |
55 const std::string& extension_id) OVERRIDE; | 55 const std::string& extension_id) override; |
56 virtual void LogExtensionCount(size_t count) OVERRIDE; | 56 virtual void LogExtensionCount(size_t count) override; |
57 virtual void LogAction( | 57 virtual void LogAction( |
58 ExtensionMessageBubbleController::BubbleAction | 58 ExtensionMessageBubbleController::BubbleAction |
59 action) OVERRIDE; | 59 action) override; |
60 | 60 |
61 private: | 61 private: |
62 // Our extension service. Weak, not owned by us. | 62 // Our extension service. Weak, not owned by us. |
63 ExtensionService* service_; | 63 ExtensionService* service_; |
64 | 64 |
65 // A weak pointer to the profile we are associated with. Not owned by us. | 65 // A weak pointer to the profile we are associated with. Not owned by us. |
66 Profile* profile_; | 66 Profile* profile_; |
67 | 67 |
68 // The ID of the extension we are showing the bubble for. | 68 // The ID of the extension we are showing the bubble for. |
69 std::string extension_id_; | 69 std::string extension_id_; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 | 209 |
210 delegate()->RestrictToSingleExtension(extension_id); | 210 delegate()->RestrictToSingleExtension(extension_id); |
211 return true; | 211 return true; |
212 } | 212 } |
213 | 213 |
214 bool ProxyOverriddenBubbleController::CloseOnDeactivate() { | 214 bool ProxyOverriddenBubbleController::CloseOnDeactivate() { |
215 return false; | 215 return false; |
216 } | 216 } |
217 | 217 |
218 } // namespace extensions | 218 } // namespace extensions |
OLD | NEW |