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

Side by Side Diff: content/common/mojo/mojo_shell_connection_impl.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, 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ 5 #ifndef CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_
6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ 6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Same as BindToCommandLinePlatformChannel(), but receives a |handle| instead 45 // Same as BindToCommandLinePlatformChannel(), but receives a |handle| instead
46 // of looking for one on the command line. 46 // of looking for one on the command line.
47 void BindToMessagePipe(mojo::ScopedMessagePipeHandle handle); 47 void BindToMessagePipe(mojo::ScopedMessagePipeHandle handle);
48 48
49 private: 49 private:
50 MojoShellConnectionImpl(); 50 MojoShellConnectionImpl();
51 ~MojoShellConnectionImpl() override; 51 ~MojoShellConnectionImpl() override;
52 52
53 // mojo::ShellClient: 53 // mojo::ShellClient:
54 void Initialize(mojo::Shell* shell, const std::string& url, 54 void Initialize(mojo::Shell* shell, const std::string& url,
55 uint32_t id) override; 55 uint32_t id, uint32_t user_id) override;
56 bool AcceptConnection(mojo::Connection* connection) override; 56 bool AcceptConnection(mojo::Connection* connection) override;
57 57
58 // MojoShellConnection: 58 // MojoShellConnection:
59 mojo::Shell* GetShell() override; 59 mojo::Shell* GetShell() override;
60 bool UsingExternalShell() const override; 60 bool UsingExternalShell() const override;
61 void AddListener(Listener* listener) override; 61 void AddListener(Listener* listener) override;
62 void RemoveListener(Listener* listener) override; 62 void RemoveListener(Listener* listener) override;
63 63
64 // Blocks the calling thread until a connection to the spawning shell is 64 // Blocks the calling thread until a connection to the spawning shell is
65 // established, an Application request from it is bound, and the Initialize() 65 // established, an Application request from it is bound, and the Initialize()
66 // method on that application is called. 66 // method on that application is called.
67 void WaitForShell(mojo::ScopedMessagePipeHandle handle); 67 void WaitForShell(mojo::ScopedMessagePipeHandle handle);
68 68
69 bool initialized_; 69 bool initialized_;
70 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_; 70 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_;
71 scoped_ptr<mojo::ShellConnection> shell_connection_; 71 scoped_ptr<mojo::ShellConnection> shell_connection_;
72 std::vector<Listener*> listeners_; 72 std::vector<Listener*> listeners_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); 74 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl);
75 }; 75 };
76 76
77 } // namespace content 77 } // namespace content
78 78
79 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ 79 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/mojo/mojo_shell_context.cc ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698