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 3 // found in the LICENSE file. 4 5 #ifndef MOJO_SHELL_VIEW_MANAGER_LOADER_H_ 6 #define MOJO_SHELL_VIEW_MANAGER_LOADER_H_ 7 8 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_vector.h" 10 #include "mojo/service_manager/service_loader.h" 11 12 namespace mojo { 13 14 class Application; 15 16 namespace shell { 17 18 // ServiceLoader responsible for creating connections to the ViewManager. 19 class ViewManagerLoader : public ServiceLoader { 20 public: 21 ViewManagerLoader(); 22 virtual ~ViewManagerLoader(); 23 24 private: 25 // ServiceLoader overrides: 26 virtual void LoadService( 27 ServiceManager* manager, 28 const GURL& url, 29 ScopedMessagePipeHandle service_provider_handle) OVERRIDE; 30 virtual void OnServiceError(ServiceManager* manager, 31 const GURL& url) OVERRIDE; 32 33 ScopedVector<Application> apps_; 34 35 DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader); 36 }; 37 38 } // namespace shell 39 } // namespace mojo 40 41 #endif // MOJO_SHELL_VIEW_MANAGER_LOADER_H_ 42