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

Side by Side Diff: mojo/shell/public/cpp/lib/shell_connection.cc

Issue 1821913002: Revert of Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used (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
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_client.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 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "mojo/public/cpp/bindings/interface_ptr.h" 8 #include "mojo/public/cpp/bindings/interface_ptr.h"
9 #include "mojo/public/cpp/bindings/interface_request.h" 9 #include "mojo/public/cpp/bindings/interface_request.h"
10 #include "mojo/shell/public/cpp/capabilities.h" 10 #include "mojo/shell/public/cpp/capabilities.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 incoming_connections_.push_back(std::move(registry)); 79 incoming_connections_.push_back(std::move(registry));
80 } 80 }
81 81
82 //////////////////////////////////////////////////////////////////////////////// 82 ////////////////////////////////////////////////////////////////////////////////
83 // ShellConnection, private: 83 // ShellConnection, private:
84 84
85 void ShellConnection::OnConnectionError() { 85 void ShellConnection::OnConnectionError() {
86 // Note that the ShellClient doesn't technically have to quit now, it may live 86 // Note that the ShellClient doesn't technically have to quit now, it may live
87 // on to service existing connections. All existing Connectors however are 87 // on to service existing connections. All existing Connectors however are
88 // invalid. 88 // invalid.
89 if (client_->ShellConnectionLost() && !connection_lost_closure_.is_null()) 89 client_->ShellConnectionLost();
90 connection_lost_closure_.Run();
91 // We don't reset the connector as clients may have taken a raw pointer to it. 90 // We don't reset the connector as clients may have taken a raw pointer to it.
92 // Connect() will return nullptr if they try to connect to anything. 91 // Connect() will return nullptr if they try to connect to anything.
93 } 92 }
94 93
95 } // namespace mojo 94 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_client.cc ('k') | mojo/shell/public/cpp/shell_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698