Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1439)

Unified Diff: mojo/services/native_viewport/native_viewport_service.h

Issue 93793009: Implement ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Allow Android to be built Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..638a127ba13691b9355d22e8b3886d81edf2836d
--- /dev/null
+++ b/mojo/services/native_viewport/native_viewport_service.h
@@ -0,0 +1,46 @@
+// 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 "mojo/services/native_viewport/native_viewport_export.h"
+#include "mojom/shell.h"
+
+namespace mojo {
+
+namespace shell {
+class Context;
+}
+
+namespace services {
+
+class NativeViewportService : public 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_;
+ ScopedVector<NativeViewportImpl> viewports_;
+ shell::Context* context_;
+};
+
+} // namespace services
+} // namespace mojo
+
+#if defined(OS_ANDROID)
+MOJO_NATIVE_VIEWPORT_EXPORT mojo::services::NativeViewportService*
+ CreateNativeViewportService(mojo::ScopedMessagePipeHandle shell_handle);
+#endif
+
+#endif // MOJO_SERVICES_NATIVE_VIEWPORT_SERVICE_H_
« no previous file with comments | « mojo/services/native_viewport/native_viewport_impl.cc ('k') | mojo/services/native_viewport/native_viewport_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698