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

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

Issue 2811083002: Move frame eviction into components (Closed)
Patch Set: Rebase Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/delegated_frame_evictor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
7
8 #include "base/macros.h"
9 #include "content/browser/renderer_host/renderer_frame_manager.h"
10 #include "content/common/content_export.h"
11
12 namespace content {
13
14 class CONTENT_EXPORT DelegatedFrameEvictorClient {
15 public:
16 virtual ~DelegatedFrameEvictorClient() {}
17 virtual void EvictDelegatedFrame() = 0;
18 };
19
20 class CONTENT_EXPORT DelegatedFrameEvictor : public RendererFrameManagerClient {
21 public:
22 // |client| must outlive |this|.
23 explicit DelegatedFrameEvictor(DelegatedFrameEvictorClient* client);
24 ~DelegatedFrameEvictor() override;
25
26 void SwappedFrame(bool visible);
27 void DiscardedFrame();
28 void SetVisible(bool visible);
29 void LockFrame();
30 void UnlockFrame();
31 bool HasFrame() { return has_frame_; }
32
33 private:
34 // RendererFrameManagerClient implementation.
35 void EvictCurrentFrame() override;
36
37 DelegatedFrameEvictorClient* client_;
38 bool has_frame_;
39 bool visible_;
40
41 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameEvictor);
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/delegated_frame_evictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698