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/frame/opaque_browser_frame_view.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 255, gfx::Rect(x - kClientEdgeThickness, y, w + kClientEdgeThickness * 3, | 679 255, gfx::Rect(x - kClientEdgeThickness, y, w + kClientEdgeThickness * 3, |
680 h)); | 680 h)); |
681 | 681 |
682 // Paint the bottom rect. | 682 // Paint the bottom rect. |
683 canvas->FillRect(gfx::Rect(x, bottom_y, w, bottom_edge_height), | 683 canvas->FillRect(gfx::Rect(x, bottom_y, w, bottom_edge_height), |
684 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); | 684 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); |
685 | 685 |
686 // Tile the toolbar image starting at the frame edge on the left and where the | 686 // Tile the toolbar image starting at the frame edge on the left and where the |
687 // horizontal tabstrip is (or would be) on the top. | 687 // horizontal tabstrip is (or would be) on the top. |
688 gfx::ImageSkia* theme_toolbar = tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR); | 688 gfx::ImageSkia* theme_toolbar = tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR); |
689 canvas->TileImageInt(*theme_toolbar, | 689 canvas->TileImageInt( |
690 x + GetThemeBackgroundXInset(), | 690 *theme_toolbar, x + GetThemeBackgroundXInset(), |
691 bottom_y - GetTopInset(), | 691 bottom_y - GetTopInset() + Tab::GetYOffsetForActiveTabBackground(), |
692 x, bottom_y, w, theme_toolbar->height()); | 692 x, bottom_y, w, theme_toolbar->height()); |
693 | 693 |
694 // Draw rounded corners for the tab. | 694 // Draw rounded corners for the tab. |
695 gfx::ImageSkia* toolbar_left_mask = | 695 gfx::ImageSkia* toolbar_left_mask = |
696 tp->GetImageSkiaNamed(IDR_CONTENT_TOP_LEFT_CORNER_MASK); | 696 tp->GetImageSkiaNamed(IDR_CONTENT_TOP_LEFT_CORNER_MASK); |
697 gfx::ImageSkia* toolbar_right_mask = | 697 gfx::ImageSkia* toolbar_right_mask = |
698 tp->GetImageSkiaNamed(IDR_CONTENT_TOP_RIGHT_CORNER_MASK); | 698 tp->GetImageSkiaNamed(IDR_CONTENT_TOP_RIGHT_CORNER_MASK); |
699 | 699 |
700 // We mask out the corners by using the DestinationIn transfer mode, | 700 // We mask out the corners by using the DestinationIn transfer mode, |
701 // which keeps the RGB pixels from the destination and the alpha from | 701 // which keeps the RGB pixels from the destination and the alpha from |
702 // the source. | 702 // the source. |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 client_area_bottom + kClientEdgeThickness - client_area_top), | 847 client_area_bottom + kClientEdgeThickness - client_area_top), |
848 toolbar_color); | 848 toolbar_color); |
849 canvas->FillRect(gfx::Rect(client_area_bounds.x(), client_area_bottom, | 849 canvas->FillRect(gfx::Rect(client_area_bounds.x(), client_area_bottom, |
850 client_area_bounds.width(), kClientEdgeThickness), | 850 client_area_bounds.width(), kClientEdgeThickness), |
851 toolbar_color); | 851 toolbar_color); |
852 canvas->FillRect(gfx::Rect(client_area_bounds.right(), client_area_top, | 852 canvas->FillRect(gfx::Rect(client_area_bounds.right(), client_area_top, |
853 kClientEdgeThickness, | 853 kClientEdgeThickness, |
854 client_area_bottom + kClientEdgeThickness - client_area_top), | 854 client_area_bottom + kClientEdgeThickness - client_area_top), |
855 toolbar_color); | 855 toolbar_color); |
856 } | 856 } |
OLD | NEW |