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

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

Issue 10696148: Move TabStripModelDelegate off Browser into its own class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Property Changes:
Added: svn:eol-style
+ LF
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_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
12
13 class Browser;
14 class DockInfo;
15 class GURL;
16 class TabContents;
17
18 namespace content {
19 struct Referrer;
20 class SiteInstance;
21 }
22
23 namespace gfx {
24 class Rect;
25 }
26
27 namespace chrome {
28
29 class BrowserTabStripModelDelegate : public TabStripModelDelegate {
30 public:
31 explicit BrowserTabStripModelDelegate(Browser* browser);
32 virtual ~BrowserTabStripModelDelegate();
33
34 private:
35 // Overridden from TabStripModelDelegate:
36 virtual TabContents* AddBlankTab(bool foreground) OVERRIDE;
37 virtual TabContents* AddBlankTabAt(int index, bool foreground) OVERRIDE;
38 virtual Browser* CreateNewStripWithContents(
39 TabContents* detached_contents,
40 const gfx::Rect& window_bounds,
41 const DockInfo& dock_info,
42 bool maximize) OVERRIDE;
43 virtual int GetDragActions() const OVERRIDE;
44 virtual TabContents* CreateTabContentsForURL(
45 const GURL& url,
46 const content::Referrer& referrer,
47 Profile* profile,
48 content::PageTransition transition,
49 bool defer_load,
50 content::SiteInstance* instance) const OVERRIDE;
51 virtual bool CanDuplicateContentsAt(int index) OVERRIDE;
52 virtual void DuplicateContentsAt(int index) OVERRIDE;
53 virtual void CloseFrameAfterDragSession() OVERRIDE;
54 virtual void CreateHistoricalTab(TabContents* contents) OVERRIDE;
55 virtual bool RunUnloadListenerBeforeClosing(TabContents* contents) OVERRIDE;
56 virtual bool CanBookmarkAllTabs() const OVERRIDE;
57 virtual void BookmarkAllTabs() OVERRIDE;
58 virtual bool CanRestoreTab() OVERRIDE;
59 virtual void RestoreTab() OVERRIDE;
60
61 void CloseFrame();
62
63 Browser* browser_;
64
65 // The following factory is used to close the frame at a later time.
66 base::WeakPtrFactory<BrowserTabStripModelDelegate> weak_factory_;
67
68 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripModelDelegate);
69 };
70
71 } // namespace chrome
72
73 #endif // CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator_browsertest.cc ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698