blob: 234a201e68620b0a0901fb21779228062ced6997 (
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
|
// 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 CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
#define CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
#pragma once
#include "ui/base/models/simple_menu_model.h"
class TabStripModel;
// A menu model that builds the contents of the tab context menu. To make sure
// the menu reflects the real state of the tab a new TabMenuModel should be
// created each time the menu is shown.
class TabMenuModel : public ui::SimpleMenuModel {
public:
// TODO: nuke this constructor when callers are updated.
TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, bool is_pinned);
TabMenuModel(ui::SimpleMenuModel::Delegate* delegate,
TabStripModel* tab_strip,
int index);
virtual ~TabMenuModel() {}
// Returns true if vertical tabs are enabled.
static bool AreVerticalTabsEnabled();
// Returns true if compact navigation bar is enabled.
static bool IsCompactNavigationModeEnabled();
private:
// TODO: nuke this when first constructor is removed.
void Build(bool is_pinned);
void Build(TabStripModel* tab_strip, int index);
DISALLOW_COPY_AND_ASSIGN(TabMenuModel);
};
#endif // CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
|