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 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 30 matching lines...) Expand all Loading... |
41 bool ShouldExecuteInMainWorld() const override; | 41 bool ShouldExecuteInMainWorld() const override; |
42 bool IsUserGesture() const override; | 42 bool IsUserGesture() const override; |
43 bool ExpectsResults() const override; | 43 bool ExpectsResults() const override; |
44 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; | 44 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; |
45 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; | 45 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; |
46 PermissionsData::AccessType CanExecuteOnFrame( | 46 PermissionsData::AccessType CanExecuteOnFrame( |
47 const InjectionHost* injection_host, | 47 const InjectionHost* injection_host, |
48 blink::WebLocalFrame* web_frame, | 48 blink::WebLocalFrame* web_frame, |
49 int tab_id) const override; | 49 int tab_id) const override; |
50 std::vector<blink::WebScriptSource> GetJsSources( | 50 std::vector<blink::WebScriptSource> GetJsSources( |
51 UserScript::RunLocation run_location, | 51 UserScript::RunLocation run_location) const override; |
52 ScriptsRunInfo* scripts_run_info) const override; | |
53 std::vector<std::string> GetCssSources( | 52 std::vector<std::string> GetCssSources( |
54 UserScript::RunLocation run_location, | 53 UserScript::RunLocation run_location) const override; |
55 ScriptsRunInfo* scripts_run_info) const override; | |
56 void GetRunInfo(ScriptsRunInfo* scripts_run_info, | 54 void GetRunInfo(ScriptsRunInfo* scripts_run_info, |
57 UserScript::RunLocation run_location) const override; | 55 UserScript::RunLocation run_location) const override; |
58 void OnInjectionComplete(std::unique_ptr<base::Value> execution_result, | 56 void OnInjectionComplete(std::unique_ptr<base::Value> execution_result, |
59 UserScript::RunLocation run_location, | 57 UserScript::RunLocation run_location, |
60 content::RenderFrame* render_frame) override; | 58 content::RenderFrame* render_frame) override; |
61 void OnWillNotInject(InjectFailureReason reason, | 59 void OnWillNotInject(InjectFailureReason reason, |
62 content::RenderFrame* render_frame) override; | 60 content::RenderFrame* render_frame) override; |
63 | 61 |
64 // The associated user script. Owned by the UserScriptInjector that created | 62 // The associated user script. Owned by the UserScriptInjector that created |
65 // this object. | 63 // this object. |
(...skipping 13 matching lines...) Expand all Loading... |
79 | 77 |
80 ScopedObserver<UserScriptSet, UserScriptSet::Observer> | 78 ScopedObserver<UserScriptSet, UserScriptSet::Observer> |
81 user_script_set_observer_; | 79 user_script_set_observer_; |
82 | 80 |
83 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); | 81 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); |
84 }; | 82 }; |
85 | 83 |
86 } // namespace extensions | 84 } // namespace extensions |
87 | 85 |
88 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ | 86 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ |
OLD | NEW |