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

Unified Diff: services/ui/view_manager/view_manager_app.cc

Issue 2015363003: Yet more ApplicationDelegate -> ApplicationImplBase conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@work797-x-work796_no_run_main_app
Patch Set: rebased again Created 4 years, 7 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 | « services/ui/view_manager/view_manager_app.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/view_manager/view_manager_app.cc
diff --git a/services/ui/view_manager/view_manager_app.cc b/services/ui/view_manager/view_manager_app.cc
index 7a80178ef8c7d79816c3147140d39142b6b84499..ff5a201b5b58b472eba82faf8d15a9a3b3a8ab70 100644
--- a/services/ui/view_manager/view_manager_app.cc
+++ b/services/ui/view_manager/view_manager_app.cc
@@ -4,40 +4,33 @@
#include "services/ui/view_manager/view_manager_app.h"
-#include <string>
-#include <vector>
-
#include "base/command_line.h"
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
-#include "mojo/application/application_runner_chromium.h"
#include "mojo/common/tracing_impl.h"
-#include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/connect.h"
+#include "mojo/public/cpp/application/run_application.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "services/ui/view_manager/view_manager_impl.h"
namespace view_manager {
-ViewManagerApp::ViewManagerApp() : app_impl_(nullptr) {}
+ViewManagerApp::ViewManagerApp() {}
ViewManagerApp::~ViewManagerApp() {}
-void ViewManagerApp::Initialize(mojo::ApplicationImpl* app_impl) {
- app_impl_ = app_impl;
-
+void ViewManagerApp::OnInitialize() {
auto command_line = base::CommandLine::ForCurrentProcess();
- command_line->InitFromArgv(app_impl_->args());
+ command_line->InitFromArgv(args());
logging::LoggingSettings settings;
settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
logging::InitLogging(settings);
- tracing_.Initialize(app_impl_->shell(), &app_impl_->args());
+ tracing_.Initialize(shell(), &args());
// Connect to compositor.
mojo::gfx::composition::CompositorPtr compositor;
- mojo::ConnectToService(app_impl_->shell(), "mojo:compositor_service",
+ mojo::ConnectToService(shell(), "mojo:compositor_service",
GetProxy(&compositor));
compositor.set_connection_error_handler(base::Bind(
&ViewManagerApp::OnCompositorConnectionError, base::Unretained(this)));
@@ -46,7 +39,7 @@ void ViewManagerApp::Initialize(mojo::ApplicationImpl* app_impl) {
registry_.reset(new ViewRegistry(compositor.Pass()));
}
-bool ViewManagerApp::ConfigureIncomingConnection(
+bool ViewManagerApp::OnAcceptConnection(
mojo::ServiceProviderImpl* service_provider_impl) {
service_provider_impl->AddService<mojo::ui::ViewManager>([this](
const mojo::ConnectionContext& connection_context,
@@ -64,7 +57,7 @@ void ViewManagerApp::OnCompositorConnectionError() {
}
void ViewManagerApp::Shutdown() {
- app_impl_->Terminate();
+ mojo::TerminateApplication(MOJO_RESULT_OK);
}
} // namespace view_manager
« no previous file with comments | « services/ui/view_manager/view_manager_app.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698