| 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/tab_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 center_x = GetMirroredXInView(center_x); | 769 center_x = GetMirroredXInView(center_x); |
| 770 | 770 |
| 771 // Determine the screen bounds. | 771 // Determine the screen bounds. |
| 772 gfx::Point drop_loc(center_x - drop_indicator_width / 2, | 772 gfx::Point drop_loc(center_x - drop_indicator_width / 2, |
| 773 -drop_indicator_height); | 773 -drop_indicator_height); |
| 774 ConvertPointToScreen(this, &drop_loc); | 774 ConvertPointToScreen(this, &drop_loc); |
| 775 gfx::Rect drop_bounds(drop_loc.x(), drop_loc.y(), drop_indicator_width, | 775 gfx::Rect drop_bounds(drop_loc.x(), drop_loc.y(), drop_indicator_width, |
| 776 drop_indicator_height); | 776 drop_indicator_height); |
| 777 | 777 |
| 778 // If the rect doesn't fit on the monitor, push the arrow to the bottom. | 778 // If the rect doesn't fit on the monitor, push the arrow to the bottom. |
| 779 #if defined(OS_WIN) | 779 #if defined(OS_WIN) && !defined(USE_AURA) |
| 780 gfx::Rect monitor_bounds = views::GetMonitorBoundsForRect(drop_bounds); | 780 gfx::Rect monitor_bounds = views::GetMonitorBoundsForRect(drop_bounds); |
| 781 *is_beneath = (monitor_bounds.IsEmpty() || | 781 *is_beneath = (monitor_bounds.IsEmpty() || |
| 782 !monitor_bounds.Contains(drop_bounds)); | 782 !monitor_bounds.Contains(drop_bounds)); |
| 783 #else | 783 #else |
| 784 *is_beneath = false; | 784 *is_beneath = false; |
| 785 NOTIMPLEMENTED(); | 785 NOTIMPLEMENTED(); |
| 786 #endif | 786 #endif |
| 787 if (*is_beneath) | 787 if (*is_beneath) |
| 788 drop_bounds.Offset(0, drop_bounds.height() + height()); | 788 drop_bounds.Offset(0, drop_bounds.height() + height()); |
| 789 | 789 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 } | 1035 } |
| 1036 return mini_count; | 1036 return mini_count; |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 bool TabStrip::IsPointInTab(Tab* tab, | 1039 bool TabStrip::IsPointInTab(Tab* tab, |
| 1040 const gfx::Point& point_in_tabstrip_coords) { | 1040 const gfx::Point& point_in_tabstrip_coords) { |
| 1041 gfx::Point point_in_tab_coords(point_in_tabstrip_coords); | 1041 gfx::Point point_in_tab_coords(point_in_tabstrip_coords); |
| 1042 View::ConvertPointToView(this, tab, &point_in_tab_coords); | 1042 View::ConvertPointToView(this, tab, &point_in_tab_coords); |
| 1043 return tab->HitTest(point_in_tab_coords); | 1043 return tab->HitTest(point_in_tab_coords); |
| 1044 } | 1044 } |
| OLD | NEW |