blob: 93b2ea0320ef06b4ae5d1eda553ad6a09b306bc2 (
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
|
// Copyright (c) 2012 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 CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_
#define CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/base/models/simple_menu_model.h"
// A SimpleMenuModel subclass that allows the system menu for a window to be
// wrapped.
class SystemMenuModel : public ui::SimpleMenuModel {
public:
explicit SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate);
virtual ~SystemMenuModel();
// Overridden from ui::MenuModel:
virtual int GetFirstItemIndex(gfx::NativeMenu native_menu) const OVERRIDE;
protected:
// Overridden from ui::SimpleMenuModel:
virtual int FlipIndex(int index) const OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(SystemMenuModel);
};
#endif // CHROME_BROWSER_UI_VIEWS_FRAME_SYSTEM_MENU_MODEL_H_
|