| Index: mandoline/ui/desktop_ui/browser_window.h
|
| diff --git a/mandoline/ui/desktop_ui/browser_window.h b/mandoline/ui/desktop_ui/browser_window.h
|
| index 7684a8b1bc678bc9475720d72c5acfe52fd409cb..cbb61f54579c060555d749b9ee71afe0ff3b0b68 100644
|
| --- a/mandoline/ui/desktop_ui/browser_window.h
|
| +++ b/mandoline/ui/desktop_ui/browser_window.h
|
| @@ -15,6 +15,7 @@
|
| #include "mandoline/ui/desktop_ui/public/interfaces/view_embedder.mojom.h"
|
| #include "mojo/application/public/cpp/interface_factory.h"
|
| #include "mojo/common/weak_binding_set.h"
|
| +#include "ui/views/controls/button/button.h"
|
| #include "ui/views/layout/layout_manager.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -24,18 +25,22 @@
|
| class View;
|
| }
|
|
|
| +namespace views {
|
| +class LabelButton;
|
| +}
|
| +
|
| namespace mandoline {
|
|
|
| class BrowserManager;
|
| class ProgressView;
|
| -class ToolbarView;
|
|
|
| class BrowserWindow : public mojo::ViewTreeDelegate,
|
| public mojo::ViewTreeHostClient,
|
| public web_view::mojom::WebViewClient,
|
| public ViewEmbedder,
|
| public mojo::InterfaceFactory<ViewEmbedder>,
|
| - public views::LayoutManager {
|
| + public views::LayoutManager,
|
| + public views::ButtonListener {
|
| public:
|
| BrowserWindow(mojo::ApplicationImpl* app,
|
| mojo::ViewTreeHostFactory* host_factory,
|
| @@ -43,10 +48,6 @@
|
|
|
| void LoadURL(const GURL& url);
|
| void Close();
|
| -
|
| - void ShowOmnibox();
|
| - void GoBack();
|
| - void GoForward();
|
|
|
| private:
|
| ~BrowserWindow() override;
|
| @@ -64,8 +65,6 @@
|
| void TopLevelNavigate(mojo::URLRequestPtr request) override;
|
| void LoadingStateChanged(bool is_loading) override;
|
| void ProgressChanged(double progress) override;
|
| - void BackForwardChanged(web_view::mojom::ButtonState back_button,
|
| - web_view::mojom::ButtonState forward_button) override;
|
| void TitleChanged(const mojo::String& title) override;
|
|
|
| // Overridden from ViewEmbedder:
|
| @@ -80,7 +79,11 @@
|
| gfx::Size GetPreferredSize(const views::View* view) const override;
|
| void Layout(views::View* host) override;
|
|
|
| + // Overridden from views::ButtonListener:
|
| + void ButtonPressed(views::Button* sender, const ui::Event& event) override;
|
| +
|
| void Init(mojo::View* root);
|
| + void ShowOmnibox();
|
| void EmbedOmnibox();
|
|
|
| mojo::ApplicationImpl* app_;
|
| @@ -88,7 +91,7 @@
|
| mojo::ViewTreeHostPtr host_;
|
| mojo::Binding<ViewTreeHostClient> host_client_binding_;
|
| BrowserManager* manager_;
|
| - ToolbarView* toolbar_view_;
|
| + views::LabelButton* omnibox_launcher_;
|
| ProgressView* progress_bar_;
|
| mojo::View* root_;
|
| mojo::View* content_;
|
|
|