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

Unified Diff: components/view_manager/surfaces/surfaces_state.h

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove context_provider.mojom Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/view_manager/surfaces/surfaces_state.h
diff --git a/components/view_manager/surfaces/surfaces_state.h b/components/view_manager/surfaces/surfaces_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..706d531dbbc19ac650b75103d4e94c696c8cfed3
--- /dev/null
+++ b/components/view_manager/surfaces/surfaces_state.h
@@ -0,0 +1,40 @@
+// Copyright 2015 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 COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_STATE_H_
+#define COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_STATE_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "cc/surfaces/surface_manager.h"
+#include "components/view_manager/surfaces/surfaces_scheduler.h"
+
+namespace cc {
+class SurfaceManager;
+} // namespace cc
+
+namespace surfaces {
+
+class SurfacesState : public base::RefCounted<SurfacesState> {
rjkroege 2015/08/06 00:16:22 you need to document what this class does.
rjkroege 2015/08/06 00:16:22 these are shared between SurfacesImpl?
Fady Samuel 2015/08/06 16:48:23 Yes.
Fady Samuel 2015/08/06 16:48:23 Done.
+ public:
+ SurfacesState();
+
+ uint32_t next_id_namespace() { return next_id_namespace_++; }
+
+ cc::SurfaceManager* manager() { return &manager_; }
+
+ SurfacesScheduler* scheduler() { return &scheduler_; }
+
+ private:
+ friend class base::RefCounted<SurfacesState>;
+ ~SurfacesState();
+
+ uint32_t next_id_namespace_;
rjkroege 2015/08/06 00:16:22 and what this is for
Fady Samuel 2015/08/06 16:48:24 Done.
+ cc::SurfaceManager manager_;
+ SurfacesScheduler scheduler_;
+};
+
+} // namespace surfaces
+
+#endif // COMPONENTS_VIEW_MANAGER_SURFACES_SURFACES_STATE_H_

Powered by Google App Engine
This is Rietveld 408576698