| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/renderer_host/delegated_frame_evictor.h" | 5 #include "content/browser/renderer_host/delegated_frame_evictor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 void DelegatedFrameEvictor::UnlockFrame() { | 42 void DelegatedFrameEvictor::UnlockFrame() { |
| 43 DCHECK(has_frame_); | 43 DCHECK(has_frame_); |
| 44 RendererFrameManager::GetInstance()->UnlockFrame(this); | 44 RendererFrameManager::GetInstance()->UnlockFrame(this); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void DelegatedFrameEvictor::EvictCurrentFrame() { | 47 void DelegatedFrameEvictor::EvictCurrentFrame() { |
| 48 client_->EvictDelegatedFrame(); | 48 client_->EvictDelegatedFrame(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool DelegatedFrameEvictor::FrameLocked() { |
| 52 // The first lock is the visible/invisible state. |
| 53 return has_frame_ && |
| 54 RendererFrameManager::GetInstance()->LockedCount(this) > 1; |
| 55 } |
| 56 |
| 51 } // namespace content | 57 } // namespace content |
| OLD | NEW |