| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is only compiled when touchui is defined. | 5 // This file is only compiled when touchui is defined. |
| 6 | 6 |
| 7 #include "chrome/browser/ui/views/tabs/tab_strip_factory.h" | 7 #include "chrome/browser/ui/views/tabs/tab_strip_factory.h" |
| 8 | 8 |
| 9 #include "chrome/browser/ui/touch/tabs/touch_tab_strip.h" | 9 #include "chrome/browser/ui/touch/tabs/touch_tab_strip.h" |
| 10 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" | 10 #include "chrome/browser/ui/touch/tabs/touch_tab_strip_controller.h" |
| 11 | 11 |
| 12 // The implmentation of CreateTabStrip for touchui creates a TouchTabStrip | 12 // The implementation of CreateTabStrip for touchui creates a TouchTabStrip |
| 13 AbstractTabStripView* CreateTabStrip(Browser* browser, | 13 AbstractTabStripView* CreateTabStrip(Browser* browser, |
| 14 views::View* parent, | 14 views::View* parent, |
| 15 TabStripModel* model, | 15 TabStripModel* model, |
| 16 bool use_vertical_tabs) { | 16 bool use_vertical_tabs) { |
| 17 BrowserTabStripController* tabstrip_controller = | 17 TouchTabStripController* tabstrip_controller = |
| 18 new BrowserTabStripController(browser, model); | 18 new TouchTabStripController(browser, model); |
| 19 // Ownership of this controller is given to a specific tabstrip when we | 19 // Ownership of this controller is given to a specific tabstrip when we |
| 20 // construct it below. | 20 // construct it below. |
| 21 | 21 |
| 22 TouchTabStrip* tabstrip = new TouchTabStrip(tabstrip_controller); | 22 TouchTabStrip* tabstrip = new TouchTabStrip(tabstrip_controller); |
| 23 parent->AddChildView(tabstrip); | 23 parent->AddChildView(tabstrip); |
| 24 tabstrip_controller->InitFromModel(tabstrip); | 24 tabstrip_controller->InitFromModel(tabstrip); |
| 25 return tabstrip; | 25 return tabstrip; |
| 26 } | 26 } |
| 27 | 27 |
| OLD | NEW |