1 // Copyright (c) 2011 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 // This file is only compiled when touchui is defined. 6 7 #include "chrome/browser/ui/views/tabs/tab_strip_factory.h" 8 9 #include "chrome/browser/ui/touch/tabs/touch_tab_strip.h" 10 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" 11 12 // The implmentation of CreateTabStrip for touchui creates a TouchTabStrip 13 AbstractTabStripView* CreateTabStrip(Browser* browser, 14 views::View* parent, 15 TabStripModel* model, 16 bool use_vertical_tabs) { 17 BrowserTabStripController* tabstrip_controller = 18 new BrowserTabStripController(browser, model); 19 // Ownership of this controller is given to a specific tabstrip when we 20 // construct it below. 21 22 TouchTabStrip* tabstrip = new TouchTabStrip(tabstrip_controller); 23 parent->AddChildView(tabstrip); 24 tabstrip_controller->InitFromModel(tabstrip); 25 return tabstrip; 26 } 27 28