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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 top_right = rb.GetImageSkiaNamed(top_right_id); | 143 top_right = rb.GetImageSkiaNamed(top_right_id); |
144 right = rb.GetImageSkiaNamed(right_id); | 144 right = rb.GetImageSkiaNamed(right_id); |
145 bottom_right = rb.GetImageSkiaNamed(bottom_right_id); | 145 bottom_right = rb.GetImageSkiaNamed(bottom_right_id); |
146 bottom = rb.GetImageSkiaNamed(bottom_id); | 146 bottom = rb.GetImageSkiaNamed(bottom_id); |
147 bottom_left = rb.GetImageSkiaNamed(bottom_left_id); | 147 bottom_left = rb.GetImageSkiaNamed(bottom_left_id); |
148 left = rb.GetImageSkiaNamed(left_id); | 148 left = rb.GetImageSkiaNamed(left_id); |
149 } | 149 } |
150 }; | 150 }; |
151 | 151 |
152 gfx::ImageSkia* CreateImageForColor(SkColor color) { | 152 gfx::ImageSkia* CreateImageForColor(SkColor color) { |
153 gfx::Canvas canvas(gfx::Size(1, 1), ui::SCALE_FACTOR_100P, true); | 153 gfx::Canvas canvas(gfx::Size(1, 1), true); |
154 canvas.DrawColor(color); | 154 canvas.DrawColor(color); |
155 return new gfx::ImageSkia(canvas.ExtractImageRep()); | 155 return new gfx::ImageSkia(canvas.ExtractBitmap()); |
156 } | 156 } |
157 | 157 |
158 const ButtonResources& GetCloseButtonResources() { | 158 const ButtonResources& GetCloseButtonResources() { |
159 static ButtonResources* buttons = NULL; | 159 static ButtonResources* buttons = NULL; |
160 if (!buttons) { | 160 if (!buttons) { |
161 buttons = new ButtonResources(IDR_PANEL_CLOSE, | 161 buttons = new ButtonResources(IDR_PANEL_CLOSE, |
162 IDR_PANEL_CLOSE_H, | 162 IDR_PANEL_CLOSE_H, |
163 IDR_PANEL_CLOSE_C, | 163 IDR_PANEL_CLOSE_C, |
164 IDS_PANEL_CLOSE_TOOLTIP); | 164 IDS_PANEL_CLOSE_TOOLTIP); |
165 } | 165 } |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 } | 798 } |
799 | 799 |
800 bool PanelBrowserFrameView::CanResize() const { | 800 bool PanelBrowserFrameView::CanResize() const { |
801 return panel_browser_view_->panel()->CanResizeByMouse() != | 801 return panel_browser_view_->panel()->CanResizeByMouse() != |
802 panel::NOT_RESIZABLE; | 802 panel::NOT_RESIZABLE; |
803 } | 803 } |
804 | 804 |
805 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { | 805 bool PanelBrowserFrameView::IsShowingTitlebarOnly() const { |
806 return height() <= panel::kTitlebarHeight; | 806 return height() <= panel::kTitlebarHeight; |
807 } | 807 } |
OLD | NEW |