OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DETACHABLE_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/ui/host_desktop.h" | 8 #include "chrome/browser/ui/host_desktop.h" |
9 #include "ui/views/accessible_pane_view.h" | 9 #include "ui/views/accessible_pane_view.h" |
10 | 10 |
11 struct SkRect; | 11 struct SkRect; |
12 | 12 |
13 // DetachableToolbarView contains functionality common to views that can detach | 13 // DetachableToolbarView contains functionality common to views that can detach |
14 // from the Chrome frame, such as the BookmarkBarView and the Extension shelf. | 14 // from the Chrome frame, such as the BookmarkBarView and the Extension shelf. |
15 class DetachableToolbarView : public views::AccessiblePaneView { | 15 class DetachableToolbarView : public views::AccessiblePaneView { |
16 public: | 16 public: |
17 // The color gradient start value close to the edge of the divider. | 17 // The color gradient start value close to the edge of the divider. |
18 static const SkColor kEdgeDividerColor; | 18 static const SkColor kEdgeDividerColor; |
19 // The color gradient value for the middle of the divider. | 19 // The color gradient value for the middle of the divider. |
20 static const SkColor kMiddleDividerColor; | 20 static const SkColor kMiddleDividerColor; |
21 | 21 |
22 DetachableToolbarView() {} | 22 DetachableToolbarView() {} |
23 virtual ~DetachableToolbarView() {} | 23 ~DetachableToolbarView() override {} |
24 | 24 |
25 // Whether the view is currently detached from the Chrome frame. | 25 // Whether the view is currently detached from the Chrome frame. |
26 virtual bool IsDetached() const = 0; | 26 virtual bool IsDetached() const = 0; |
27 | 27 |
28 // Gets the current state of the resize animation (show/hide). | 28 // Gets the current state of the resize animation (show/hide). |
29 virtual double GetAnimationValue() const = 0; | 29 virtual double GetAnimationValue() const = 0; |
30 | 30 |
31 // Gets the current amount of overlap atop the browser toolbar. | 31 // Gets the current amount of overlap atop the browser toolbar. |
32 virtual int GetToolbarOverlap() const = 0; | 32 virtual int GetToolbarOverlap() const = 0; |
33 | 33 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 int vertical_padding, | 87 int vertical_padding, |
88 SkColor top_color, | 88 SkColor top_color, |
89 SkColor middle_color, | 89 SkColor middle_color, |
90 SkColor bottom_color); | 90 SkColor bottom_color); |
91 | 91 |
92 private: | 92 private: |
93 DISALLOW_COPY_AND_ASSIGN(DetachableToolbarView); | 93 DISALLOW_COPY_AND_ASSIGN(DetachableToolbarView); |
94 }; | 94 }; |
95 | 95 |
96 #endif // CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ | 96 #endif // CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ |
OLD | NEW |