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

Side by Side Diff: sky/viewer/sky_loader.h

Issue 1083273003: Expose some sky_viewer plumbing to allow for reuse (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 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 | « sky/viewer/content_handler_impl.cc ('k') | sky/viewer/sky_loader.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 2015 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 SKY_VIEWER_SKY_LOADER_H_
6 #define SKY_VIEWER_SKY_LOADER_H_
7
8 #include "mojo/public/interfaces/application/shell.mojom.h"
9 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom. h"
10 #include "mojo/services/network/public/interfaces/network_service.mojom.h"
11
12 namespace sky {
13
14 // A class that loads Sky applications from URLs.
15 class SkyLoader {
16 public:
17 // |shell| must outlive this object.
18 // If |initial_app_to_load| is not null, it will be loaded on the first call
19 // to |LoadApplication()|.
20 SkyLoader(mojo::Shell* shell, mojo::URLResponsePtr initial_app_to_load);
21
22 virtual ~SkyLoader();
23
24 // Loads the application at |url|, passing it |services| and
25 // |exposed_services|.
26 void LoadApplication(mojo::InterfaceRequest<mojo::ServiceProvider> services,
27 mojo::ServiceProviderPtr exposed_services,
28 const mojo::String& url);
29
30 private:
31 void OnApplicationLoaded(
32 mojo::URLLoaderPtr loader,
33 mojo::InterfaceRequest<mojo::ServiceProvider> services,
34 mojo::ServiceProviderPtr exposed_services,
35 mojo::URLResponsePtr response);
36
37 mojo::Shell* shell_;
38 mojo::NetworkServicePtr network_service_;
39 mojo::URLResponsePtr initial_app_to_load_;
40 };
41
42 } // namespace sky
43
44 #endif // SKY_VIEWER_SKY_LOADER_H_
OLDNEW
« no previous file with comments | « sky/viewer/content_handler_impl.cc ('k') | sky/viewer/sky_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698