| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 AddChildView(window_icon_); | 96 AddChildView(window_icon_); |
| 97 window_icon_->Update(); | 97 window_icon_->Update(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 if (UsePackagedAppHeaderStyle()) { | 100 if (UsePackagedAppHeaderStyle()) { |
| 101 ash::DefaultHeaderPainter* header_painter = new ash::DefaultHeaderPainter; | 101 ash::DefaultHeaderPainter* header_painter = new ash::DefaultHeaderPainter; |
| 102 header_painter_.reset(header_painter); | 102 header_painter_.reset(header_painter); |
| 103 header_painter->Init(frame(), this, caption_button_container_); | 103 header_painter->Init(frame(), this, caption_button_container_); |
| 104 if (window_icon_) | 104 if (window_icon_) |
| 105 header_painter->UpdateLeftHeaderView(window_icon_); | 105 header_painter->UpdateLeftHeaderView(window_icon_); |
| 106 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) { | 106 // For non app (i.e. WebUI) windows (e.g. Settings) use MD frame color. |
| 107 // For non app (i.e. WebUI) windows (e.g. Settings) use MD frame color. | 107 if (!browser_view()->browser()->is_app()) |
| 108 if (!browser_view()->browser()->is_app()) | 108 header_painter->SetFrameColors(kMdWebUIFrameColor, kMdWebUIFrameColor); |
| 109 header_painter->SetFrameColors(kMdWebUIFrameColor, kMdWebUIFrameColor); | |
| 110 } | |
| 111 } else { | 109 } else { |
| 112 BrowserHeaderPainterAsh* header_painter = new BrowserHeaderPainterAsh; | 110 BrowserHeaderPainterAsh* header_painter = new BrowserHeaderPainterAsh; |
| 113 header_painter_.reset(header_painter); | 111 header_painter_.reset(header_painter); |
| 114 header_painter->Init(frame(), browser_view(), this, window_icon_, | 112 header_painter->Init(frame(), browser_view(), this, window_icon_, |
| 115 caption_button_container_); | 113 caption_button_container_); |
| 116 } | 114 } |
| 117 | 115 |
| 118 #if defined(OS_CHROMEOS) | 116 #if defined(OS_CHROMEOS) |
| 119 if (browser_view()->browser()->is_app()) { | 117 if (browser_view()->browser()->is_app()) { |
| 120 frame()->GetNativeWindow()->SetProperty( | 118 frame()->GetNativeWindow()->SetProperty( |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 toolbar_bounds.width(), 0); | 450 toolbar_bounds.width(), 0); |
| 453 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), | 451 BrowserView::Paint1pxHorizontalLine(canvas, GetToolbarTopSeparatorColor(), |
| 454 separator_rect, true); | 452 separator_rect, true); |
| 455 | 453 |
| 456 // Toolbar/content separator. | 454 // Toolbar/content separator. |
| 457 toolbar_bounds.Inset(kClientEdgeThickness, 0); | 455 toolbar_bounds.Inset(kClientEdgeThickness, 0); |
| 458 BrowserView::Paint1pxHorizontalLine( | 456 BrowserView::Paint1pxHorizontalLine( |
| 459 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), | 457 canvas, tp->GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR), |
| 460 toolbar_bounds, true); | 458 toolbar_bounds, true); |
| 461 } | 459 } |
| OLD | NEW |