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

Side by Side Diff: chrome/browser/ui/browser_tab_restore_service_delegate.h

Issue 6660028: Decouple TabRestoreService from Browser (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: New version using a seperate class for the delegate Created 9 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_BROWSER_TAB_RESTORE_SERVICE_DELEGATE_H_
6 #define CHROME_BROWSER_UI_BROWSER_TAB_RESTORE_SERVICE_DELEGATE_H_
7
8 #include "chrome/browser/sessions/tab_restore_service_delegate.h"
9
10 class Browser;
11 class BrowserWindow;
12 class Profile;
13 class SessionStorageNamespace;
14 class TabContents;
15 class TabNavigation;
16 class TabRestoreService;
17
18 // Implementation of TabRestoreServiceDelegate which uses an instance of
19 // Browser in order to fulfil its duties.
20 class BrowserTabRestoreServiceDelegate : public TabRestoreServiceDelegate {
21 public:
22 explicit BrowserTabRestoreServiceDelegate(Browser* browser)
23 : browser_(browser) {
24 }
25
26 // Overridden from TabRestoreServiceDelegate:
27 virtual void ShowBrowserWindow();
28 virtual const SessionID& GetSessionID() const;
29 virtual int GetTabCount() const;
30 virtual int GetSelectedIndex() const;
31 virtual TabContents* GetTabContentsAt(int index) const;
32 virtual TabContents* GetSelectedTabContents() const;
33 virtual bool IsTabPinned(int index) const;
34 virtual TabContents* AddRestoredTab(
35 const std::vector<TabNavigation>& navigations,
36 int tab_index,
37 int selected_navigation,
38 const std::string& extension_app_id,
39 bool select,
40 bool pin,
41 bool from_last_session,
42 SessionStorageNamespace* storage_namespace);
43 virtual void ReplaceRestoredTab(
44 const std::vector<TabNavigation>& navigations,
45 int selected_navigation,
46 bool from_last_session,
47 const std::string& extension_app_id,
48 SessionStorageNamespace* session_storage_namespace);
49 virtual void CloseTab();
50
51 private:
52 Browser* browser_;
53 };
Ben Goodger (Google) 2011/03/11 15:21:32 DISALLOW_COPY_AND_ASSIGN
torne_google.com 2011/03/11 15:31:23 Done.
54
55 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698