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

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

Issue 2250263004: [Extensions] Reduce string copy in renderer/ UserScript. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments 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/renderer/dispatcher.cc ('k') | extensions/renderer/programmatic_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_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 5 #ifndef EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
6 #define EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 6 #define EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 23 matching lines...) Expand all
34 bool IsUserGesture() const override; 34 bool IsUserGesture() const override;
35 bool ExpectsResults() const override; 35 bool ExpectsResults() const override;
36 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; 36 bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
37 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; 37 bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
38 PermissionsData::AccessType CanExecuteOnFrame( 38 PermissionsData::AccessType CanExecuteOnFrame(
39 const InjectionHost* injection_host, 39 const InjectionHost* injection_host,
40 blink::WebLocalFrame* web_frame, 40 blink::WebLocalFrame* web_frame,
41 int tab_id) const override; 41 int tab_id) const override;
42 std::vector<blink::WebScriptSource> GetJsSources( 42 std::vector<blink::WebScriptSource> GetJsSources(
43 UserScript::RunLocation run_location) const override; 43 UserScript::RunLocation run_location) const override;
44 std::vector<std::string> GetCssSources( 44 std::vector<blink::WebString> GetCssSources(
45 UserScript::RunLocation run_location) const override; 45 UserScript::RunLocation run_location) const override;
46 void GetRunInfo(ScriptsRunInfo* scripts_run_info, 46 void GetRunInfo(ScriptsRunInfo* scripts_run_info,
47 UserScript::RunLocation run_location) const override; 47 UserScript::RunLocation run_location) const override;
48 void OnInjectionComplete(std::unique_ptr<base::Value> execution_result, 48 void OnInjectionComplete(std::unique_ptr<base::Value> execution_result,
49 UserScript::RunLocation run_location, 49 UserScript::RunLocation run_location,
50 content::RenderFrame* render_frame) override; 50 content::RenderFrame* render_frame) override;
51 void OnWillNotInject(InjectFailureReason reason, 51 void OnWillNotInject(InjectFailureReason reason,
52 content::RenderFrame* render_frame) override; 52 content::RenderFrame* render_frame) override;
53 53
54 // Whether it is safe to include information about the URL in error messages. 54 // Whether it is safe to include information about the URL in error messages.
(...skipping 21 matching lines...) Expand all
76 76
77 // Whether or not this script injection has finished. 77 // Whether or not this script injection has finished.
78 bool finished_; 78 bool finished_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector); 80 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector);
81 }; 81 };
82 82
83 } // namespace extensions 83 } // namespace extensions
84 84
85 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 85 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher.cc ('k') | extensions/renderer/programmatic_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698