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

Side by Side Diff: chrome/renderer/user_script_slave.h

Issue 18183: First pass as implementing the greasemonkey API. This patch (Closed)
Patch Set: Created 11 years, 11 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 | « chrome/renderer/renderer_resources.rc ('k') | chrome/renderer/user_script_slave.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 (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
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_
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_resources.rc ('k') | chrome/renderer/user_script_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698