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

Side by Side Diff: ui/app_list/views/app_list_main_view.cc

Issue 2143893002: Purge the App Launcher code from Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ui/app_list/views/app_list_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 void AppListMainView::ActivateApp(AppListItem* item, int event_flags) { 287 void AppListMainView::ActivateApp(AppListItem* item, int event_flags) {
288 // TODO(jennyz): Activate the folder via AppListModel notification. 288 // TODO(jennyz): Activate the folder via AppListModel notification.
289 if (item->GetItemType() == AppListFolderItem::kItemType) 289 if (item->GetItemType() == AppListFolderItem::kItemType)
290 contents_view_->ShowFolderContent(static_cast<AppListFolderItem*>(item)); 290 contents_view_->ShowFolderContent(static_cast<AppListFolderItem*>(item));
291 else 291 else
292 item->Activate(event_flags); 292 item->Activate(event_flags);
293 } 293 }
294 294
295 void AppListMainView::GetShortcutPathForApp(
296 const std::string& app_id,
297 const base::Callback<void(const base::FilePath&)>& callback) {
298 delegate_->GetShortcutPathForApp(app_id, callback);
299 }
300
301 void AppListMainView::CancelDragInActiveFolder() { 295 void AppListMainView::CancelDragInActiveFolder() {
302 contents_view_->apps_container_view() 296 contents_view_->apps_container_view()
303 ->app_list_folder_view() 297 ->app_list_folder_view()
304 ->items_grid_view() 298 ->items_grid_view()
305 ->EndDrag(true); 299 ->EndDrag(true);
306 } 300 }
307 301
308 void AppListMainView::QueryChanged(SearchBoxView* sender) { 302 void AppListMainView::QueryChanged(SearchBoxView* sender) {
309 base::string16 query; 303 base::string16 query;
310 base::TrimWhitespace(model_->search_box()->text(), base::TRIM_ALL, &query); 304 base::TrimWhitespace(model_->search_box()->text(), base::TRIM_ALL, &query);
(...skipping 12 matching lines...) Expand all
323 contents_view_->search_results_page_view()->SetSelection(select); 317 contents_view_->search_results_page_view()->SetSelection(select);
324 } 318 }
325 319
326 void AppListMainView::OnResultInstalled(SearchResult* result) { 320 void AppListMainView::OnResultInstalled(SearchResult* result) {
327 // Clears the search to show the apps grid. The last installed app 321 // Clears the search to show the apps grid. The last installed app
328 // should be highlighted and made visible already. 322 // should be highlighted and made visible already.
329 search_box_view_->ClearSearch(); 323 search_box_view_->ClearSearch();
330 } 324 }
331 325
332 } // namespace app_list 326 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698