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

Side by Side Diff: mojo/shell/public/cpp/lib/connection_impl.h

Issue 1728083002: Extract a Connector interface from Shell that can be cloned & passed to other threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@12uid
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
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 MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_
6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 18 matching lines...) Expand all
29 // the string value "*" all interfaces may be exposed. 29 // the string value "*" all interfaces may be exposed.
30 ConnectionImpl(const std::string& connection_url, 30 ConnectionImpl(const std::string& connection_url,
31 const std::string& remote_url, 31 const std::string& remote_url,
32 uint32_t remote_id, 32 uint32_t remote_id,
33 uint32_t remote_user_id, 33 uint32_t remote_user_id,
34 shell::mojom::InterfaceProviderPtr remote_interfaces, 34 shell::mojom::InterfaceProviderPtr remote_interfaces,
35 shell::mojom::InterfaceProviderRequest local_interfaces, 35 shell::mojom::InterfaceProviderRequest local_interfaces,
36 const std::set<std::string>& allowed_interfaces); 36 const std::set<std::string>& allowed_interfaces);
37 ~ConnectionImpl() override; 37 ~ConnectionImpl() override;
38 38
39 shell::mojom::Shell::ConnectCallback GetConnectCallback(); 39 shell::mojom::Connector::ConnectCallback GetConnectCallback();
40 40
41 private: 41 private:
42 // Connection: 42 // Connection:
43 const std::string& GetConnectionURL() override; 43 const std::string& GetConnectionURL() override;
44 const std::string& GetRemoteApplicationURL() override; 44 const std::string& GetRemoteApplicationURL() override;
45 uint32_t GetRemoteUserID() const override; 45 uint32_t GetRemoteUserID() const override;
46 void SetRemoteInterfaceProviderConnectionErrorHandler( 46 void SetRemoteInterfaceProviderConnectionErrorHandler(
47 const Closure& handler) override; 47 const Closure& handler) override;
48 bool GetRemoteApplicationID(uint32_t* remote_id) const override; 48 bool GetRemoteApplicationID(uint32_t* remote_id) const override;
49 void AddRemoteIDCallback(const Closure& callback) override; 49 void AddRemoteIDCallback(const Closure& callback) override;
(...skipping 20 matching lines...) Expand all
70 70
71 base::WeakPtrFactory<ConnectionImpl> weak_factory_; 71 base::WeakPtrFactory<ConnectionImpl> weak_factory_;
72 72
73 MOJO_DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); 73 MOJO_DISALLOW_COPY_AND_ASSIGN(ConnectionImpl);
74 }; 74 };
75 75
76 } // namespace internal 76 } // namespace internal
77 } // namespace mojo 77 } // namespace mojo
78 78
79 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ 79 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/application_test_base.cc ('k') | mojo/shell/public/cpp/lib/connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698