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

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

Issue 51373002: NativeViewport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nl Created 7 years, 2 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/native_viewport_stub.cc
diff --git a/mojo/services/native_viewport/native_viewport_stub.cc b/mojo/services/native_viewport/native_viewport_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b4f3bd288e3d410650cda6d49742358e41f55003
--- /dev/null
+++ b/mojo/services/native_viewport/native_viewport_stub.cc
@@ -0,0 +1,38 @@
+// 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/native_viewport.h"
+
+// Stub to build on platforms we don't fully support yet.
+
+namespace mojo {
+namespace services {
+
+class NativeViewportStub : public NativeViewport {
+ public:
+ NativeViewportStub(NativeViewportDelegate* delegate)
+ : delegate_(delegate) {
+ }
+ virtual ~NativeViewportStub() {
+ }
+
+ private:
+ // Overridden from NativeViewport:
+ virtual void Close() OVERRIDE {
+ delegate_->OnDestroyed();
+ }
+
+ NativeViewportDelegate* delegate_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeViewportStub);
+};
+
+// static
+scoped_ptr<NativeViewport> NativeViewport::Create(
+ NativeViewportDelegate* delegate) {
+ return scoped_ptr<NativeViewport>(new NativeViewportStub(delegate)).Pass();
+}
+
+} // namespace services
+} // namespace mojo
« no previous file with comments | « mojo/services/native_viewport/native_viewport_controller.cc ('k') | mojo/services/native_viewport/native_viewport_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698