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

Side by Side Diff: components/mus/surfaces/surfaces_state.h

Issue 1987133002: Delete mus surfaces hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 4 years, 7 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
« no previous file with comments | « no previous file | components/mus/surfaces/surfaces_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_MUS_SURFACES_SURFACES_STATE_H_ 5 #ifndef COMPONENTS_MUS_SURFACES_SURFACES_STATE_H_
6 #define COMPONENTS_MUS_SURFACES_SURFACES_STATE_H_ 6 #define COMPONENTS_MUS_SURFACES_SURFACES_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "cc/surfaces/surface_hittest.h"
13 #include "cc/surfaces/surface_manager.h" 12 #include "cc/surfaces/surface_manager.h"
14 13
15 namespace cc { 14 namespace cc {
16 class SurfaceHittest; 15 class SurfaceHittest;
17 class SurfaceManager; 16 class SurfaceManager;
18 } // namespace cc 17 } // namespace cc
19 18
20 namespace mus { 19 namespace mus {
21 20
22 // The SurfacesState object is an object global to the Window Manager app that 21 // The SurfacesState object is an object global to the Window Manager app that
23 // holds the SurfaceManager and allocates new Surfaces namespaces. 22 // holds the SurfaceManager and allocates new Surfaces namespaces.
24 // This object lives on the main thread of the Window Manager. 23 // This object lives on the main thread of the Window Manager.
25 // TODO(rjkroege, fsamuel): This object will need to change to support multiple 24 // TODO(rjkroege, fsamuel): This object will need to change to support multiple
26 // displays. 25 // displays.
27 class SurfacesState : public base::RefCounted<SurfacesState> { 26 class SurfacesState : public base::RefCounted<SurfacesState> {
28 public: 27 public:
29 SurfacesState(); 28 SurfacesState();
30 29
31 uint32_t next_id_namespace() { return next_id_namespace_++; } 30 uint32_t next_id_namespace() { return next_id_namespace_++; }
32 31
33 cc::SurfaceManager* manager() { return &manager_; } 32 cc::SurfaceManager* manager() { return &manager_; }
34 33
35 cc::SurfaceHittest* hit_tester() { return &hit_tester_; }
36
37 private: 34 private:
38 friend class base::RefCounted<SurfacesState>; 35 friend class base::RefCounted<SurfacesState>;
39 ~SurfacesState(); 36 ~SurfacesState();
40 37
41 // A Surface ID is an unsigned 64-bit int where the high 32-bits are generated 38 // A Surface ID is an unsigned 64-bit int where the high 32-bits are generated
42 // by the Surfaces service, and the low 32-bits are generated by the process 39 // by the Surfaces service, and the low 32-bits are generated by the process
43 // that requested the Surface. 40 // that requested the Surface.
44 uint32_t next_id_namespace_; 41 uint32_t next_id_namespace_;
45 cc::SurfaceManager manager_; 42 cc::SurfaceManager manager_;
46 cc::SurfaceHittest hit_tester_;
47 43
48 DISALLOW_COPY_AND_ASSIGN(SurfacesState); 44 DISALLOW_COPY_AND_ASSIGN(SurfacesState);
49 }; 45 };
50 46
51 } // namespace mus 47 } // namespace mus
52 48
53 #endif // COMPONENTS_MUS_SURFACES_SURFACES_STATE_H_ 49 #endif // COMPONENTS_MUS_SURFACES_SURFACES_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/surfaces/surfaces_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698