summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_thread.cc
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 21:39:11 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 21:39:11 +0000
commit06533c0b11ce14b45eb0205fdc28a217eeba763c (patch)
treec2209aab205a7b2216c61be7e1ae6b231b7cb148 /chrome/renderer/render_thread.cc
parent68acddb6ced1c8d29e84fb1465f331515217e50a (diff)
downloadchromium_src-06533c0b11ce14b45eb0205fdc28a217eeba763c.zip
chromium_src-06533c0b11ce14b45eb0205fdc28a217eeba763c.tar.gz
chromium_src-06533c0b11ce14b45eb0205fdc28a217eeba763c.tar.bz2
Refactor v8 extensions so that they aren't in the WebCore namespace, and can call functions in the rest of Chromium code without having to go through ChromiumBridge (which now lives upstream in the WebKit repository).
R=darin,mbelshe Review URL: http://codereview.chromium.org/40132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r--chrome/renderer/render_thread.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index f244092..f2eed65 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -12,8 +12,10 @@
#include "chrome/renderer/render_thread.h"
+#include "base/command_line.h"
#include "base/shared_memory.h"
#include "chrome/common/chrome_plugin_lib.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/url_constants.h"
@@ -33,6 +35,9 @@
#include "chrome/renderer/renderer_webkitclient_impl.h"
#include "chrome/renderer/user_script_slave.h"
#include "chrome/renderer/visitedlink_slave.h"
+#include "webkit/extensions/v8/gears_extension.h"
+#include "webkit/extensions/v8/interval_extension.h"
+#include "webkit/extensions/v8/playback_extension.h"
#include "webkit/glue/cache_manager.h"
#include "WebKit.h"
@@ -244,4 +249,12 @@ void RenderThread::EnsureWebKitInitialized() {
webkit_client_.reset(new RendererWebKitClientImpl);
WebKit::initialize(webkit_client_.get());
WebKit::registerURLSchemeAsLocal(ASCIIToUTF16(chrome::kChromeUIScheme));
+ WebKit::registerExtension(extensions_v8::GearsExtension::Get());
+ WebKit::registerExtension(extensions_v8::IntervalExtension::Get());
+
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kPlaybackMode) ||
+ command_line.HasSwitch(switches::kRecordMode)) {
+ WebKit::registerExtension(extensions_v8::PlaybackExtension::Get());
+ }
}