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 "ui/views/accessible_pane_view.h" | 8 #include "ui/views/accessible_pane_view.h" |
9 | 9 |
10 struct SkRect; | 10 struct SkRect; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // only a small round rectangle is for drawing our content on. This calculates | 43 // only a small round rectangle is for drawing our content on. This calculates |
44 // how big this area is, where it is located within the shelf and how round | 44 // how big this area is, where it is located within the shelf and how round |
45 // the edges should be. | 45 // the edges should be. |
46 static void CalculateContentArea(double animation_state, | 46 static void CalculateContentArea(double animation_state, |
47 double horizontal_padding, | 47 double horizontal_padding, |
48 double vertical_padding, | 48 double vertical_padding, |
49 SkRect* rect, | 49 SkRect* rect, |
50 double* roundness, | 50 double* roundness, |
51 views::View* view); | 51 views::View* view); |
52 | 52 |
53 // Paint the horizontal border separating the shelf/bar from the page content. | 53 // Paint the horizontal border separating the shelf/bar from the page content, |
| 54 // with COLOR_TOOLBAR_SEPARATOR. |
54 static void PaintHorizontalBorder(gfx::Canvas* canvas, | 55 static void PaintHorizontalBorder(gfx::Canvas* canvas, |
55 DetachableToolbarView* view); | 56 DetachableToolbarView* view); |
56 | 57 |
| 58 // Similar to PaintHorizontalBorder but with the specified |border_color|. |
| 59 static void PaintHorizontalBorderWithColor(gfx::Canvas* canvas, |
| 60 DetachableToolbarView* view, |
| 61 SkColor border_color); |
| 62 |
57 // Paint the background of the content area (the surface behind the | 63 // Paint the background of the content area (the surface behind the |
58 // bookmarks). |rect| is the rectangle to paint the background within. | 64 // bookmarks). |rect| is the rectangle to paint the background within. |
59 // |roundness| describes the roundness of the corners. | 65 // |roundness| describes the roundness of the corners. |
60 static void PaintContentAreaBackground(gfx::Canvas* canvas, | 66 static void PaintContentAreaBackground(gfx::Canvas* canvas, |
61 ui::ThemeProvider* theme_provider, | 67 ui::ThemeProvider* theme_provider, |
62 const SkRect& rect, | 68 const SkRect& rect, |
63 double roundness); | 69 double roundness); |
64 // Paint the border around the content area (when in detached mode). | 70 // Paint the border around the content area (when in detached mode). |
65 static void PaintContentAreaBorder(gfx::Canvas* canvas, | 71 static void PaintContentAreaBorder(gfx::Canvas* canvas, |
66 ui::ThemeProvider* theme_provider, | 72 ui::ThemeProvider* theme_provider, |
(...skipping 13 matching lines...) Expand all Loading... |
80 int vertical_padding, | 86 int vertical_padding, |
81 SkColor top_color, | 87 SkColor top_color, |
82 SkColor middle_color, | 88 SkColor middle_color, |
83 SkColor bottom_color); | 89 SkColor bottom_color); |
84 | 90 |
85 private: | 91 private: |
86 DISALLOW_COPY_AND_ASSIGN(DetachableToolbarView); | 92 DISALLOW_COPY_AND_ASSIGN(DetachableToolbarView); |
87 }; | 93 }; |
88 | 94 |
89 #endif // CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ | 95 #endif // CHROME_BROWSER_UI_VIEWS_DETACHABLE_TOOLBAR_VIEW_H_ |
OLD | NEW |