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

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

Issue 1166123005: Removes ServiceProviders from ViewManager::Embed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use is_headless rather than check for browser. Created 5 years, 6 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 if (manager_) { 359 if (manager_) {
360 static_cast<ViewManagerClientImpl*>(manager_)->SetSurfaceId(id_, id.Pass()); 360 static_cast<ViewManagerClientImpl*>(manager_)->SetSurfaceId(id_, id.Pass());
361 } 361 }
362 } 362 }
363 363
364 void View::SetFocus() { 364 void View::SetFocus() {
365 if (manager_) 365 if (manager_)
366 static_cast<ViewManagerClientImpl*>(manager_)->SetFocus(id_); 366 static_cast<ViewManagerClientImpl*>(manager_)->SetFocus(id_);
367 } 367 }
368 368
369 void View::Embed(const String& url) {
370 if (PrepareForEmbed())
371 static_cast<ViewManagerClientImpl*>(manager_)->Embed(url, id_);
372 }
373
374 void View::Embed(mojo::URLRequestPtr request,
375 InterfaceRequest<ServiceProvider> services,
376 ServiceProviderPtr exposed_services) {
377 if (PrepareForEmbed()) {
378 static_cast<ViewManagerClientImpl*>(manager_)
379 ->Embed(request.Pass(), id_, services.Pass(), exposed_services.Pass());
380 }
381 }
382
383 void View::Embed(ViewManagerClientPtr client) { 369 void View::Embed(ViewManagerClientPtr client) {
384 if (PrepareForEmbed()) 370 if (PrepareForEmbed())
385 static_cast<ViewManagerClientImpl*>(manager_)->Embed(id_, client.Pass()); 371 static_cast<ViewManagerClientImpl*>(manager_)->Embed(id_, client.Pass());
386 } 372 }
387 373
388 void View::EmbedAllowingReembed(mojo::URLRequestPtr request) { 374 void View::EmbedAllowingReembed(mojo::URLRequestPtr request) {
389 if (PrepareForEmbed()) { 375 if (PrepareForEmbed()) {
390 static_cast<ViewManagerClientImpl*>(manager_) 376 static_cast<ViewManagerClientImpl*>(manager_)
391 ->EmbedAllowingReembed(request.Pass(), id_); 377 ->EmbedAllowingReembed(request.Pass(), id_);
392 } 378 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) { 589 !static_cast<ViewManagerClientImpl*>(manager_)->is_embed_root()) {
604 return false; 590 return false;
605 } 591 }
606 592
607 while (!children_.empty()) 593 while (!children_.empty())
608 RemoveChild(children_[0]); 594 RemoveChild(children_[0]);
609 return true; 595 return true;
610 } 596 }
611 597
612 } // namespace mojo 598 } // namespace mojo
OLDNEW
« no previous file with comments | « components/view_manager/public/cpp/BUILD.gn ('k') | components/view_manager/public/cpp/lib/view_manager_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698