OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/shell/shell_render_process_observer.h" | 5 #include "content/shell/shell_render_process_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/renderer/render_thread.h" | 8 #include "content/public/renderer/render_thread.h" |
9 #include "content/shell/layout_test_controller_bindings.h" | |
10 #include "content/shell/shell_switches.h" | 9 #include "content/shell/shell_switches.h" |
| 10 #include "content/shell/webkit_test_runner_bindings.h" |
11 #include "webkit/glue/webkit_glue.h" | 11 #include "webkit/glue/webkit_glue.h" |
12 #include "webkit/support/gc_extension.h" | 12 #include "webkit/support/gc_extension.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 ShellRenderProcessObserver::ShellRenderProcessObserver() { | 16 ShellRenderProcessObserver::ShellRenderProcessObserver() { |
17 RenderThread::Get()->AddObserver(this); | 17 RenderThread::Get()->AddObserver(this); |
18 } | 18 } |
19 | 19 |
20 ShellRenderProcessObserver::~ShellRenderProcessObserver() { | 20 ShellRenderProcessObserver::~ShellRenderProcessObserver() { |
21 } | 21 } |
22 | 22 |
23 void ShellRenderProcessObserver::WebKitInitialized() { | 23 void ShellRenderProcessObserver::WebKitInitialized() { |
24 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) | 24 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
25 return; | 25 return; |
26 | 26 |
27 // To implement a catch-all for not yet implemented controller properties. | 27 // To implement a catch-all for not yet implemented controller properties. |
28 webkit_glue::SetJavaScriptFlags(" --harmony_proxies"); | 28 webkit_glue::SetJavaScriptFlags(" --harmony_proxies"); |
29 RenderThread::Get()->RegisterExtension(new LayoutTestControllerBindings()); | 29 RenderThread::Get()->RegisterExtension(new WebKitTestRunnerBindings()); |
30 | 30 |
31 // We always expose GC to layout tests. | 31 // We always expose GC to layout tests. |
32 webkit_glue::SetJavaScriptFlags(" --expose-gc"); | 32 webkit_glue::SetJavaScriptFlags(" --expose-gc"); |
33 RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get()); | 33 RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get()); |
34 } | 34 } |
35 | 35 |
36 } // namespace content | 36 } // namespace content |
OLD | NEW |