| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <malloc.h> | 8 #include <malloc.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 size_t WebKitClientImpl::actualMemoryUsageMB() { | 639 size_t WebKitClientImpl::actualMemoryUsageMB() { |
| 640 return getMemoryUsageMB(true); | 640 return getMemoryUsageMB(true); |
| 641 } | 641 } |
| 642 | 642 |
| 643 void WebKitClientImpl::SuspendSharedTimer() { | 643 void WebKitClientImpl::SuspendSharedTimer() { |
| 644 ++shared_timer_suspended_; | 644 ++shared_timer_suspended_; |
| 645 } | 645 } |
| 646 | 646 |
| 647 void WebKitClientImpl::ResumeSharedTimer() { | 647 void WebKitClientImpl::ResumeSharedTimer() { |
| 648 // The shared timer may have fired or been adjusted while we were suspended. | 648 // The shared timer may have fired or been adjusted while we were suspended. |
| 649 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 649 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) { |
| 650 #ifdef WEBKIT_USE_MONOTONIC_CLOCK_FOR_TIMER_SCHEDULING | |
| 651 setSharedTimerFireInterval( | 650 setSharedTimerFireInterval( |
| 652 monotonicallyIncreasingTime() - shared_timer_fire_time_); | 651 monotonicallyIncreasingTime() - shared_timer_fire_time_); |
| 653 #else | 652 } |
| 654 setSharedTimerFireTime(shared_timer_fire_time_); | |
| 655 #endif | |
| 656 } | 653 } |
| 657 | 654 |
| 658 } // namespace webkit_glue | 655 } // namespace webkit_glue |
| OLD | NEW |