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

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

Issue 1736663003: Eliminate Quit() from Shell, and roll Shell & Connector together. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@14cf
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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_H_ 5 #ifndef MOJO_SHELL_PUBLIC_CPP_SHELL_H_
6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_H_ 6 #define MOJO_SHELL_PUBLIC_CPP_SHELL_H_
7 7
8 #include "mojo/shell/public/cpp/connection.h" 8 #include "mojo/shell/public/cpp/connection.h"
9 #include "mojo/shell/public/cpp/connector.h" 9 #include "mojo/shell/public/cpp/connector.h"
10 #include "mojo/shell/public/interfaces/shell.mojom.h" 10 #include "mojo/shell/public/interfaces/shell.mojom.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void ConnectToInterface(const std::string& url, 50 void ConnectToInterface(const std::string& url,
51 InterfacePtr<Interface>* ptr) { 51 InterfacePtr<Interface>* ptr) {
52 Connector::ConnectParams params(url); 52 Connector::ConnectParams params(url);
53 return ConnectToInterface(&params, ptr); 53 return ConnectToInterface(&params, ptr);
54 } 54 }
55 55
56 // Returns a clone of the ShellConnection's Connector that can be passed to 56 // Returns a clone of the ShellConnection's Connector that can be passed to
57 // other threads. 57 // other threads.
58 virtual scoped_ptr<Connector> CloneConnector() const = 0; 58 virtual scoped_ptr<Connector> CloneConnector() const = 0;
59 59
60 // Initiate shutdown of this application. This may involve a round trip to the 60 // Quits the message loop run by the ApplicationRunner, which causes this
61 // Shell to ensure there are no inbound service requests. 61 // object to be destructed and the application to quit.
62 virtual void Quit() = 0; 62 virtual void Quit() = 0;
63 63
64 // Create an object that can be used to refcount the lifetime of the 64 // Create an object that can be used to refcount the lifetime of the
65 // application. The returned object may be cloned, and when the refcount falls 65 // application. The returned object may be cloned, and when the refcount falls
66 // to zero Quit() is called. 66 // to zero Quit() is called.
67 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0; 67 virtual scoped_ptr<AppRefCount> CreateAppRefCount() = 0;
68 }; 68 };
69 69
70 } // namespace mojo 70 } // namespace mojo
71 71
72 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_ 72 #endif // MOJO_SHELL_PUBLIC_CPP_SHELL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698