OLD | NEW |
---|---|
(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 #ifndef CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_ | |
7 | |
8 #include "content/browser/renderer_host/renderer_frame_manager.h" | |
9 | |
10 namespace content { | |
11 | |
12 class DelegatedFrameEvictorClient { | |
13 public: | |
14 virtual ~DelegatedFrameEvictorClient() {} | |
15 virtual void EvictDelegatedFrame() = 0; | |
16 }; | |
17 | |
18 class DelegatedFrameEvictor : public RendererFrameManagerClient { | |
19 public: | |
20 // |client| must outlive |this|. | |
21 explicit DelegatedFrameEvictor(DelegatedFrameEvictorClient* client); | |
22 virtual ~DelegatedFrameEvictor(); | |
23 | |
24 void SwappedFrame(bool visible); | |
25 void DiscardedFrame(); | |
26 void SetVisible(bool visible); | |
27 | |
28 private: | |
29 // RendererFrameManagerClient implementation | |
danakj
2013/10/28 22:29:41
nit: .
piman
2013/10/28 22:40:47
Done.
| |
30 virtual void EvictCurrentFrame() OVERRIDE; | |
31 | |
32 DelegatedFrameEvictorClient* client_; | |
33 bool has_frame_; | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(DelegatedFrameEvictor); | |
36 }; | |
37 | |
38 } // namespace content | |
39 | |
40 #endif // CONTENT_BROWSER_RENDERER_HOST_DELEGATED_FRAME_EVICTOR_H_ | |
OLD | NEW |