Infobar material design refresh: layout
[chromium-blink-merge.git] / chrome / browser / ui / browser_tab_strip_model_delegate.h
blob40a2f619075b013f0851fd089f1e77122d3eb4d4
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 ~BrowserTabStripModelDelegate() override;
21 private:
22 // Overridden from TabStripModelDelegate:
23 void AddTabAt(const GURL& url, int index, bool foreground) override;
24 Browser* CreateNewStripWithContents(
25 const std::vector<NewStripContents>& contentses,
26 const gfx::Rect& window_bounds,
27 bool maximize) override;
28 void WillAddWebContents(content::WebContents* contents) override;
29 int GetDragActions() const override;
30 bool CanDuplicateContentsAt(int index) override;
31 void DuplicateContentsAt(int index) override;
32 void CreateHistoricalTab(content::WebContents* contents) override;
33 bool RunUnloadListenerBeforeClosing(content::WebContents* contents) override;
34 bool ShouldRunUnloadListenerBeforeClosing(
35 content::WebContents* contents) override;
36 bool CanBookmarkAllTabs() const override;
37 void BookmarkAllTabs() override;
38 RestoreTabType GetRestoreTabType() override;
39 void RestoreTab() override;
41 void CloseFrame();
43 Browser* browser_;
45 // The following factory is used to close the frame at a later time.
46 base::WeakPtrFactory<BrowserTabStripModelDelegate> weak_factory_;
48 DISALLOW_COPY_AND_ASSIGN(BrowserTabStripModelDelegate);
51 } // namespace chrome
53 #endif // CHROME_BROWSER_UI_BROWSER_TAB_STRIP_MODEL_DELEGATE_H_