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

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

Issue 25942002: Make software compositing work on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows resolve 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/frame_memory_manager.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_FRAME_MEMORY_MANAGER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_FRAME_MEMORY_MANAGER_H_
7
8 #include <list>
9 #include <set>
10
11 #include "base/basictypes.h"
12
13 template <typename T> struct DefaultSingletonTraits;
14
15 namespace content {
16
17 class FrameContainer {
18 public:
19 virtual void ReleaseCurrentFrame() = 0;
20 };
21
22 class FrameMemoryManager {
23 public:
24 static FrameMemoryManager* GetInstance();
25
26 void AddFrame(FrameContainer*, bool visible);
27 void RemoveFrame(FrameContainer*);
28 void SetFrameVisibility(FrameContainer*, bool visible);
29
30 private:
31 FrameMemoryManager();
32 ~FrameMemoryManager();
33 void CullHiddenFrames();
34 friend struct DefaultSingletonTraits<FrameMemoryManager>;
35
36 std::set<FrameContainer*> visible_frames_;
37 std::list<FrameContainer*> hidden_frames_;
38
39 DISALLOW_COPY_AND_ASSIGN(FrameMemoryManager);
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_BROWSER_RENDERER_HOST_FRAME_MEMORY_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/frame_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698