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 "mojom/shell.h" |
| 11 |
| 12 namespace mojo { |
| 13 |
| 14 namespace shell { |
| 15 class Context; |
| 16 } |
| 17 |
| 18 namespace services { |
| 19 |
| 20 class NativeViewportService : public ShellClientStub { |
| 21 public: |
| 22 NativeViewportService(ScopedMessagePipeHandle shell_handle); |
| 23 virtual ~NativeViewportService(); |
| 24 virtual void AcceptConnection(ScopedMessagePipeHandle client_handle) |
| 25 MOJO_OVERRIDE; |
| 26 |
| 27 // For locally loaded services. |
| 28 void set_context(shell::Context* context) { context_ = context; } |
| 29 |
| 30 private: |
| 31 class NativeViewportImpl; |
| 32 RemotePtr<Shell> shell_; |
| 33 ScopedVector<NativeViewportImpl> viewports_; |
| 34 shell::Context* context_; |
| 35 }; |
| 36 |
| 37 } // namespace services |
| 38 } // namespace mojo |
| 39 |
| 40 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_SERVICE_H_ |
OLD | NEW |