summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/renderer/render_process.cc4
-rw-r--r--chrome/renderer/render_thread.cc13
2 files changed, 13 insertions, 4 deletions
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc
index 80ec5fb..99b91fa 100644
--- a/chrome/renderer/render_process.cc
+++ b/chrome/renderer/render_process.cc
@@ -131,10 +131,6 @@ void RenderProcess::Init() {
webkit_glue::SetJavaScriptFlags(
command_line.GetSwitchValue(switches::kJavaScriptFlags));
}
- if (command_line.HasSwitch(switches::kPlaybackMode) ||
- command_line.HasSwitch(switches::kRecordMode)) {
- webkit_glue::SetRecordPlaybackMode(true);
- }
if (command_line.HasSwitch(switches::kEnableWatchdog)) {
// TODO(JAR): Need to implement renderer IO msgloop watchdog.
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());
+ }
}