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

Side by Side Diff: mojo/shell/public/cpp/connection.h

Issue 1705323003: ContentHandler -> ShellClientFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delete
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 | « mojo/shell/public/cpp/BUILD.gn ('k') | mojo/shell/public/cpp/content_handler_factory.h » ('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 MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_
6 #define MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const Closure& handler) = 0; 88 const Closure& handler) = 0;
89 89
90 // Returns the id of the remote application. For Connections created via 90 // Returns the id of the remote application. For Connections created via
91 // Shell::Connect(), this will not be determined until Connect()'s callback is 91 // Shell::Connect(), this will not be determined until Connect()'s callback is
92 // run, and this function will return false. Use AddRemoteIDCallback() to 92 // run, and this function will return false. Use AddRemoteIDCallback() to
93 // schedule a callback to be run when the remote application id is available. 93 // schedule a callback to be run when the remote application id is available.
94 // A value of Shell::kInvalidApplicationID indicates the connection has not 94 // A value of Shell::kInvalidApplicationID indicates the connection has not
95 // been established. 95 // been established.
96 virtual bool GetRemoteApplicationID(uint32_t* remote_id) const = 0; 96 virtual bool GetRemoteApplicationID(uint32_t* remote_id) const = 0;
97 97
98 // Returns the id of the deepest content handler used in connecting to 98 // Returns the id of the deepest shell client factory used in connecting to
99 // the application. See GetRemoteApplicationID() for details about the return 99 // the application. See GetRemoteApplicationID() for details about the return
100 // value. A |content_handler_id| value of Shell::kInvalidApplicationID 100 // value. A |shell_client_factory_id| value of Shell::kInvalidApplicationID
101 // indicates no content handler was used in connecting to the application. 101 // indicates no shell client factory was used in connecting to the
102 virtual bool GetRemoteContentHandlerID( 102 // application.
103 uint32_t* content_handler_id) const = 0; 103 virtual bool GetRemoteShellClientFactoryID(
104 uint32_t* shell_client_factory_id) const = 0;
104 105
105 // See description in GetRemoteApplicationID()/GetRemoteContentHandlerID(). If 106 // See description in GetRemoteApplicationID()/
106 // the ids are available, |callback| is run immediately. 107 // GetRemoteShellClientFactoryID(). If the ids are available, |callback| is
108 // run immediately.
107 virtual void AddRemoteIDCallback(const Closure& callback) = 0; 109 virtual void AddRemoteIDCallback(const Closure& callback) = 0;
108 110
109 // Returns true if the Shell allows |interface_name| to be exposed to the 111 // Returns true if the Shell allows |interface_name| to be exposed to the
110 // remote application. 112 // remote application.
111 virtual bool AllowsInterface(const std::string& interface_name) const = 0; 113 virtual bool AllowsInterface(const std::string& interface_name) const = 0;
112 114
113 // Returns the raw proxy to the remote application's InterfaceProvider 115 // Returns the raw proxy to the remote application's InterfaceProvider
114 // interface. Most applications will just use GetInterface() instead. 116 // interface. Most applications will just use GetInterface() instead.
115 // Caller does not take ownership. 117 // Caller does not take ownership.
116 virtual shell::mojom::InterfaceProvider* GetRemoteInterfaces() = 0; 118 virtual shell::mojom::InterfaceProvider* GetRemoteInterfaces() = 0;
117 119
118 protected: 120 protected:
119 virtual InterfaceRegistry* GetLocalRegistry() = 0; 121 virtual InterfaceRegistry* GetLocalRegistry() = 0;
120 122
121 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; 123 virtual base::WeakPtr<Connection> GetWeakPtr() = 0;
122 }; 124 };
123 125
124 } // namespace mojo 126 } // namespace mojo
125 127
126 #endif // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ 128 #endif // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/BUILD.gn ('k') | mojo/shell/public/cpp/content_handler_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698