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

Side by Side Diff: mash/app_driver/app_driver.cc

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 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 unified diff | Download patch
« no previous file with comments | « mash/app_driver/app_driver.h ('k') | mash/app_driver/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/app_driver/app_driver.h" 5 #include "mash/app_driver/app_driver.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 base::Bind(&AppDriver::AddAccelerators, weak_factory_.GetWeakPtr())); 79 base::Bind(&AppDriver::AddAccelerators, weak_factory_.GetWeakPtr()));
80 80
81 for (const AcceleratorSpec& spec : g_spec) { 81 for (const AcceleratorSpec& spec : g_spec) {
82 registrar->AddAccelerator( 82 registrar->AddAccelerator(
83 static_cast<uint32_t>(spec.id), 83 static_cast<uint32_t>(spec.id),
84 ui::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), 84 ui::CreateKeyMatcher(spec.keyboard_code, spec.event_flags),
85 base::Bind(&AssertTrue)); 85 base::Bind(&AssertTrue));
86 } 86 }
87 } 87 }
88 88
89 void AppDriver::OnStart(const shell::Identity& identity) { 89 void AppDriver::OnStart(const service_manager::Identity& identity) {
90 AddAccelerators(); 90 AddAccelerators();
91 } 91 }
92 92
93 bool AppDriver::OnConnect(const shell::Identity& remote_identity, 93 bool AppDriver::OnConnect(const service_manager::Identity& remote_identity,
94 shell::InterfaceRegistry* registry) { 94 service_manager::InterfaceRegistry* registry) {
95 return true; 95 return true;
96 } 96 }
97 97
98 bool AppDriver::OnStop() { 98 bool AppDriver::OnStop() {
99 // Prevent the code in AddAccelerators() from keeping this app alive. 99 // Prevent the code in AddAccelerators() from keeping this app alive.
100 if (binding_.is_bound()) 100 if (binding_.is_bound())
101 binding_.set_connection_error_handler(base::Bind(&DoNothing)); 101 binding_.set_connection_error_handler(base::Bind(&DoNothing));
102 return true; 102 return true;
103 } 103 }
104 104
(...skipping 25 matching lines...) Expand all
130 130
131 void AppDriver::AddAccelerators() { 131 void AppDriver::AddAccelerators() {
132 connector()->ConnectToInterface("service:catalog", &catalog_); 132 connector()->ConnectToInterface("service:catalog", &catalog_);
133 catalog_->GetEntriesProvidingClass( 133 catalog_->GetEntriesProvidingClass(
134 "mus:window_manager", base::Bind(&AppDriver::OnAvailableCatalogEntries, 134 "mus:window_manager", base::Bind(&AppDriver::OnAvailableCatalogEntries,
135 weak_factory_.GetWeakPtr())); 135 weak_factory_.GetWeakPtr()));
136 } 136 }
137 137
138 } // namespace app_driver 138 } // namespace app_driver
139 } // namespace mash 139 } // namespace mash
OLDNEW
« no previous file with comments | « mash/app_driver/app_driver.h ('k') | mash/app_driver/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698