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

Side by Side Diff: extensions/renderer/user_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
« no previous file with comments | « extensions/renderer/script_injector.h ('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 <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 27 matching lines...) Expand all
38 // ScriptInjector implementation. 38 // ScriptInjector implementation.
39 UserScript::InjectionType script_type() const override; 39 UserScript::InjectionType script_type() const override;
40 bool ShouldExecuteInMainWorld() const override; 40 bool ShouldExecuteInMainWorld() const override;
41 bool IsUserGesture() const override; 41 bool IsUserGesture() const override;
42 bool ExpectsResults() const override; 42 bool ExpectsResults() const override;
43 bool ShouldInjectJs(UserScript::RunLocation run_location) const override; 43 bool ShouldInjectJs(UserScript::RunLocation run_location) const override;
44 bool ShouldInjectCss(UserScript::RunLocation run_location) const override; 44 bool ShouldInjectCss(UserScript::RunLocation run_location) const override;
45 PermissionsData::AccessType CanExecuteOnFrame( 45 PermissionsData::AccessType CanExecuteOnFrame(
46 const InjectionHost* injection_host, 46 const InjectionHost* injection_host,
47 blink::WebFrame* web_frame, 47 blink::WebFrame* web_frame,
48 int tab_id, 48 int tab_id) const override;
49 const GURL& top_url) const override;
50 std::vector<blink::WebScriptSource> GetJsSources( 49 std::vector<blink::WebScriptSource> GetJsSources(
51 UserScript::RunLocation run_location) const override; 50 UserScript::RunLocation run_location) const override;
52 std::vector<std::string> GetCssSources( 51 std::vector<std::string> GetCssSources(
53 UserScript::RunLocation run_location) const override; 52 UserScript::RunLocation run_location) const override;
54 void GetRunInfo(ScriptsRunInfo* scripts_run_info, 53 void GetRunInfo(ScriptsRunInfo* scripts_run_info,
55 UserScript::RunLocation run_location) const override; 54 UserScript::RunLocation run_location) const override;
56 void OnInjectionComplete(scoped_ptr<base::Value> execution_result, 55 void OnInjectionComplete(scoped_ptr<base::Value> execution_result,
57 UserScript::RunLocation run_location) override; 56 UserScript::RunLocation run_location) override;
58 void OnWillNotInject(InjectFailureReason reason) override; 57 void OnWillNotInject(InjectFailureReason reason) override;
59 58
(...skipping 15 matching lines...) Expand all
75 74
76 ScopedObserver<UserScriptSet, UserScriptSet::Observer> 75 ScopedObserver<UserScriptSet, UserScriptSet::Observer>
77 user_script_set_observer_; 76 user_script_set_observer_;
78 77
79 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); 78 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector);
80 }; 79 };
81 80
82 } // namespace extensions 81 } // namespace extensions
83 82
84 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ 83 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_
OLDNEW
« no previous file with comments | « extensions/renderer/script_injector.h ('k') | extensions/renderer/user_script_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698