| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ash_layout_constants.h" | 9 #include "ash/ash_layout_constants.h" |
| 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 10 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR), | 438 canvas->TileImageInt(*tp->GetImageSkiaNamed(IDR_THEME_TOOLBAR), |
| 439 x + GetThemeBackgroundXInset(), y - bg_y, x, y, | 439 x + GetThemeBackgroundXInset(), y - bg_y, x, y, |
| 440 toolbar_bounds.width(), toolbar_bounds.height()); | 440 toolbar_bounds.width(), toolbar_bounds.height()); |
| 441 } else { | 441 } else { |
| 442 canvas->FillRect(toolbar_bounds, | 442 canvas->FillRect(toolbar_bounds, |
| 443 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); | 443 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); |
| 444 } | 444 } |
| 445 | 445 |
| 446 // Top stroke. | 446 // Top stroke. |
| 447 gfx::ScopedCanvas scoped_canvas(canvas); | 447 gfx::ScopedCanvas scoped_canvas(canvas); |
| 448 gfx::Rect tabstrip_bounds(GetBoundsForTabStrip(browser_view()->tabstrip())); | 448 gfx::Rect tabstrip_bounds = |
| 449 tabstrip_bounds.set_x(GetMirroredXForRect(tabstrip_bounds)); | 449 GetMirroredRect(GetBoundsForTabStrip(browser_view()->tabstrip())); |
| 450 canvas->ClipRect(tabstrip_bounds, SkClipOp::kDifference); | 450 canvas->ClipRect(tabstrip_bounds, SkClipOp::kDifference); |
| 451 const gfx::Rect separator_rect(toolbar_bounds.x(), tabstrip_bounds.bottom(), | 451 const gfx::Rect separator_rect(toolbar_bounds.x(), tabstrip_bounds.bottom(), |
| 452 toolbar_bounds.width(), 0); | 452 toolbar_bounds.width(), 0); |
| 453 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), | 453 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), |
| 454 separator_rect, true); | 454 separator_rect, true); |
| 455 | 455 |
| 456 // Toolbar/content separator. | 456 // Toolbar/content separator. |
| 457 toolbar_bounds.Inset(kClientEdgeThickness, 0); | 457 toolbar_bounds.Inset(kClientEdgeThickness, 0); |
| 458 BrowserView::Paint1pxHorizontalLine( | 458 BrowserView::Paint1pxHorizontalLine( |
| 459 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), | 459 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), |
| 460 toolbar_bounds, true); | 460 toolbar_bounds, true); |
| 461 } | 461 } |
| OLD | NEW |