NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / browser_tab_strip_model_delegate.h
blob6411738669897c4b9a98f37af9d9fbe650fd96a1
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.
5 #ifndef CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_
6 #define CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h"
12 class GURL;
14 namespace chrome {
16 class BrowserTabStripModelDelegate : public TabStripModelDelegate {
17 public:
18 explicit BrowserTabStripModelDelegate(Browser* browser);
19 virtual ~BrowserTabStripModelDelegate();
21 private:
22 // Overridden from TabStripModelDelegate:
23 virtual void AddTabAt(const GURL& url,
24 int index,
25 bool foreground) OVERRIDE;
26 virtual Browser* CreateNewStripWithContents(
27 const std::vector<NewStripContents>& contentses,
28 const gfx::Rect& window_bounds,
29 const DockInfo& dock_info,
30 bool maximize) OVERRIDE;
31 virtual void WillAddWebContents(content::WebContents* contents) OVERRIDE;
32 virtual int GetDragActions() const OVERRIDE;
33 virtual bool CanDuplicateContentsAt(int index) OVERRIDE;
34 virtual void DuplicateContentsAt(int index) OVERRIDE;
35 virtual void CloseFrameAfterDragSession() OVERRIDE;
36 virtual void CreateHistoricalTab(content::WebContents* contents) OVERRIDE;
37 virtual bool RunUnloadListenerBeforeClosing(
38 content::WebContents* contents) OVERRIDE;
39 virtual bool ShouldRunUnloadListenerBeforeClosing(
40 content::WebContents* contents) OVERRIDE;
41 virtual bool CanBookmarkAllTabs() const OVERRIDE;
42 virtual void BookmarkAllTabs() OVERRIDE;
43 virtual RestoreTabType GetRestoreTabType() OVERRIDE;
44 virtual void RestoreTab() OVERRIDE;
46 void CloseFrame();
48 Browser* browser_;
50 // The following factory is used to close the frame at a later time.
51 base::WeakPtrFactory<BrowserTabStripModelDelegate> weak_factory_;
53 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripModelDelegate);
56 } // namespace chrome
58 #endif // CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_