OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/frame/opaque_browser_frame_view.h" | 5 #include "chrome/browser/views/frame/opaque_browser_frame_view.h" |
6 | 6 |
7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
8 #include "app/gfx/font.h" | 8 #include "app/gfx/font.h" |
9 #include "app/gfx/path.h" | 9 #include "app/gfx/path.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 SkBitmap* bottom_edge = tp->GetBitmapNamed(IDR_WINDOW_BOTTOM_CENTER); | 545 SkBitmap* bottom_edge = tp->GetBitmapNamed(IDR_WINDOW_BOTTOM_CENTER); |
546 | 546 |
547 | 547 |
548 // Window frame mode and color | 548 // Window frame mode and color |
549 SkBitmap* theme_frame; | 549 SkBitmap* theme_frame; |
550 SkColor frame_color; | 550 SkColor frame_color; |
551 | 551 |
552 // Never theme app and popup windows. | 552 // Never theme app and popup windows. |
553 if (!browser_view_->IsBrowserTypeNormal()) { | 553 if (!browser_view_->IsBrowserTypeNormal()) { |
554 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 554 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 555 bool is_off_the_record = browser_view_->IsOffTheRecord(); |
555 if (ShouldPaintAsActive()) { | 556 if (ShouldPaintAsActive()) { |
556 theme_frame = rb.GetBitmapNamed(IDR_FRAME); | 557 theme_frame = rb.GetBitmapNamed(is_off_the_record ? |
557 frame_color = browser_view_->IsOffTheRecord() ? | 558 IDR_THEME_FRAME_INCOGNITO : IDR_FRAME); |
| 559 frame_color = is_off_the_record ? |
558 ResourceBundle::frame_color_incognito : | 560 ResourceBundle::frame_color_incognito : |
559 ResourceBundle::frame_color; | 561 ResourceBundle::frame_color; |
560 } else { | 562 } else { |
561 theme_frame = rb.GetBitmapNamed(IDR_THEME_FRAME_INACTIVE); | 563 theme_frame = rb.GetBitmapNamed(is_off_the_record ? |
562 frame_color = browser_view_->IsOffTheRecord() ? | 564 IDR_THEME_FRAME_INCOGNITO_INACTIVE : |
| 565 IDR_THEME_FRAME_INACTIVE); |
| 566 frame_color = is_off_the_record ? |
563 ResourceBundle::frame_color_incognito_inactive : | 567 ResourceBundle::frame_color_incognito_inactive : |
564 ResourceBundle::frame_color_inactive; | 568 ResourceBundle::frame_color_inactive; |
565 } | 569 } |
566 } else if (!browser_view_->IsOffTheRecord()) { | 570 } else if (!browser_view_->IsOffTheRecord()) { |
567 if (ShouldPaintAsActive()) { | 571 if (ShouldPaintAsActive()) { |
568 theme_frame = tp->GetBitmapNamed(IDR_THEME_FRAME); | 572 theme_frame = tp->GetBitmapNamed(IDR_THEME_FRAME); |
569 frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME); | 573 frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME); |
570 } else { | 574 } else { |
571 theme_frame = tp->GetBitmapNamed(IDR_THEME_FRAME_INACTIVE); | 575 theme_frame = tp->GetBitmapNamed(IDR_THEME_FRAME_INACTIVE); |
572 frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME_INACTIVE); | 576 frame_color = tp->GetColor(BrowserThemeProvider::COLOR_FRAME_INACTIVE); |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 static bool initialized = false; | 1061 static bool initialized = false; |
1058 if (!initialized) { | 1062 if (!initialized) { |
1059 #if defined(OS_WIN) | 1063 #if defined(OS_WIN) |
1060 title_font_ = new gfx::Font(win_util::GetWindowTitleFont()); | 1064 title_font_ = new gfx::Font(win_util::GetWindowTitleFont()); |
1061 #else | 1065 #else |
1062 title_font_ = new gfx::Font(); | 1066 title_font_ = new gfx::Font(); |
1063 #endif | 1067 #endif |
1064 initialized = true; | 1068 initialized = true; |
1065 } | 1069 } |
1066 } | 1070 } |
OLD | NEW |