OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WS_CLIENT_CONNECTION_H_ | 5 #ifndef COMPONENTS_MUS_WS_CLIENT_CONNECTION_H_ |
6 #define COMPONENTS_MUS_WS_CLIENT_CONNECTION_H_ | 6 #define COMPONENTS_MUS_WS_CLIENT_CONNECTION_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/mus/public/interfaces/window_tree.mojom.h" | 10 #include "components/mus/public/interfaces/window_tree.mojom.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 ClientConnection(scoped_ptr<WindowTreeImpl> service, | 23 ClientConnection(scoped_ptr<WindowTreeImpl> service, |
24 mojom::WindowTreeClient* client); | 24 mojom::WindowTreeClient* client); |
25 virtual ~ClientConnection(); | 25 virtual ~ClientConnection(); |
26 | 26 |
27 WindowTreeImpl* service() { return service_.get(); } | 27 WindowTreeImpl* service() { return service_.get(); } |
28 const WindowTreeImpl* service() const { return service_.get(); } | 28 const WindowTreeImpl* service() const { return service_.get(); } |
29 | 29 |
30 mojom::WindowTreeClient* client() { return client_; } | 30 mojom::WindowTreeClient* client() { return client_; } |
31 | 31 |
32 virtual mojom::WindowManagerInternal* GetWindowManagerInternal() = 0; | 32 virtual mojom::WindowManager* GetWindowManager() = 0; |
33 | 33 |
34 virtual void SetIncomingMethodCallProcessingPaused(bool paused) = 0; | 34 virtual void SetIncomingMethodCallProcessingPaused(bool paused) = 0; |
35 | 35 |
36 private: | 36 private: |
37 scoped_ptr<WindowTreeImpl> service_; | 37 scoped_ptr<WindowTreeImpl> service_; |
38 mojom::WindowTreeClient* client_; | 38 mojom::WindowTreeClient* client_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(ClientConnection); | 40 DISALLOW_COPY_AND_ASSIGN(ClientConnection); |
41 }; | 41 }; |
42 | 42 |
43 // Bindings implementation of ClientConnection. | 43 // Bindings implementation of ClientConnection. |
44 class DefaultClientConnection : public ClientConnection { | 44 class DefaultClientConnection : public ClientConnection { |
45 public: | 45 public: |
46 DefaultClientConnection( | 46 DefaultClientConnection( |
47 scoped_ptr<WindowTreeImpl> service_impl, | 47 scoped_ptr<WindowTreeImpl> service_impl, |
48 ConnectionManager* connection_manager, | 48 ConnectionManager* connection_manager, |
49 mojo::InterfaceRequest<mojom::WindowTree> service_request, | 49 mojo::InterfaceRequest<mojom::WindowTree> service_request, |
50 mojom::WindowTreeClientPtr client); | 50 mojom::WindowTreeClientPtr client); |
51 ~DefaultClientConnection() override; | 51 ~DefaultClientConnection() override; |
52 | 52 |
53 // ClientConnection: | 53 // ClientConnection: |
54 mojom::WindowManagerInternal* GetWindowManagerInternal() override; | 54 mojom::WindowManager* GetWindowManager() override; |
55 void SetIncomingMethodCallProcessingPaused(bool paused) override; | 55 void SetIncomingMethodCallProcessingPaused(bool paused) override; |
56 | 56 |
57 private: | 57 private: |
58 ConnectionManager* connection_manager_; | 58 ConnectionManager* connection_manager_; |
59 mojo::Binding<mojom::WindowTree> binding_; | 59 mojo::Binding<mojom::WindowTree> binding_; |
60 mojom::WindowTreeClientPtr client_; | 60 mojom::WindowTreeClientPtr client_; |
61 mojom::WindowManagerInternalAssociatedPtr window_manager_internal_; | 61 mojom::WindowManagerAssociatedPtr window_manager_internal_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(DefaultClientConnection); | 63 DISALLOW_COPY_AND_ASSIGN(DefaultClientConnection); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace ws | 66 } // namespace ws |
67 } // namespace mus | 67 } // namespace mus |
68 | 68 |
69 #endif // COMPONENTS_MUS_WS_CLIENT_CONNECTION_H_ | 69 #endif // COMPONENTS_MUS_WS_CLIENT_CONNECTION_H_ |
OLD | NEW |