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 "ui/views/view.h" | 5 #include "ui/views/view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 | 1363 |
1364 base::snprintf(bounds_buffer, | 1364 base::snprintf(bounds_buffer, |
1365 arraysize(bounds_buffer), | 1365 arraysize(bounds_buffer), |
1366 "\\n bounds: (%d, %d), (%dx%d)", | 1366 "\\n bounds: (%d, %d), (%dx%d)", |
1367 this->bounds().x(), | 1367 this->bounds().x(), |
1368 this->bounds().y(), | 1368 this->bounds().y(), |
1369 this->bounds().width(), | 1369 this->bounds().width(), |
1370 this->bounds().height()); | 1370 this->bounds().height()); |
1371 result.append(bounds_buffer); | 1371 result.append(bounds_buffer); |
1372 | 1372 |
1373 if (layer() && !layer()->hole_rect().IsEmpty()) { | |
1374 base::snprintf(bounds_buffer, | |
1375 arraysize(bounds_buffer), | |
1376 "\\n hole bounds: (%d, %d), (%dx%d)", | |
1377 layer()->hole_rect().x(), | |
1378 layer()->hole_rect().y(), | |
1379 layer()->hole_rect().width(), | |
1380 layer()->hole_rect().height()); | |
1381 result.append(bounds_buffer); | |
1382 } | |
1383 | |
1384 if (GetTransform().HasChange()) { | 1373 if (GetTransform().HasChange()) { |
1385 gfx::Point translation; | 1374 gfx::Point translation; |
1386 float rotation; | 1375 float rotation; |
1387 gfx::Point3f scale; | 1376 gfx::Point3f scale; |
1388 if (ui::InterpolatedTransform::FactorTRS(GetTransform(), | 1377 if (ui::InterpolatedTransform::FactorTRS(GetTransform(), |
1389 &translation, | 1378 &translation, |
1390 &rotation, | 1379 &rotation, |
1391 &scale)) { | 1380 &scale)) { |
1392 if (translation != gfx::Point(0, 0)) { | 1381 if (translation != gfx::Point(0, 0)) { |
1393 base::snprintf(bounds_buffer, | 1382 base::snprintf(bounds_buffer, |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 OSExchangeData data; | 2050 OSExchangeData data; |
2062 WriteDragData(press_pt, &data); | 2051 WriteDragData(press_pt, &data); |
2063 | 2052 |
2064 // Message the RootView to do the drag and drop. That way if we're removed | 2053 // Message the RootView to do the drag and drop. That way if we're removed |
2065 // the RootView can detect it and avoid calling us back. | 2054 // the RootView can detect it and avoid calling us back. |
2066 GetWidget()->RunShellDrag(this, data, drag_operations); | 2055 GetWidget()->RunShellDrag(this, data, drag_operations); |
2067 #endif // !defined(OS_MACOSX) | 2056 #endif // !defined(OS_MACOSX) |
2068 } | 2057 } |
2069 | 2058 |
2070 } // namespace views | 2059 } // namespace views |
OLD | NEW |