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

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

Issue 2127713005: Purge AppListMenu, and the app list profile switcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160707-Apps-RemoveSettings
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
« no previous file with comments | « ui/app_list/views/app_list_menu_views.h ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ui/app_list/views/app_list_menu_views.h"
6
7 #include "ui/app_list/app_list_view_delegate.h"
8 #include "ui/views/controls/button/menu_button.h"
9 #include "ui/views/controls/image_view.h"
10 #include "ui/views/controls/label.h"
11 #include "ui/views/controls/menu/menu_config.h"
12 #include "ui/views/controls/menu/menu_item_view.h"
13 #include "ui/views/controls/menu/submenu_view.h"
14 #include "ui/views/layout/grid_layout.h"
15
16 using views::MenuItemView;
17
18 namespace app_list {
19
20 AppListMenuViews::AppListMenuViews(AppListViewDelegate* delegate)
21 : AppListMenu(delegate) {
22 menu_delegate_.reset(new views::MenuModelAdapter(menu_model()));
23 menu_ = new MenuItemView(menu_delegate_.get());
24 menu_runner_.reset(new views::MenuRunner(menu_, 0));
25 menu_delegate_->BuildMenu(menu_);
26 }
27
28 AppListMenuViews::~AppListMenuViews() {}
29
30 void AppListMenuViews::RunMenuAt(views::MenuButton* button,
31 const gfx::Point& point) {
32 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(),
33 button,
34 gfx::Rect(point, gfx::Size()),
35 views::MENU_ANCHOR_TOPRIGHT,
36 ui::MENU_SOURCE_NONE));
37 }
38
39 void AppListMenuViews::Cancel() {
40 menu_runner_->Cancel();
41 }
42
43 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_menu_views.h ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698