Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/browser/extensions/active_script_controller.h

Issue 454053005: Consolidate ExtensionToolbarModel::Action and LocationBarController::Action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/active_script_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/active_script_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698