| 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/views/panels/panel_frame_view.h" | 5 #include "chrome/browser/ui/views/panels/panel_frame_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/ui/panels/panel.h" | 7 #include "chrome/browser/ui/panels/panel.h" |
| 8 #include "chrome/browser/ui/panels/panel_constants.h" | 8 #include "chrome/browser/ui/panels/panel_constants.h" |
| 9 #include "chrome/browser/ui/views/panels/panel_view.h" | 9 #include "chrome/browser/ui/views/panels/panel_view.h" |
| 10 #include "chrome/browser/ui/views/tab_icon_view.h" | 10 #include "chrome/browser/ui/views/tab_icon_view.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 SkColorSetRGB(0x53, 0xa9, 0x3f); | 57 SkColorSetRGB(0x53, 0xa9, 0x3f); |
| 58 | 58 |
| 59 // Color used to draw the minimized panel. | 59 // Color used to draw the minimized panel. |
| 60 const SkColor kMinimizeBackgroundDefaultColor = SkColorSetRGB(0xf5, 0xf4, 0xf0); | 60 const SkColor kMinimizeBackgroundDefaultColor = SkColorSetRGB(0xf5, 0xf4, 0xf0); |
| 61 const SkColor kMinimizeBorderDefaultColor = SkColorSetRGB(0xc9, 0xc9, 0xc9); | 61 const SkColor kMinimizeBorderDefaultColor = SkColorSetRGB(0xc9, 0xc9, 0xc9); |
| 62 | 62 |
| 63 // Color used to draw the title text under default theme. | 63 // Color used to draw the title text under default theme. |
| 64 const SkColor kTitleTextDefaultColor = SkColorSetRGB(0xf9, 0xf9, 0xf9); | 64 const SkColor kTitleTextDefaultColor = SkColorSetRGB(0xf9, 0xf9, 0xf9); |
| 65 | 65 |
| 66 gfx::ImageSkia* CreateImageForColor(SkColor color) { | 66 gfx::ImageSkia* CreateImageForColor(SkColor color) { |
| 67 gfx::Canvas canvas(gfx::Size(1, 1), ui::SCALE_FACTOR_100P, true); | 67 gfx::Canvas canvas(gfx::Size(1, 1), 1.0f, true); |
| 68 canvas.DrawColor(color); | 68 canvas.DrawColor(color); |
| 69 return new gfx::ImageSkia(canvas.ExtractImageRep()); | 69 return new gfx::ImageSkia(canvas.ExtractImageRep()); |
| 70 } | 70 } |
| 71 | 71 |
| 72 const gfx::ImageSkia& GetTopLeftCornerImage(panel::CornerStyle corner_style) { | 72 const gfx::ImageSkia& GetTopLeftCornerImage(panel::CornerStyle corner_style) { |
| 73 static gfx::ImageSkia* rounded_image = NULL; | 73 static gfx::ImageSkia* rounded_image = NULL; |
| 74 static gfx::ImageSkia* non_rounded_image = NULL; | 74 static gfx::ImageSkia* non_rounded_image = NULL; |
| 75 if (!rounded_image) { | 75 if (!rounded_image) { |
| 76 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 76 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 77 rounded_image = rb.GetImageSkiaNamed(IDR_WINDOW_TOP_LEFT_CORNER); | 77 rounded_image = rb.GetImageSkiaNamed(IDR_WINDOW_TOP_LEFT_CORNER); |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 761 |
| 762 // Draw the left border. | 762 // Draw the left border. |
| 763 canvas->TileImageInt(left_image, | 763 canvas->TileImageInt(left_image, |
| 764 0, | 764 0, |
| 765 top_left_image.height(), | 765 top_left_image.height(), |
| 766 left_image.width(), | 766 left_image.width(), |
| 767 height() - top_left_image.height() - | 767 height() - top_left_image.height() - |
| 768 bottom_left_image.height()); | 768 bottom_left_image.height()); |
| 769 #endif | 769 #endif |
| 770 } | 770 } |
| OLD | NEW |