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 "views/view.h" | 5 #include "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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 | 1457 |
1458 { | 1458 { |
1459 // If the View we are about to paint requested the canvas to be flipped, we | 1459 // If the View we are about to paint requested the canvas to be flipped, we |
1460 // should change the transform appropriately. | 1460 // should change the transform appropriately. |
1461 // The canvas mirroring is undone once the View is done painting so that we | 1461 // The canvas mirroring is undone once the View is done painting so that we |
1462 // don't pass the canvas with the mirrored transform to Views that didn't | 1462 // don't pass the canvas with the mirrored transform to Views that didn't |
1463 // request the canvas to be flipped. | 1463 // request the canvas to be flipped. |
1464 ScopedCanvas scoped(canvas); | 1464 ScopedCanvas scoped(canvas); |
1465 if (FlipCanvasOnPaintForRTLUI()) { | 1465 if (FlipCanvasOnPaintForRTLUI()) { |
1466 canvas->Translate(gfx::Point(width(), 0)); | 1466 canvas->Translate(gfx::Point(width(), 0)); |
1467 canvas->ScaleInt(-1, 1); | 1467 canvas->Scale(-1, 1); |
1468 } | 1468 } |
1469 | 1469 |
1470 OnPaint(canvas); | 1470 OnPaint(canvas); |
1471 } | 1471 } |
1472 | 1472 |
1473 PaintChildren(canvas); | 1473 PaintChildren(canvas); |
1474 } | 1474 } |
1475 | 1475 |
1476 // Tree operations ------------------------------------------------------------- | 1476 // Tree operations ------------------------------------------------------------- |
1477 | 1477 |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 | 2078 |
2079 OSExchangeData data; | 2079 OSExchangeData data; |
2080 WriteDragData(press_pt, &data); | 2080 WriteDragData(press_pt, &data); |
2081 | 2081 |
2082 // Message the RootView to do the drag and drop. That way if we're removed | 2082 // Message the RootView to do the drag and drop. That way if we're removed |
2083 // the RootView can detect it and avoid calling us back. | 2083 // the RootView can detect it and avoid calling us back. |
2084 GetWidget()->RunShellDrag(this, data, drag_operations); | 2084 GetWidget()->RunShellDrag(this, data, drag_operations); |
2085 } | 2085 } |
2086 | 2086 |
2087 } // namespace views | 2087 } // namespace views |
OLD | NEW |