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

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

Issue 1150683007: [Extensions] Use document url (not top url) for tab-specific permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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_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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 23 matching lines...) Expand all
34 // ScriptInjector implementation. 34 // ScriptInjector implementation.
35 UserScript::InjectionType script_type() const override; 35 UserScript::InjectionType script_type() const override;
36 bool ShouldExecuteInMainWorld() const override; 36 bool ShouldExecuteInMainWorld() const override;
37 bool IsUserGesture() const override; 37 bool IsUserGesture() const override;
38 bool ExpectsResults() const override; 38 bool ExpectsResults() const override;
39 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; 39 bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
40 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; 40 bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
41 PermissionsData::AccessType CanExecuteOnFrame( 41 PermissionsData::AccessType CanExecuteOnFrame(
42 const InjectionHost* injection_host, 42 const InjectionHost* injection_host,
43 blink::WebFrame* web_frame, 43 blink::WebFrame* web_frame,
44 int tab_id, 44 int tab_id) const override;
45 const GURL& top_url) const override;
46 std::vector<blink::WebScriptSource> GetJsSources( 45 std::vector<blink::WebScriptSource> GetJsSources(
47 UserScript::RunLocation run_location) const override; 46 UserScript::RunLocation run_location) const override;
48 std::vector<std::string> GetCssSources( 47 std::vector<std::string> GetCssSources(
49 UserScript::RunLocation run_location) const override; 48 UserScript::RunLocation run_location) const override;
50 void GetRunInfo(ScriptsRunInfo* scripts_run_info, 49 void GetRunInfo(ScriptsRunInfo* scripts_run_info,
51 UserScript::RunLocation run_location) const override; 50 UserScript::RunLocation run_location) const override;
52 void OnInjectionComplete(scoped_ptr<base::Value> execution_result, 51 void OnInjectionComplete(scoped_ptr<base::Value> execution_result,
53 UserScript::RunLocation run_location) override; 52 UserScript::RunLocation run_location) override;
54 void OnWillNotInject(InjectFailureReason reason) override; 53 void OnWillNotInject(InjectFailureReason reason) override;
55 54
(...skipping 23 matching lines...) Expand all
79 78
80 // Whether or not this script injection has finished. 79 // Whether or not this script injection has finished.
81 bool finished_; 80 bool finished_;
82 81
83 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector); 82 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector);
84 }; 83 };
85 84
86 } // namespace extensions 85 } // namespace extensions
87 86
88 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ 87 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_
OLDNEW
« no previous file with comments | « extensions/renderer/injection_host.h ('k') | extensions/renderer/programmatic_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698