Chromium Code Reviews| 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..fd65d19a19605bb70079f70d823658aa04b02648 |
| --- /dev/null |
| +++ b/content/browser/renderer_host/delegated_frame_evictor.h |
| @@ -0,0 +1,40 @@ |
| +// 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" |
| + |
| +namespace content { |
| + |
| +class DelegatedFrameEvictorClient { |
| + public: |
| + virtual ~DelegatedFrameEvictorClient() {} |
| + virtual void EvictDelegatedFrame() = 0; |
| +}; |
| + |
| +class 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 |
|
danakj
2013/10/28 22:29:41
nit: .
piman
2013/10/28 22:40:47
Done.
|
| + 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_ |