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

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

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/views/app_list_item_view.cc ('k') | ui/app_list/views/search_result_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 menu_delegate_.reset(new views::MenuModelAdapter(menu_model())); 24 menu_delegate_.reset(new views::MenuModelAdapter(menu_model()));
25 menu_ = new MenuItemView(menu_delegate_.get()); 25 menu_ = new MenuItemView(menu_delegate_.get());
26 menu_runner_.reset(new views::MenuRunner(menu_)); 26 menu_runner_.reset(new views::MenuRunner(menu_));
27 menu_delegate_->BuildMenu(menu_); 27 menu_delegate_->BuildMenu(menu_);
28 } 28 }
29 29
30 AppListMenuViews::~AppListMenuViews() {} 30 AppListMenuViews::~AppListMenuViews() {}
31 31
32 void AppListMenuViews::RunMenuAt(views::MenuButton* button, 32 void AppListMenuViews::RunMenuAt(views::MenuButton* button,
33 const gfx::Point& point) { 33 const gfx::Point& point) {
34 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(), button, 34 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(),
35 button,
35 gfx::Rect(point, gfx::Size()), 36 gfx::Rect(point, gfx::Size()),
36 MenuItemView::TOPRIGHT, 37 views::MENU_ANCHOR_TOPRIGHT,
37 ui::MENU_SOURCE_NONE, 0)); 38 ui::MENU_SOURCE_NONE,
39 0));
38 } 40 }
39 41
40 void AppListMenuViews::Cancel() { 42 void AppListMenuViews::Cancel() {
41 menu_runner_->Cancel(); 43 menu_runner_->Cancel();
42 } 44 }
43 45
44 } // namespace app_list 46 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_item_view.cc ('k') | ui/app_list/views/search_result_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698