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_painter.h" | 9 #include "ash/wm/frame_painter.h" |
10 #include "chrome/browser/themes/theme_properties.h" | 10 #include "chrome/browser/themes/theme_properties.h" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 524 } |
525 | 525 |
526 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { | 526 void BrowserNonClientFrameViewAsh::PaintContentEdge(gfx::Canvas* canvas) { |
527 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), | 527 canvas->FillRect(gfx::Rect(0, caption_button_container_->bounds().bottom(), |
528 width(), kClientEdgeThickness), | 528 width(), kClientEdgeThickness), |
529 ThemeProperties::GetDefaultColor( | 529 ThemeProperties::GetDefaultColor( |
530 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); | 530 ThemeProperties::COLOR_TOOLBAR_SEPARATOR)); |
531 } | 531 } |
532 | 532 |
533 int BrowserNonClientFrameViewAsh::GetThemeFrameImageId() const { | 533 int BrowserNonClientFrameViewAsh::GetThemeFrameImageId() const { |
534 bool is_incognito = browser_view()->IsOffTheRecord() && | 534 bool is_incognito = !browser_view()->IsRegularOrGuestSession(); |
535 !browser_view()->IsGuestSession(); | |
536 if (browser_view()->IsBrowserTypeNormal()) { | 535 if (browser_view()->IsBrowserTypeNormal()) { |
537 // Use the standard resource ids to allow users to theme the frames. | 536 // Use the standard resource ids to allow users to theme the frames. |
538 if (ShouldPaintAsActive()) { | 537 if (ShouldPaintAsActive()) { |
539 return is_incognito ? | 538 return is_incognito ? |
540 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; | 539 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME; |
541 } | 540 } |
542 return is_incognito ? | 541 return is_incognito ? |
543 IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE; | 542 IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE; |
544 } | 543 } |
545 // Never theme app and popup windows. | 544 // Never theme app and popup windows. |
(...skipping 10 matching lines...) Expand all Loading... |
556 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { | 555 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { |
557 ui::ThemeProvider* tp = GetThemeProvider(); | 556 ui::ThemeProvider* tp = GetThemeProvider(); |
558 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && | 557 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |
559 browser_view()->IsBrowserTypeNormal() && | 558 browser_view()->IsBrowserTypeNormal() && |
560 !browser_view()->IsOffTheRecord()) { | 559 !browser_view()->IsOffTheRecord()) { |
561 return ShouldPaintAsActive() ? | 560 return ShouldPaintAsActive() ? |
562 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; | 561 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; |
563 } | 562 } |
564 return 0; | 563 return 0; |
565 } | 564 } |
OLD | NEW |