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

Side by Side Diff: content/shell/renderer/shell_render_process_observer.cc

Issue 139413003: Replace the gc extension in content shell with a gin::Wrappable class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/renderer/gc_extension.cc ('k') | content/shell/renderer/webkit_test_runner.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) 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/renderer/shell_render_process_observer.h" 5 #include "content/shell/renderer/shell_render_process_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/common/content_client.h" 8 #include "content/public/common/content_client.h"
9 #include "content/public/renderer/render_thread.h" 9 #include "content/public/renderer/render_thread.h"
10 #include "content/public/renderer/render_view.h" 10 #include "content/public/renderer/render_view.h"
11 #include "content/public/test/layouttest_support.h" 11 #include "content/public/test/layouttest_support.h"
12 #include "content/shell/common/shell_messages.h" 12 #include "content/shell/common/shell_messages.h"
13 #include "content/shell/common/shell_switches.h" 13 #include "content/shell/common/shell_switches.h"
14 #include "content/shell/renderer/gc_extension.h"
15 #include "content/shell/renderer/shell_content_renderer_client.h" 14 #include "content/shell/renderer/shell_content_renderer_client.h"
16 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" 15 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
17 #include "content/shell/renderer/webkit_test_runner.h" 16 #include "content/shell/renderer/webkit_test_runner.h"
18 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 17 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
19 #include "third_party/WebKit/public/web/WebView.h" 18 #include "third_party/WebKit/public/web/WebView.h"
20 #include "webkit/glue/webkit_glue.h" 19 #include "webkit/glue/webkit_glue.h"
21 20
22 using blink::WebFrame; 21 using blink::WebFrame;
23 using blink::WebRuntimeFeatures; 22 using blink::WebRuntimeFeatures;
24 using WebTestRunner::WebTestDelegate; 23 using WebTestRunner::WebTestDelegate;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 test_interfaces_->setWebView(view->GetWebView(), test_runner->proxy()); 60 test_interfaces_->setWebView(view->GetWebView(), test_runner->proxy());
62 main_test_runner_ = test_runner; 61 main_test_runner_ = test_runner;
63 } 62 }
64 63
65 void ShellRenderProcessObserver::WebKitInitialized() { 64 void ShellRenderProcessObserver::WebKitInitialized() {
66 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 65 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
67 return; 66 return;
68 67
69 // We always expose GC to layout tests. 68 // We always expose GC to layout tests.
70 webkit_glue::SetJavaScriptFlags(" --expose-gc"); 69 webkit_glue::SetJavaScriptFlags(" --expose-gc");
71 RenderThread::Get()->RegisterExtension(extensions_v8::GCExtension::Get());
72 70
73 if (!CommandLine::ForCurrentProcess()->HasSwitch( 71 if (!CommandLine::ForCurrentProcess()->HasSwitch(
74 switches::kStableReleaseMode)) { 72 switches::kStableReleaseMode)) {
75 WebRuntimeFeatures::enableTestOnlyFeatures(true); 73 WebRuntimeFeatures::enableTestOnlyFeatures(true);
76 } 74 }
77 75
78 test_interfaces_.reset(new WebTestInterfaces); 76 test_interfaces_.reset(new WebTestInterfaces);
79 test_interfaces_->resetAll(); 77 test_interfaces_->resetAll();
80 } 78 }
81 79
(...skipping 11 matching lines...) Expand all
93 91
94 return handled; 92 return handled;
95 } 93 }
96 94
97 void ShellRenderProcessObserver::OnSetWebKitSourceDir( 95 void ShellRenderProcessObserver::OnSetWebKitSourceDir(
98 const base::FilePath& webkit_source_dir) { 96 const base::FilePath& webkit_source_dir) {
99 webkit_source_dir_ = webkit_source_dir; 97 webkit_source_dir_ = webkit_source_dir;
100 } 98 }
101 99
102 } // namespace content 100 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/gc_extension.cc ('k') | content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698