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/aura/window.h" | 5 #include "ui/aura/window.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 it != children_.end(); ++it) { | 787 it != children_.end(); ++it) { |
788 (*it)->NotifyAddedToRootWindow(); | 788 (*it)->NotifyAddedToRootWindow(); |
789 } | 789 } |
790 } | 790 } |
791 | 791 |
792 void Window::OnPaintLayer(gfx::Canvas* canvas) { | 792 void Window::OnPaintLayer(gfx::Canvas* canvas) { |
793 if (delegate_) | 793 if (delegate_) |
794 delegate_->OnPaint(canvas); | 794 delegate_->OnPaint(canvas); |
795 } | 795 } |
796 | 796 |
| 797 void Window::OnDeviceScaleFactorChanged(float device_scale_factor) { |
| 798 if (delegate_) |
| 799 delegate_->OnDeviceScaleFactorChanged(device_scale_factor); |
| 800 } |
| 801 |
797 void Window::UpdateLayerName(const std::string& name) { | 802 void Window::UpdateLayerName(const std::string& name) { |
798 #if !defined(NDEBUG) | 803 #if !defined(NDEBUG) |
799 DCHECK(layer()); | 804 DCHECK(layer()); |
800 | 805 |
801 std::string layer_name(name_); | 806 std::string layer_name(name_); |
802 if (layer_name.empty()) | 807 if (layer_name.empty()) |
803 layer_name.append("Unnamed Window"); | 808 layer_name.append("Unnamed Window"); |
804 | 809 |
805 if (id_ != -1) { | 810 if (id_ != -1) { |
806 char id_buf[10]; | 811 char id_buf[10]; |
(...skipping 18 matching lines...) Expand all Loading... |
825 for (Windows::const_reverse_iterator it = children_.rbegin(), | 830 for (Windows::const_reverse_iterator it = children_.rbegin(), |
826 rend = children_.rend(); | 831 rend = children_.rend(); |
827 it != rend; ++it) { | 832 it != rend; ++it) { |
828 Window* child = *it; | 833 Window* child = *it; |
829 child->PrintWindowHierarchy(depth + 1); | 834 child->PrintWindowHierarchy(depth + 1); |
830 } | 835 } |
831 } | 836 } |
832 #endif | 837 #endif |
833 | 838 |
834 } // namespace aura | 839 } // namespace aura |
OLD | NEW |