Chromium Code Reviews

Side by Side Diff: mojo/shell/ui_application_loader_android.h

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
« no previous file with comments | « mojo/shell/test_child_process.cc ('k') | mojo/shell/ui_application_loader_android.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 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_UI_APPLICATION_LOADER_ANDROID_H_
6 #define MOJO_SHELL_UI_APPLICATION_LOADER_ANDROID_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/application_manager/application_loader.h"
11
12 namespace mojo {
13
14 class ApplicationManager;
15
16 namespace shell {
17 class Context;
18 }
19
20 // ApplicationLoader implementation that creates a background thread and issues
21 // load
22 // requests there.
23 class UIApplicationLoader : public ApplicationLoader {
24 public:
25 UIApplicationLoader(scoped_ptr<ApplicationLoader> real_loader,
26 shell::Context* context);
27 ~UIApplicationLoader() override;
28
29 // ApplicationLoader overrides:
30 void Load(ApplicationManager* manager,
31 const GURL& url,
32 ScopedMessagePipeHandle shell_handle,
33 LoadCallback callback) override;
34 void OnApplicationError(ApplicationManager* manager,
35 const GURL& url) override;
36
37 private:
38 class UILoader;
39
40 // These functions are exected on the background thread. They call through
41 // to |background_loader_| to do the actual loading.
42 // TODO: having this code take a |manager| is fragile (as ApplicationManager
43 // isn't thread safe).
44 void LoadOnUIThread(ApplicationManager* manager,
45 const GURL& url,
46 ScopedMessagePipeHandle shell_handle);
47 void OnApplicationErrorOnUIThread(ApplicationManager* manager,
48 const GURL& url);
49 void ShutdownOnUIThread();
50
51 scoped_ptr<ApplicationLoader> loader_;
52 shell::Context* context_;
53
54 DISALLOW_COPY_AND_ASSIGN(UIApplicationLoader);
55 };
56
57 } // namespace mojo
58
59 #endif // MOJO_SHELL_UI_APPLICATION_LOADER_ANDROID_H_
OLDNEW
« no previous file with comments | « mojo/shell/test_child_process.cc ('k') | mojo/shell/ui_application_loader_android.cc » ('j') | no next file with comments »

Powered by Google App Engine