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

Unified Diff: ui/views/controls/menu/menu_runner.cc

Issue 187483005: Extending the Views-on-Mac experiment: whole app list grid. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: still compiles r263560 + crrev/195793005 Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_runner.h ('k') | ui/views/controls/native/native_view_host_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_runner.cc
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
index 18b3fcd546581704a6969f718381a8dccae4cb36..ce63fef85c8321b84d1f61c8d29e859f46c7c356 100644
--- a/ui/views/controls/menu/menu_runner.cc
+++ b/ui/views/controls/menu/menu_runner.cc
@@ -12,6 +12,7 @@
#include "ui/views/controls/menu/menu_controller.h"
#include "ui/views/controls/menu/menu_controller_delegate.h"
#include "ui/views/controls/menu/menu_delegate.h"
+#include "ui/views/controls/menu/menu_item_view.h"
#include "ui/views/controls/menu/menu_model_adapter.h"
#include "ui/views/controls/menu/menu_runner_handler.h"
#include "ui/views/widget/widget.h"
@@ -43,7 +44,7 @@ class MenuRunnerImpl : public internal::MenuControllerDelegate {
MenuRunner::RunResult RunMenuAt(Widget* parent,
MenuButton* button,
const gfx::Rect& bounds,
- MenuItemView::AnchorPosition anchor,
+ ui::MenuAnchorPosition anchor,
int32 types) WARN_UNUSED_RESULT;
void Cancel();
@@ -297,12 +298,15 @@ MenuItemView* MenuRunner::GetMenu() {
return holder_->menu();
}
+template<>
MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent,
MenuButton* button,
const gfx::Rect& bounds,
- MenuItemView::AnchorPosition anchor,
+ ui::MenuAnchorPosition menu_anchor,
ui::MenuSourceType source_type,
int32 types) {
+ MenuItemView::AnchorPosition anchor =
+ static_cast<MenuItemView::AnchorPosition>(menu_anchor);
if (runner_handler_.get()) {
return runner_handler_->RunMenuAt(parent, button, bounds, anchor,
source_type, types);
« no previous file with comments | « ui/views/controls/menu/menu_runner.h ('k') | ui/views/controls/native/native_view_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698