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

Unified Diff: chrome/renderer/greasemonkey_slave.h

Issue 17281: This is a rename of the term 'Greasemonkey' to 'user script' in Chromium. (Closed)
Patch Set: Fix indent 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/greasemonkey_slave.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/greasemonkey_slave.h
diff --git a/chrome/renderer/greasemonkey_slave.h b/chrome/renderer/user_script_slave.h
similarity index 73%
rename from chrome/renderer/greasemonkey_slave.h
rename to chrome/renderer/user_script_slave.h
index 5f80f8bf534ebcbfd48c4464b26364bbf2a1d67b..dd409603290ce44670fc981c6537755e96748ff2 100644
--- a/chrome/renderer/greasemonkey_slave.h
+++ b/chrome/renderer/user_script_slave.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_RENDERER_GREASEMONKEY_SLAVE_H_
-#define CHROME_RENDERER_GREASEMONKEY_SLAVE_H_
+#ifndef CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_
+#define CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
@@ -13,10 +13,10 @@
#include "webkit/glue/webframe.h"
-// Parsed representation of a Greasemonkey script.
-class GreasemonkeyScript {
+// Parsed representation of a user script.
+class UserScript {
public:
- GreasemonkeyScript(const StringPiece& script_url)
+ UserScript(const StringPiece& script_url)
: url_(script_url) {}
// Gets the script body that should be injected into matching content.
@@ -37,12 +37,12 @@ class GreasemonkeyScript {
bool MatchesUrl(const GURL& url);
private:
- FRIEND_TEST(GreasemonkeySlaveTest, EscapeGlob);
- FRIEND_TEST(GreasemonkeySlaveTest, Parse1);
- FRIEND_TEST(GreasemonkeySlaveTest, Parse2);
- FRIEND_TEST(GreasemonkeySlaveTest, Parse3);
+ FRIEND_TEST(UserScriptSlaveTest, EscapeGlob);
+ FRIEND_TEST(UserScriptSlaveTest, Parse1);
+ FRIEND_TEST(UserScriptSlaveTest, Parse2);
+ FRIEND_TEST(UserScriptSlaveTest, Parse3);
- // Helper function to convert the Greasemonkey glob format to the patterns
+ // Helper function to convert the user script glob format to the patterns
// used internally to test URLs.
static std::string EscapeGlob(const std::string& glob);
@@ -69,16 +69,16 @@ class GreasemonkeyScript {
};
-// Manages installed GreasemonkeyScripts for a render process.
-class GreasemonkeySlave {
+// Manages installed UserScripts for a render process.
+class UserScriptSlave {
public:
- GreasemonkeySlave();
+ UserScriptSlave();
// Update the parsed scripts from shared memory.
bool UpdateScripts(base::SharedMemoryHandle shared_memory);
// Inject the appropriate scripts into a frame based on its URL.
- // TODO(aa): Extract a GreasemonkeyFrame interface out of this to improve
+ // TODO(aa): Extract a UserScriptFrame interface out of this to improve
// testability.
bool InjectScripts(WebFrame* frame);
@@ -87,9 +87,9 @@ class GreasemonkeySlave {
scoped_ptr<base::SharedMemory> shared_memory_;
// Parsed script data.
- std::vector<GreasemonkeyScript> scripts_;
+ std::vector<UserScript> scripts_;
- DISALLOW_COPY_AND_ASSIGN(GreasemonkeySlave);
+ DISALLOW_COPY_AND_ASSIGN(UserScriptSlave);
};
-#endif // CHROME_RENDERER_GREASEMONKEY_SLAVE_H_
+#endif // CHROME_BROWSER_EXTENSIONS_USER_SCRIPT_SLAVE_H_
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/greasemonkey_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698