Index: mandoline/ui/browser/android/android_ui.cc |
diff --git a/mandoline/ui/browser/android/android_ui.cc b/mandoline/ui/browser/android/android_ui.cc |
index 7cdbc72201e099e59427f6d3956a8b45528a0ff1..3239d1e6e3ed077c4c3d078721238763109a84c6 100644 |
--- a/mandoline/ui/browser/android/android_ui.cc |
+++ b/mandoline/ui/browser/android/android_ui.cc |
@@ -5,14 +5,17 @@ |
#include "mandoline/ui/browser/android/android_ui.h" |
#include "components/view_manager/public/cpp/view.h" |
+#include "mandoline/ui/browser/browser.h" |
#include "mojo/converters/geometry/geometry_type_converters.h" |
#include "ui/gfx/geometry/rect.h" |
namespace mandoline { |
-AndroidUI::AndroidUI(Browser* browser, mojo::Shell* shell) |
+class Browser; |
+ |
+AndroidUI::AndroidUI(Browser* browser, mojo::ApplicationImpl* application_impl) |
: browser_(browser), |
- shell_(shell), |
+ application_impl_(application_impl), |
root_(nullptr), |
content_(nullptr) {} |
@@ -20,12 +23,14 @@ AndroidUI::~AndroidUI() { |
root_->RemoveObserver(this); |
} |
-void AndroidUI::Init(mojo::View* root, mojo::View* content) { |
+void AndroidUI::Init(mojo::View* root) { |
root_ = root; |
root_->AddObserver(this); |
- content_ = content; |
- content_->SetBounds(root_->bounds()); |
+ browser_->content()->SetBounds(root_->bounds()); |
+} |
+ |
+void AndroidUI::OnURLChanged() { |
} |
void AndroidUI::OnViewBoundsChanged(mojo::View* view, |
@@ -36,8 +41,9 @@ void AndroidUI::OnViewBoundsChanged(mojo::View* view, |
} |
// static |
-BrowserUI* BrowserUI::Create(Browser* browser, mojo::Shell* shell) { |
- return new AndroidUI(browser, shell); |
+BrowserUI* BrowserUI::Create(Browser* browser, |
+ mojo::ApplicationImpl* application_impl) { |
+ return new AndroidUI(browser, application_impl); |
} |
} // namespace mandoline |