Chromium Code Reviews| 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1072 background_->Paint(canvas, this); | 1072 background_->Paint(canvas, this); |
| 1073 } | 1073 } |
| 1074 | 1074 |
| 1075 void View::OnPaintBorder(gfx::Canvas* canvas) { | 1075 void View::OnPaintBorder(gfx::Canvas* canvas) { |
| 1076 if (border_.get()) | 1076 if (border_.get()) |
| 1077 border_->Paint(*this, canvas); | 1077 border_->Paint(*this, canvas); |
| 1078 } | 1078 } |
| 1079 | 1079 |
| 1080 void View::OnPaintFocusBorder(gfx::Canvas* canvas) { | 1080 void View::OnPaintFocusBorder(gfx::Canvas* canvas) { |
| 1081 if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) | 1081 if ((IsFocusable() || IsAccessibilityFocusableInRootView()) && HasFocus()) |
| 1082 canvas->DrawFocusRect(0, 0, width(), height()); | 1082 canvas->DrawFocusRect(gfx::Rect(0, 0, width(), height())); |
|
Peter Kasting
2011/10/24 22:15:13
Nit: Just pass GetLocalBounds() instead.
(While y
tfarina
2011/10/25 02:04:53
Done.
| |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 // Accelerated Painting -------------------------------------------------------- | 1085 // Accelerated Painting -------------------------------------------------------- |
| 1086 | 1086 |
| 1087 void View::SetFillsBoundsOpaquely(bool fills_bounds_opaquely) { | 1087 void View::SetFillsBoundsOpaquely(bool fills_bounds_opaquely) { |
| 1088 // This method should not have the side-effect of creating the layer. | 1088 // This method should not have the side-effect of creating the layer. |
| 1089 if (layer()) | 1089 if (layer()) |
| 1090 layer()->SetFillsBoundsOpaquely(fills_bounds_opaquely); | 1090 layer()->SetFillsBoundsOpaquely(fills_bounds_opaquely); |
| 1091 } | 1091 } |
| 1092 | 1092 |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2072 | 2072 |
| 2073 OSExchangeData data; | 2073 OSExchangeData data; |
| 2074 WriteDragData(press_pt, &data); | 2074 WriteDragData(press_pt, &data); |
| 2075 | 2075 |
| 2076 // Message the RootView to do the drag and drop. That way if we're removed | 2076 // Message the RootView to do the drag and drop. That way if we're removed |
| 2077 // the RootView can detect it and avoid calling us back. | 2077 // the RootView can detect it and avoid calling us back. |
| 2078 GetWidget()->RunShellDrag(this, data, drag_operations); | 2078 GetWidget()->RunShellDrag(this, data, drag_operations); |
| 2079 } | 2079 } |
| 2080 | 2080 |
| 2081 } // namespace views | 2081 } // namespace views |
| OLD | NEW |