Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: services/ui/public/cpp/window.cc

Issue 2425923003: Replaced is_null() with is_valid in SurfaceId and related classes. (Closed)
Patch Set: Fixed an exo compile error Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 805
806 for (auto& observer : observers_) 806 for (auto& observer : observers_)
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_valid() &&
816 existing_surface_id != new_surface_id) { 816 existing_surface_id != new_surface_id) {
817 // Return the existing surface sequence. 817 // Return the existing surface sequence.
818 if (client_) { 818 if (client_) {
819 client_->OnWindowSurfaceDetached(server_id_, 819 client_->OnWindowSurfaceDetached(server_id_,
820 surface_info_->surface_sequence); 820 surface_info_->surface_sequence);
821 } 821 }
822 } 822 }
823 } 823 }
824 if (parent_ && parent_->surface_id_handler_) { 824 if (parent_ && parent_->surface_id_handler_) {
825 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this, 825 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this,
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 notifier->NotifyWindowReordered(); 967 notifier->NotifyWindowReordered();
968 968
969 return true; 969 return true;
970 } 970 }
971 971
972 // static 972 // static
973 Window** Window::GetStackingTarget(Window* window) { 973 Window** Window::GetStackingTarget(Window* window) {
974 return &window->stacking_target_; 974 return &window->stacking_target_;
975 } 975 }
976 } // namespace ui 976 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698