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

Unified Diff: content/browser/renderer_host/delegated_frame_evictor.h

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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/delegated_frame_evictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/delegated_frame_evictor.h
diff --git a/content/browser/renderer_host/delegated_frame_evictor.h b/content/browser/renderer_host/delegated_frame_evictor.h
new file mode 100644
index 0000000000000000000000000000000000000000..34ae7cf5314e72ae24ba7292eeda0a0c47bb5f34
--- /dev/null
+++ b/content/browser/renderer_host/delegated_frame_evictor.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
+#define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
+
+#include "content/browser/renderer_host/renderer_frame_manager.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+class CONTENT_EXPORT DelegatedFrameEvictorClient {
+ public:
+ virtual ~DelegatedFrameEvictorClient() {}
+ virtual void EvictDelegatedFrame() = 0;
+};
+
+class CONTENT_EXPORT DelegatedFrameEvictor : public RendererFrameManagerClient {
+ public:
+ // |client| must outlive |this|.
+ explicit DelegatedFrameEvictor(DelegatedFrameEvictorClient* client);
+ virtual ~DelegatedFrameEvictor();
+
+ void SwappedFrame(bool visible);
+ void DiscardedFrame();
+ void SetVisible(bool visible);
+
+ private:
+ // RendererFrameManagerClient implementation.
+ virtual void EvictCurrentFrame() OVERRIDE;
+
+ DelegatedFrameEvictorClient* client_;
+ bool has_frame_;
+
+ DISALLOW_COPY_AND_ASSIGN(DelegatedFrameEvictor);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
« no previous file with comments | « no previous file | content/browser/renderer_host/delegated_frame_evictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698