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

Side by Side Diff: ui/views/mus/surface_binding.h

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 | « ui/views/mus/screen_mus.cc ('k') | ui/views/mus/surface_binding.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 UI_VIEWS_MUS_SURFACE_BINDING_H_ 5 #ifndef UI_VIEWS_MUS_SURFACE_BINDING_H_
6 #define UI_VIEWS_MUS_SURFACE_BINDING_H_ 6 #define UI_VIEWS_MUS_SURFACE_BINDING_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "components/mus/public/interfaces/window_tree.mojom.h" 11 #include "components/mus/public/interfaces/window_tree.mojom.h"
12 #include "ui/views/mus/mus_export.h" 12 #include "ui/views/mus/mus_export.h"
13 13
14 namespace cc { 14 namespace cc {
15 class OutputSurface; 15 class OutputSurface;
16 } 16 }
17 17
18 namespace mojo { 18 namespace mojo {
19 namespace shell {
20 namespace mojom {
21 class Shell; 19 class Shell;
22 } 20 }
23 }
24 }
25 21
26 namespace mus { 22 namespace mus {
27 class Window; 23 class Window;
28 } 24 }
29 25
30 namespace views { 26 namespace views {
31 27
32 // SurfaceBinding is responsible for managing the connections necessary to 28 // SurfaceBinding is responsible for managing the connections necessary to
33 // bind a Window to the surfaces service. 29 // bind a Window to the surfaces service.
34 // Internally SurfaceBinding manages one connection (and related structures) per 30 // Internally SurfaceBinding manages one connection (and related structures) per
35 // WindowTree. That is, all Windows from a particular WindowTree share the same 31 // WindowTree. That is, all Windows from a particular WindowTree share the same
36 // connection. 32 // connection.
37 class VIEWS_MUS_EXPORT SurfaceBinding { 33 class VIEWS_MUS_EXPORT SurfaceBinding {
38 public: 34 public:
39 SurfaceBinding(mojo::shell::mojom::Shell* shell, 35 SurfaceBinding(mojo::Shell* shell,
40 mus::Window* window, 36 mus::Window* window,
41 mus::mojom::SurfaceType surface_type); 37 mus::mojom::SurfaceType surface_type);
42 ~SurfaceBinding(); 38 ~SurfaceBinding();
43 39
44 // Creates an OutputSurface that renders to the Window supplied to the 40 // Creates an OutputSurface that renders to the Window supplied to the
45 // constructor. 41 // constructor.
46 scoped_ptr<cc::OutputSurface> CreateOutputSurface(); 42 scoped_ptr<cc::OutputSurface> CreateOutputSurface();
47 43
48 private: 44 private:
49 class PerConnectionState; 45 class PerConnectionState;
50 46
51 mus::Window* window_; 47 mus::Window* window_;
52 const mus::mojom::SurfaceType surface_type_; 48 const mus::mojom::SurfaceType surface_type_;
53 scoped_refptr<PerConnectionState> state_; 49 scoped_refptr<PerConnectionState> state_;
54 50
55 DISALLOW_COPY_AND_ASSIGN(SurfaceBinding); 51 DISALLOW_COPY_AND_ASSIGN(SurfaceBinding);
56 }; 52 };
57 53
58 } // namespace views 54 } // namespace views
59 55
60 #endif // UI_VIEWS_MUS_SURFACE_BINDING_H_ 56 #endif // UI_VIEWS_MUS_SURFACE_BINDING_H_
OLDNEW
« no previous file with comments | « ui/views/mus/screen_mus.cc ('k') | ui/views/mus/surface_binding.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698