| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "services/ui/public/cpp/window.h" | 5 #include "services/ui/public/cpp/window.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 | 796 |
| 797 for (auto& observer : observers_) | 797 for (auto& observer : observers_) |
| 798 observer.OnWindowSharedPropertyChanged(this, name, old_value_ptr, value); | 798 observer.OnWindowSharedPropertyChanged(this, name, old_value_ptr, value); |
| 799 } | 799 } |
| 800 | 800 |
| 801 void Window::LocalSetSurfaceId(std::unique_ptr<SurfaceInfo> surface_info) { | 801 void Window::LocalSetSurfaceId(std::unique_ptr<SurfaceInfo> surface_info) { |
| 802 if (surface_info_) { | 802 if (surface_info_) { |
| 803 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; | 803 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; |
| 804 cc::SurfaceId new_surface_id = | 804 cc::SurfaceId new_surface_id = |
| 805 surface_info ? surface_info->surface_id : cc::SurfaceId(); | 805 surface_info ? surface_info->surface_id : cc::SurfaceId(); |
| 806 if (!existing_surface_id.is_null() && | 806 if (existing_surface_id.is_valid() && |
| 807 existing_surface_id != new_surface_id) { | 807 existing_surface_id != new_surface_id) { |
| 808 // Return the existing surface sequence. | 808 // Return the existing surface sequence. |
| 809 if (client_) { | 809 if (client_) { |
| 810 client_->OnWindowSurfaceDetached(server_id_, | 810 client_->OnWindowSurfaceDetached(server_id_, |
| 811 surface_info_->surface_sequence); | 811 surface_info_->surface_sequence); |
| 812 } | 812 } |
| 813 } | 813 } |
| 814 } | 814 } |
| 815 if (parent_ && parent_->surface_id_handler_) { | 815 if (parent_ && parent_->surface_id_handler_) { |
| 816 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this, | 816 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this, |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 notifier->NotifyWindowReordered(); | 958 notifier->NotifyWindowReordered(); |
| 959 | 959 |
| 960 return true; | 960 return true; |
| 961 } | 961 } |
| 962 | 962 |
| 963 // static | 963 // static |
| 964 Window** Window::GetStackingTarget(Window* window) { | 964 Window** Window::GetStackingTarget(Window* window) { |
| 965 return &window->stacking_target_; | 965 return &window->stacking_target_; |
| 966 } | 966 } |
| 967 } // namespace ui | 967 } // namespace ui |
| OLD | NEW |