| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 UserScript::RunLocation run_location) OVERRIDE; | 59 UserScript::RunLocation run_location) OVERRIDE; |
| 60 virtual void OnWillNotInject(InjectFailureReason reason) OVERRIDE; | 60 virtual void OnWillNotInject(InjectFailureReason reason) OVERRIDE; |
| 61 | 61 |
| 62 // The associated user script. Owned by the UserScriptInjector that created | 62 // The associated user script. Owned by the UserScriptInjector that created |
| 63 // this object. | 63 // this object. |
| 64 const UserScript* script_; | 64 const UserScript* script_; |
| 65 | 65 |
| 66 // The id of the associated user script. We cache this because when we update | 66 // The id of the associated user script. We cache this because when we update |
| 67 // the |script_| associated with this injection, the old referance may be | 67 // the |script_| associated with this injection, the old referance may be |
| 68 // deleted. | 68 // deleted. |
| 69 int64 script_id_; | 69 int script_id_; |
| 70 | 70 |
| 71 // The associated extension id, preserved for the same reason as |script_id|. | 71 // The associated extension id, preserved for the same reason as |script_id|. |
| 72 std::string extension_id_; | 72 std::string extension_id_; |
| 73 | 73 |
| 74 ScopedObserver<UserScriptSet, UserScriptSet::Observer> | 74 ScopedObserver<UserScriptSet, UserScriptSet::Observer> |
| 75 user_script_set_observer_; | 75 user_script_set_observer_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); | 77 DISALLOW_COPY_AND_ASSIGN(UserScriptInjector); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace extensions | 80 } // namespace extensions |
| 81 | 81 |
| 82 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ | 82 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_INJECTOR_H_ |
| OLD | NEW |