| 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 #include "chrome/browser/ui/views/tabs/side_tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/side_tab_strip.h" |
| 6 | 6 |
| 7 #include "chrome/browser/tabs/tab_strip_selection_model.h" | 7 #include "chrome/browser/tabs/tab_strip_selection_model.h" |
| 8 #include "chrome/browser/ui/view_ids.h" | 8 #include "chrome/browser/ui/view_ids.h" |
| 9 #include "chrome/browser/ui/views/tabs/side_tab.h" | 9 #include "chrome/browser/ui/views/tabs/side_tab.h" |
| 10 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" | 10 #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 //////////////////////////////////////////////////////////////////////////////// | 148 //////////////////////////////////////////////////////////////////////////////// |
| 149 // SideTabStrip, AbstractTabStripView implementation: | 149 // SideTabStrip, AbstractTabStripView implementation: |
| 150 | 150 |
| 151 bool SideTabStrip::IsPositionInWindowCaption(const gfx::Point& point) { | 151 bool SideTabStrip::IsPositionInWindowCaption(const gfx::Point& point) { |
| 152 return GetEventHandlerForPoint(point) == this; | 152 return GetEventHandlerForPoint(point) == this; |
| 153 } | 153 } |
| 154 | 154 |
| 155 void SideTabStrip::SetBackgroundOffset(const gfx::Point& offset) { | 155 void SideTabStrip::SetBackgroundOffset(const gfx::Point& offset) { |
| 156 } | 156 } |
| 157 | 157 |
| 158 views::View* SideTabStrip::GetNewTabButton() { |
| 159 return newtab_button_; |
| 160 } |
| 161 |
| 158 //////////////////////////////////////////////////////////////////////////////// | 162 //////////////////////////////////////////////////////////////////////////////// |
| 159 // SideTabStrip, BaseTabStrip implementation: | 163 // SideTabStrip, BaseTabStrip implementation: |
| 160 | 164 |
| 161 void SideTabStrip::StartHighlight(int model_index) { | 165 void SideTabStrip::StartHighlight(int model_index) { |
| 162 } | 166 } |
| 163 | 167 |
| 164 void SideTabStrip::StopAllHighlighting() { | 168 void SideTabStrip::StopAllHighlighting() { |
| 165 } | 169 } |
| 166 | 170 |
| 167 BaseTab* SideTabStrip::CreateTabForDragging() { | 171 BaseTab* SideTabStrip::CreateTabForDragging() { |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 return; | 463 return; |
| 460 | 464 |
| 461 if (ideal_bounds(tab_index).y() < kTabStripInset) { | 465 if (ideal_bounds(tab_index).y() < kTabStripInset) { |
| 462 SetFirstTabYOffset(first_tab_y_offset_ - ideal_bounds(tab_index).y() + | 466 SetFirstTabYOffset(first_tab_y_offset_ - ideal_bounds(tab_index).y() + |
| 463 kTabStripInset); | 467 kTabStripInset); |
| 464 } else if (ideal_bounds(tab_index).bottom() > GetMaxTabY()) { | 468 } else if (ideal_bounds(tab_index).bottom() > GetMaxTabY()) { |
| 465 SetFirstTabYOffset(GetMaxTabY() - (ideal_bounds(tab_index).bottom() - | 469 SetFirstTabYOffset(GetMaxTabY() - (ideal_bounds(tab_index).bottom() - |
| 466 first_tab_y_offset_)); | 470 first_tab_y_offset_)); |
| 467 } | 471 } |
| 468 } | 472 } |
| OLD | NEW |