| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "chrome/browser/themes/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
| 9 #include "chrome/browser/themes/theme_service_factory.h" | 9 #include "chrome/browser/themes/theme_service_factory.h" |
| 10 #include "chrome/browser/ui/layout_constants.h" | 10 #include "chrome/browser/ui/layout_constants.h" |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER); | 638 tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_CENTER); |
| 639 canvas->TileImageInt(*bottom_image, x, bottom, w, bottom_image->height()); | 639 canvas->TileImageInt(*bottom_image, x, bottom, w, bottom_image->height()); |
| 640 canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER), | 640 canvas->DrawImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_BOTTOM_LEFT_CORNER), |
| 641 x - img_w, bottom); | 641 x - img_w, bottom); |
| 642 canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE), x - img_w, | 642 canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_CONTENT_LEFT_SIDE), x - img_w, |
| 643 y, img_w, height); | 643 y, img_w, height); |
| 644 FillClientEdgeRects(x, y, w, height, true, toolbar_color, canvas); | 644 FillClientEdgeRects(x, y, w, height, true, toolbar_color, canvas); |
| 645 | 645 |
| 646 // For popup windows, draw location bar sides. | 646 // For popup windows, draw location bar sides. |
| 647 if (!tabstrip_visible && IsToolbarVisible()) { | 647 if (!tabstrip_visible && IsToolbarVisible()) { |
| 648 FillClientEdgeRects( | 648 FillClientEdgeRects(x, y, w, toolbar_bounds.height(), false, |
| 649 x, y, w, toolbar_bounds.height(), false, | 649 LocationBarView::GetOpaqueBorderColor(incognito), |
| 650 LocationBarView::GetBorderColor(incognito), canvas); | 650 canvas); |
| 651 } | 651 } |
| 652 } | 652 } |
| 653 | 653 |
| 654 void OpaqueBrowserFrameView::FillClientEdgeRects(int x, | 654 void OpaqueBrowserFrameView::FillClientEdgeRects(int x, |
| 655 int y, | 655 int y, |
| 656 int w, | 656 int w, |
| 657 int h, | 657 int h, |
| 658 bool draw_bottom, | 658 bool draw_bottom, |
| 659 SkColor color, | 659 SkColor color, |
| 660 gfx::Canvas* canvas) const { | 660 gfx::Canvas* canvas) const { |
| 661 x -= kClientEdgeThickness; | 661 x -= kClientEdgeThickness; |
| 662 gfx::Rect side(x, y, kClientEdgeThickness, h); | 662 gfx::Rect side(x, y, kClientEdgeThickness, h); |
| 663 canvas->FillRect(side, color); | 663 canvas->FillRect(side, color); |
| 664 if (draw_bottom) { | 664 if (draw_bottom) { |
| 665 canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), | 665 canvas->FillRect(gfx::Rect(x, y + h, w + (2 * kClientEdgeThickness), |
| 666 kClientEdgeThickness), | 666 kClientEdgeThickness), |
| 667 color); | 667 color); |
| 668 } | 668 } |
| 669 side.Offset(w + kClientEdgeThickness, 0); | 669 side.Offset(w + kClientEdgeThickness, 0); |
| 670 canvas->FillRect(side, color); | 670 canvas->FillRect(side, color); |
| 671 } | 671 } |
| OLD | NEW |