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

Side by Side Diff: content/common/mojo/mojo_shell_connection_impl.h

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
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 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Same as BindToCommandLinePlatformChannel(), but receives a |handle| instead 44 // Same as BindToCommandLinePlatformChannel(), but receives a |handle| instead
45 // of looking for one on the command line. 45 // of looking for one on the command line.
46 void BindToMessagePipe(mojo::ScopedMessagePipeHandle handle); 46 void BindToMessagePipe(mojo::ScopedMessagePipeHandle handle);
47 47
48 private: 48 private:
49 MojoShellConnectionImpl(); 49 MojoShellConnectionImpl();
50 ~MojoShellConnectionImpl() override; 50 ~MojoShellConnectionImpl() override;
51 51
52 // mojo::ApplicationDelegate: 52 // mojo::ApplicationDelegate:
53 void Initialize(mojo::ApplicationImpl* application) override; 53 void Initialize(mojo::Shell* shell, const std::string& url,
54 uint32_t id) override;
54 bool AcceptConnection( 55 bool AcceptConnection(
55 mojo::ApplicationConnection* connection) override; 56 mojo::ApplicationConnection* connection) override;
56 57
57 // MojoShellConnection: 58 // MojoShellConnection:
58 mojo::ApplicationImpl* GetApplication() override; 59 mojo::Shell* GetShell() override;
59 void AddListener(Listener* listener) override; 60 void AddListener(Listener* listener) override;
60 void RemoveListener(Listener* listener) override; 61 void RemoveListener(Listener* listener) override;
61 62
62 // Blocks the calling thread until a connection to the spawning shell is 63 // Blocks the calling thread until a connection to the spawning shell is
63 // established, an Application request from it is bound, and the Initialize() 64 // established, an Application request from it is bound, and the Initialize()
64 // method on that application is called. 65 // method on that application is called.
65 void WaitForShell(mojo::ScopedMessagePipeHandle handle); 66 void WaitForShell(mojo::ScopedMessagePipeHandle handle);
66 67
67 bool initialized_; 68 bool initialized_;
68 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_; 69 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_;
69 scoped_ptr<mojo::ApplicationImpl> application_impl_; 70 scoped_ptr<mojo::ApplicationImpl> application_impl_;
70 std::vector<Listener*> listeners_; 71 std::vector<Listener*> listeners_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); 73 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl);
73 }; 74 };
74 75
75 } // namespace content 76 } // namespace content
76 77
77 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ 78 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mus.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