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

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: Fix mac build and handle NULL in delegate statics 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_tab_restore_service_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string>
9 #include <vector>
10
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/sessions/tab_restore_service_delegate.h"
13
14 class Browser;
15 class Profile;
16 class SessionStorageNamespace;
17 class TabContents;
18 class TabNavigation;
19
20 // Implementation of TabRestoreServiceDelegate which uses an instance of
21 // Browser in order to fulfil its duties.
22 class BrowserTabRestoreServiceDelegate : public TabRestoreServiceDelegate {
23 public:
24 explicit BrowserTabRestoreServiceDelegate(Browser* browser)
25 : browser_(browser) {}
26 virtual ~BrowserTabRestoreServiceDelegate() {}
27
28 // Overridden from TabRestoreServiceDelegate:
29 virtual void ShowBrowserWindow() OVERRIDE;
30 virtual const SessionID& GetSessionID() const OVERRIDE;
31 virtual int GetTabCount() const OVERRIDE;
32 virtual int GetSelectedIndex() const OVERRIDE;
33 virtual TabContents* GetTabContentsAt(int index) const OVERRIDE;
34 virtual TabContents* GetSelectedTabContents() const OVERRIDE;
35 virtual bool IsTabPinned(int index) const OVERRIDE;
36 virtual TabContents* AddRestoredTab(
37 const std::vector<TabNavigation>& navigations,
38 int tab_index,
39 int selected_navigation,
40 const std::string& extension_app_id,
41 bool select,
42 bool pin,
43 bool from_last_session,
44 SessionStorageNamespace* storage_namespace) OVERRIDE;
45 virtual void ReplaceRestoredTab(
46 const std::vector<TabNavigation>& navigations,
47 int selected_navigation,
48 bool from_last_session,
49 const std::string& extension_app_id,
50 SessionStorageNamespace* session_storage_namespace) OVERRIDE;
51 virtual void CloseTab() OVERRIDE;
52
53 private:
54 Browser* browser_;
55
56 DISALLOW_COPY_AND_ASSIGN(BrowserTabRestoreServiceDelegate);
57 };
58
59 #endif // CHROME_BROWSER_UI_BROWSER_TAB_RESTORE_SERVICE_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/browser_tab_restore_service_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698