| 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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 observer.OnWindowSharedPropertyChanged(this, name, old_value_ptr, value); | 807 observer.OnWindowSharedPropertyChanged(this, name, old_value_ptr, value); |
| 808 } | 808 } |
| 809 | 809 |
| 810 void Window::LocalSetSurfaceId(std::unique_ptr<SurfaceInfo> surface_info) { | 810 void Window::LocalSetSurfaceId(std::unique_ptr<SurfaceInfo> surface_info) { |
| 811 if (surface_info_) { | 811 if (surface_info_) { |
| 812 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; | 812 const cc::SurfaceId& existing_surface_id = surface_info_->surface_id; |
| 813 cc::SurfaceId new_surface_id = | 813 cc::SurfaceId new_surface_id = |
| 814 surface_info ? surface_info->surface_id : cc::SurfaceId(); | 814 surface_info ? surface_info->surface_id : cc::SurfaceId(); |
| 815 if (!existing_surface_id.is_null() && | 815 if (!existing_surface_id.is_null() && |
| 816 existing_surface_id != new_surface_id) { | 816 existing_surface_id != new_surface_id) { |
| 817 // Return the existing surface sequence. | 817 // TODO(kylechar): Start return reference here? |
| 818 if (client_) { | |
| 819 client_->OnWindowSurfaceDetached(server_id_, | |
| 820 surface_info_->surface_sequence); | |
| 821 } | |
| 822 } | 818 } |
| 823 } | 819 } |
| 824 if (parent_ && parent_->surface_id_handler_) { | 820 if (parent_ && parent_->surface_id_handler_) { |
| 825 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this, | 821 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this, |
| 826 &surface_info); | 822 &surface_info); |
| 827 } | 823 } |
| 828 surface_info_ = std::move(surface_info); | 824 surface_info_ = std::move(surface_info); |
| 829 } | 825 } |
| 830 | 826 |
| 831 void Window::NotifyWindowStackingChanged() { | 827 void Window::NotifyWindowStackingChanged() { |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 notifier->NotifyWindowReordered(); | 963 notifier->NotifyWindowReordered(); |
| 968 | 964 |
| 969 return true; | 965 return true; |
| 970 } | 966 } |
| 971 | 967 |
| 972 // static | 968 // static |
| 973 Window** Window::GetStackingTarget(Window* window) { | 969 Window** Window::GetStackingTarget(Window* window) { |
| 974 return &window->stacking_target_; | 970 return &window->stacking_target_; |
| 975 } | 971 } |
| 976 } // namespace ui | 972 } // namespace ui |
| OLD | NEW |