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 #include "mojo/services/native_viewport/native_viewport.h" |
| 6 |
| 7 // Stub to build on platforms we don't fully support yet. |
| 8 |
| 9 namespace mojo { |
| 10 namespace services { |
| 11 |
| 12 class NativeViewportStub : public NativeViewport { |
| 13 public: |
| 14 NativeViewportStub(NativeViewportDelegate* delegate) |
| 15 : delegate_(delegate) { |
| 16 } |
| 17 virtual ~NativeViewportStub() { |
| 18 } |
| 19 |
| 20 private: |
| 21 // Overridden from NativeViewport: |
| 22 virtual void Close() OVERRIDE { |
| 23 delegate_->OnDestroyed(); |
| 24 } |
| 25 |
| 26 NativeViewportDelegate* delegate_; |
| 27 |
| 28 DISALLOW_COPY_AND_ASSIGN(NativeViewportStub); |
| 29 }; |
| 30 |
| 31 // static |
| 32 scoped_ptr<NativeViewport> NativeViewport::Create( |
| 33 NativeViewportDelegate* delegate) { |
| 34 return scoped_ptr<NativeViewport>(new NativeViewportStub(delegate)).Pass(); |
| 35 } |
| 36 |
| 37 } // namespace services |
| 38 } // namespace mojo |
OLD | NEW |