Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome/browser/ui/tabs/tab_menu_model.h

Issue 6913026: Compact Navigation prototype (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Clang build fix. After commit/revert. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_ 6 #define CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/base/models/simple_menu_model.h" 9 #include "ui/base/models/simple_menu_model.h"
10 10
11 class TabStripModel; 11 class TabStripModel;
12 12
13 // A menu model that builds the contents of the tab context menu. To make sure 13 // A menu model that builds the contents of the tab context menu. To make sure
14 // the menu reflects the real state of the tab a new TabMenuModel should be 14 // the menu reflects the real state of the tab a new TabMenuModel should be
15 // created each time the menu is shown. 15 // created each time the menu is shown.
16 class TabMenuModel : public ui::SimpleMenuModel { 16 class TabMenuModel : public ui::SimpleMenuModel {
17 public: 17 public:
18 // TODO: nuke this constructor when callers are updated. 18 // TODO: nuke this constructor when callers are updated.
19 TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, bool is_pinned); 19 TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, bool is_pinned);
20 TabMenuModel(ui::SimpleMenuModel::Delegate* delegate, 20 TabMenuModel(ui::SimpleMenuModel::Delegate* delegate,
21 TabStripModel* tab_strip, 21 TabStripModel* tab_strip,
22 int index); 22 int index);
23 virtual ~TabMenuModel() {} 23 virtual ~TabMenuModel() {}
24 24
25 // Returns true if vertical tabs are enabled. 25 // Returns true if vertical tabs are enabled.
26 static bool AreVerticalTabsEnabled(); 26 static bool AreVerticalTabsEnabled();
27 27
28 // Returns true if compact navigation bar is enabled.
29 static bool IsCompactNavigationModeEnabled();
30
28 private: 31 private:
29 // TODO: nuke this when first constructor is removed. 32 // TODO: nuke this when first constructor is removed.
30 void Build(bool is_pinned); 33 void Build(bool is_pinned);
31 void Build(TabStripModel* tab_strip, int index); 34 void Build(TabStripModel* tab_strip, int index);
32 35
33 DISALLOW_COPY_AND_ASSIGN(TabMenuModel); 36 DISALLOW_COPY_AND_ASSIGN(TabMenuModel);
34 }; 37 };
35 38
36 #endif // CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_ 39 #endif // CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_cocoa.mm ('k') | chrome/browser/ui/tabs/tab_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698