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

Side by Side Diff: services/ui/surfaces/surfaces_state.h

Issue 2369793002: WIP: Propagate SurfaceID up window tree hierarchy
Patch Set: Fix input events: EventDispatcher ignores container windows Created 4 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
OLDNEW
(Empty)
1 // Copyright 2015 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 SERVICES_UI_SURFACES_SURFACES_STATE_H_
6 #define SERVICES_UI_SURFACES_SURFACES_STATE_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "cc/surfaces/surface_manager.h"
13
14 namespace cc {
15 class SurfaceHittest;
16 class SurfaceManager;
17 } // namespace cc
18
19 namespace ui {
20
21 // The SurfacesState object is an object global to the Window Manager app that
22 // holds the SurfaceManager and allocates new Surfaces namespaces.
23 // This object lives on the main thread of the Window Manager.
24 // TODO(rjkroege, fsamuel): This object will need to change to support multiple
25 // displays.
26 class SurfacesState : public base::RefCounted<SurfacesState> {
27 public:
28 SurfacesState();
29
30 uint32_t next_client_id() { return next_client_id_++; }
31
32 cc::SurfaceManager* manager() { return &manager_; }
33
34 private:
35 friend class base::RefCounted<SurfacesState>;
36 ~SurfacesState();
37
38 // A Surface ID is an unsigned 64-bit int where the high 32-bits are generated
39 // by the Surfaces service, and the low 32-bits are generated by the process
40 // that requested the Surface.
41 uint32_t next_client_id_;
42 cc::SurfaceManager manager_;
43
44 DISALLOW_COPY_AND_ASSIGN(SurfacesState);
45 };
46
47 } // namespace ui
48
49 #endif // SERVICES_UI_SURFACES_SURFACES_STATE_H_
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor_client.h ('k') | services/ui/surfaces/surfaces_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698