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

Side by Side Diff: mojo/shell/background/background_shell.h

Issue 1667273002: Creates BackgroundShell and uses it in test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android 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
« no previous file with comments | « mojo/shell/background/BUILD.gn ('k') | mojo/shell/background/background_shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_
6 #define MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "mojo/shell/public/interfaces/application.mojom.h"
12
13 class GURL;
14
15 namespace mojo {
16 namespace shell {
17
18 // BackgroundShell starts up the mojo shell on a background thread, and
19 // destroys the thread in the destructor. Once created use CreateApplication()
20 // to obtain an InterfaceRequest for the Application. The InterfaceRequest can
21 // then be bound to an ApplicationImpl.
22 class BackgroundShell {
23 public:
24 BackgroundShell();
25 ~BackgroundShell();
26
27 void Init();
28
29 // Obtains an InterfaceRequest for the specified url.
30 InterfaceRequest<mojom::Application> CreateApplication(const GURL& url);
31
32 private:
33 class MojoThread;
34
35 scoped_ptr<MojoThread> thread_;
36
37 DISALLOW_COPY_AND_ASSIGN(BackgroundShell);
38 };
39
40 } // namespace shell
41 } // namespace mojo
42
43 #endif // MOJO_SHELL_BACKGROUND_BACKGROUND_SHELL_H_
OLDNEW
« no previous file with comments | « mojo/shell/background/BUILD.gn ('k') | mojo/shell/background/background_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698