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

Side by Side Diff: components/mus/ws/connection_manager_delegate.h

Issue 1764483003: Changes ownership of ClientConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/window_tree_factory.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 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_CONNECTION_MANAGER_DELEGATE_H_ 5 #ifndef COMPONENTS_MUS_WS_CONNECTION_MANAGER_DELEGATE_H_
6 #define COMPONENTS_MUS_WS_CONNECTION_MANAGER_DELEGATE_H_ 6 #define COMPONENTS_MUS_WS_CONNECTION_MANAGER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/scoped_ptr.h"
12 #include "components/mus/common/types.h" 13 #include "components/mus/common/types.h"
13 #include "components/mus/public/interfaces/window_tree.mojom.h" 14 #include "components/mus/public/interfaces/window_tree.mojom.h"
14 #include "mojo/public/cpp/bindings/interface_request.h" 15 #include "mojo/public/cpp/bindings/interface_request.h"
15 16
16 namespace mus { 17 namespace mus {
17 18
18 namespace mojom { 19 namespace mojom {
19 class Display; 20 class Display;
20 class WindowManagerFactory; 21 class WindowManagerFactory;
21 class WindowTree; 22 class WindowTree;
22 } 23 }
23 24
24 namespace ws { 25 namespace ws {
25 26
26 class ClientConnection; 27 class ClientConnection;
27 class ConnectionManager; 28 class ConnectionManager;
28 class ServerWindow; 29 class ServerWindow;
29 class WindowTreeHostImpl; 30 class WindowTreeHostImpl;
31 class WindowTreeImpl;
30 32
31 class ConnectionManagerDelegate { 33 class ConnectionManagerDelegate {
32 public: 34 public:
33 virtual void OnFirstRootConnectionCreated(); 35 virtual void OnFirstRootConnectionCreated();
34 36
35 virtual void OnNoMoreRootConnections() = 0; 37 virtual void OnNoMoreRootConnections() = 0;
36 38
37 // Creates a ClientConnection in response to Embed() calls on the 39 // Creates a ClientConnection in response to Embed() calls on the
38 // ConnectionManager. 40 // ConnectionManager.
39 virtual ClientConnection* CreateClientConnectionForEmbedAtWindow( 41 virtual scoped_ptr<ClientConnection> CreateClientConnectionForEmbedAtWindow(
40 ConnectionManager* connection_manager, 42 ws::ConnectionManager* connection_manager,
43 ws::WindowTreeImpl* tree,
41 mojom::WindowTreeRequest tree_request, 44 mojom::WindowTreeRequest tree_request,
42 ServerWindow* root,
43 uint32_t policy_bitmask,
44 mojom::WindowTreeClientPtr client) = 0; 45 mojom::WindowTreeClientPtr client) = 0;
45 46
46 virtual ClientConnection* CreateClientConnectionForWindowManager(
47 WindowTreeHostImpl* tree_host,
48 ServerWindow* window,
49 const mojom::Display& display,
50 uint32_t user_id,
51 mojom::WindowManagerFactory* factory) = 0;
52
53 // Called if no WindowTreeHosts have been created, but a 47 // Called if no WindowTreeHosts have been created, but a
54 // WindowManagerFactory has been set. 48 // WindowManagerFactory has been set.
55 virtual void CreateDefaultWindowTreeHosts() = 0; 49 virtual void CreateDefaultWindowTreeHosts() = 0;
56 50
57 protected: 51 protected:
58 virtual ~ConnectionManagerDelegate() {} 52 virtual ~ConnectionManagerDelegate() {}
59 }; 53 };
60 54
61 } // namespace ws 55 } // namespace ws
62 } // namespace mus 56 } // namespace mus
63 57
64 #endif // COMPONENTS_MUS_WS_CONNECTION_MANAGER_DELEGATE_H_ 58 #endif // COMPONENTS_MUS_WS_CONNECTION_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/connection_manager.cc ('k') | components/mus/ws/window_tree_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698