Index: mojo/services/native_viewport/native_viewport_service.h |
diff --git a/mojo/services/native_viewport/native_viewport_service.h b/mojo/services/native_viewport/native_viewport_service.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ad73df0725e58853210e361c0c7b45907d64306 |
--- /dev/null |
+++ b/mojo/services/native_viewport/native_viewport_service.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2013 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_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |
+#define MOJO_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |
+ |
+#include "base/memory/scoped_vector.h" |
+#include "mojo/public/bindings/lib/remote_ptr.h" |
+#include "mojom/shell.h" |
+ |
+namespace mojo { |
+ |
+namespace shell { |
+class Context; |
+} |
+ |
+namespace services { |
+ |
+class NativeViewportService : public ::shell::ShellClientStub { |
+ public: |
+ NativeViewportService(ScopedMessagePipeHandle shell_handle); |
+ virtual ~NativeViewportService(); |
+ virtual void AcceptConnection(ScopedMessagePipeHandle client_handle) |
+ MOJO_OVERRIDE; |
+ |
+ // For locally loaded services. |
+ void set_context(shell::Context* context) { context_ = context; } |
+ |
+ private: |
+ class NativeViewportImpl; |
+ RemotePtr< ::shell::Shell> shell_; |
+ ScopedVector<NativeViewportImpl> viewports_; |
+ shell::Context* context_; |
+}; |
+ |
+} // namespace services |
+} // namespace mojo |
+ |
+#endif // MOJO_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |