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

Unified Diff: cc/surfaces/surface_manager.h

Issue 2537943002: Getting rid of CompositorFrameMetadata::satisfies_sequences (Closed)
Patch Set: x Created 4 years 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 | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_manager.h
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index 5dd3bb2bfb162bc1b61589d27319754afcf10b38..81ca648fc15b73516bb3c76ceab0b3eb85189b7e 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -15,6 +15,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/threading/thread_checker.h"
#include "cc/surfaces/frame_sink_id.h"
@@ -117,6 +118,8 @@ class CC_SURFACES_EXPORT SurfaceManager
size_t GetSurfaceReferenceCount(const SurfaceId& surface_id) const override;
size_t GetReferencedSurfaceCount(const SurfaceId& surface_id) const override;
+ base::WeakPtr<SurfaceManager> GetWeakPtr();
+
private:
void RecursivelyAttachBeginFrameSource(const FrameSinkId& frame_sink_id,
BeginFrameSource* source);
@@ -196,6 +199,8 @@ class CC_SURFACES_EXPORT SurfaceManager
// with this id, it's for bookkeeping purposes only.
const SurfaceId root_surface_id_;
+ base::WeakPtrFactory<SurfaceManager> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(SurfaceManager);
};
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698