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

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: nits and such. 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
« no previous file with comments | « mandoline/ui/desktop_ui/browser_commands.h ('k') | mandoline/ui/desktop_ui/browser_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7684a8b1bc678bc9475720d72c5acfe52fd409cb 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,22 +24,18 @@ class Shell;
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::ButtonListener {
+ public views::LayoutManager {
public:
BrowserWindow(mojo::ApplicationImpl* app,
mojo::ViewTreeHostFactory* host_factory,
@@ -49,6 +44,10 @@ class BrowserWindow : public mojo::ViewTreeDelegate,
void LoadURL(const GURL& url);
void Close();
+ void ShowOmnibox();
+ void GoBack();
+ void GoForward();
+
private:
~BrowserWindow() override;
@@ -65,6 +64,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 +80,7 @@ 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 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_;
« no previous file with comments | « mandoline/ui/desktop_ui/browser_commands.h ('k') | mandoline/ui/desktop_ui/browser_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698