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

Unified Diff: apps/moterm/moterm_main.cc

Issue 1556683004: Port Moterm to Mozart. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-16
Patch Set: fix nits Created 4 years, 11 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 | « apps/moterm/moterm_app.cc ('k') | apps/moterm/moterm_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/moterm/moterm_main.cc
diff --git a/apps/moterm/moterm_main.cc b/apps/moterm/moterm_main.cc
deleted file mode 100644
index 299a3b4d1dcf5051efb4a599991e6f4b79050cf6..0000000000000000000000000000000000000000
--- a/apps/moterm/moterm_main.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2015 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.
-
-// This is the "main" for the embeddable Moterm terminal view, which provides
-// services to the thing embedding it. (This is not very useful as a "top-level"
-// application.)
-
-#include "apps/moterm/moterm_view.h"
-#include "base/logging.h"
-#include "base/macros.h"
-#include "mojo/application/application_runner_chromium.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/services/view_manager/cpp/view_manager.h"
-#include "mojo/services/view_manager/cpp/view_manager_client_factory.h"
-#include "mojo/services/view_manager/cpp/view_manager_delegate.h"
-
-namespace {
-
-class Moterm : public mojo::ApplicationDelegate,
- public mojo::ViewManagerDelegate {
- public:
- Moterm() : application_impl_() {}
- ~Moterm() override {}
-
- private:
- // |mojo::ApplicationDelegate|:
- void Initialize(mojo::ApplicationImpl* application_impl) override {
- DCHECK(!application_impl_);
- application_impl_ = application_impl;
- view_manager_client_factory_.reset(
- new mojo::ViewManagerClientFactory(application_impl_->shell(), this));
- }
-
- bool ConfigureIncomingConnection(
- mojo::ApplicationConnection* connection) override {
- connection->AddService(view_manager_client_factory_.get());
- return true;
- }
-
- // |mojo::ViewManagerDelegate|:
- void OnEmbed(mojo::View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) override {
- new MotermView(application_impl_->shell(), root, services.Pass());
- }
-
- void OnViewManagerDisconnected(mojo::ViewManager* view_manager) override {
- }
-
- mojo::ApplicationImpl* application_impl_;
- scoped_ptr<mojo::ViewManagerClientFactory> view_manager_client_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(Moterm);
-};
-
-} // namespace
-
-MojoResult MojoMain(MojoHandle application_request) {
- mojo::ApplicationRunnerChromium runner(new Moterm());
- return runner.Run(application_request);
-}
« no previous file with comments | « apps/moterm/moterm_app.cc ('k') | apps/moterm/moterm_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698