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

Side by Side Diff: chrome/browser/ui/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: Uploaded as per comments Created 8 years, 6 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_UI_TABS_TAB_MRU_LIST_MANAGER_H_
6 #define CHROME_BROWSER_UI_TABS_TAB_MRU_LIST_MANAGER_H_
7 #pragma once
8
9 #include <list>
10
11 #include "base/basictypes.h"
12 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
13
14 class TabContentsWrapper;
15 ////////////////////////////////////////////////////////////////////////////////
16 //
17 // TabMRUListManager
18 //
19 // This is a list that manages the tabs that are in a tab strip as per the most
20 // recently used priority order. This overrides TabStrip Model Observer.
21 //
22 ////////////////////////////////////////////////////////////////////////////////
23 class TabMRUListManager : public TabStripModelObserver {
24 public:
25 TabMRUListManager();
26 virtual ~TabMRUListManager();
27
28 // Overridden from TabStripModelObserver:
29 virtual void TabInsertedAt(TabContentsWrapper* contents,
30 int index,
31 bool foreground);
sky 2012/05/29 19:48:28 OVERRIDE on all of these.
NaveenBobbili (Motorola) 2012/06/05 05:34:16 Done.
32 virtual void TabClosingAt(TabStripModel* tab_strip_model,
33 TabContentsWrapper* contents,
34 int index);
35 virtual void TabDetachedAt(TabContentsWrapper* contents, int index);
36 virtual void ActiveTabChanged(TabContentsWrapper* old_contents,
37 TabContentsWrapper* new_contents,
38 int index,
39 bool user_gesture);
40 virtual void TabReplacedAt(TabStripModel* tab_strip_model,
41 TabContentsWrapper* old_contents,
42 TabContentsWrapper* new_contents,
43 int index);
44 virtual void TabStripEmpty();
45
46 // Public Methods
sky 2012/05/29 19:48:28 Move GetNextMRUTab above TabInsertedTab and add a
NaveenBobbili (Motorola) 2012/06/05 05:34:16 Done.
47 TabContentsWrapper* GetNextMRUTab();
48
49 private:
50 // List that maintains the tab indices in the most recently visited order
51 typedef std::list<TabContentsWrapper*> TabsMRUList;
52 TabsMRUList tabs_mru_list_;
53
54 DISALLOW_COPY_AND_ASSIGN(TabMRUListManager);
55 };
56
57 #endif // CHROME_BROWSER_UI_TABS_TAB_MRU_LIST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698