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

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: Rebase 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
« no previous file with comments | « content/test/content_browser_test_utils_internal.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // TODO(kylechar): Start return reference here? 817 // TODO(kylechar): Start return reference here?
818 } 818 }
819 } 819 }
820 if (parent_ && parent_->surface_id_handler_) { 820 if (parent_ && parent_->surface_id_handler_) {
821 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this, 821 parent_->surface_id_handler_->OnChildWindowSurfaceChanged(this,
822 &surface_info); 822 &surface_info);
823 } 823 }
824 surface_info_ = std::move(surface_info); 824 surface_info_ = std::move(surface_info);
825 } 825 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 notifier->NotifyWindowReordered(); 963 notifier->NotifyWindowReordered();
964 964
965 return true; 965 return true;
966 } 966 }
967 967
968 // static 968 // static
969 Window** Window::GetStackingTarget(Window* window) { 969 Window** Window::GetStackingTarget(Window* window) {
970 return &window->stacking_target_; 970 return &window->stacking_target_;
971 } 971 }
972 } // namespace ui 972 } // namespace ui
OLDNEW
« no previous file with comments | « content/test/content_browser_test_utils_internal.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698