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 "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 Loading... |
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 Loading... |
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 } |
OLD | NEW |