| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_SHELL_VIEW_MANAGER_LOADER_H_ | 5 #ifndef MOJO_SHELL_VIEW_MANAGER_LOADER_H_ |
| 6 #define MOJO_SHELL_VIEW_MANAGER_LOADER_H_ | 6 #define MOJO_SHELL_VIEW_MANAGER_LOADER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "mojo/service_manager/service_loader.h" | 10 #include "mojo/service_manager/service_loader.h" |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 namespace view_manager { | |
| 14 namespace service { | |
| 15 class RootNodeManager; | |
| 16 } | |
| 17 } | |
| 18 | 13 |
| 19 class Application; | 14 class Application; |
| 20 | 15 |
| 21 namespace shell { | 16 namespace shell { |
| 22 | 17 |
| 23 // ServiceLoader responsible for creating connections to the ViewManager. | 18 // ServiceLoader responsible for creating connections to the ViewManager. |
| 24 class ViewManagerLoader : public ServiceLoader { | 19 class ViewManagerLoader : public ServiceLoader { |
| 25 public: | 20 public: |
| 26 ViewManagerLoader(); | 21 ViewManagerLoader(); |
| 27 virtual ~ViewManagerLoader(); | 22 virtual ~ViewManagerLoader(); |
| 28 | 23 |
| 29 private: | 24 private: |
| 30 // ServiceLoader overrides: | 25 // ServiceLoader overrides: |
| 31 virtual void LoadService( | 26 virtual void LoadService( |
| 32 ServiceManager* manager, | 27 ServiceManager* manager, |
| 33 const GURL& url, | 28 const GURL& url, |
| 34 ScopedMessagePipeHandle service_provider_handle) OVERRIDE; | 29 ScopedMessagePipeHandle service_provider_handle) OVERRIDE; |
| 35 virtual void OnServiceError(ServiceManager* manager, | 30 virtual void OnServiceError(ServiceManager* manager, |
| 36 const GURL& url) OVERRIDE; | 31 const GURL& url) OVERRIDE; |
| 37 | 32 |
| 38 scoped_ptr<view_manager::service::RootNodeManager> root_node_manager_; | |
| 39 ScopedVector<Application> apps_; | 33 ScopedVector<Application> apps_; |
| 40 | 34 |
| 41 DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader); | 35 DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader); |
| 42 }; | 36 }; |
| 43 | 37 |
| 44 } // namespace shell | 38 } // namespace shell |
| 45 } // namespace mojo | 39 } // namespace mojo |
| 46 | 40 |
| 47 #endif // MOJO_SHELL_VIEW_MANAGER_LOADER_H_ | 41 #endif // MOJO_SHELL_VIEW_MANAGER_LOADER_H_ |
| OLD | NEW |