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

Side by Side Diff: mojo/services/view_manager/server_view.cc

Issue 732223002: Rebuild aura::Window's property system on top of mojo::View. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: The rest of the sky comments from the previous review. Created 6 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 "mojo/services/view_manager/server_view.h" 5 #include "mojo/services/view_manager/server_view.h"
6 6
7 #include "mojo/services/view_manager/server_view_delegate.h" 7 #include "mojo/services/view_manager/server_view_delegate.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace service { 10 namespace service {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // no change. 132 // no change.
133 return; 133 return;
134 } 134 }
135 135
136 if (value) { 136 if (value) {
137 properties_[name] = *value; 137 properties_[name] = *value;
138 } else if (it != properties_.end()) { 138 } else if (it != properties_.end()) {
139 properties_.erase(it); 139 properties_.erase(it);
140 } 140 }
141 141
142 delegate_->OnViewPropertyChanged(this, name, value); 142 delegate_->OnViewSharedPropertyChanged(this, name, value);
143 } 143 }
144 144
145 bool ServerView::IsDrawn(const ServerView* root) const { 145 bool ServerView::IsDrawn(const ServerView* root) const {
146 if (!root->visible_) 146 if (!root->visible_)
147 return false; 147 return false;
148 const ServerView* view = this; 148 const ServerView* view = this;
149 while (view && view != root && view->visible_) 149 while (view && view != root && view->visible_)
150 view = view->parent_; 150 view = view->parent_;
151 return view == root; 151 return view == root;
152 } 152 }
153 153
154 void ServerView::SetSurfaceId(cc::SurfaceId surface_id) { 154 void ServerView::SetSurfaceId(cc::SurfaceId surface_id) {
155 surface_id_ = surface_id; 155 surface_id_ = surface_id;
156 delegate_->OnViewSurfaceIdChanged(this); 156 delegate_->OnViewSurfaceIdChanged(this);
157 } 157 }
158 158
159 void ServerView::RemoveImpl(ServerView* view) { 159 void ServerView::RemoveImpl(ServerView* view) {
160 view->parent_ = NULL; 160 view->parent_ = NULL;
161 children_.erase(std::find(children_.begin(), children_.end(), view)); 161 children_.erase(std::find(children_.begin(), children_.end(), view));
162 } 162 }
163 163
164 } // namespace service 164 } // namespace service
165 } // namespace mojo 165 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/connection_manager.cc ('k') | mojo/services/view_manager/server_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698