summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/menu_host_views.h
blob: 7ab17293b611c42153eef4d0665845c248a523bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef VIEWS_CONTROLS_MENU_MENU_HOST_VIEWS_H_
#define VIEWS_CONTROLS_MENU_MENU_HOST_VIEWS_H_
#pragma once

#include "views/controls/menu/native_menu_host.h"
#include "views/widget/native_widget_views.h"

namespace views {
namespace internal {
class NativeMenuHostDelegate;
}

// MenuHost implementation for views.
class MenuHostViews : public NativeWidgetViews,
                      public NativeMenuHost {
 public:
  explicit MenuHostViews(internal::NativeMenuHostDelegate* delegate);
  virtual ~MenuHostViews();

 private:
  // Overridden from NativeMenuHost:
  virtual void StartCapturing() OVERRIDE;
  virtual NativeWidget* AsNativeWidget() OVERRIDE;

  // Overridden from NativeWidgetViews:
  virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE;

  internal::NativeMenuHostDelegate* delegate_;

  DISALLOW_COPY_AND_ASSIGN(MenuHostViews);
};

}  // namespace views

#endif  // VIEWS_CONTROLS_MENU_MENU_HOST_VIEWS_H_