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

Side by Side Diff: mojo/application/public/cpp/application_delegate.h

Issue 1565343003: Move mojo/application/public -> mojo/shell/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fetcher
Patch Set: . Created 4 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_DELEGATE_H_
6 #define MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_DELEGATE_H_
7
8 #include <string>
9
10 #include "mojo/public/cpp/system/macros.h"
11
12 namespace mojo {
13
14 class ApplicationConnection;
15 class ApplicationImpl;
16
17 // An abstract class that the application may subclass to control various
18 // behaviors of ApplicationImpl.
19 class ApplicationDelegate {
20 public:
21 ApplicationDelegate();
22 virtual ~ApplicationDelegate();
23
24 // Called exactly once before any other method.
25 virtual void Initialize(ApplicationImpl* app);
26
27 // Override this method to configure what services a connection supports when
28 // being connected to from an app.
29 // Return false to reject the connection entirely.
30 virtual bool ConfigureIncomingConnection(ApplicationConnection* connection);
31
32 // Override this method to configure what services a connection supports when
33 // connecting to another app.
34 // Return false to reject the connection entirely.
35 virtual bool ConfigureOutgoingConnection(ApplicationConnection* connection);
36
37 // Called when the shell connection has a connection error.
38 //
39 // Return true to shutdown the application. Return false to skip shutting
40 // down the connection, but user is then required to call
41 // ApplicationImpl::QuitNow() when done.
42 virtual bool OnShellConnectionError();
43
44 // Called before ApplicationImpl::Terminate(). After returning from this call
45 // the delegate can no longer rely on the main run loop still running.
46 virtual void Quit();
47
48 private:
49 MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationDelegate);
50 };
51
52 } // namespace mojo
53
54 #endif // MOJO_APPLICATION_PUBLIC_CPP_APPLICATION_DELEGATE_H_
OLDNEW
« no previous file with comments | « mojo/application/public/cpp/application_connection.h ('k') | mojo/application/public/cpp/application_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698