Chromium Code Reviews| 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/dragged_tab_controller.h" | 5 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 525 } | 525 } |
| 526 | 526 |
| 527 void DraggedTabController::UpdateWindowCreatePoint() { | 527 void DraggedTabController::UpdateWindowCreatePoint() { |
| 528 // See comments in InitWindowCreatePoint for details on this. | 528 // See comments in InitWindowCreatePoint for details on this. |
| 529 window_create_point_ = first_source_tab_point_; | 529 window_create_point_ = first_source_tab_point_; |
| 530 window_create_point_.Offset(mouse_offset_.x(), mouse_offset_.y()); | 530 window_create_point_.Offset(mouse_offset_.x(), mouse_offset_.y()); |
| 531 } | 531 } |
| 532 | 532 |
| 533 gfx::Point DraggedTabController::GetWindowCreatePoint() const { | 533 gfx::Point DraggedTabController::GetWindowCreatePoint() const { |
| 534 gfx::Point cursor_point = GetCursorScreenPoint(); | 534 gfx::Point cursor_point = GetCursorScreenPoint(); |
| 535 if (dock_info_.type() != DockInfo::NONE) { | 535 if (dock_info_.type() != DockInfo::NONE && dock_info_.in_enable_area()) { |
|
sky
2011/01/24 21:58:48
If dock_info_.type() == NONE then it might not con
Jamie
2011/01/25 17:13:02
Can you clarify what you mean by this? If dock_inf
| |
| 536 // If we're going to dock, we need to return the exact coordinate, | 536 // If we're going to dock, we need to return the exact coordinate, |
| 537 // otherwise we may attempt to maximize on the wrong monitor. | 537 // otherwise we may attempt to maximize on the wrong monitor. |
| 538 return cursor_point; | 538 return cursor_point; |
| 539 } | 539 } |
| 540 return gfx::Point(cursor_point.x() - window_create_point_.x(), | 540 return gfx::Point(cursor_point.x() - window_create_point_.x(), |
| 541 cursor_point.y() - window_create_point_.y()); | 541 cursor_point.y() - window_create_point_.y()); |
| 542 } | 542 } |
| 543 | 543 |
| 544 void DraggedTabController::UpdateDockInfo(const gfx::Point& screen_point) { | 544 void DraggedTabController::UpdateDockInfo(const gfx::Point& screen_point) { |
| 545 // Update the DockInfo for the current mouse coordinates. | 545 // Update the DockInfo for the current mouse coordinates. |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1336 #else | 1336 #else |
| 1337 NOTIMPLEMENTED(); | 1337 NOTIMPLEMENTED(); |
| 1338 #endif | 1338 #endif |
| 1339 } | 1339 } |
| 1340 } | 1340 } |
| 1341 | 1341 |
| 1342 TabStripModel* DraggedTabController::GetModel(BaseTabStrip* tabstrip) const { | 1342 TabStripModel* DraggedTabController::GetModel(BaseTabStrip* tabstrip) const { |
| 1343 return static_cast<BrowserTabStripController*>(tabstrip->controller())-> | 1343 return static_cast<BrowserTabStripController*>(tabstrip->controller())-> |
| 1344 model(); | 1344 model(); |
| 1345 } | 1345 } |
| OLD | NEW |