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

Unified Diff: mojo/examples/sample_app/native_viewport_client_impl.cc

Issue 93793009: Implement ServiceManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Allow Android to be built Created 7 years 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
« no previous file with comments | « mojo/examples/sample_app/native_viewport_client_impl.h ('k') | mojo/examples/sample_app/sample_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/sample_app/native_viewport_client_impl.cc
diff --git a/mojo/examples/sample_app/native_viewport_client_impl.cc b/mojo/examples/sample_app/native_viewport_client_impl.cc
deleted file mode 100644
index 17991dad8f10765cf958627fe6e5ff3c41dbcc0e..0000000000000000000000000000000000000000
--- a/mojo/examples/sample_app/native_viewport_client_impl.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// 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/examples/sample_app/native_viewport_client_impl.h"
-
-#include <stdio.h>
-
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-
-namespace mojo {
-namespace examples {
-
-NativeViewportClientImpl::NativeViewportClientImpl(ScopedMessagePipeHandle pipe)
- : service_(pipe.Pass()) {
- service_.SetPeer(this);
-}
-
-NativeViewportClientImpl::~NativeViewportClientImpl() {
- service_->Close();
-}
-
-void NativeViewportClientImpl::Open() {
- service_->Open();
-
- ScopedMessagePipeHandle gles2;
- ScopedMessagePipeHandle gles2_client;
- CreateMessagePipe(&gles2, &gles2_client);
-
- gles2_client_.reset(new GLES2ClientImpl(gles2.Pass()));
- service_->CreateGLES2Context(gles2_client.Pass());
-}
-
-void NativeViewportClientImpl::OnCreated() {
-}
-
-void NativeViewportClientImpl::OnDestroyed() {
- base::MessageLoop::current()->Quit();
-}
-
-void NativeViewportClientImpl::OnEvent(const Event& event) {
- if (!event.location().is_null()) {
- gles2_client_->HandleInputEvent(event);
- service_->AckEvent(event);
- }
-}
-
-} // namespace examples
-} // namespace mojo
« no previous file with comments | « mojo/examples/sample_app/native_viewport_client_impl.h ('k') | mojo/examples/sample_app/sample_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698