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

Unified Diff: mandoline/ui/browser/browser.cc

Issue 1135933003: Get the omnibox to show up again. Sky's changes from yesterday removed the window manager interface… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 | « mandoline/ui/browser/browser.h ('k') | mandoline/ui/browser/view_embedder.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/ui/browser/browser.cc
diff --git a/mandoline/ui/browser/browser.cc b/mandoline/ui/browser/browser.cc
index 741346a81b44004054ee77e9573bd7ba816d48d4..19d0d130331b82d49098117a284138d5855cfb2c 100644
--- a/mandoline/ui/browser/browser.cc
+++ b/mandoline/ui/browser/browser.cc
@@ -36,7 +36,7 @@ Browser::Browser()
omnibox_(nullptr),
navigator_host_(this),
ui_(nullptr) {
- exposed_services_impl_.AddService(this);
+ exposed_services_impl_.AddService<mojo::NavigatorHost>(this);
}
Browser::~Browser() {
@@ -72,6 +72,7 @@ bool Browser::ConfigureIncomingConnection(
bool Browser::ConfigureOutgoingConnection(
mojo::ApplicationConnection* connection) {
+ connection->AddService<ViewEmbedder>(this);
return true;
}
@@ -122,24 +123,6 @@ void Browser::OpenURL(const mojo::String& url) {
ReplaceContentWithURL(url);
}
-void Browser::Create(mojo::ApplicationConnection* connection,
- mojo::InterfaceRequest<mojo::NavigatorHost> request) {
- navigator_host_.Bind(request.Pass());
-}
-
-void Browser::ShowOmnibox(
- const mojo::String& url,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services) {
- if (!omnibox_) {
- omnibox_ = root_->view_manager()->CreateView();
- root_->AddChild(omnibox_);
- omnibox_->SetVisible(true);
- omnibox_->SetBounds(root_->bounds());
- }
- omnibox_->Embed(url, services.Pass(), exposed_services.Pass());
-}
-
void Browser::Embed(const mojo::String& url,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::ServiceProviderPtr exposed_services) {
@@ -170,4 +153,27 @@ void Browser::Embed(const mojo::String& url,
navigator_host_.RecordNavigation(url);
}
+void Browser::Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<mojo::NavigatorHost> request) {
+ navigator_host_.Bind(request.Pass());
+}
+
+void Browser::Create(mojo::ApplicationConnection* connection,
+ mojo::InterfaceRequest<ViewEmbedder> request) {
+ view_embedder_bindings_.AddBinding(this, request.Pass());
+}
+
+void Browser::ShowOmnibox(
+ const mojo::String& url,
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services) {
+ if (!omnibox_) {
+ omnibox_ = root_->view_manager()->CreateView();
+ root_->AddChild(omnibox_);
+ omnibox_->SetVisible(true);
+ omnibox_->SetBounds(root_->bounds());
+ }
+ omnibox_->Embed(url, services.Pass(), exposed_services.Pass());
+}
+
} // namespace mandoline
« no previous file with comments | « mandoline/ui/browser/browser.h ('k') | mandoline/ui/browser/view_embedder.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698