Chromium Code Reviews| 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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1223 } | 1223 } |
| 1224 } | 1224 } |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 void View::OnPaintLayer(gfx::Canvas* canvas) { | 1227 void View::OnPaintLayer(gfx::Canvas* canvas) { |
| 1228 if (!layer() || !layer()->fills_bounds_opaquely()) | 1228 if (!layer() || !layer()->fills_bounds_opaquely()) |
| 1229 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); | 1229 canvas->DrawColor(SK_ColorBLACK, SkXfermode::kClear_Mode); |
| 1230 PaintCommon(canvas); | 1230 PaintCommon(canvas); |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 void View::OnDeviceScaleFactorChanged(float device_scale_factor) { | |
| 1234 } | |
|
sky
2012/05/16 21:16:01
Doesn't this need to percolate to child views?
oshima
2012/05/16 21:50:29
Not right now. Repainting will paint the content a
| |
| 1235 | |
| 1233 void View::ReorderLayers() { | 1236 void View::ReorderLayers() { |
| 1234 View* v = this; | 1237 View* v = this; |
| 1235 while (v && !v->layer()) | 1238 while (v && !v->layer()) |
| 1236 v = v->parent(); | 1239 v = v->parent(); |
| 1237 | 1240 |
| 1238 // Forward to widget in case we're in a NativeWidgetAura. | 1241 // Forward to widget in case we're in a NativeWidgetAura. |
| 1239 if (!v) { | 1242 if (!v) { |
| 1240 if (GetWidget()) | 1243 if (GetWidget()) |
| 1241 GetWidget()->ReorderLayers(); | 1244 GetWidget()->ReorderLayers(); |
| 1242 } else { | 1245 } else { |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2065 gfx::Point widget_location(event.location()); | 2068 gfx::Point widget_location(event.location()); |
| 2066 ConvertPointToWidget(this, &widget_location); | 2069 ConvertPointToWidget(this, &widget_location); |
| 2067 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); | 2070 GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); |
| 2068 return true; | 2071 return true; |
| 2069 #else | 2072 #else |
| 2070 return false; | 2073 return false; |
| 2071 #endif // !defined(OS_MACOSX) | 2074 #endif // !defined(OS_MACOSX) |
| 2072 } | 2075 } |
| 2073 | 2076 |
| 2074 } // namespace views | 2077 } // namespace views |
| OLD | NEW |