Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: content/browser/renderer_host/delegated_frame_evictor.cc

Issue 43193002: Aura/ÜC: Drop frames on background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CONTENT_EXPORT Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/renderer_host/delegated_frame_evictor.h"
6
7 namespace content {
8
9 DelegatedFrameEvictor::DelegatedFrameEvictor(
10 DelegatedFrameEvictorClient* client)
11 : client_(client), has_frame_(false) {}
12
13 DelegatedFrameEvictor::~DelegatedFrameEvictor() { DiscardedFrame(); }
14
15 void DelegatedFrameEvictor::SwappedFrame(bool visible) {
16 has_frame_ = true;
17 RendererFrameManager::GetInstance()->AddFrame(this, visible);
18 }
19
20 void DelegatedFrameEvictor::DiscardedFrame() {
21 RendererFrameManager::GetInstance()->RemoveFrame(this);
22 has_frame_ = false;
23 }
24
25 void DelegatedFrameEvictor::SetVisible(bool visible) {
26 if (has_frame_)
27 RendererFrameManager::GetInstance()->SetFrameVisibility(this, visible);
28 }
29
30 void DelegatedFrameEvictor::EvictCurrentFrame() {
31 client_->EvictDelegatedFrame();
32 }
33
34 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/delegated_frame_evictor.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698