| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MANDOLINE_UI_DESKTOP_UI_TOOLBAR_VIEW_H_ | |
| 6 #define MANDOLINE_UI_DESKTOP_UI_TOOLBAR_VIEW_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "ui/views/controls/button/label_button.h" | |
| 10 #include "ui/views/view.h" | |
| 11 | |
| 12 namespace views { | |
| 13 class BoxLayout; | |
| 14 class LabelButton; | |
| 15 } | |
| 16 | |
| 17 namespace mandoline { | |
| 18 class BrowserWindow; | |
| 19 | |
| 20 class ToolbarView : public views::View, | |
| 21 public views::ButtonListener { | |
| 22 public: | |
| 23 ToolbarView(BrowserWindow* browser_window); | |
| 24 ~ToolbarView() override; | |
| 25 | |
| 26 // Sets the state of the visual elements. | |
| 27 void SetOmniboxText(const base::string16& text); | |
| 28 void SetBackForwardEnabled(bool back_enabled, bool forward_enabled); | |
| 29 | |
| 30 // Overridden from views::ButtonListener: | |
| 31 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
| 32 | |
| 33 private: | |
| 34 BrowserWindow* browser_window_; | |
| 35 | |
| 36 views::BoxLayout* layout_; | |
| 37 views::LabelButton* back_button_; | |
| 38 views::LabelButton* forward_button_; | |
| 39 views::LabelButton* omnibox_launcher_; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(ToolbarView); | |
| 42 }; | |
| 43 | |
| 44 } // namespace mandoline | |
| 45 | |
| 46 #endif // MANDOLINE_UI_DESKTOP_UI_TOOLBAR_VIEW_H_ | |
| OLD | NEW |