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

Side by Side Diff: components/view_manager/public/cpp/lib/view.cc

Issue 1281663002: Mandoline: Allow submitting CompositorFrames directly to mojo::Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet anther rebase (YAR!!!) Created 5 years, 4 months 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 "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
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) { 617 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) {
612 return false; 618 return false;
613 } 619 }
614 620
615 while (!children_.empty()) 621 while (!children_.empty())
616 RemoveChild(children_[0]); 622 RemoveChild(children_[0]);
617 return true; 623 return true;
618 } 624 }
619 625
620 } // namespace mojo 626 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698