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

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

Issue 1783303002: Revert of Capability Classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@45class
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 | « no previous file | mojo/shell/public/cpp/lib/connection_impl.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 // Binds |ptr| to an implemention of Interface in the remote application. 77 // Binds |ptr| to an implemention of Interface in the remote application.
78 // |ptr| can immediately be used to start sending requests to the remote 78 // |ptr| can immediately be used to start sending requests to the remote
79 // interface. 79 // interface.
80 template <typename Interface> 80 template <typename Interface>
81 void GetInterface(InterfacePtr<Interface>* ptr) { 81 void GetInterface(InterfacePtr<Interface>* ptr) {
82 mojo::GetInterface(GetRemoteInterfaces(), ptr); 82 mojo::GetInterface(GetRemoteInterfaces(), ptr);
83 } 83 }
84 84
85 // Returns true if the remote application has the specified capability class
86 // specified in its manifest. Only valid for inbound connections. Will return
87 // false for outbound connections.
88 virtual bool HasCapabilityClass(const std::string& class_name) const = 0;
89
90 // Returns the name that was used by the source application to establish a 85 // Returns the name that was used by the source application to establish a
91 // connection to the destination application. 86 // connection to the destination application.
92 // 87 //
93 // When Connection is representing and outgoing connection, this will be the 88 // When Connection is representing and outgoing connection, this will be the
94 // same as the value returned by GetRemoveApplicationName(). 89 // same as the value returned by GetRemoveApplicationName().
95 virtual const std::string& GetConnectionName() = 0; 90 virtual const std::string& GetConnectionName() = 0;
96 91
97 // Returns the remote identity. While the connection is in the pending state, 92 // Returns the remote identity. While the connection is in the pending state,
98 // the user_id() field will be the value passed via Connect(). After the 93 // the user_id() field will be the value passed via Connect(). After the
99 // connection is completed, it will change to the value assigned by the shell. 94 // connection is completed, it will change to the value assigned by the shell.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 133
139 protected: 134 protected:
140 virtual InterfaceRegistry* GetLocalRegistry() = 0; 135 virtual InterfaceRegistry* GetLocalRegistry() = 0;
141 136
142 virtual base::WeakPtr<Connection> GetWeakPtr() = 0; 137 virtual base::WeakPtr<Connection> GetWeakPtr() = 0;
143 }; 138 };
144 139
145 } // namespace mojo 140 } // namespace mojo
146 141
147 #endif // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ 142 #endif // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | mojo/shell/public/cpp/lib/connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698