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 "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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 const gfx::Point& point, | 399 const gfx::Point& point, |
400 ui::MenuSourceType source_type) { | 400 ui::MenuSourceType source_type) { |
401 // |result_| could be NULL when result list is changing. | 401 // |result_| could be NULL when result list is changing. |
402 if (!result_) | 402 if (!result_) |
403 return; | 403 return; |
404 | 404 |
405 ui::MenuModel* menu_model = result_->GetContextMenuModel(); | 405 ui::MenuModel* menu_model = result_->GetContextMenuModel(); |
406 if (!menu_model) | 406 if (!menu_model) |
407 return; | 407 return; |
408 | 408 |
409 context_menu_runner_.reset(new views::MenuRunner( | 409 context_menu_runner_.reset( |
410 menu_model, views::MenuRunner::HAS_MNEMONICS | views::MenuRunner::ASYNC)); | 410 new views::MenuRunner(menu_model, views::MenuRunner::HAS_MNEMONICS)); |
411 context_menu_runner_->RunMenuAt(GetWidget(), NULL, | 411 context_menu_runner_->RunMenuAt(GetWidget(), NULL, |
412 gfx::Rect(point, gfx::Size()), | 412 gfx::Rect(point, gfx::Size()), |
413 views::MENU_ANCHOR_TOPLEFT, source_type); | 413 views::MENU_ANCHOR_TOPLEFT, source_type); |
414 } | 414 } |
415 | 415 |
416 } // namespace app_list | 416 } // namespace app_list |
OLD | NEW |