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 #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h"
7 #include "chrome/browser/extensions/tab_helper.h"
8 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
10 TestTabStripModelDelegate::TestTabStripModelDelegate() {
13 TestTabStripModelDelegate::~TestTabStripModelDelegate() {
16 void TestTabStripModelDelegate::AddTabAt(const GURL
& url
,
21 Browser
* TestTabStripModelDelegate::CreateNewStripWithContents(
22 const std::vector
<NewStripContents
>& contentses
,
23 const gfx::Rect
& window_bounds
,
24 const DockInfo
& dock_info
,
29 void TestTabStripModelDelegate::WillAddWebContents(
30 content::WebContents
* contents
) {
31 // Required to determine reloadability of tabs.
32 CoreTabHelper::CreateForWebContents(contents
);
33 // Required to determine if tabs are app tabs.
34 extensions::TabHelper::CreateForWebContents(contents
);
37 int TestTabStripModelDelegate::GetDragActions() const {
41 bool TestTabStripModelDelegate::CanDuplicateContentsAt(int index
) {
45 void TestTabStripModelDelegate::DuplicateContentsAt(int index
) {
48 void TestTabStripModelDelegate::CloseFrameAfterDragSession() {
51 void TestTabStripModelDelegate::CreateHistoricalTab(
52 content::WebContents
* contents
) {
55 bool TestTabStripModelDelegate::ShouldRunUnloadListenerBeforeClosing(
56 content::WebContents
* contents
) {
60 bool TestTabStripModelDelegate::RunUnloadListenerBeforeClosing(
61 content::WebContents
* contents
) {
65 TabStripModelDelegate::RestoreTabType
66 TestTabStripModelDelegate::GetRestoreTabType() {
67 return TabStripModelDelegate::RESTORE_NONE
;
70 void TestTabStripModelDelegate::RestoreTab() {
73 bool TestTabStripModelDelegate::CanBookmarkAllTabs() const {
77 void TestTabStripModelDelegate::BookmarkAllTabs() {