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

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

Issue 1910043002: Provide capability classes from Mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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/quick_launch/manifest.json ('k') | mash/screenlock/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 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_application.h" 5 #include "mash/quick_launch/quick_launch_application.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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 base::string16 working; 118 base::string16 working;
119 base::TrimWhitespace(input, base::TRIM_ALL, &working); 119 base::TrimWhitespace(input, base::TRIM_ALL, &working);
120 GURL url(working); 120 GURL url(working);
121 if (url.scheme() != "mojo" && url.scheme() != "exe") 121 if (url.scheme() != "mojo" && url.scheme() != "exe")
122 working = base::ASCIIToUTF16("mojo:") + working; 122 working = base::ASCIIToUTF16("mojo:") + working;
123 return base::UTF16ToUTF8(working); 123 return base::UTF16ToUTF8(working);
124 } 124 }
125 125
126 void UpdateEntries() { 126 void UpdateEntries() {
127 catalog_->GetEntriesProvidingClass( 127 catalog_->GetEntriesProvidingClass(
128 "launchable", 128 "mash:launchable",
129 base::Bind(&QuickLaunchUI::OnGotCatalogEntries, 129 base::Bind(&QuickLaunchUI::OnGotCatalogEntries,
130 base::Unretained(this))); 130 base::Unretained(this)));
131 } 131 }
132 132
133 void OnGotCatalogEntries(mojo::Array<catalog::mojom::EntryPtr> entries) { 133 void OnGotCatalogEntries(mojo::Array<catalog::mojom::EntryPtr> entries) {
134 for (const auto& entry : entries) 134 for (const auto& entry : entries)
135 app_names_.insert(base::UTF8ToUTF16(entry->name.get())); 135 app_names_.insert(base::UTF8ToUTF16(entry->name.get()));
136 } 136 }
137 137
138 void Launch(const std::string& name, bool new_window) { 138 void Launch(const std::string& name, bool new_window) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 windows_.push_back(window); 201 windows_.push_back(window);
202 } 202 }
203 203
204 void QuickLaunchApplication::Create(shell::Connection* connection, 204 void QuickLaunchApplication::Create(shell::Connection* connection,
205 mojom::LaunchableRequest request) { 205 mojom::LaunchableRequest request) {
206 bindings_.AddBinding(this, std::move(request)); 206 bindings_.AddBinding(this, std::move(request));
207 } 207 }
208 208
209 } // namespace quick_launch 209 } // namespace quick_launch
210 } // namespace mash 210 } // namespace mash
OLDNEW
« no previous file with comments | « mash/quick_launch/manifest.json ('k') | mash/screenlock/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698