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_VIEW_MANAGER_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_
6 #define COMPONENTS_VIEW_MANAGER_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_
8 #include "base/macros.h"
9 #include "components/view_manager/native_viewport/platform_viewport.h"
10 #include "components/view_manager/public/interfaces/view_manager.mojom.h"
11 #include "ui/gfx/geometry/rect.h"
13 namespace native_viewport
{
15 class PlatformViewportHeadless
: public PlatformViewport
{
17 ~PlatformViewportHeadless() override
;
19 static scoped_ptr
<PlatformViewport
> Create(Delegate
* delegate
);
22 explicit PlatformViewportHeadless(Delegate
* delegate
);
24 // Overridden from PlatformViewport:
25 void Init(const gfx::Rect
& bounds
) override
;
28 void Close() override
;
29 gfx::Size
GetSize() override
;
30 void SetBounds(const gfx::Rect
& bounds
) override
;
33 mojo::ViewportMetricsPtr metrics_
;
35 DISALLOW_COPY_AND_ASSIGN(PlatformViewportHeadless
);
38 } // namespace native_viewport
40 #endif // COMPONENTS_VIEW_MANAGER_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_