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

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

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_connection.cc ('k') | mojo/shell/public/cpp/shell_connection.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 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_
6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 25 matching lines...) Expand all
36 uint32_t id); 36 uint32_t id);
37 37
38 // Called when a connection to this client is brokered by the shell. Override 38 // Called when a connection to this client is brokered by the shell. Override
39 // to expose services to the remote application. Return true if the connection 39 // to expose services to the remote application. Return true if the connection
40 // should succeed. Return false if the connection should be rejected and the 40 // should succeed. Return false if the connection should be rejected and the
41 // underlying pipe closed. The default implementation returns false. 41 // underlying pipe closed. The default implementation returns false.
42 virtual bool AcceptConnection(Connection* connection); 42 virtual bool AcceptConnection(Connection* connection);
43 43
44 // Called when ShellConnection's ShellClient binding (i.e. the pipe the 44 // Called when ShellConnection's ShellClient binding (i.e. the pipe the
45 // Mojo Shell has to talk to us over) is closed. A shell client may use this 45 // Mojo Shell has to talk to us over) is closed. A shell client may use this
46 // as a signal to terminate. Return true from this method to tell the 46 // as a signal to terminate.
47 // ShellConnection to run its connection lost closure if it has one, false to 47 virtual void ShellConnectionLost();
48 // prevent it from being run. The default implementation returns true.
49 // When used in conjunction with ApplicationRunner, returning true here quits
50 // the message loop created by ApplicationRunner, which results in the app
51 // quitting.
52 virtual bool ShellConnectionLost();
53 48
54 private: 49 private:
55 DISALLOW_COPY_AND_ASSIGN(ShellClient); 50 DISALLOW_COPY_AND_ASSIGN(ShellClient);
56 }; 51 };
57 52
58 } // namespace mojo 53 } // namespace mojo
59 54
60 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_ 55 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_CLIENT_H_
OLDNEW
« no previous file with comments | « mojo/shell/public/cpp/lib/shell_connection.cc ('k') | mojo/shell/public/cpp/shell_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698