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 #ifndef COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_
6 #define COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_
8 #include "base/macros.h"
9 #include "components/native_viewport/platform_viewport.h"
10 #include "ui/gfx/geometry/rect.h"
12 namespace native_viewport
{
14 class PlatformViewportHeadless
: public PlatformViewport
{
16 ~PlatformViewportHeadless() override
;
18 static scoped_ptr
<PlatformViewport
> Create(Delegate
* delegate
);
21 explicit PlatformViewportHeadless(Delegate
* delegate
);
23 // Overridden from PlatformViewport:
24 void Init(const gfx::Rect
& bounds
) override
;
27 void Close() override
;
28 gfx::Size
GetSize() override
;
29 void SetBounds(const gfx::Rect
& bounds
) override
;
32 mojo::ViewportMetricsPtr metrics_
;
34 DISALLOW_COPY_AND_ASSIGN(PlatformViewportHeadless
);
37 } // namespace native_viewport
39 #endif // COMPONENTS_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_