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

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

Issue 1920033005: services/shell: Fix running the connection-lost callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 friend class MojoShellConnection; 46 friend class MojoShellConnection;
47 47
48 explicit MojoShellConnectionImpl(bool external); 48 explicit MojoShellConnectionImpl(bool external);
49 ~MojoShellConnectionImpl() override; 49 ~MojoShellConnectionImpl() override;
50 50
51 // shell::ShellClient: 51 // shell::ShellClient:
52 void Initialize(shell::Connector* connector, 52 void Initialize(shell::Connector* connector,
53 const shell::Identity& identity, 53 const shell::Identity& identity,
54 uint32_t id) override; 54 uint32_t id) override;
55 bool AcceptConnection(shell::Connection* connection) override; 55 bool AcceptConnection(shell::Connection* connection) override;
56 bool ShellConnectionLost() override;
56 57
57 // MojoShellConnection: 58 // MojoShellConnection:
58 shell::Connector* GetConnector() override; 59 shell::Connector* GetConnector() override;
59 const shell::Identity& GetIdentity() const override; 60 const shell::Identity& GetIdentity() const override;
60 bool UsingExternalShell() const override; 61 bool UsingExternalShell() const override;
61 void SetConnectionLostClosure(const base::Closure& closure) override; 62 void SetConnectionLostClosure(const base::Closure& closure) override;
62 void AddListener(std::unique_ptr<Listener> listener) override; 63 void AddListener(std::unique_ptr<Listener> listener) override;
63 std::unique_ptr<Listener> RemoveListener(Listener* listener) override; 64 std::unique_ptr<Listener> RemoveListener(Listener* listener) override;
64 65
65 const bool external_; 66 const bool external_;
67 bool connection_lost_;
66 std::unique_ptr<shell::ShellConnection> shell_connection_; 68 std::unique_ptr<shell::ShellConnection> shell_connection_;
67 std::vector<Listener*> listeners_; 69 std::vector<Listener*> listeners_;
68 70
69 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); 71 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl);
70 }; 72 };
71 73
72 } // namespace content 74 } // namespace content
73 75
74 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ 76 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | content/common/mojo/mojo_shell_connection_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698