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 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" | 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 const SkColor kAttentionBackgroundDefaultColorStart = 0xffffab57; | 103 const SkColor kAttentionBackgroundDefaultColorStart = 0xffffab57; |
104 const SkColor kAttentionBackgroundDefaultColorEnd = 0xfff59338; | 104 const SkColor kAttentionBackgroundDefaultColorEnd = 0xfff59338; |
105 | 105 |
106 // Color used to draw the border. | 106 // Color used to draw the border. |
107 const SkColor kBorderColor = 0xc0000000; | 107 const SkColor kBorderColor = 0xc0000000; |
108 | 108 |
109 // Color used to draw the divider line between the titlebar and the client area. | 109 // Color used to draw the divider line between the titlebar and the client area. |
110 const SkColor kDividerColor = 0xffb5b5b5; | 110 const SkColor kDividerColor = 0xffb5b5b5; |
111 | 111 |
112 struct ButtonResources { | 112 struct ButtonResources { |
113 SkBitmap* normal_image; | 113 gfx::ImageSkia* normal_image; |
114 SkBitmap* hover_image; | 114 gfx::ImageSkia* hover_image; |
115 string16 tooltip_text; | 115 string16 tooltip_text; |
116 | 116 |
117 ButtonResources(int normal_image_id, int hover_image_id, int tooltip_id) | 117 ButtonResources(int normal_image_id, int hover_image_id, int tooltip_id) |
118 : normal_image(NULL), | 118 : normal_image(NULL), |
119 hover_image(NULL) { | 119 hover_image(NULL) { |
120 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 120 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
121 normal_image = rb.GetBitmapNamed(normal_image_id); | 121 normal_image = rb.GetImageSkiaNamed(normal_image_id); |
122 hover_image = rb.GetBitmapNamed(hover_image_id); | 122 hover_image = rb.GetImageSkiaNamed(hover_image_id); |
123 tooltip_text = l10n_util::GetStringUTF16(tooltip_id); | 123 tooltip_text = l10n_util::GetStringUTF16(tooltip_id); |
124 } | 124 } |
125 }; | 125 }; |
126 | 126 |
127 struct EdgeResources { | 127 struct EdgeResources { |
128 SkBitmap* top_left; | 128 SkBitmap* top_left; |
129 SkBitmap* top; | 129 SkBitmap* top; |
130 SkBitmap* top_right; | 130 SkBitmap* top_right; |
131 SkBitmap* right; | 131 SkBitmap* right; |
132 SkBitmap* bottom_right; | 132 SkBitmap* bottom_right; |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 } | 797 } |
798 | 798 |
799 bool PanelBrowserFrameView::CanResize() const { | 799 bool PanelBrowserFrameView::CanResize() const { |
800 return panel_browser_view_->panel()->CanResizeByMouse() != | 800 return panel_browser_view_->panel()->CanResizeByMouse() != |
801 panel::NOT_RESIZABLE; | 801 panel::NOT_RESIZABLE; |
802 } | 802 } |
803 | 803 |
804 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { | 804 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { |
805 return height() <= kTitlebarHeight; | 805 return height() <= kTitlebarHeight; |
806 } | 806 } |
OLD | NEW |