Views Omnibox: tolerate minor click-to-select-all dragging.
[chromium-blink-merge.git] / ui / app_list / views / app_list_menu_views.h
blob32efc3ac14f4182a195e4b4c62b98fef482242e6
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.
5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/app_list/app_list_menu.h"
10 #include "ui/views/controls/menu/menu_model_adapter.h"
11 #include "ui/views/controls/menu/menu_runner.h"
13 namespace gfx {
14 class Point;
17 namespace views {
18 class MenuButton;
21 namespace app_list {
23 // Views implementation of the app list menu.
24 // TODO(benwells): We should consider moving this into Chrome.
25 class AppListMenuViews : public AppListMenu {
26 public:
27 explicit AppListMenuViews(AppListViewDelegate* delegate);
28 virtual ~AppListMenuViews();
30 void RunMenuAt(views::MenuButton* button, const gfx::Point& point);
31 void Cancel();
33 private:
34 // The context menu itself and its contents.
35 scoped_ptr<views::MenuModelAdapter> menu_delegate_;
36 views::MenuItemView* menu_; // Owned by menu_runner_.
37 scoped_ptr<views::MenuRunner> menu_runner_;
39 DISALLOW_COPY_AND_ASSIGN(AppListMenuViews);
42 } // namespace app_list
44 #endif // UI_APP_LIST_VIEWS_APP_LIST_MENU_VIEWS_H_