OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // testability. | 82 // testability. |
83 bool InjectScripts(WebFrame* frame); | 83 bool InjectScripts(WebFrame* frame); |
84 | 84 |
85 private: | 85 private: |
86 // Shared memory containing raw script data. | 86 // Shared memory containing raw script data. |
87 scoped_ptr<base::SharedMemory> shared_memory_; | 87 scoped_ptr<base::SharedMemory> shared_memory_; |
88 | 88 |
89 // Parsed script data. | 89 // Parsed script data. |
90 std::vector<UserScript> scripts_; | 90 std::vector<UserScript> scripts_; |
91 | 91 |
| 92 // Greasemonkey API source that is injected with the scripts. |
| 93 StringPiece api_js_; |
| 94 |
| 95 // The line number of the first line of the user script among all of the |
| 96 // injected javascript. This is used to make reported errors correspond with |
| 97 // the proper line in the user script. |
| 98 int user_script_start_line_; |
| 99 |
92 DISALLOW_COPY_AND_ASSIGN(UserScriptSlave); | 100 DISALLOW_COPY_AND_ASSIGN(UserScriptSlave); |
93 }; | 101 }; |
94 | 102 |
95 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ | 103 #endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ |
OLD | NEW |