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

Unified Diff: mojo/services/native_viewport/platform_viewport_stub.cc

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_stub.cc
diff --git a/mojo/services/native_viewport/platform_viewport_stub.cc b/mojo/services/native_viewport/platform_viewport_stub.cc
index 9ed83fd72fc44a30588bbd8ff55876416c1ab2b0..80a7e9467e4ef8054c6f86573539b3e254ed18fe 100644
--- a/mojo/services/native_viewport/platform_viewport_stub.cc
+++ b/mojo/services/native_viewport/platform_viewport_stub.cc
@@ -1,46 +1,14 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 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"
-
-// Stub to build on platforms we don't fully support yet.
+#include "mojo/services/native_viewport/platform_viewport_headless.h"
namespace mojo {
-class PlatformViewportStub : public PlatformViewport {
- public:
- PlatformViewportStub(Delegate* delegate) : delegate_(delegate) {
- }
- virtual ~PlatformViewportStub() {
- }
-
- private:
- // Overridden from PlatformViewport:
- virtual void Init() OVERRIDE {
- }
- virtual void Show() OVERRIDE {
- }
- virtual void Hide() OVERRIDE {
- }
- virtual void Close() OVERRIDE {
- delegate_->OnDestroyed();
- }
- virtual gfx::Size GetSize() OVERRIDE {
- return gfx::Size();
- }
- virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE {
- }
-
- Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(PlatformViewportStub);
-};
-
// static
scoped_ptr<PlatformViewport> PlatformViewport::Create(Delegate* delegate) {
- return scoped_ptr<PlatformViewport>(
- new PlatformViewportStub(delegate)).Pass();
+ return PlatformViewportHeadless::Create(delegate);
}
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698