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

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

Issue 2390013002: Rename mojo: to service: (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 | « device/usb/mojo/device_manager_impl.h ('k') | mash/app_driver/manifest.json » ('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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 }; 108 };
109 109
110 std::map<Accelerator, LaunchOptions> options{ 110 std::map<Accelerator, LaunchOptions> options{
111 {Accelerator::NewChromeWindow, 111 {Accelerator::NewChromeWindow,
112 {mojom::kWindow, "exe:chrome", LaunchMode::MAKE_NEW}}, 112 {mojom::kWindow, "exe:chrome", LaunchMode::MAKE_NEW}},
113 {Accelerator::NewChromeTab, 113 {Accelerator::NewChromeTab,
114 {mojom::kDocument, "exe:chrome", LaunchMode::MAKE_NEW}}, 114 {mojom::kDocument, "exe:chrome", LaunchMode::MAKE_NEW}},
115 {Accelerator::NewChromeIncognitoWindow, 115 {Accelerator::NewChromeIncognitoWindow,
116 {mojom::kIncognitoWindow, "exe:chrome", LaunchMode::MAKE_NEW}}, 116 {mojom::kIncognitoWindow, "exe:chrome", LaunchMode::MAKE_NEW}},
117 {Accelerator::ShowTaskManager, 117 {Accelerator::ShowTaskManager,
118 {mojom::kWindow, "mojo:task_viewer", LaunchMode::DEFAULT}}, 118 {mojom::kWindow, "service:task_viewer", LaunchMode::DEFAULT}},
119 }; 119 };
120 120
121 const auto iter = options.find(static_cast<Accelerator>(id)); 121 const auto iter = options.find(static_cast<Accelerator>(id));
122 DCHECK(iter != options.end()); 122 DCHECK(iter != options.end());
123 const LaunchOptions& entry = iter->second; 123 const LaunchOptions& entry = iter->second;
124 LaunchablePtr launchable; 124 LaunchablePtr launchable;
125 connector()->ConnectToInterface(entry.app, &launchable); 125 connector()->ConnectToInterface(entry.app, &launchable);
126 launchable->Launch(entry.option, entry.mode); 126 launchable->Launch(entry.option, entry.mode);
127 } 127 }
128 128
129 void AppDriver::AddAccelerators() { 129 void AppDriver::AddAccelerators() {
130 connector()->ConnectToInterface("mojo:catalog", &catalog_); 130 connector()->ConnectToInterface("service:catalog", &catalog_);
131 catalog_->GetEntriesProvidingClass( 131 catalog_->GetEntriesProvidingClass(
132 "mus:window_manager", base::Bind(&AppDriver::OnAvailableCatalogEntries, 132 "mus:window_manager", base::Bind(&AppDriver::OnAvailableCatalogEntries,
133 weak_factory_.GetWeakPtr())); 133 weak_factory_.GetWeakPtr()));
134 } 134 }
135 135
136 } // namespace app_driver 136 } // namespace app_driver
137 } // namespace mash 137 } // namespace mash
OLDNEW
« no previous file with comments | « device/usb/mojo/device_manager_impl.h ('k') | mash/app_driver/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698