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

Side by Side Diff: extensions/renderer/user_script_injector.h

Issue 2193093002: [UserScript cleanup] Remove use of ScopedVector from UserScriptSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 5 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
6 #define EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 6 #define EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 class UserScriptInjector : public ScriptInjector, 26 class UserScriptInjector : public ScriptInjector,
27 public UserScriptSet::Observer { 27 public UserScriptSet::Observer {
28 public: 28 public:
29 UserScriptInjector(const UserScript* user_script, 29 UserScriptInjector(const UserScript* user_script,
30 UserScriptSet* user_script_set, 30 UserScriptSet* user_script_set,
31 bool is_declarative); 31 bool is_declarative);
32 ~UserScriptInjector() override; 32 ~UserScriptInjector() override;
33 33
34 private: 34 private:
35 // UserScriptSet::Observer implementation. 35 // UserScriptSet::Observer implementation.
36 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts, 36 void OnUserScriptsUpdated(
37 const std::vector<UserScript*>& scripts) override; 37 const std::set<HostID>& changed_hosts,
38 const std::vector<std::unique_ptr<UserScript>>& scripts) override;
38 39
39 // ScriptInjector implementation. 40 // ScriptInjector implementation.
40 UserScript::InjectionType script_type() const override; 41 UserScript::InjectionType script_type() const override;
41 bool ShouldExecuteInMainWorld() const override; 42 bool ShouldExecuteInMainWorld() const override;
42 bool IsUserGesture() const override; 43 bool IsUserGesture() const override;
43 bool ExpectsResults() const override; 44 bool ExpectsResults() const override;
44 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; 45 bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
45 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; 46 bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
46 PermissionsData::AccessType CanExecuteOnFrame( 47 PermissionsData::AccessType CanExecuteOnFrame(
47 const InjectionHost* injection_host, 48 const InjectionHost* injection_host,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 80
80 ScopedObserver<UserScriptSet, UserScriptSet::Observer> 81 ScopedObserver<UserScriptSet, UserScriptSet::Observer>
81 user_script_set_observer_; 82 user_script_set_observer_;
82 83
83 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); 84 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector);
84 }; 85 };
85 86
86 } // namespace extensions 87 } // namespace extensions
87 88
88 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 89 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
OLDNEW
« no previous file with comments | « extensions/renderer/script_injection_manager.cc ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698