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

Unified Diff: mojo/public/shell/lib/application.cc

Issue 219583003: Mojo: Move mojo/public/shell to mojo/public/{cpp,interfaces}/shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/public/shell/application.h ('k') | mojo/public/shell/lib/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/shell/lib/application.cc
diff --git a/mojo/public/shell/lib/application.cc b/mojo/public/shell/lib/application.cc
deleted file mode 100644
index 1baff5226dccc5ce0ccd195470435556a9d8cf39..0000000000000000000000000000000000000000
--- a/mojo/public/shell/lib/application.cc
+++ /dev/null
@@ -1,54 +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 "mojo/public/shell/application.h"
-
-namespace mojo {
-
-Application::Application(ScopedShellHandle shell_handle)
- : internal::ServiceFactoryBase::Owner(shell_handle.Pass()) {
-}
-
-Application::Application(MojoHandle shell_handle)
- : internal::ServiceFactoryBase::Owner(
- mojo::MakeScopedHandle(ShellHandle(shell_handle)).Pass()) {}
-
-Application::~Application() {
- for (ServiceFactoryList::iterator it = service_factories_.begin();
- it != service_factories_.end(); ++it) {
- delete *it;
- }
-}
-
-void Application::AddServiceFactory(
- internal::ServiceFactoryBase* service_factory) {
- service_factories_.push_back(service_factory);
- set_service_factory_owner(service_factory, this);
-}
-
-void Application::RemoveServiceFactory(
- internal::ServiceFactoryBase* service_factory) {
- for (ServiceFactoryList::iterator it = service_factories_.begin();
- it != service_factories_.end(); ++it) {
- if (*it == service_factory) {
- service_factories_.erase(it);
- delete service_factory;
- break;
- }
- }
- if (service_factories_.empty())
- shell_.reset();
-}
-
-void Application::AcceptConnection(const mojo::String& url,
- ScopedMessagePipeHandle client_handle) {
- // TODO(davemoore): This method must be overridden by an Application subclass
- // to dispatch to the right ServiceFactory. We need to figure out an approach
- // to registration to make this better.
- assert(1 == service_factories_.size());
- return service_factories_.front()->AcceptConnection(url.To<std::string>(),
- client_handle.Pass());
-}
-
-} // namespace mojo
« no previous file with comments | « mojo/public/shell/application.h ('k') | mojo/public/shell/lib/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698