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

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

Issue 1719193003: Add a user id parameter to connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/lib/shell_connection.cc ('k') | mojo/shell/public/cpp/shell_client.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SHELL_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_H_
6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_H_
7 7
8 #include "mojo/shell/public/cpp/connection.h" 8 #include "mojo/shell/public/cpp/connection.h"
9 #include "mojo/shell/public/interfaces/shell.mojom.h" 9 #include "mojo/shell/public/interfaces/shell.mojom.h"
10 #include "mojo/shell/public/interfaces/shell_client.mojom.h" 10 #include "mojo/shell/public/interfaces/shell_client.mojom.h"
(...skipping 29 matching lines...) Expand all
40 explicit ConnectParams(const std::string& url); 40 explicit ConnectParams(const std::string& url);
41 ~ConnectParams(); 41 ~ConnectParams();
42 42
43 const GURL& url() { return url_; } 43 const GURL& url() { return url_; }
44 shell::mojom::CapabilityFilterPtr TakeFilter() { 44 shell::mojom::CapabilityFilterPtr TakeFilter() {
45 return std::move(filter_); 45 return std::move(filter_);
46 } 46 }
47 void set_filter(shell::mojom::CapabilityFilterPtr filter) { 47 void set_filter(shell::mojom::CapabilityFilterPtr filter) {
48 filter_ = std::move(filter); 48 filter_ = std::move(filter);
49 } 49 }
50 void set_user_id(uint32_t user_id) { user_id_ = user_id; }
51 uint32_t user_id() const { return user_id_; }
50 52
51 private: 53 private:
52 GURL url_; 54 GURL url_;
53 shell::mojom::CapabilityFilterPtr filter_; 55 shell::mojom::CapabilityFilterPtr filter_;
56 uint32_t user_id_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(ConnectParams); 58 DISALLOW_COPY_AND_ASSIGN(ConnectParams);
56 }; 59 };
57 60
58 // Requests a new connection to an application. Returns a pointer to the 61 // Requests a new connection to an application. Returns a pointer to the
59 // connection if the connection is permitted by this application's delegate, 62 // connection if the connection is permitted by this application's delegate,
60 // or nullptr otherwise. Caller takes ownership. 63 // or nullptr otherwise. Caller takes ownership.
61 virtual scoped_ptr<Connection> Connect(const std::string& url) = 0; 64 virtual scoped_ptr<Connection> Connect(const std::string& url) = 0;
62 virtual scoped_ptr<Connection> Connect(ConnectParams* params) = 0; 65 virtual scoped_ptr<Connection> Connect(ConnectParams* params) = 0;
63 66
(...skipping 19 matching lines...) Expand all
83 86
84 // Create an object that can be used to refcount the lifetime of the 87 // Create an object that can be used to refcount the lifetime of the
85 // application. The returned object may be cloned, and when the refcount falls 88 // application. The returned object may be cloned, and when the refcount falls
86 // to zero Quit() is called. 89 // to zero Quit() is called.
87 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0; 90 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0;
88 }; 91 };
89 92
90 } // namespace mojo 93 } // namespace mojo
91 94
92 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_ 95 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_connection.cc ('k') | mojo/shell/public/cpp/shell_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698