| 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 "components/view_manager/public/cpp/view.h" | 5 #include "components/view_manager/public/cpp/view.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" | 10 #include "components/view_manager/public/cpp/lib/view_manager_client_impl.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 void View::SetVisible(bool value) { | 217 void View::SetVisible(bool value) { |
| 218 if (visible_ == value) | 218 if (visible_ == value) |
| 219 return; | 219 return; |
| 220 | 220 |
| 221 if (manager_) | 221 if (manager_) |
| 222 static_cast<ViewManagerClientImpl*>(manager_)->SetVisible(id_, value); | 222 static_cast<ViewManagerClientImpl*>(manager_)->SetVisible(id_, value); |
| 223 LocalSetVisible(value); | 223 LocalSetVisible(value); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void View::RequestCompositorFrameReceiver( |
| 227 InterfaceRequest<CompositorFrameReceiver> receiver) { |
| 228 static_cast<ViewManagerClientImpl*>(manager_)->RequestCompositorFrameReceiver( |
| 229 id_, receiver.Pass()); |
| 230 } |
| 231 |
| 226 void View::SetSharedProperty(const std::string& name, | 232 void View::SetSharedProperty(const std::string& name, |
| 227 const std::vector<uint8_t>* value) { | 233 const std::vector<uint8_t>* value) { |
| 228 std::vector<uint8_t> old_value; | 234 std::vector<uint8_t> old_value; |
| 229 std::vector<uint8_t>* old_value_ptr = nullptr; | 235 std::vector<uint8_t>* old_value_ptr = nullptr; |
| 230 auto it = properties_.find(name); | 236 auto it = properties_.find(name); |
| 231 if (it != properties_.end()) { | 237 if (it != properties_.end()) { |
| 232 old_value = it->second; | 238 old_value = it->second; |
| 233 old_value_ptr = &old_value; | 239 old_value_ptr = &old_value; |
| 234 | 240 |
| 235 if (value && old_value == *value) | 241 if (value && old_value == *value) |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) { | 618 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) { |
| 613 return false; | 619 return false; |
| 614 } | 620 } |
| 615 | 621 |
| 616 while (!children_.empty()) | 622 while (!children_.empty()) |
| 617 RemoveChild(children_[0]); | 623 RemoveChild(children_[0]); |
| 618 return true; | 624 return true; |
| 619 } | 625 } |
| 620 | 626 |
| 621 } // namespace mojo | 627 } // namespace mojo |
| OLD | NEW |