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

Side by Side Diff: mojo/public/cpp/application/lib/application_impl.cc

Issue 683583002: Update mojo sdk to rev e083961bf11fd0c94d40be8853761da529b6d444 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: geolocation Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/cpp/application/application_impl.h" 5 #include "mojo/public/cpp/application/application_impl.h"
6 6
7 #include "mojo/public/cpp/application/application_delegate.h" 7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/lib/service_registry.h" 8 #include "mojo/public/cpp/application/lib/service_registry.h"
9 #include "mojo/public/cpp/bindings/interface_ptr.h" 9 #include "mojo/public/cpp/bindings/interface_ptr.h"
10 #include "mojo/public/cpp/environment/logging.h" 10 #include "mojo/public/cpp/environment/logging.h"
(...skipping 18 matching lines...) Expand all
29 : initialized_(false), delegate_(delegate), shell_watch_(nullptr) { 29 : initialized_(false), delegate_(delegate), shell_watch_(nullptr) {
30 BindShell(shell_handle.Pass()); 30 BindShell(shell_handle.Pass());
31 } 31 }
32 32
33 ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate, 33 ApplicationImpl::ApplicationImpl(ApplicationDelegate* delegate,
34 MojoHandle shell_handle) 34 MojoHandle shell_handle)
35 : initialized_(false), delegate_(delegate), shell_watch_(nullptr) { 35 : initialized_(false), delegate_(delegate), shell_watch_(nullptr) {
36 BindShell(MakeScopedHandle(MessagePipeHandle(shell_handle))); 36 BindShell(MakeScopedHandle(MessagePipeHandle(shell_handle)));
37 } 37 }
38 38
39 bool ApplicationImpl::HasArg(const std::string& arg) const {
40 return std::find(args_.begin(), args_.end(), arg) != args_.end();
41 }
42
39 void ApplicationImpl::ClearConnections() { 43 void ApplicationImpl::ClearConnections() {
40 for (ServiceRegistryList::iterator i(incoming_service_registries_.begin()); 44 for (ServiceRegistryList::iterator i(incoming_service_registries_.begin());
41 i != incoming_service_registries_.end(); 45 i != incoming_service_registries_.end();
42 ++i) 46 ++i)
43 delete *i; 47 delete *i;
44 for (ServiceRegistryList::iterator i(outgoing_service_registries_.begin()); 48 for (ServiceRegistryList::iterator i(outgoing_service_registries_.begin());
45 i != outgoing_service_registries_.end(); 49 i != outgoing_service_registries_.end();
46 ++i) 50 ++i)
47 delete *i; 51 delete *i;
48 incoming_service_registries_.clear(); 52 incoming_service_registries_.clear();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 internal::ServiceRegistry* registry = new internal::ServiceRegistry( 104 internal::ServiceRegistry* registry = new internal::ServiceRegistry(
101 this, requestor_url, service_provider.Pass()); 105 this, requestor_url, service_provider.Pass());
102 if (!delegate_->ConfigureIncomingConnection(registry)) { 106 if (!delegate_->ConfigureIncomingConnection(registry)) {
103 delete registry; 107 delete registry;
104 return; 108 return;
105 } 109 }
106 incoming_service_registries_.push_back(registry); 110 incoming_service_registries_.push_back(registry);
107 } 111 }
108 112
109 } // namespace mojo 113 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/lib/DEPS ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698