Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BACK_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_BACK_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BACK_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_BACK_BUTTON_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" | 8 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" |
| 9 | 9 |
| 10 namespace ui { | 10 namespace ui { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 class BackButton : public ToolbarButton { | 23 class BackButton : public ToolbarButton { |
| 24 public: | 24 public: |
| 25 // Takes ownership of the |model|, which can be null if no menu | 25 // Takes ownership of the |model|, which can be null if no menu |
| 26 // is to be shown. | 26 // is to be shown. |
| 27 BackButton(views::ButtonListener* listener, ui::MenuModel* model); | 27 BackButton(views::ButtonListener* listener, ui::MenuModel* model); |
| 28 ~BackButton() override; | 28 ~BackButton() override; |
| 29 | 29 |
| 30 void SetLeadingMargin(int margin); | 30 void SetLeadingMargin(int margin); |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 // NativeThemeDelegate: | |
|
Peter Kasting
2015/01/23 07:28:11
This class doesn't inherit directly from NativeThe
oshima
2015/01/24 01:23:07
Done.
| |
| 33 gfx::Rect GetThemePaintRect() const override; | 34 gfx::Rect GetThemePaintRect() const override; |
| 35 | |
| 36 // views::View: | |
| 37 const char* GetClassName() const override; | |
| 38 | |
| 39 // views::LabelButton: | |
| 34 scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override; | 40 scoped_ptr<views::LabelButtonBorder> CreateDefaultBorder() const override; |
| 35 | 41 |
| 36 private: | 42 private: |
| 37 // Any leading margin to be applied. Used when the back button is in | 43 // Any leading margin to be applied. Used when the back button is in |
| 38 // a maximized state to extend to the full window width. | 44 // a maximized state to extend to the full window width. |
| 39 int margin_leading_; | 45 int margin_leading_; |
| 40 | 46 |
| 41 DISALLOW_COPY_AND_ASSIGN(BackButton); | 47 DISALLOW_COPY_AND_ASSIGN(BackButton); |
| 42 }; | 48 }; |
| 43 | 49 |
| 44 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BACK_BUTTON_H_ | 50 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_BACK_BUTTON_H_ |
| OLD | NEW |