| OLD | NEW |
| 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_menu_views.h" | 5 #include "ui/app_list/views/app_list_menu_views.h" |
| 6 | 6 |
| 7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
| 8 #include "ui/app_list/app_list_view_delegate.h" | 8 #include "ui/app_list/app_list_view_delegate.h" |
| 9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
| 10 #include "ui/views/controls/button/menu_button.h" | 10 #include "ui/views/controls/button/menu_button.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 menu_runner_.reset(new views::MenuRunner(menu_)); | 131 menu_runner_.reset(new views::MenuRunner(menu_)); |
| 132 menu_delegate_->BuildMenu(menu_); | 132 menu_delegate_->BuildMenu(menu_); |
| 133 } | 133 } |
| 134 | 134 |
| 135 AppListMenuViews::~AppListMenuViews() {} | 135 AppListMenuViews::~AppListMenuViews() {} |
| 136 | 136 |
| 137 void AppListMenuViews::RunMenuAt(views::MenuButton* button, | 137 void AppListMenuViews::RunMenuAt(views::MenuButton* button, |
| 138 const gfx::Point& point) { | 138 const gfx::Point& point) { |
| 139 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(), button, | 139 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(), button, |
| 140 gfx::Rect(point, gfx::Size()), | 140 gfx::Rect(point, gfx::Size()), |
| 141 MenuItemView::TOPRIGHT, 0)); | 141 MenuItemView::TOPRIGHT, |
| 142 ui::MENU_SOURCE_NONE, 0)); |
| 142 } | 143 } |
| 143 | 144 |
| 144 void AppListMenuViews::Cancel() { | 145 void AppListMenuViews::Cancel() { |
| 145 menu_runner_->Cancel(); | 146 menu_runner_->Cancel(); |
| 146 } | 147 } |
| 147 | 148 |
| 148 } // namespace app_list | 149 } // namespace app_list |
| OLD | NEW |