| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "mojo/shell/context.h" | 5 #include "mojo/shell/context.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 private: | 120 private: |
| 121 // ApplicationLoader implementation. | 121 // ApplicationLoader implementation. |
| 122 virtual void Load(ApplicationManager* manager, | 122 virtual void Load(ApplicationManager* manager, |
| 123 const GURL& url, | 123 const GURL& url, |
| 124 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { | 124 scoped_refptr<LoadCallbacks> callbacks) OVERRIDE { |
| 125 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); | 125 ScopedMessagePipeHandle shell_handle = callbacks->RegisterApplication(); |
| 126 if (shell_handle.is_valid()) | 126 if (shell_handle.is_valid()) |
| 127 app_.reset(new ApplicationImpl(this, shell_handle.Pass())); | 127 app_.reset(new ApplicationImpl(this, shell_handle.Pass())); |
| 128 } | 128 } |
| 129 | 129 |
| 130 virtual void OnServiceError(ApplicationManager* manager, | 130 virtual void OnApplicationError(ApplicationManager* manager, |
| 131 const GURL& url) OVERRIDE {} | 131 const GURL& url) OVERRIDE {} |
| 132 | 132 |
| 133 // ApplicationDelegate implementation. | 133 // ApplicationDelegate implementation. |
| 134 virtual bool ConfigureIncomingConnection( | 134 virtual bool ConfigureIncomingConnection( |
| 135 mojo::ApplicationConnection* connection) OVERRIDE { | 135 mojo::ApplicationConnection* connection) OVERRIDE { |
| 136 connection->AddService<NativeViewport>(this); | 136 connection->AddService<NativeViewport>(this); |
| 137 connection->AddService<Gpu>(this); | 137 connection->AddService<Gpu>(this); |
| 138 return true; | 138 return true; |
| 139 } | 139 } |
| 140 | 140 |
| 141 // InterfaceFactory<NativeViewport> implementation. | 141 // InterfaceFactory<NativeViewport> implementation. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 ScopedMessagePipeHandle Context::ConnectToServiceByName( | 262 ScopedMessagePipeHandle Context::ConnectToServiceByName( |
| 263 const GURL& application_url, | 263 const GURL& application_url, |
| 264 const std::string& service_name) { | 264 const std::string& service_name) { |
| 265 app_urls_.insert(application_url); | 265 app_urls_.insert(application_url); |
| 266 return application_manager_.ConnectToServiceByName( | 266 return application_manager_.ConnectToServiceByName( |
| 267 application_url, service_name).Pass(); | 267 application_url, service_name).Pass(); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace shell | 270 } // namespace shell |
| 271 } // namespace mojo | 271 } // namespace mojo |
| OLD | NEW |