| 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 | 522 |
| 523 WebRuntimeFeatures::enableMediaPlayer( | 523 WebRuntimeFeatures::enableMediaPlayer( |
| 524 RenderProcess::current()->initialized_media_library()); | 524 RenderProcess::current()->initialized_media_library()); |
| 525 | 525 |
| 526 WebRuntimeFeatures::enableSockets( | 526 WebRuntimeFeatures::enableSockets( |
| 527 command_line.HasSwitch(switches::kEnableWebSockets)); | 527 command_line.HasSwitch(switches::kEnableWebSockets)); |
| 528 | 528 |
| 529 WebRuntimeFeatures::enableDatabase( | 529 WebRuntimeFeatures::enableDatabase( |
| 530 command_line.HasSwitch(switches::kEnableDatabases)); | 530 command_line.HasSwitch(switches::kEnableDatabases)); |
| 531 |
| 532 #if defined(OS_WIN) |
| 533 // We don't yet support notifications on non-Windows, so hide it from pages. |
| 534 WebRuntimeFeatures::enableNotifications( |
| 535 command_line.HasSwitch(switches::kEnableDesktopNotifications)); |
| 536 #endif |
| 531 } | 537 } |
| 532 | 538 |
| 533 void RenderThread::IdleHandler() { | 539 void RenderThread::IdleHandler() { |
| 534 // It is possible that the timer was set while the widgets were idle, | 540 // It is possible that the timer was set while the widgets were idle, |
| 535 // but that they are no longer idle. If so, just return. | 541 // but that they are no longer idle. If so, just return. |
| 536 if (!widget_count_ || hidden_widget_count_ < widget_count_) | 542 if (!widget_count_ || hidden_widget_count_ < widget_count_) |
| 537 return; | 543 return; |
| 538 | 544 |
| 539 #if defined(OS_WIN) | 545 #if defined(OS_WIN) |
| 540 MallocExtension::instance()->ReleaseFreeMemory(); | 546 MallocExtension::instance()->ReleaseFreeMemory(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 void RenderThread::OnPurgePluginListCache(bool reload_pages) { | 599 void RenderThread::OnPurgePluginListCache(bool reload_pages) { |
| 594 EnsureWebKitInitialized(); | 600 EnsureWebKitInitialized(); |
| 595 // The call below will cause a GetPlugins call with refresh=true, but at this | 601 // The call below will cause a GetPlugins call with refresh=true, but at this |
| 596 // point we already know that the browser has refreshed its list, so disable | 602 // point we already know that the browser has refreshed its list, so disable |
| 597 // refresh temporarily to prevent each renderer process causing the list to be | 603 // refresh temporarily to prevent each renderer process causing the list to be |
| 598 // regenerated. | 604 // regenerated. |
| 599 plugin_refresh_allowed_ = false; | 605 plugin_refresh_allowed_ = false; |
| 600 WebKit::resetPluginCache(reload_pages); | 606 WebKit::resetPluginCache(reload_pages); |
| 601 plugin_refresh_allowed_ = true; | 607 plugin_refresh_allowed_ = true; |
| 602 } | 608 } |
| OLD | NEW |