Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: mojo/services/native_viewport/platform_viewport_headless.h

Issue 606883002: Add a headless configuration to Mojo's native viewport service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address jamesr's questions Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/services/native_viewport/platform_viewport_headless.h
diff --git a/mojo/services/native_viewport/platform_viewport_headless.h b/mojo/services/native_viewport/platform_viewport_headless.h
new file mode 100644
index 0000000000000000000000000000000000000000..ff5b18fbbd8580a626f933e0087140437af3779d
--- /dev/null
+++ b/mojo/services/native_viewport/platform_viewport_headless.h
@@ -0,0 +1,35 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/services/native_viewport/platform_viewport.h"
+#include "ui/gfx/rect.h"
+
+namespace mojo {
+
+class PlatformViewportHeadless : public PlatformViewport {
+ public:
+ virtual ~PlatformViewportHeadless();
+
+ static scoped_ptr<PlatformViewport> Create(Delegate* delegate);
+
+ private:
+ explicit PlatformViewportHeadless(Delegate* delegate);
+
+ // Overridden from PlatformViewport:
+ virtual void Init(const gfx::Rect& bounds) OVERRIDE;
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual void Close() OVERRIDE;
+ virtual gfx::Size GetSize() OVERRIDE;
+ virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
+ virtual void SetCapture() OVERRIDE;
+ virtual void ReleaseCapture() OVERRIDE;
+
+ Delegate* delegate_;
+ gfx::Rect bounds_;
+
+ DISALLOW_COPY_AND_ASSIGN(PlatformViewportHeadless);
+};
+
+} // namespace mojo
« no previous file with comments | « mojo/services/native_viewport/platform_viewport.h ('k') | mojo/services/native_viewport/platform_viewport_headless.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698