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

Side by Side Diff: mojo/application_manager/shell_impl.h

Issue 821123005: Move application_manager's ShellImpl to own file (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « mojo/application_manager/application_manager.cc ('k') | mojo/application_manager/shell_impl.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 MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_
6 #define MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_
7
8 #include "mojo/public/cpp/bindings/binding.h"
9 #include "mojo/public/cpp/bindings/error_handler.h"
10 #include "mojo/public/interfaces/application/application.mojom.h"
11 #include "mojo/public/interfaces/application/shell.mojom.h"
12 #include "url/gurl.h"
13
14 namespace mojo {
15 class ApplicationManager;
16
17 class ShellImpl : public Shell, public ErrorHandler {
18 public:
19 ShellImpl(ScopedMessagePipeHandle handle,
20 ApplicationManager* manager,
21 const GURL& requested_url,
22 const GURL& url);
23
24 ShellImpl(ShellPtr* ptr,
25 ApplicationManager* manager,
26 const GURL& requested_url,
27 const GURL& url);
28
29 ~ShellImpl() override;
30
31 void ConnectToClient(const GURL& requestor_url,
32 ServiceProviderPtr service_provider);
33
34 Application* client() { return binding_.client(); }
35 const GURL& url() const { return url_; }
36 const GURL& requested_url() const { return requested_url_; }
37
38 private:
39 ShellImpl(ApplicationManager* manager,
40 const GURL& requested_url,
41 const GURL& url);
42
43 // Shell implementation:
44 void ConnectToApplication(
45 const String& app_url,
46 InterfaceRequest<ServiceProvider> in_service_provider) override;
47
48 // ErrorHandler implementation:
49 void OnConnectionError() override;
50
51 ApplicationManager* const manager_;
52 const GURL requested_url_;
53 const GURL url_;
54 Binding<Shell> binding_;
55
56 DISALLOW_COPY_AND_ASSIGN(ShellImpl);
57 };
58
59 } // namespace mojo
60
61 #endif // MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/application_manager/application_manager.cc ('k') | mojo/application_manager/shell_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698