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

Unified Diff: mojo/examples/surfaces_app/child_gl_app.cc

Issue 684543003: Move //mojo/examples to //examples (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « mojo/examples/surfaces_app/child_app.cc ('k') | mojo/examples/surfaces_app/child_gl_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/examples/surfaces_app/child_gl_app.cc
diff --git a/mojo/examples/surfaces_app/child_gl_app.cc b/mojo/examples/surfaces_app/child_gl_app.cc
deleted file mode 100644
index a18b20881b91268958409b0fa34dfe4ebc638934..0000000000000000000000000000000000000000
--- a/mojo/examples/surfaces_app/child_gl_app.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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 "base/macros.h"
-#include "base/threading/platform_thread.h"
-#include "mojo/application/application_runner_chromium.h"
-#include "mojo/examples/surfaces_app/child_gl_impl.h"
-#include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/application/application_connection.h"
-#include "mojo/public/cpp/application/application_delegate.h"
-#include "mojo/public/cpp/application/application_impl.h"
-#include "mojo/public/cpp/bindings/string.h"
-#include "mojo/services/public/interfaces/gpu/gpu.mojom.h"
-
-namespace mojo {
-namespace examples {
-
-class ChildGLApp : public ApplicationDelegate, public InterfaceFactory<Child> {
- public:
- ChildGLApp() {}
- virtual ~ChildGLApp() {}
-
- virtual void Initialize(ApplicationImpl* app) override {
- surfaces_service_connection_ =
- app->ConnectToApplication("mojo:surfaces_service");
- // TODO(jamesr): Should be mojo:gpu_service
- app->ConnectToService("mojo:native_viewport_service", &gpu_service_);
- }
-
- // ApplicationDelegate implementation.
- virtual bool ConfigureIncomingConnection(
- ApplicationConnection* connection) override {
- connection->AddService(this);
- return true;
- }
-
- // InterfaceFactory<Child> implementation.
- virtual void Create(ApplicationConnection* connection,
- InterfaceRequest<Child> request) override {
- CommandBufferPtr command_buffer;
- gpu_service_->CreateOffscreenGLES2Context(GetProxy(&command_buffer));
- BindToRequest(
- new ChildGLImpl(surfaces_service_connection_, command_buffer.Pass()),
- &request);
- }
-
- private:
- ApplicationConnection* surfaces_service_connection_;
- GpuPtr gpu_service_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildGLApp);
-};
-
-} // namespace examples
-} // namespace mojo
-
-MojoResult MojoMain(MojoHandle shell_handle) {
- mojo::ApplicationRunnerChromium runner(new mojo::examples::ChildGLApp);
- return runner.Run(shell_handle);
-}
« no previous file with comments | « mojo/examples/surfaces_app/child_app.cc ('k') | mojo/examples/surfaces_app/child_gl_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698