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

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

Issue 2272023002: Turn AppList context menus Async (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « ui/app_list/views/search_result_tile_item_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/search_result_view.h" 5 #include "ui/app_list/views/search_result_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/app_list/app_list_constants.h" 10 #include "ui/app_list/app_list_constants.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 const gfx::Point& point, 404 const gfx::Point& point,
405 ui::MenuSourceType source_type) { 405 ui::MenuSourceType source_type) {
406 // |result_| could be NULL when result list is changing. 406 // |result_| could be NULL when result list is changing.
407 if (!result_) 407 if (!result_)
408 return; 408 return;
409 409
410 ui::MenuModel* menu_model = result_->GetContextMenuModel(); 410 ui::MenuModel* menu_model = result_->GetContextMenuModel();
411 if (!menu_model) 411 if (!menu_model)
412 return; 412 return;
413 413
414 context_menu_runner_.reset( 414 context_menu_runner_.reset(new views::MenuRunner(
415 new views::MenuRunner(menu_model, views::MenuRunner::HAS_MNEMONICS)); 415 menu_model, views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::ASYNC));
416 if (context_menu_runner_->RunMenuAt(GetWidget(), 416 context_menu_runner_->RunMenuAt(GetWidget(), NULL,
417 NULL, 417 gfx::Rect(point, gfx::Size()),
418 gfx::Rect(point, gfx::Size()), 418 views::MENU_ANCHOR_TOPLEFT, source_type);
419 views::MENU_ANCHOR_TOPLEFT,
420 source_type) ==
421 views::MenuRunner::MENU_DELETED)
422 return;
423 } 419 }
424 420
425 } // namespace app_list 421 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/search_result_tile_item_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698