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.
5 #include "mojo/services/native_viewport/native_viewport.h"
7 // Stub to build on platforms we don't fully support yet.
12 class NativeViewportStub : public NativeViewport {
14 NativeViewportStub(NativeViewportDelegate* delegate)
15 : delegate_(delegate) {
17 virtual ~NativeViewportStub() {
21 // Overridden from NativeViewport:
22 virtual void Init() OVERRIDE {
24 virtual void Show() OVERRIDE {
26 virtual void Hide() OVERRIDE {
28 virtual void Close() OVERRIDE {
29 delegate_->OnDestroyed();
31 virtual gfx::Size GetSize() OVERRIDE {
34 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE {
37 NativeViewportDelegate* delegate_;
39 DISALLOW_COPY_AND_ASSIGN(NativeViewportStub);
43 scoped_ptr<NativeViewport> NativeViewport::Create(
44 shell::Context* context,
45 NativeViewportDelegate* delegate) {
46 return scoped_ptr<NativeViewport>(new NativeViewportStub(delegate)).Pass();
49 } // namespace services