Home | History | Annotate | Download | only in tabs
      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 #include "chrome/browser/ui/tabs/test_tab_strip_model_delegate.h"
      6 
      7 #include "chrome/browser/extensions/tab_helper.h"
      8 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
      9 
     10 TestTabStripModelDelegate::TestTabStripModelDelegate() {
     11 }
     12 
     13 TestTabStripModelDelegate::~TestTabStripModelDelegate() {
     14 }
     15 
     16 void TestTabStripModelDelegate::AddBlankTabAt(int index, bool foreground) {
     17 }
     18 
     19 Browser* TestTabStripModelDelegate::CreateNewStripWithContents(
     20     const std::vector<NewStripContents>& contentses,
     21     const gfx::Rect& window_bounds,
     22     const DockInfo& dock_info,
     23     bool maximize) {
     24   return NULL;
     25 }
     26 
     27 void TestTabStripModelDelegate::WillAddWebContents(
     28     content::WebContents* contents) {
     29   // Required to determine reloadability of tabs.
     30   CoreTabHelper::CreateForWebContents(contents);
     31   // Required to determine if tabs are app tabs.
     32   extensions::TabHelper::CreateForWebContents(contents);
     33 }
     34 
     35 int TestTabStripModelDelegate::GetDragActions() const {
     36   return 0;
     37 }
     38 
     39 bool TestTabStripModelDelegate::CanDuplicateContentsAt(int index) {
     40   return false;
     41 }
     42 
     43 void TestTabStripModelDelegate::DuplicateContentsAt(int index) {
     44 }
     45 
     46 void TestTabStripModelDelegate::CloseFrameAfterDragSession() {
     47 }
     48 
     49 void TestTabStripModelDelegate::CreateHistoricalTab(
     50     content::WebContents* contents) {
     51 }
     52 
     53 bool TestTabStripModelDelegate::RunUnloadListenerBeforeClosing(
     54     content::WebContents* contents) {
     55   return true;
     56 }
     57 
     58 TabStripModelDelegate::RestoreTabType
     59 TestTabStripModelDelegate::GetRestoreTabType() {
     60   return TabStripModelDelegate::RESTORE_NONE;
     61 }
     62 
     63 void TestTabStripModelDelegate::RestoreTab() {
     64 }
     65 
     66 bool TestTabStripModelDelegate::CanBookmarkAllTabs() const {
     67   return true;
     68 }
     69 
     70 void TestTabStripModelDelegate::BookmarkAllTabs() {
     71 }
     72