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/platform_viewport.h"
7 // Stub to build on platforms we don't fully support yet.
11 class PlatformViewportStub
: public PlatformViewport
{
13 PlatformViewportStub(Delegate
* delegate
) : delegate_(delegate
) {
15 virtual ~PlatformViewportStub() {
19 // Overridden from PlatformViewport:
20 virtual void Init() OVERRIDE
{
22 virtual void Show() OVERRIDE
{
24 virtual void Hide() OVERRIDE
{
26 virtual void Close() OVERRIDE
{
27 delegate_
->OnDestroyed();
29 virtual gfx::Size
GetSize() OVERRIDE
{
32 virtual void SetBounds(const gfx::Rect
& bounds
) OVERRIDE
{
37 DISALLOW_COPY_AND_ASSIGN(PlatformViewportStub
);
41 scoped_ptr
<PlatformViewport
> PlatformViewport::Create(Delegate
* delegate
) {
42 return scoped_ptr
<PlatformViewport
>(
43 new PlatformViewportStub(delegate
)).Pass();