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

Side by Side Diff: chrome/browser/tabs/tab_mru_list_manager.h

Issue 10117016: Implementation for switching between recently used tabs using ctrl tilde or quoteleft. Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added tab mru list manager class. Created 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CHROME_BROWSER_TABS_TAB_MRU_LIST_MANAGER_H_
sky 2012/05/25 17:56:52 This should be in chrome/browser/ui/tabs.
NaveenBobbili (Motorola) 2012/05/29 11:41:05 Done.
NaveenBobbili (Motorola) 2012/05/29 11:41:05 Done.
6 #define CHROME_BROWSER_TABS_TAB_MRU_LIST_MANAGER_H_
7 #pragma once
8
9 #include <list>
10
11 class TabContentsWrapper;
12 ////////////////////////////////////////////////////////////////////////////////
13 //
14 // TabMRUListManager
15 //
16 // This is a list that manages the tabs that are in a tab strip as per the most
17 // recently used priority order.
18 //
19 ////////////////////////////////////////////////////////////////////////////////
20 class TabMRUListManager {
sky 2012/05/25 17:56:52 TabMRUListManager should be a TabStripModelObserve
NaveenBobbili (Motorola) 2012/05/29 11:41:05 Done.
21 public:
22 virtual ~TabMRUListManager();
sky 2012/05/25 17:56:52 no virtual
23
24 void ActivateContents(TabContentsWrapper* new_contents);
25 void AppendContents(TabContentsWrapper* new_contents);
26 void ClearContents();
27 TabContentsWrapper* GetNextMRUTab();
28 void RemoveContents(TabContentsWrapper* removed_contents);
29 void ReplaceContents(
30 TabContentsWrapper* old_contents, TabContentsWrapper* new_contents);
31
32 private:
33 // List that maintains the tab indices in the most recently visited order
34 typedef std::list<TabContentsWrapper*> TabsMRUList;
35 TabsMRUList tabs_mru_list_;
36 };
sky 2012/05/25 17:56:52 DISALLOW_COPY_AND_ASSIGN
37 #endif // CHROME_BROWSER_TABS_TAB_MRU_LIST_MANAGER_H_
sky 2012/05/25 17:56:52 newline between 36/67.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698