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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc

Issue 591633002: Replace most uses of ViewManagerInitService with client lib ViewManager::Embed() to offer the same … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
index bd91eade5d8190edad0aa45845b874ba658675ae..a7baa743658bbe4c78c595ac0f6e824871f35d3f 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.cc
@@ -8,6 +8,7 @@
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
+#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/connect.h"
#include "mojo/public/cpp/application/service_provider_impl.h"
#include "mojo/public/interfaces/application/service_provider.mojom.h"
@@ -356,7 +357,8 @@ void ViewManagerClientImpl::OnViewInputEvent(
void ViewManagerClientImpl::Embed(
const String& url,
InterfaceRequest<ServiceProvider> service_provider) {
- window_manager_delegate_->Embed(url, service_provider.Pass());
+ if (window_manager_delegate_)
+ window_manager_delegate_->Embed(url, service_provider.Pass());
}
void ViewManagerClientImpl::DispatchOnViewInputEvent(EventPtr event) {
« no previous file with comments | « mojo/services/public/cpp/view_manager/BUILD.gn ('k') | mojo/services/public/cpp/view_manager/lib/view_manager_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698