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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 ChromeRenderProcessObserver::ChromeRenderProcessObserver( | 248 ChromeRenderProcessObserver::ChromeRenderProcessObserver( |
249 ChromeContentRendererClient* client) | 249 ChromeContentRendererClient* client) |
250 : client_(client), | 250 : client_(client), |
251 clear_cache_pending_(false), | 251 clear_cache_pending_(false), |
252 webkit_initialized_(false), | 252 webkit_initialized_(false), |
253 pending_cache_min_dead_capacity_(0), | 253 pending_cache_min_dead_capacity_(0), |
254 pending_cache_max_dead_capacity_(0), | 254 pending_cache_max_dead_capacity_(0), |
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)) { | |
258 // TODO(JAR): Need to implement renderer IO msgloop watchdog. | |
259 } | |
260 | 257 |
261 #if defined(ENABLE_AUTOFILL_DIALOG) | 258 #if defined(ENABLE_AUTOFILL_DIALOG) |
262 WebRuntimeFeatures::enableRequestAutocomplete(true); | 259 WebRuntimeFeatures::enableRequestAutocomplete(true); |
263 #endif | 260 #endif |
264 | 261 |
265 if (command_line.HasSwitch(switches::kEnableShowModalDialog)) | 262 if (command_line.HasSwitch(switches::kEnableShowModalDialog)) |
266 WebRuntimeFeatures::enableShowModalDialog(true); | 263 WebRuntimeFeatures::enableShowModalDialog(true); |
267 | 264 |
268 RenderThread* thread = RenderThread::Get(); | 265 RenderThread* thread = RenderThread::Get(); |
269 resource_delegate_.reset(new RendererResourceDelegate()); | 266 resource_delegate_.reset(new RendererResourceDelegate()); |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 if (clear_cache_pending_ && webkit_initialized_) { | 404 if (clear_cache_pending_ && webkit_initialized_) { |
408 clear_cache_pending_ = false; | 405 clear_cache_pending_ = false; |
409 WebCache::clear(); | 406 WebCache::clear(); |
410 } | 407 } |
411 } | 408 } |
412 | 409 |
413 const RendererContentSettingRules* | 410 const RendererContentSettingRules* |
414 ChromeRenderProcessObserver::content_setting_rules() const { | 411 ChromeRenderProcessObserver::content_setting_rules() const { |
415 return &content_setting_rules_; | 412 return &content_setting_rules_; |
416 } | 413 } |
OLD | NEW |