| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 pending_cache_capacity_(kUnitializedCacheCapacity) { | 255 pending_cache_capacity_(kUnitializedCacheCapacity) { |
| 256 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 256 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 257 if (command_line.HasSwitch(switches::kEnableWatchdog)) { | 257 if (command_line.HasSwitch(switches::kEnableWatchdog)) { |
| 258 // TODO(JAR): Need to implement renderer IO msgloop watchdog. | 258 // TODO(JAR): Need to implement renderer IO msgloop watchdog. |
| 259 } | 259 } |
| 260 | 260 |
| 261 #if defined(ENABLE_AUTOFILL_DIALOG) | 261 #if defined(ENABLE_AUTOFILL_DIALOG) |
| 262 WebRuntimeFeatures::enableRequestAutocomplete(true); | 262 WebRuntimeFeatures::enableRequestAutocomplete(true); |
| 263 #endif | 263 #endif |
| 264 | 264 |
| 265 if (command_line.HasSwitch(switches::kEnableShowModalDialog)) |
| 266 WebRuntimeFeatures::enableShowModalDialog(true); |
| 267 |
| 265 RenderThread* thread = RenderThread::Get(); | 268 RenderThread* thread = RenderThread::Get(); |
| 266 resource_delegate_.reset(new RendererResourceDelegate()); | 269 resource_delegate_.reset(new RendererResourceDelegate()); |
| 267 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); | 270 thread->SetResourceDispatcherDelegate(resource_delegate_.get()); |
| 268 | 271 |
| 269 // Configure modules that need access to resources. | 272 // Configure modules that need access to resources. |
| 270 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 273 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 271 | 274 |
| 272 #if defined(OS_WIN) | 275 #if defined(OS_WIN) |
| 273 // Need to patch a few functions for font loading to work correctly. | 276 // Need to patch a few functions for font loading to work correctly. |
| 274 base::FilePath pdf; | 277 base::FilePath pdf; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 if (clear_cache_pending_ && webkit_initialized_) { | 407 if (clear_cache_pending_ && webkit_initialized_) { |
| 405 clear_cache_pending_ = false; | 408 clear_cache_pending_ = false; |
| 406 WebCache::clear(); | 409 WebCache::clear(); |
| 407 } | 410 } |
| 408 } | 411 } |
| 409 | 412 |
| 410 const RendererContentSettingRules* | 413 const RendererContentSettingRules* |
| 411 ChromeRenderProcessObserver::content_setting_rules() const { | 414 ChromeRenderProcessObserver::content_setting_rules() const { |
| 412 return &content_setting_rules_; | 415 return &content_setting_rules_; |
| 413 } | 416 } |
| OLD | NEW |