| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_ | 5 #ifndef SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_ |
| 6 #define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_ | 6 #define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "services/native_viewport/platform_viewport.h" | 9 #include "services/native_viewport/platform_viewport.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| 11 | 11 |
| 12 namespace native_viewport { | 12 namespace native_viewport { |
| 13 | 13 |
| 14 class PlatformViewportHeadless : public PlatformViewport { | 14 class PlatformViewportHeadless : public PlatformViewport { |
| 15 public: | 15 public: |
| 16 ~PlatformViewportHeadless() override; | 16 ~PlatformViewportHeadless() override; |
| 17 | 17 |
| 18 static scoped_ptr<PlatformViewport> Create(Delegate* delegate); | 18 static scoped_ptr<PlatformViewport> Create(Delegate* delegate); |
| 19 | 19 |
| 20 private: | 20 private: |
| 21 explicit PlatformViewportHeadless(Delegate* delegate); | 21 explicit PlatformViewportHeadless(Delegate* delegate); |
| 22 | 22 |
| 23 // Overridden from PlatformViewport: | 23 // Overridden from PlatformViewport: |
| 24 void Init(const gfx::Rect& bounds) override; | 24 void Init(const gfx::Rect& bounds) override; |
| 25 void Show() override; | 25 void Show() override; |
| 26 void Hide() override; | 26 void Hide() override; |
| 27 void Close() override; | 27 void Close() override; |
| 28 gfx::Size GetSize() override; | 28 gfx::Size GetSize() override; |
| 29 void SetBounds(const gfx::Rect& bounds) override; | 29 void SetBounds(const gfx::Rect& bounds) override; |
| 30 void SetCapture() override; | |
| 31 void ReleaseCapture() override; | |
| 32 | 30 |
| 33 Delegate* delegate_; | 31 Delegate* delegate_; |
| 34 mojo::ViewportMetricsPtr metrics_; | 32 mojo::ViewportMetricsPtr metrics_; |
| 35 | 33 |
| 36 DISALLOW_COPY_AND_ASSIGN(PlatformViewportHeadless); | 34 DISALLOW_COPY_AND_ASSIGN(PlatformViewportHeadless); |
| 37 }; | 35 }; |
| 38 | 36 |
| 39 } // namespace native_viewport | 37 } // namespace native_viewport |
| 40 | 38 |
| 41 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_ | 39 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_HEADLESS_H_ |
| OLD | NEW |