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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 649 |
650 std::unique_ptr<ui::PropertyData> Window::BeforePropertyChange( | 650 std::unique_ptr<ui::PropertyData> Window::BeforePropertyChange( |
651 const void* key) { | 651 const void* key) { |
652 return port_ ? port_->OnWillChangeProperty(key) : nullptr; | 652 return port_ ? port_->OnWillChangeProperty(key) : nullptr; |
653 } | 653 } |
654 | 654 |
655 void Window::AfterPropertyChange(const void* key, | 655 void Window::AfterPropertyChange(const void* key, |
656 int64_t old_value, | 656 int64_t old_value, |
657 std::unique_ptr<ui::PropertyData> data) { | 657 std::unique_ptr<ui::PropertyData> data) { |
658 if (port_) | 658 if (port_) |
659 port_->OnPropertyChanged(key, std::move(data)); | 659 port_->OnPropertyChanged(key, old_value, std::move(data)); |
660 for (WindowObserver& observer : observers_) | 660 for (WindowObserver& observer : observers_) |
661 observer.OnWindowPropertyChanged(this, key, old_value); | 661 observer.OnWindowPropertyChanged(this, key, old_value); |
662 } | 662 } |
663 | 663 |
664 /////////////////////////////////////////////////////////////////////////////// | 664 /////////////////////////////////////////////////////////////////////////////// |
665 // Window, private: | 665 // Window, private: |
666 | 666 |
667 bool Window::HitTest(const gfx::Point& local_point) { | 667 bool Window::HitTest(const gfx::Point& local_point) { |
668 gfx::Rect local_bounds(bounds().size()); | 668 gfx::Rect local_bounds(bounds().size()); |
669 if (!delegate_ || !delegate_->HasHitTestMask()) | 669 if (!delegate_ || !delegate_->HasHitTestMask()) |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 layer_name = "Unnamed Window"; | 1085 layer_name = "Unnamed Window"; |
1086 | 1086 |
1087 if (id_ != -1) | 1087 if (id_ != -1) |
1088 layer_name += " " + base::IntToString(id_); | 1088 layer_name += " " + base::IntToString(id_); |
1089 | 1089 |
1090 layer()->set_name(layer_name); | 1090 layer()->set_name(layer_name); |
1091 #endif | 1091 #endif |
1092 } | 1092 } |
1093 | 1093 |
1094 } // namespace aura | 1094 } // namespace aura |
OLD | NEW |