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

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

Issue 2215133002: Change signature of OnConnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: . Created 4 years, 4 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/browser/browser.h » ('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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 static_cast<uint32_t>(spec.id), 84 static_cast<uint32_t>(spec.id),
85 ui::CreateKeyMatcher(spec.keyboard_code, spec.event_flags), 85 ui::CreateKeyMatcher(spec.keyboard_code, spec.event_flags),
86 base::Bind(&AssertTrue)); 86 base::Bind(&AssertTrue));
87 } 87 }
88 } 88 }
89 89
90 void AppDriver::OnStart(const shell::Identity& identity) { 90 void AppDriver::OnStart(const shell::Identity& identity) {
91 AddAccelerators(); 91 AddAccelerators();
92 } 92 }
93 93
94 bool AppDriver::OnConnect(shell::Connection* connection) { 94 bool AppDriver::OnConnect(const shell::Identity& remote_identity,
95 shell::InterfaceRegistry* registry) {
95 return true; 96 return true;
96 } 97 }
97 98
98 bool AppDriver::OnStop() { 99 bool AppDriver::OnStop() {
99 // Prevent the code in AddAccelerators() from keeping this app alive. 100 // Prevent the code in AddAccelerators() from keeping this app alive.
100 if (binding_.is_bound()) 101 if (binding_.is_bound())
101 binding_.set_connection_error_handler(base::Bind(&DoNothing)); 102 binding_.set_connection_error_handler(base::Bind(&DoNothing));
102 return true; 103 return true;
103 } 104 }
104 105
(...skipping 27 matching lines...) Expand all
132 133
133 void AppDriver::AddAccelerators() { 134 void AppDriver::AddAccelerators() {
134 connector()->ConnectToInterface("mojo:catalog", &catalog_); 135 connector()->ConnectToInterface("mojo:catalog", &catalog_);
135 catalog_->GetEntriesProvidingClass( 136 catalog_->GetEntriesProvidingClass(
136 "mus:window_manager", base::Bind(&AppDriver::OnAvailableCatalogEntries, 137 "mus:window_manager", base::Bind(&AppDriver::OnAvailableCatalogEntries,
137 weak_factory_.GetWeakPtr())); 138 weak_factory_.GetWeakPtr()));
138 } 139 }
139 140
140 } // namespace app_driver 141 } // namespace app_driver
141 } // namespace mash 142 } // namespace mash
OLDNEW
« no previous file with comments | « mash/app_driver/app_driver.h ('k') | mash/browser/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698