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

Side by Side Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 588543003: Let --js-flags work when Harmony is enabled in about:flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to Chrome layer as requested in code review Created 6 years, 3 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
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | 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 "chrome/renderer/chrome_render_process_observer.h" 5 #include "chrome/renderer/chrome_render_process_observer.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/allocator/allocator_extension.h" 10 #include "base/allocator/allocator_extension.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 webkit_initialized_(false) { 257 webkit_initialized_(false) {
258 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 258 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
259 259
260 #if defined(ENABLE_AUTOFILL_DIALOG) 260 #if defined(ENABLE_AUTOFILL_DIALOG)
261 WebRuntimeFeatures::enableRequestAutocomplete(true); 261 WebRuntimeFeatures::enableRequestAutocomplete(true);
262 #endif 262 #endif
263 263
264 if (command_line.HasSwitch(switches::kEnableShowModalDialog)) 264 if (command_line.HasSwitch(switches::kEnableShowModalDialog))
265 WebRuntimeFeatures::enableShowModalDialog(true); 265 WebRuntimeFeatures::enableShowModalDialog(true);
266 266
267 if (command_line.HasSwitch(switches::kJavaScriptHarmony)) {
268 std::string flag("--harmony");
269 v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));
270 }
271
267 RenderThread* thread = RenderThread::Get(); 272 RenderThread* thread = RenderThread::Get();
268 resource_delegate_.reset(new RendererResourceDelegate()); 273 resource_delegate_.reset(new RendererResourceDelegate());
269 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); 274 thread->SetResourceDispatcherDelegate(resource_delegate_.get());
270 275
271 // Configure modules that need access to resources. 276 // Configure modules that need access to resources.
272 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); 277 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
273 278
274 #if defined(OS_WIN) 279 #if defined(OS_WIN)
275 // Need to patch a few functions for font loading to work correctly. 280 // Need to patch a few functions for font loading to work correctly.
276 base::FilePath pdf; 281 base::FilePath pdf;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 374 }
370 375
371 void ChromeRenderProcessObserver::OnGetV8HeapStats() { 376 void ChromeRenderProcessObserver::OnGetV8HeapStats() {
372 HeapStatisticsCollector::Instance()->InitiateCollection(); 377 HeapStatisticsCollector::Instance()->InitiateCollection();
373 } 378 }
374 379
375 const RendererContentSettingRules* 380 const RendererContentSettingRules*
376 ChromeRenderProcessObserver::content_setting_rules() const { 381 ChromeRenderProcessObserver::content_setting_rules() const {
377 return &content_setting_rules_; 382 return &content_setting_rules_;
378 } 383 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698