| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_ | 5 #ifndef MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_ |
| 6 #define MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_ | 6 #define MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_ |
| 7 | 7 |
| 8 #include "mojo/public/cpp/bindings/binding.h" | 8 #include "mojo/public/cpp/bindings/binding.h" |
| 9 #include "mojo/public/cpp/bindings/error_handler.h" | 9 #include "mojo/public/cpp/bindings/error_handler.h" |
| 10 #include "mojo/public/interfaces/application/application.mojom.h" | 10 #include "mojo/public/interfaces/application/application.mojom.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const GURL& url); | 22 const GURL& url); |
| 23 | 23 |
| 24 ShellImpl(ShellPtr* ptr, | 24 ShellImpl(ShellPtr* ptr, |
| 25 ApplicationManager* manager, | 25 ApplicationManager* manager, |
| 26 const GURL& requested_url, | 26 const GURL& requested_url, |
| 27 const GURL& url); | 27 const GURL& url); |
| 28 | 28 |
| 29 ~ShellImpl() override; | 29 ~ShellImpl() override; |
| 30 | 30 |
| 31 void ConnectToClient(const GURL& requestor_url, | 31 void ConnectToClient(const GURL& requestor_url, |
| 32 ServiceProviderPtr service_provider); | 32 InterfaceRequest<ServiceProvider> services, |
| 33 ServiceProviderPtr exposed_services); |
| 33 | 34 |
| 34 Application* client() { return binding_.client(); } | 35 Application* client() { return binding_.client(); } |
| 35 const GURL& url() const { return url_; } | 36 const GURL& url() const { return url_; } |
| 36 const GURL& requested_url() const { return requested_url_; } | 37 const GURL& requested_url() const { return requested_url_; } |
| 37 | 38 |
| 38 private: | 39 private: |
| 39 ShellImpl(ApplicationManager* manager, | 40 ShellImpl(ApplicationManager* manager, |
| 40 const GURL& requested_url, | 41 const GURL& requested_url, |
| 41 const GURL& url); | 42 const GURL& url); |
| 42 | 43 |
| 43 // Shell implementation: | 44 // Shell implementation: |
| 44 void ConnectToApplication( | 45 void ConnectToApplication(const String& app_url, |
| 45 const String& app_url, | 46 InterfaceRequest<ServiceProvider> services, |
| 46 InterfaceRequest<ServiceProvider> in_service_provider) override; | 47 ServiceProviderPtr exposed_services) override; |
| 47 | 48 |
| 48 // ErrorHandler implementation: | 49 // ErrorHandler implementation: |
| 49 void OnConnectionError() override; | 50 void OnConnectionError() override; |
| 50 | 51 |
| 51 ApplicationManager* const manager_; | 52 ApplicationManager* const manager_; |
| 52 const GURL requested_url_; | 53 const GURL requested_url_; |
| 53 const GURL url_; | 54 const GURL url_; |
| 54 Binding<Shell> binding_; | 55 Binding<Shell> binding_; |
| 55 | 56 |
| 56 DISALLOW_COPY_AND_ASSIGN(ShellImpl); | 57 DISALLOW_COPY_AND_ASSIGN(ShellImpl); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 } // namespace mojo | 60 } // namespace mojo |
| 60 | 61 |
| 61 #endif // MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_ | 62 #endif // MOJO_APPLICATION_MANAGER_SHELL_IMPL_H_ |
| OLD | NEW |