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

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

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

Powered by Google App Engine
This is Rietveld 408576698