| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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/base_tab.h" | 5 #include "chrome/browser/ui/views/tabs/base_tab.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } else if (!IsSelected()) { | 328 } else if (!IsSelected()) { |
| 329 controller()->SelectTab(this); | 329 controller()->SelectTab(this); |
| 330 } | 330 } |
| 331 controller()->MaybeStartDrag(this, event, original_selection); | 331 controller()->MaybeStartDrag(this, event, original_selection); |
| 332 } | 332 } |
| 333 return true; | 333 return true; |
| 334 } | 334 } |
| 335 | 335 |
| 336 bool BaseTab::OnMouseDragged(const views::MouseEvent& event) { | 336 bool BaseTab::OnMouseDragged(const views::MouseEvent& event) { |
| 337 if (controller()) | 337 if (controller()) |
| 338 controller()->ContinueDrag(event); | 338 controller()->ContinueDrag(this, event.location()); |
| 339 return true; | 339 return true; |
| 340 } | 340 } |
| 341 | 341 |
| 342 void BaseTab::OnMouseReleased(const views::MouseEvent& event) { | 342 void BaseTab::OnMouseReleased(const views::MouseEvent& event) { |
| 343 if (!controller()) | 343 if (!controller()) |
| 344 return; | 344 return; |
| 345 | 345 |
| 346 controller()->OnMouseEventInTab(this, event); | 346 controller()->OnMouseEventInTab(this, event); |
| 347 | 347 |
| 348 // Notify the drag helper that we're done with any potential drag operations. | 348 // Notify the drag helper that we're done with any potential drag operations. |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 // static | 599 // static |
| 600 void BaseTab::InitResources() { | 600 void BaseTab::InitResources() { |
| 601 static bool initialized = false; | 601 static bool initialized = false; |
| 602 if (!initialized) { | 602 if (!initialized) { |
| 603 initialized = true; | 603 initialized = true; |
| 604 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 604 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 605 font_ = new gfx::Font(rb.GetFont(ui::ResourceBundle::BaseFont)); | 605 font_ = new gfx::Font(rb.GetFont(ui::ResourceBundle::BaseFont)); |
| 606 font_height_ = font_->GetHeight(); | 606 font_height_ = font_->GetHeight(); |
| 607 } | 607 } |
| 608 } | 608 } |
| OLD | NEW |