OLD | NEW |
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 "ui/app_list/app_list_constants.h" | 9 #include "ui/app_list/app_list_constants.h" |
10 #include "ui/app_list/search_result.h" | 10 #include "ui/app_list/search_result.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 const gfx::Point& point, | 334 const gfx::Point& point, |
335 ui::MenuSourceType source_type) { | 335 ui::MenuSourceType source_type) { |
336 // |result_| could be NULL when result list is changing. | 336 // |result_| could be NULL when result list is changing. |
337 if (!result_) | 337 if (!result_) |
338 return; | 338 return; |
339 | 339 |
340 ui::MenuModel* menu_model = result_->GetContextMenuModel(); | 340 ui::MenuModel* menu_model = result_->GetContextMenuModel(); |
341 if (!menu_model) | 341 if (!menu_model) |
342 return; | 342 return; |
343 | 343 |
344 context_menu_runner_.reset(new views::MenuRunner(menu_model)); | 344 context_menu_runner_.reset( |
| 345 new views::MenuRunner(menu_model, views::MenuRunner::HAS_MNEMONICS)); |
345 if (context_menu_runner_->RunMenuAt(GetWidget(), | 346 if (context_menu_runner_->RunMenuAt(GetWidget(), |
346 NULL, | 347 NULL, |
347 gfx::Rect(point, gfx::Size()), | 348 gfx::Rect(point, gfx::Size()), |
348 views::MENU_ANCHOR_TOPLEFT, | 349 views::MENU_ANCHOR_TOPLEFT, |
349 source_type, | 350 source_type) == |
350 views::MenuRunner::HAS_MNEMONICS) == | |
351 views::MenuRunner::MENU_DELETED) | 351 views::MenuRunner::MENU_DELETED) |
352 return; | 352 return; |
353 } | 353 } |
354 | 354 |
355 } // namespace app_list | 355 } // namespace app_list |
OLD | NEW |