| 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 | |
| 272 RenderThread* thread = RenderThread::Get(); | 267 RenderThread* thread = RenderThread::Get(); |
| 273 resource_delegate_.reset(new RendererResourceDelegate()); | 268 resource_delegate_.reset(new RendererResourceDelegate()); |
| 274 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); | 269 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); |
| 275 | 270 |
| 276 // Configure modules that need access to resources. | 271 // Configure modules that need access to resources. |
| 277 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 272 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 278 | 273 |
| 279 #if defined(OS_WIN) | 274 #if defined(OS_WIN) |
| 280 // Need to patch a few functions for font loading to work correctly. | 275 // Need to patch a few functions for font loading to work correctly. |
| 281 base::FilePath pdf; | 276 base::FilePath pdf; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 369 } |
| 375 | 370 |
| 376 void ChromeRenderProcessObserver::OnGetV8HeapStats() { | 371 void ChromeRenderProcessObserver::OnGetV8HeapStats() { |
| 377 HeapStatisticsCollector::Instance()->InitiateCollection(); | 372 HeapStatisticsCollector::Instance()->InitiateCollection(); |
| 378 } | 373 } |
| 379 | 374 |
| 380 const RendererContentSettingRules* | 375 const RendererContentSettingRules* |
| 381 ChromeRenderProcessObserver::content_setting_rules() const { | 376 ChromeRenderProcessObserver::content_setting_rules() const { |
| 382 return &content_setting_rules_; | 377 return &content_setting_rules_; |
| 383 } | 378 } |
| OLD | NEW |