Chromium Code Reviews| 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_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 "extensions/renderer/script_injection.h" | 10 #include "extensions/renderer/script_injection.h" |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 namespace extensions { | 23 namespace extensions { |
| 24 class Extension; | 24 class Extension; |
| 25 | 25 |
| 26 // A ScriptInjector to handle tabs.executeScript(). | 26 // A ScriptInjector to handle tabs.executeScript(). |
| 27 class ProgrammaticScriptInjector : public ScriptInjector { | 27 class ProgrammaticScriptInjector : public ScriptInjector { |
| 28 public: | 28 public: |
| 29 ProgrammaticScriptInjector(const ExtensionMsg_ExecuteCode_Params& params, | 29 ProgrammaticScriptInjector(const ExtensionMsg_ExecuteCode_Params& params, |
| 30 blink::WebFrame* web_frame); | 30 blink::WebFrame* web_frame); |
| 31 virtual ~ProgrammaticScriptInjector(); | 31 virtual ~ProgrammaticScriptInjector(); |
| 32 | 32 |
| 33 // ScriptInjector implementation. | |
| 34 virtual bool is_declarative() const OVERRIDE; | |
|
Devlin
2014/08/21 17:06:16
Why?
Mark Dittmer
2014/08/23 12:21:38
Left over from some debugging. I'll get rid of it.
| |
| 35 | |
| 33 private: | 36 private: |
| 34 // ScriptInjector implementation. | 37 // ScriptInjector implementation. |
| 35 virtual UserScript::InjectionType script_type() const OVERRIDE; | 38 virtual UserScript::InjectionType script_type() const OVERRIDE; |
| 36 virtual bool ShouldExecuteInChildFrames() const OVERRIDE; | 39 virtual bool ShouldExecuteInChildFrames() const OVERRIDE; |
| 37 virtual bool ShouldExecuteInMainWorld() const OVERRIDE; | 40 virtual bool ShouldExecuteInMainWorld() const OVERRIDE; |
| 38 virtual bool IsUserGesture() const OVERRIDE; | 41 virtual bool IsUserGesture() const OVERRIDE; |
| 39 virtual bool ExpectsResults() const OVERRIDE; | 42 virtual bool ExpectsResults() const OVERRIDE; |
| 40 virtual bool ShouldInjectJs( | 43 virtual bool ShouldInjectJs( |
| 41 UserScript::RunLocation run_location) const OVERRIDE; | 44 UserScript::RunLocation run_location) const OVERRIDE; |
| 42 virtual bool ShouldInjectCss( | 45 virtual bool ShouldInjectCss( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 | 80 |
| 78 // Whether or not this script injection has finished. | 81 // Whether or not this script injection has finished. |
| 79 bool finished_; | 82 bool finished_; |
| 80 | 83 |
| 81 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector); | 84 DISALLOW_COPY_AND_ASSIGN(ProgrammaticScriptInjector); |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 } // namespace extensions | 87 } // namespace extensions |
| 85 | 88 |
| 86 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ | 89 #endif // EXTENSIONS_RENDERER_PROGRAMMATIC_SCRIPT_INJECTOR_H_ |
| OLD | NEW |