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

Unified Diff: mandoline/ui/desktop_ui/browser_window.h

Issue 1326443006: mandoline: Add back/forward support and UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 3 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
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 cbb61f54579c060555d749b9ee71afe0ff3b0b68..366ad08cde2b51df40350a773856b0a6fc8fee39 100644
--- a/mandoline/ui/desktop_ui/browser_window.h
+++ b/mandoline/ui/desktop_ui/browser_window.h
@@ -15,7 +15,6 @@
#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"
@@ -25,10 +24,6 @@ class Shell;
class View;
}
-namespace views {
-class LabelButton;
-}
-
namespace mandoline {
class BrowserManager;
@@ -39,8 +34,7 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
public web_view::mojom::WebViewClient,
public ViewEmbedder,
public mojo::InterfaceFactory<ViewEmbedder>,
- public views::LayoutManager,
- public views::ButtonListener {
+ public views::LayoutManager {
public:
BrowserWindow(mojo::ApplicationImpl* app,
mojo::ViewTreeHostFactory* host_factory,
@@ -50,6 +44,8 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
void Close();
private:
+ class ToolbarView;
+
~BrowserWindow() override;
float DIPSToPixels(float value) const;
@@ -65,6 +61,8 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
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:
@@ -79,11 +77,10 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
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 GoBack();
+ void GoForward();
void EmbedOmnibox();
mojo::ApplicationImpl* app_;
@@ -91,7 +88,7 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
mojo::ViewTreeHostPtr host_;
mojo::Binding<ViewTreeHostClient> host_client_binding_;
BrowserManager* manager_;
- views::LabelButton* omnibox_launcher_;
+ ToolbarView* toolbar_view_;
ProgressView* progress_bar_;
mojo::View* root_;
mojo::View* content_;

Powered by Google App Engine
This is Rietveld 408576698