OLD | NEW |
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_SUSPICIOUS_EXTENSION_BUBBLE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_SUSPICIOUS_EXTENSION_BUBBLE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_SUSPICIOUS_EXTENSION_BUBBLE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_SUSPICIOUS_EXTENSION_BUBBLE_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" | 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
10 #include "chrome/browser/extensions/extension_message_bubble_controller.h" | 10 #include "chrome/browser/extensions/extension_message_bubble_controller.h" |
(...skipping 24 matching lines...) Expand all Loading... |
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 user_action) OVERRIDE; | 40 ExtensionMessageBubbleController::BubbleAction user_action) OVERRIDE; |
41 virtual void PerformAction(const ExtensionIdList& list) OVERRIDE; | 41 virtual void PerformAction(const ExtensionIdList& list) OVERRIDE; |
42 virtual base::string16 GetTitle() const OVERRIDE; | 42 virtual base::string16 GetTitle() const OVERRIDE; |
43 virtual base::string16 GetMessageBody() const OVERRIDE; | 43 virtual base::string16 GetMessageBody() const OVERRIDE; |
44 virtual base::string16 GetOverflowText( | 44 virtual base::string16 GetOverflowText( |
45 const string16& overflow_count) const OVERRIDE; | 45 const base::string16& overflow_count) const OVERRIDE; |
46 virtual base::string16 GetLearnMoreLabel() const OVERRIDE; | 46 virtual base::string16 GetLearnMoreLabel() const OVERRIDE; |
47 virtual GURL GetLearnMoreUrl() const OVERRIDE; | 47 virtual GURL GetLearnMoreUrl() const OVERRIDE; |
48 virtual base::string16 GetActionButtonLabel() const OVERRIDE; | 48 virtual base::string16 GetActionButtonLabel() const OVERRIDE; |
49 virtual base::string16 GetDismissButtonLabel() const OVERRIDE; | 49 virtual base::string16 GetDismissButtonLabel() const OVERRIDE; |
50 virtual bool ShouldShowExtensionList() const OVERRIDE; | 50 virtual bool ShouldShowExtensionList() const OVERRIDE; |
51 virtual std::vector<string16> GetExtensions() OVERRIDE; | 51 virtual std::vector<base::string16> GetExtensions() OVERRIDE; |
52 virtual void LogExtensionCount(size_t count) OVERRIDE; | 52 virtual void LogExtensionCount(size_t count) OVERRIDE; |
53 virtual void LogAction( | 53 virtual void LogAction( |
54 ExtensionMessageBubbleController::BubbleAction action) OVERRIDE; | 54 ExtensionMessageBubbleController::BubbleAction action) OVERRIDE; |
55 private: | 55 private: |
56 friend class ProfileKeyedAPIFactory< | 56 friend class ProfileKeyedAPIFactory< |
57 SuspiciousExtensionBubbleController>; | 57 SuspiciousExtensionBubbleController>; |
58 | 58 |
59 // ProfileKeyedAPI implementation. | 59 // ProfileKeyedAPI implementation. |
60 static const char* service_name() { | 60 static const char* service_name() { |
61 return "SuspiciousExtensionBubbleController"; | 61 return "SuspiciousExtensionBubbleController"; |
62 } | 62 } |
63 static const bool kServiceRedirectedInIncognito = true; | 63 static const bool kServiceRedirectedInIncognito = true; |
64 | 64 |
65 // Our extension service. Weak, not owned by us. | 65 // Our extension service. Weak, not owned by us. |
66 ExtensionService* service_; | 66 ExtensionService* service_; |
67 | 67 |
68 // A weak pointer to the profile we are associated with. Not owned by us. | 68 // A weak pointer to the profile we are associated with. Not owned by us. |
69 Profile* profile_; | 69 Profile* profile_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(SuspiciousExtensionBubbleController); | 71 DISALLOW_COPY_AND_ASSIGN(SuspiciousExtensionBubbleController); |
72 }; | 72 }; |
73 | 73 |
74 template <> | 74 template <> |
75 void ProfileKeyedAPIFactory< | 75 void ProfileKeyedAPIFactory< |
76 SuspiciousExtensionBubbleController>::DeclareFactoryDependencies(); | 76 SuspiciousExtensionBubbleController>::DeclareFactoryDependencies(); |
77 | 77 |
78 } // namespace extensions | 78 } // namespace extensions |
79 | 79 |
80 #endif // CHROME_BROWSER_EXTENSIONS_SUSPICIOUS_EXTENSION_BUBBLE_CONTROLLER_H_ | 80 #endif // CHROME_BROWSER_EXTENSIONS_SUSPICIOUS_EXTENSION_BUBBLE_CONTROLLER_H_ |
OLD | NEW |