OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 WebRuntimeFeatures::enableDatabase( | 533 WebRuntimeFeatures::enableDatabase( |
534 command_line.HasSwitch(switches::kEnableDatabases)); | 534 command_line.HasSwitch(switches::kEnableDatabases)); |
535 | 535 |
536 #if defined(OS_WIN) | 536 #if defined(OS_WIN) |
537 // We don't yet support notifications on non-Windows, so hide it from pages. | 537 // We don't yet support notifications on non-Windows, so hide it from pages. |
538 WebRuntimeFeatures::enableNotifications( | 538 WebRuntimeFeatures::enableNotifications( |
539 command_line.HasSwitch(switches::kEnableDesktopNotifications)); | 539 command_line.HasSwitch(switches::kEnableDesktopNotifications)); |
540 #endif | 540 #endif |
541 | 541 |
542 WebRuntimeFeatures::enableLocalStorage( | 542 WebRuntimeFeatures::enableLocalStorage( |
543 command_line.HasSwitch(switches::kEnableLocalStorage)); | 543 !command_line.HasSwitch(switches::kDisableLocalStorage)); |
544 WebRuntimeFeatures::enableSessionStorage( | 544 WebRuntimeFeatures::enableSessionStorage( |
545 command_line.HasSwitch(switches::kEnableSessionStorage)); | 545 command_line.HasSwitch(switches::kEnableSessionStorage)); |
546 } | 546 } |
547 | 547 |
548 void RenderThread::IdleHandler() { | 548 void RenderThread::IdleHandler() { |
549 // It is possible that the timer was set while the widgets were idle, | 549 // It is possible that the timer was set while the widgets were idle, |
550 // but that they are no longer idle. If so, just return. | 550 // but that they are no longer idle. If so, just return. |
551 if (!widget_count_ || hidden_widget_count_ < widget_count_) | 551 if (!widget_count_ || hidden_widget_count_ < widget_count_) |
552 return; | 552 return; |
553 | 553 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 void RenderThread::OnPurgePluginListCache(bool reload_pages) { | 613 void RenderThread::OnPurgePluginListCache(bool reload_pages) { |
614 EnsureWebKitInitialized(); | 614 EnsureWebKitInitialized(); |
615 // The call below will cause a GetPlugins call with refresh=true, but at this | 615 // The call below will cause a GetPlugins call with refresh=true, but at this |
616 // point we already know that the browser has refreshed its list, so disable | 616 // point we already know that the browser has refreshed its list, so disable |
617 // refresh temporarily to prevent each renderer process causing the list to be | 617 // refresh temporarily to prevent each renderer process causing the list to be |
618 // regenerated. | 618 // regenerated. |
619 plugin_refresh_allowed_ = false; | 619 plugin_refresh_allowed_ = false; |
620 WebKit::resetPluginCache(reload_pages); | 620 WebKit::resetPluginCache(reload_pages); |
621 plugin_refresh_allowed_ = true; | 621 plugin_refresh_allowed_ = true; |
622 } | 622 } |
OLD | NEW |