summaryrefslogtreecommitdiffstats
path: root/chromium/mojo/shell/view_manager_loader.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/mojo/shell/view_manager_loader.h')
-rw-r--r--chromium/mojo/shell/view_manager_loader.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/chromium/mojo/shell/view_manager_loader.h b/chromium/mojo/shell/view_manager_loader.h
new file mode 100644
index 00000000000..8bebc5742cb
--- /dev/null
+++ b/chromium/mojo/shell/view_manager_loader.h
@@ -0,0 +1,41 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SHELL_VIEW_MANAGER_LOADER_H_
+#define MOJO_SHELL_VIEW_MANAGER_LOADER_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
+#include "mojo/service_manager/service_loader.h"
+
+namespace mojo {
+
+class Application;
+
+namespace shell {
+
+// ServiceLoader responsible for creating connections to the ViewManager.
+class ViewManagerLoader : public ServiceLoader {
+ public:
+ ViewManagerLoader();
+ virtual ~ViewManagerLoader();
+
+ private:
+ // ServiceLoader overrides:
+ virtual void LoadService(
+ ServiceManager* manager,
+ const GURL& url,
+ ScopedMessagePipeHandle service_provider_handle) OVERRIDE;
+ virtual void OnServiceError(ServiceManager* manager,
+ const GURL& url) OVERRIDE;
+
+ ScopedVector<Application> apps_;
+
+ DISALLOW_COPY_AND_ASSIGN(ViewManagerLoader);
+};
+
+} // namespace shell
+} // namespace mojo
+
+#endif // MOJO_SHELL_VIEW_MANAGER_LOADER_H_