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

Side by Side Diff: mojo/services/view_manager/view_manager_service_impl.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/view_manager_service_impl.h" 5 #include "mojo/services/view_manager/view_manager_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "mojo/converters/geometry/geometry_type_converters.h" 9 #include "mojo/converters/geometry/geometry_type_converters.h"
10 #include "mojo/converters/input_events/input_events_type_converters.h" 10 #include "mojo/converters/input_events/input_events_type_converters.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 const std::string& name, 126 const std::string& name,
127 const std::vector<uint8_t>* new_data, 127 const std::vector<uint8_t>* new_data,
128 bool originated_change) { 128 bool originated_change) {
129 if (originated_change) 129 if (originated_change)
130 return; 130 return;
131 131
132 Array<uint8_t> data; 132 Array<uint8_t> data;
133 if (new_data) 133 if (new_data)
134 data = Array<uint8_t>::From(*new_data); 134 data = Array<uint8_t>::From(*new_data);
135 135
136 client()->OnViewPropertyChanged( 136 client()->OnViewSharedPropertyChanged(ViewIdToTransportId(view->id()),
137 ViewIdToTransportId(view->id()), 137 String(name), data.Pass());
138 String(name),
139 data.Pass());
140 } 138 }
141 139
142 void ViewManagerServiceImpl::ProcessViewHierarchyChanged( 140 void ViewManagerServiceImpl::ProcessViewHierarchyChanged(
143 const ServerView* view, 141 const ServerView* view,
144 const ServerView* new_parent, 142 const ServerView* new_parent,
145 const ServerView* old_parent, 143 const ServerView* old_parent,
146 bool originated_change) { 144 bool originated_change) {
147 if (originated_change && !IsViewKnown(view) && new_parent && 145 if (originated_change && !IsViewKnown(view) && new_parent &&
148 IsViewKnown(new_parent)) { 146 IsViewKnown(new_parent)) {
149 std::vector<const ServerView*> unused; 147 std::vector<const ServerView*> unused;
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 571
574 bool ViewManagerServiceImpl::IsViewRootOfAnotherConnectionForAccessPolicy( 572 bool ViewManagerServiceImpl::IsViewRootOfAnotherConnectionForAccessPolicy(
575 const ServerView* view) const { 573 const ServerView* view) const {
576 ViewManagerServiceImpl* connection = 574 ViewManagerServiceImpl* connection =
577 connection_manager_->GetConnectionWithRoot(view->id()); 575 connection_manager_->GetConnectionWithRoot(view->id());
578 return connection && connection != this; 576 return connection && connection != this;
579 } 577 }
580 578
581 } // namespace service 579 } // namespace service
582 } // namespace mojo 580 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698