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

Unified Diff: components/html_viewer/html_document.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/html_viewer/html_document.h ('k') | components/html_viewer/html_viewer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_document.cc
diff --git a/components/html_viewer/html_document.cc b/components/html_viewer/html_document.cc
index 62ef9cb3e661b6ccd25c467a1196d7bafe9c9159..d7f287c45b8f009513fee39f4a1860eb5c124754 100644
--- a/components/html_viewer/html_document.cc
+++ b/components/html_viewer/html_document.cc
@@ -151,14 +151,14 @@ HTMLDocument::HTMLDocument(mojo::ApplicationImpl* html_document_app,
html_document_app->app_lifetime_helper()->CreateAppRefCount()),
html_document_app_(html_document_app),
response_(response.Pass()),
+ navigator_host_(connection->GetServiceProvider()),
web_view_(nullptr),
root_(nullptr),
view_manager_client_factory_(html_document_app->shell(), this),
setup_(setup),
frame_tree_manager_binding_(&frame_tree_manager_) {
- embedder_exported_services_.AddService(
+ connection->AddService(
static_cast<mojo::InterfaceFactory<mandoline::FrameTreeClient>*>(this));
-
connection->AddService(
static_cast<InterfaceFactory<mojo::AxProvider>*>(this));
connection->AddService(&view_manager_client_factory_);
@@ -177,17 +177,10 @@ HTMLDocument::~HTMLDocument() {
root_->RemoveObserver(this);
}
-void HTMLDocument::OnEmbed(
- View* root,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) {
+void HTMLDocument::OnEmbed(View* root) {
DCHECK(!setup_->is_headless());
root_ = root;
root_->AddObserver(this);
- embedder_service_provider_ = exposed_services.Pass();
- navigator_host_.set_service_provider(embedder_service_provider_.get());
-
- embedder_exported_services_.Bind(services.Pass());
InitSetupAndLoadIfNecessary();
}
@@ -352,7 +345,7 @@ blink::WebNavigationPolicy HTMLDocument::decidePolicyForNavigation(
if (info.frame->parent() && EnableOOPIFs()) {
mojo::View* view = frame_to_view_[info.frame].view;
mojo::URLRequestPtr url_request = mojo::URLRequest::From(info.urlRequest);
- view->Embed(url_request.Pass(), nullptr, nullptr);
+ view->EmbedAllowingReembed(url_request.Pass());
// TODO(sky): I tried swapping the frame types here, but that resulted in
// the view never getting sized. Figure out why.
// TODO(sky): there are timing conditions here, and we should only do this
« no previous file with comments | « components/html_viewer/html_document.h ('k') | components/html_viewer/html_viewer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698