OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |
| 6 #define MOJO_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |
| 7 |
| 8 #include "base/memory/scoped_vector.h" |
| 9 #include "mojo/public/bindings/lib/remote_ptr.h" |
| 10 #include "mojo/services/native_viewport/native_viewport_export.h" |
| 11 #include "mojom/shell.h" |
| 12 |
| 13 namespace mojo { |
| 14 |
| 15 namespace shell { |
| 16 class Context; |
| 17 } |
| 18 |
| 19 namespace services { |
| 20 |
| 21 class NativeViewportService : public ShellClientStub { |
| 22 public: |
| 23 NativeViewportService(ScopedMessagePipeHandle shell_handle); |
| 24 virtual ~NativeViewportService(); |
| 25 virtual void AcceptConnection(ScopedMessagePipeHandle client_handle) |
| 26 MOJO_OVERRIDE; |
| 27 |
| 28 // For locally loaded services. |
| 29 void set_context(shell::Context* context) { context_ = context; } |
| 30 |
| 31 private: |
| 32 class NativeViewportImpl; |
| 33 RemotePtr<Shell> shell_; |
| 34 ScopedVector<NativeViewportImpl> viewports_; |
| 35 shell::Context* context_; |
| 36 }; |
| 37 |
| 38 } // namespace services |
| 39 } // namespace mojo |
| 40 |
| 41 #if defined(OS_ANDROID) |
| 42 MOJO_NATIVE_VIEWPORT_EXPORT mojo::services::NativeViewportService* |
| 43 CreateNativeViewportService(mojo::ScopedMessagePipeHandle shell_handle); |
| 44 #endif |
| 45 |
| 46 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |
OLD | NEW |