| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_mus.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_mus.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "chrome/browser/profiles/profiles_state.h" | 9 #include "chrome/browser/profiles/profiles_state.h" |
| 10 #include "chrome/browser/themes/theme_properties.h" | 10 #include "chrome/browser/themes/theme_properties.h" |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 toolbar_bounds.width(), toolbar_bounds.height()); | 486 toolbar_bounds.width(), toolbar_bounds.height()); |
| 487 } else { | 487 } else { |
| 488 canvas->FillRect(toolbar_bounds, | 488 canvas->FillRect(toolbar_bounds, |
| 489 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); | 489 tp->GetColor(ThemeProperties::COLOR_TOOLBAR)); |
| 490 } | 490 } |
| 491 | 491 |
| 492 // Top stroke. | 492 // Top stroke. |
| 493 gfx::ScopedCanvas scoped_canvas(canvas); | 493 gfx::ScopedCanvas scoped_canvas(canvas); |
| 494 gfx::Rect tabstrip_bounds(GetBoundsForTabStrip(browser_view()->tabstrip())); | 494 gfx::Rect tabstrip_bounds(GetBoundsForTabStrip(browser_view()->tabstrip())); |
| 495 tabstrip_bounds.set_x(GetMirroredXForRect(tabstrip_bounds)); | 495 tabstrip_bounds.set_x(GetMirroredXForRect(tabstrip_bounds)); |
| 496 canvas->ClipRect(tabstrip_bounds, kDifference_SkClipOp); | 496 canvas->ClipRect(tabstrip_bounds, SkClipOp::kDifference); |
| 497 const gfx::Rect separator_rect(toolbar_bounds.x(), tabstrip_bounds.bottom(), | 497 const gfx::Rect separator_rect(toolbar_bounds.x(), tabstrip_bounds.bottom(), |
| 498 toolbar_bounds.width(), 0); | 498 toolbar_bounds.width(), 0); |
| 499 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), | 499 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), |
| 500 separator_rect, true); | 500 separator_rect, true); |
| 501 | 501 |
| 502 // Toolbar/content separator. | 502 // Toolbar/content separator. |
| 503 toolbar_bounds.Inset(kClientEdgeThickness, 0); | 503 toolbar_bounds.Inset(kClientEdgeThickness, 0); |
| 504 BrowserView::Paint1pxHorizontalLine( | 504 BrowserView::Paint1pxHorizontalLine( |
| 505 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), | 505 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), |
| 506 toolbar_bounds, | 506 toolbar_bounds, |
| 507 true); | 507 true); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void BrowserNonClientFrameViewMus::PaintContentEdge(gfx::Canvas* canvas) { | 510 void BrowserNonClientFrameViewMus::PaintContentEdge(gfx::Canvas* canvas) { |
| 511 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); | 511 DCHECK(!UsePackagedAppHeaderStyle() && !UseWebAppHeaderStyle()); |
| 512 const int bottom = frame_values().normal_insets.bottom(); | 512 const int bottom = frame_values().normal_insets.bottom(); |
| 513 canvas->FillRect( | 513 canvas->FillRect( |
| 514 gfx::Rect(0, bottom, width(), kClientEdgeThickness), | 514 gfx::Rect(0, bottom, width(), kClientEdgeThickness), |
| 515 GetThemeProvider()->GetColor( | 515 GetThemeProvider()->GetColor( |
| 516 ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR)); | 516 ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR)); |
| 517 } | 517 } |
| OLD | NEW |