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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. | 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. |
6 | 6 |
7 #include "ui/views/view.h" | 7 #include "ui/views/view.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 "\\n scale: (%2.4f, %2.4f)", | 1683 "\\n scale: (%2.4f, %2.4f)", |
1684 decomp.scale[0], | 1684 decomp.scale[0], |
1685 decomp.scale[1]); | 1685 decomp.scale[1]); |
1686 result.append(bounds_buffer); | 1686 result.append(bounds_buffer); |
1687 } | 1687 } |
1688 | 1688 |
1689 result.append("\""); | 1689 result.append("\""); |
1690 if (!parent_) | 1690 if (!parent_) |
1691 result.append(", shape=box"); | 1691 result.append(", shape=box"); |
1692 if (layer()) { | 1692 if (layer()) { |
1693 if (layer()->texture()) | 1693 if (layer()->has_external_content()) |
1694 result.append(", color=green"); | 1694 result.append(", color=green"); |
1695 else | 1695 else |
1696 result.append(", color=red"); | 1696 result.append(", color=red"); |
1697 | 1697 |
1698 if (layer()->fills_bounds_opaquely()) | 1698 if (layer()->fills_bounds_opaquely()) |
1699 result.append(", style=filled"); | 1699 result.append(", style=filled"); |
1700 } | 1700 } |
1701 result.append("]\n"); | 1701 result.append("]\n"); |
1702 | 1702 |
1703 // Link to parent. | 1703 // Link to parent. |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2353 // Message the RootView to do the drag and drop. That way if we're removed | 2353 // Message the RootView to do the drag and drop. That way if we're removed |
2354 // the RootView can detect it and avoid calling us back. | 2354 // the RootView can detect it and avoid calling us back. |
2355 gfx::Point widget_location(event.location()); | 2355 gfx::Point widget_location(event.location()); |
2356 ConvertPointToWidget(this, &widget_location); | 2356 ConvertPointToWidget(this, &widget_location); |
2357 widget->RunShellDrag(this, data, widget_location, drag_operations, source); | 2357 widget->RunShellDrag(this, data, widget_location, drag_operations, source); |
2358 // WARNING: we may have been deleted. | 2358 // WARNING: we may have been deleted. |
2359 return true; | 2359 return true; |
2360 } | 2360 } |
2361 | 2361 |
2362 } // namespace views | 2362 } // namespace views |
OLD | NEW |