Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / components / renderer_context_menu / views / toolkit_delegate_views.h
blobcb20987f26f41212eb4c8f03ab1908e086288e70
1 // Copyright 2014 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 COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_
6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_
8 #include "components/renderer_context_menu/render_view_context_menu_base.h"
9 #include "ui/base/ui_base_types.h"
11 namespace gfx {
12 class Point;
15 namespace views {
16 class MenuItemView;
17 class MenuModelAdapter;
18 class MenuRunner;
19 class Widget;
22 namespace ui {
23 class SimpleMenuModel;
26 class ToolkitDelegateViews : public RenderViewContextMenuBase::ToolkitDelegate {
27 public:
28 ToolkitDelegateViews();
29 ~ToolkitDelegateViews() override;
31 void RunMenuAt(views::Widget* parent,
32 const gfx::Point& point,
33 ui::MenuSourceType type);
35 private:
36 // ToolkitDelegate:
37 void Init(ui::SimpleMenuModel* menu_model) override;
38 void Cancel() override;
39 void UpdateMenuItem(int command_id,
40 bool enabled,
41 bool hidden,
42 const base::string16& title) override;
44 scoped_ptr<views::MenuModelAdapter> menu_adapter_;
45 scoped_ptr<views::MenuRunner> menu_runner_;
47 // Weak. Owned by menu_runner_;
48 views::MenuItemView* menu_view_;
50 DISALLOW_COPY_AND_ASSIGN(ToolkitDelegateViews);
53 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_TOOLKIT_DELEGATE_VIEWS_H_