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

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

Issue 2227193002: Make UserScript non-copyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott 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
« no previous file with comments | « extensions/common/user_script_unittest.cc ('k') | extensions/renderer/user_script_injector.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 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( 36 void OnUserScriptsUpdated(const std::set<HostID>& changed_hosts,
37 const std::set<HostID>& changed_hosts, 37 const UserScriptList& scripts) override;
38 const std::vector<std::unique_ptr<UserScript>>& scripts) override;
39 38
40 // ScriptInjector implementation. 39 // ScriptInjector implementation.
41 UserScript::InjectionType script_type() const override; 40 UserScript::InjectionType script_type() const override;
42 bool ShouldExecuteInMainWorld() const override; 41 bool ShouldExecuteInMainWorld() const override;
43 bool IsUserGesture() const override; 42 bool IsUserGesture() const override;
44 bool ExpectsResults() const override; 43 bool ExpectsResults() const override;
45 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; 44 bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
46 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; 45 bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
47 PermissionsData::AccessType CanExecuteOnFrame( 46 PermissionsData::AccessType CanExecuteOnFrame(
48 const InjectionHost* injection_host, 47 const InjectionHost* injection_host,
(...skipping 29 matching lines...) Expand all
78 77
79 ScopedObserver<UserScriptSet, UserScriptSet::Observer> 78 ScopedObserver<UserScriptSet, UserScriptSet::Observer>
80 user_script_set_observer_; 79 user_script_set_observer_;
81 80
82 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); 81 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector);
83 }; 82 };
84 83
85 } // namespace extensions 84 } // namespace extensions
86 85
87 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 86 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
OLDNEW
« no previous file with comments | « extensions/common/user_script_unittest.cc ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698