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 MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "mojo/public/cpp/shell/service.h" | 12 #include "mojo/public/cpp/shell/service.h" |
13 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 13 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
14 #include "mojo/services/view_manager/ids.h" | 14 #include "mojo/services/view_manager/ids.h" |
15 #include "mojo/services/view_manager/node_delegate.h" | 15 #include "mojo/services/view_manager/node_delegate.h" |
16 #include "mojo/services/view_manager/view_manager_export.h" | 16 #include "mojo/services/view_manager/view_manager_export.h" |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace services { | 19 namespace services { |
20 namespace view_manager { | 20 namespace view_manager { |
21 | 21 |
22 class Node; | 22 class Node; |
23 class RootNodeManager; | 23 class RootNodeManager; |
24 class View; | 24 class View; |
25 | 25 |
| 26 #if defined(OS_WIN) |
| 27 // Equivalent of NON_EXPORTED_BASE which does not work with the template snafu |
| 28 // below. |
| 29 #pragma warning(push) |
| 30 #pragma warning(disable : 4275) |
| 31 #endif |
| 32 |
26 // Manages a connection from the client. | 33 // Manages a connection from the client. |
27 class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection | 34 class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection |
28 : public ServiceConnection<NON_EXPORTED_BASE(IViewManager), | 35 : public ServiceConnection<IViewManager, ViewManagerConnection, |
29 ViewManagerConnection, | |
30 RootNodeManager>, | 36 RootNodeManager>, |
31 public NodeDelegate { | 37 public NodeDelegate { |
32 public: | 38 public: |
33 ViewManagerConnection(); | 39 ViewManagerConnection(); |
34 virtual ~ViewManagerConnection(); | 40 virtual ~ViewManagerConnection(); |
35 | 41 |
36 TransportConnectionId id() const { return id_; } | 42 TransportConnectionId id() const { return id_; } |
37 | 43 |
38 // Invoked when connection is established. | 44 // Invoked when connection is established. |
39 void Initialize(); | 45 void Initialize(); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // Initialize(). | 127 // Initialize(). |
122 TransportConnectionId id_; | 128 TransportConnectionId id_; |
123 | 129 |
124 NodeMap node_map_; | 130 NodeMap node_map_; |
125 | 131 |
126 ViewMap view_map_; | 132 ViewMap view_map_; |
127 | 133 |
128 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnection); | 134 DISALLOW_COPY_AND_ASSIGN(ViewManagerConnection); |
129 }; | 135 }; |
130 | 136 |
| 137 #if defined(OS_WIN) |
| 138 #pragma warning(pop) |
| 139 #endif |
| 140 |
131 } // namespace view_manager | 141 } // namespace view_manager |
132 } // namespace services | 142 } // namespace services |
133 } // namespace mojo | 143 } // namespace mojo |
134 | 144 |
135 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ | 145 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_CONNECTION_H_ |
OLD | NEW |