OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/views/view.h" | 5 #include "chrome/views/view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #ifndef NDEBUG | 9 #ifndef NDEBUG |
10 #include <iostream> | 10 #include <iostream> |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 } | 619 } |
620 | 620 |
621 void View::PropagateAddNotifications(View* parent, View* child) { | 621 void View::PropagateAddNotifications(View* parent, View* child) { |
622 int i, c; | 622 int i, c; |
623 for (i = 0, c = GetChildViewCount(); i < c; ++i) { | 623 for (i = 0, c = GetChildViewCount(); i < c; ++i) { |
624 GetChildViewAt(i)->PropagateAddNotifications(parent, child); | 624 GetChildViewAt(i)->PropagateAddNotifications(parent, child); |
625 } | 625 } |
626 ViewHierarchyChangedImpl(true, true, parent, child); | 626 ViewHierarchyChangedImpl(true, true, parent, child); |
627 } | 627 } |
628 | 628 |
| 629 void View::ThemeChanged() { |
| 630 int c = GetChildViewCount(); |
| 631 for (int i = c - 1; i >= 0; --i) |
| 632 GetChildViewAt(i)->ThemeChanged(); |
| 633 } |
| 634 |
629 #ifndef NDEBUG | 635 #ifndef NDEBUG |
630 bool View::IsProcessingPaint() const { | 636 bool View::IsProcessingPaint() const { |
631 return GetParent() && GetParent()->IsProcessingPaint(); | 637 return GetParent() && GetParent()->IsProcessingPaint(); |
632 } | 638 } |
633 #endif | 639 #endif |
634 | 640 |
635 gfx::Point View::GetKeyboardContextMenuLocation() { | 641 gfx::Point View::GetKeyboardContextMenuLocation() { |
636 gfx::Rect vis_bounds = GetVisibleBounds(); | 642 gfx::Rect vis_bounds = GetVisibleBounds(); |
637 gfx::Point screen_point(vis_bounds.x() + vis_bounds.width() / 2, | 643 gfx::Point screen_point(vis_bounds.x() + vis_bounds.width() / 2, |
638 vis_bounds.y() + vis_bounds.height() / 2); | 644 vis_bounds.y() + vis_bounds.height() / 2); |
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 } | 1603 } |
1598 | 1604 |
1599 void View::DragInfo::PossibleDrag(int x, int y) { | 1605 void View::DragInfo::PossibleDrag(int x, int y) { |
1600 possible_drag = true; | 1606 possible_drag = true; |
1601 start_x = x; | 1607 start_x = x; |
1602 start_y = y; | 1608 start_y = y; |
1603 } | 1609 } |
1604 | 1610 |
1605 } // namespace | 1611 } // namespace |
1606 | 1612 |
OLD | NEW |