| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/views/tabs/browser_tab_strip.h" | 5 #include "chrome/browser/views/tabs/browser_tab_strip.h" |
| 6 | 6 |
| 7 #include "chrome/browser/tab_contents/tab_contents.h" | 7 #include "chrome/browser/tab_contents/tab_contents.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(RemovingTabModel); | 48 DISALLOW_COPY_AND_ASSIGN(RemovingTabModel); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 //////////////////////////////////////////////////////////////////////////////// | 53 //////////////////////////////////////////////////////////////////////////////// |
| 54 // BrowserTabStrip, public: | 54 // BrowserTabStrip, public: |
| 55 | 55 |
| 56 BrowserTabStrip::BrowserTabStrip(TabStripModel* model) | 56 BrowserTabStrip::BrowserTabStrip(TabStripModel* model) |
| 57 : TabStrip2(this), | 57 : ALLOW_THIS_IN_INITIALIZER_LIST(TabStrip2(this)), |
| 58 model_(model) { | 58 model_(model) { |
| 59 model_->AddObserver(this); | 59 model_->AddObserver(this); |
| 60 } | 60 } |
| 61 | 61 |
| 62 BrowserTabStrip::~BrowserTabStrip() { | 62 BrowserTabStrip::~BrowserTabStrip() { |
| 63 model_->RemoveObserver(this); | 63 model_->RemoveObserver(this); |
| 64 } | 64 } |
| 65 | 65 |
| 66 TabContents* BrowserTabStrip::DetachTab(int index) { | 66 TabContents* BrowserTabStrip::DetachTab(int index) { |
| 67 TabContents* contents = model_->GetTabContentsAt(index); | 67 TabContents* contents = model_->GetTabContentsAt(index); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void BrowserTabStrip::MoveTabAt(int index, int to_index) { | 139 void BrowserTabStrip::MoveTabAt(int index, int to_index) { |
| 140 model_->MoveTabContentsAt(index, to_index, true); | 140 model_->MoveTabContentsAt(index, to_index, true); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void BrowserTabStrip::DetachTabAt(int index, const gfx::Rect& window_bounds, | 143 void BrowserTabStrip::DetachTabAt(int index, const gfx::Rect& window_bounds, |
| 144 const gfx::Rect& tab_bounds) { | 144 const gfx::Rect& tab_bounds) { |
| 145 TabContents* contents = DetachTab(index); | 145 TabContents* contents = DetachTab(index); |
| 146 model_->delegate()->ContinueDraggingDetachedTab(contents, window_bounds, | 146 model_->delegate()->ContinueDraggingDetachedTab(contents, window_bounds, |
| 147 tab_bounds); | 147 tab_bounds); |
| 148 } | 148 } |
| OLD | NEW |