| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h" |
| |
| #include "chrome/browser/extensions/tab_helper.h" |
| #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
| |
| TestTabStripModelDelegate::TestTabStripModelDelegate() { |
| } |
| |
| TestTabStripModelDelegate::~TestTabStripModelDelegate() { |
| } |
| |
| void TestTabStripModelDelegate::AddTabAt(const GURL& url, |
| int index, |
| bool foreground) { |
| } |
| |
| Browser* TestTabStripModelDelegate::CreateNewStripWithContents( |
| const std::vector<NewStripContents>& contentses, |
| const gfx::Rect& window_bounds, |
| bool maximize) { |
| return NULL; |
| } |
| |
| void TestTabStripModelDelegate::WillAddWebContents( |
| content::WebContents* contents) { |
| // Required to determine reloadability of tabs. |
| CoreTabHelper::CreateForWebContents(contents); |
| // Required to determine if tabs are app tabs. |
| extensions::TabHelper::CreateForWebContents(contents); |
| } |
| |
| int TestTabStripModelDelegate::GetDragActions() const { |
| return 0; |
| } |
| |
| bool TestTabStripModelDelegate::CanDuplicateContentsAt(int index) { |
| return false; |
| } |
| |
| void TestTabStripModelDelegate::DuplicateContentsAt(int index) { |
| } |
| |
| void TestTabStripModelDelegate::CreateHistoricalTab( |
| content::WebContents* contents) { |
| } |
| |
| bool TestTabStripModelDelegate::ShouldRunUnloadListenerBeforeClosing( |
| content::WebContents* contents) { |
| return false; |
| } |
| |
| bool TestTabStripModelDelegate::RunUnloadListenerBeforeClosing( |
| content::WebContents* contents) { |
| return true; |
| } |
| |
| TabStripModelDelegate::RestoreTabType |
| TestTabStripModelDelegate::GetRestoreTabType() { |
| return TabStripModelDelegate::RESTORE_NONE; |
| } |
| |
| void TestTabStripModelDelegate::RestoreTab() { |
| } |
| |
| bool TestTabStripModelDelegate::CanBookmarkAllTabs() const { |
| return true; |
| } |
| |
| void TestTabStripModelDelegate::BookmarkAllTabs() { |
| } |