| 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/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 "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" | 8 #include "ash/wm/caption_buttons/frame_caption_button_container_view.h" |
| 9 #include "ash/wm/frame_border_hit_test_controller.h" | 9 #include "ash/wm/frame_border_hit_test_controller.h" |
| 10 #include "ash/wm/header_painter.h" | 10 #include "ash/wm/header_painter.h" |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 243 |
| 244 ui::ThemeProvider* theme_provider = GetThemeProvider(); | 244 ui::ThemeProvider* theme_provider = GetThemeProvider(); |
| 245 if (!theme_provider->HasCustomImage(theme_frame_image_id) && | 245 if (!theme_provider->HasCustomImage(theme_frame_image_id) && |
| 246 (theme_frame_overlay_image_id == 0 || | 246 (theme_frame_overlay_image_id == 0 || |
| 247 !theme_provider->HasCustomImage(theme_frame_overlay_image_id))) { | 247 !theme_provider->HasCustomImage(theme_frame_overlay_image_id))) { |
| 248 if (frame()->IsMaximized() || frame()->IsFullscreen()) | 248 if (frame()->IsMaximized() || frame()->IsFullscreen()) |
| 249 theme_frame_image_id = IDR_AURA_WINDOW_HEADER_BASE_MINIMAL; | 249 theme_frame_image_id = IDR_AURA_WINDOW_HEADER_BASE_MINIMAL; |
| 250 } | 250 } |
| 251 header_painter_->PaintHeader( | 251 header_painter_->PaintHeader( |
| 252 canvas, | 252 canvas, |
| 253 ShouldPaintAsActive() ? | |
| 254 ash::HeaderPainter::ACTIVE : ash::HeaderPainter::INACTIVE, | |
| 255 theme_frame_image_id, | 253 theme_frame_image_id, |
| 256 theme_frame_overlay_image_id); | 254 theme_frame_overlay_image_id); |
| 257 if (browser_view()->ShouldShowWindowTitle()) | 255 if (browser_view()->ShouldShowWindowTitle()) |
| 258 header_painter_->PaintTitleBar(canvas, BrowserFrame::GetTitleFont()); | 256 header_painter_->PaintTitleBar(canvas, BrowserFrame::GetTitleFont()); |
| 259 if (browser_view()->IsToolbarVisible()) | 257 if (browser_view()->IsToolbarVisible()) |
| 260 PaintToolbarBackground(canvas); | 258 PaintToolbarBackground(canvas); |
| 261 else | 259 else |
| 262 PaintContentEdge(canvas); | 260 PaintContentEdge(canvas); |
| 263 } | 261 } |
| 264 | 262 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { | 534 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { |
| 537 ui::ThemeProvider* tp = GetThemeProvider(); | 535 ui::ThemeProvider* tp = GetThemeProvider(); |
| 538 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && | 536 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |
| 539 browser_view()->IsBrowserTypeNormal() && | 537 browser_view()->IsBrowserTypeNormal() && |
| 540 !browser_view()->IsOffTheRecord()) { | 538 !browser_view()->IsOffTheRecord()) { |
| 541 return ShouldPaintAsActive() ? | 539 return ShouldPaintAsActive() ? |
| 542 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; | 540 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; |
| 543 } | 541 } |
| 544 return 0; | 542 return 0; |
| 545 } | 543 } |
| OLD | NEW |