Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / mojo / services / native_viewport / platform_viewport_stub.cc
blob9ed83fd72fc44a30588bbd8ff55876416c1ab2b0
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.
9 namespace mojo {
11 class PlatformViewportStub : public PlatformViewport {
12 public:
13 PlatformViewportStub(Delegate* delegate) : delegate_(delegate) {
15 virtual ~PlatformViewportStub() {
18 private:
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 {
30 return gfx::Size();
32 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE {
35 Delegate* delegate_;
37 DISALLOW_COPY_AND_ASSIGN(PlatformViewportStub);
40 // static
41 scoped_ptr<PlatformViewport> PlatformViewport::Create(Delegate* delegate) {
42 return scoped_ptr<PlatformViewport>(
43 new PlatformViewportStub(delegate)).Pass();
46 } // namespace mojo