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 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVE_SCRIPT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTIVE_SCRIPT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_ACTIVE_SCRIPT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_ACTIVE_SCRIPT_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // active tab permissions. This will run any pending injections for that | 50 // active tab permissions. This will run any pending injections for that |
51 // extension. | 51 // extension. |
52 void OnActiveTabPermissionGranted(const Extension* extension); | 52 void OnActiveTabPermissionGranted(const Extension* extension); |
53 | 53 |
54 // Notifies the ActiveScriptController of detected ad injection. | 54 // Notifies the ActiveScriptController of detected ad injection. |
55 void OnAdInjectionDetected(const std::set<std::string>& ad_injectors); | 55 void OnAdInjectionDetected(const std::set<std::string>& ad_injectors); |
56 | 56 |
57 // LocationBarControllerProvider implementation. | 57 // LocationBarControllerProvider implementation. |
58 virtual ExtensionAction* GetActionForExtension( | 58 virtual ExtensionAction* GetActionForExtension( |
59 const Extension* extension) OVERRIDE; | 59 const Extension* extension) OVERRIDE; |
60 virtual LocationBarController::Action OnClicked( | 60 virtual ExtensionAction::ShowAction OnClicked( |
61 const Extension* extension) OVERRIDE; | 61 const Extension* extension) OVERRIDE; |
62 virtual void OnNavigated() OVERRIDE; | 62 virtual void OnNavigated() OVERRIDE; |
63 virtual void OnExtensionUnloaded(const Extension* extension) OVERRIDE; | 63 virtual void OnExtensionUnloaded(const Extension* extension) OVERRIDE; |
64 | 64 |
65 #if defined(UNIT_TEST) | 65 #if defined(UNIT_TEST) |
66 // Only used in tests. | 66 // Only used in tests. |
67 PermissionsData::AccessType RequiresUserConsentForScriptInjectionForTesting( | 67 PermissionsData::AccessType RequiresUserConsentForScriptInjectionForTesting( |
68 const Extension* extension, | 68 const Extension* extension, |
69 UserScript::InjectionType type) { | 69 UserScript::InjectionType type) { |
70 return RequiresUserConsentForScriptInjection(extension, type); | 70 return RequiresUserConsentForScriptInjection(extension, type); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // that get generated for extensions that haven't declared anything. | 129 // that get generated for extensions that haven't declared anything. |
130 typedef std::map<std::string, linked_ptr<ExtensionAction> > ActiveScriptMap; | 130 typedef std::map<std::string, linked_ptr<ExtensionAction> > ActiveScriptMap; |
131 ActiveScriptMap active_script_actions_; | 131 ActiveScriptMap active_script_actions_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(ActiveScriptController); | 133 DISALLOW_COPY_AND_ASSIGN(ActiveScriptController); |
134 }; | 134 }; |
135 | 135 |
136 } // namespace extensions | 136 } // namespace extensions |
137 | 137 |
138 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVE_SCRIPT_CONTROLLER_H_ | 138 #endif // CHROME_BROWSER_EXTENSIONS_ACTIVE_SCRIPT_CONTROLLER_H_ |
OLD | NEW |