From edce7545f7dbe596df5cb4954b2e40bc44ae5867 Mon Sep 17 00:00:00 2001 From: "davemoore@chromium.org" Date: Wed, 18 Dec 2013 02:07:37 +0000 Subject: Implement ServiceManager BUG=None R=abarth@chromium.org, abarth Review URL: https://codereview.chromium.org/93793009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241446 0039d316-1c4b-4281-b951-d872f2087c98 --- .../sample_app/native_viewport_client_impl.cc | 50 ---------------------- 1 file changed, 50 deletions(-) delete mode 100644 mojo/examples/sample_app/native_viewport_client_impl.cc (limited to '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 17991da..0000000 --- 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 - -#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 -- cgit v1.1