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 "ui/views/view.h" |
| 9 #include "ui/views/controls/button/label_button.h" |
| 10 |
| 11 namespace views { |
| 12 class BoxLayout; |
| 13 class LabelButton; |
| 14 } |
| 15 |
| 16 namespace mandoline { |
| 17 class BrowserWindow; |
| 18 |
| 19 class ToolbarView : public views::View, |
| 20 public views::ButtonListener { |
| 21 public: |
| 22 ToolbarView(BrowserWindow* browser_window); |
| 23 ~ToolbarView() override; |
| 24 |
| 25 // Sets the state of the visual elements. |
| 26 void SetOmniboxText(const base::string16& text); |
| 27 void SetBackForwardEnabled(bool back_enabled, bool forward_enabled); |
| 28 |
| 29 // Overridden from views::ButtonListener: |
| 30 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 31 |
| 32 private: |
| 33 BrowserWindow* browser_window_; |
| 34 |
| 35 views::BoxLayout* layout_; |
| 36 views::LabelButton* back_button_; |
| 37 views::LabelButton* forward_button_; |
| 38 views::LabelButton* omnibox_launcher_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(ToolbarView); |
| 41 }; |
| 42 |
| 43 } // namespace mandoline |
| 44 |
| 45 #endif // MANDOLINE_UI_DESKTOP_UI_TOOLBAR_VIEW_H_ |
OLD | NEW |