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

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

Issue 1141453002: Makes browser resize content when root bounds change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move to androidui 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/browser_ui.h » ('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 d62d1272e29c4d4524bd641499af556a9f9b71e8..52741a803c6751450b0747b6e156e51af2097831 100644
--- a/mandoline/ui/browser/browser.cc
+++ b/mandoline/ui/browser/browser.cc
@@ -31,6 +31,11 @@ base::WeakPtr<Browser> Browser::GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
+// Convenience method:
+void Browser::ReplaceContentWithURL(const mojo::String& url) {
+ Embed(url, nullptr, nullptr);
+}
+
void Browser::Initialize(mojo::ApplicationImpl* app) {
window_manager_app_->Initialize(app);
ui_.reset(BrowserUI::Create(this, app->shell()));
@@ -94,6 +99,12 @@ void Browser::OnEmbed(
Embed(default_url_, services.Pass(), exposed_services.Pass());
}
+void Browser::OnViewManagerDisconnected(
+ mojo::ViewManager* view_manager) {
+ ui_.reset();
+ root_ = nullptr;
+}
+
void Browser::Embed(const mojo::String& url,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
mojo::ServiceProviderPtr exposed_services) {
@@ -125,14 +136,4 @@ void Browser::Create(mojo::ApplicationConnection* connection,
navigator_host_.Bind(request.Pass());
}
-void Browser::OnViewManagerDisconnected(
- mojo::ViewManager* view_manager) {
- root_ = nullptr;
-}
-
-// Convenience method:
-void Browser::ReplaceContentWithURL(const mojo::String& url) {
- Embed(url, nullptr, nullptr);
-}
-
} // namespace mandoline
« no previous file with comments | « mandoline/ui/browser/browser.h ('k') | mandoline/ui/browser/browser_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698