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

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

Issue 2425563004: Support reading multiple InterfaceProviderSpecs from manifests (Closed)
Patch Set: . Created 4 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
« no previous file with comments | « mash/app_driver/app_driver.cc ('k') | mash/task_viewer/task_viewer.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/quick_launch/quick_launch.h" 5 #include "mash/quick_launch/quick_launch.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 std::string Canonicalize(const base::string16& input) const { 112 std::string Canonicalize(const base::string16& input) const {
113 base::string16 working; 113 base::string16 working;
114 base::TrimWhitespace(input, base::TRIM_ALL, &working); 114 base::TrimWhitespace(input, base::TRIM_ALL, &working);
115 GURL url(working); 115 GURL url(working);
116 if (url.scheme() != "service" && url.scheme() != "exe") 116 if (url.scheme() != "service" && url.scheme() != "exe")
117 working = base::ASCIIToUTF16("service:") + working; 117 working = base::ASCIIToUTF16("service:") + working;
118 return base::UTF16ToUTF8(working); 118 return base::UTF16ToUTF8(working);
119 } 119 }
120 120
121 void UpdateEntries() { 121 void UpdateEntries() {
122 catalog_->GetEntriesProvidingClass( 122 catalog_->GetEntriesProvidingCapability(
123 "mash:launchable", 123 "mash:launchable",
124 base::Bind(&QuickLaunchUI::OnGotCatalogEntries, 124 base::Bind(&QuickLaunchUI::OnGotCatalogEntries,
125 base::Unretained(this))); 125 base::Unretained(this)));
126 } 126 }
127 127
128 void OnGotCatalogEntries(std::vector<catalog::mojom::EntryPtr> entries) { 128 void OnGotCatalogEntries(std::vector<catalog::mojom::EntryPtr> entries) {
129 for (const auto& entry : entries) 129 for (const auto& entry : entries)
130 app_names_.insert(base::UTF8ToUTF16(entry->name)); 130 app_names_.insert(base::UTF8ToUTF16(entry->name));
131 } 131 }
132 132
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 windows_.push_back(window); 197 windows_.push_back(window);
198 } 198 }
199 199
200 void QuickLaunch::Create(const service_manager::Identity& remote_identity, 200 void QuickLaunch::Create(const service_manager::Identity& remote_identity,
201 mojom::LaunchableRequest request) { 201 mojom::LaunchableRequest request) {
202 bindings_.AddBinding(this, std::move(request)); 202 bindings_.AddBinding(this, std::move(request));
203 } 203 }
204 204
205 } // namespace quick_launch 205 } // namespace quick_launch
206 } // namespace mash 206 } // namespace mash
OLDNEW
« no previous file with comments | « mash/app_driver/app_driver.cc ('k') | mash/task_viewer/task_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698