Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 2541873004: Change default frame colors. Change custom titlebar colors on Windows. (Closed)
Patch Set: final osx behavior Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/themes/theme_service_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/glass_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 return ShouldCustomDrawSystemTitlebar() && 548 return ShouldCustomDrawSystemTitlebar() &&
549 browser_view()->ShouldShowWindowTitle(); 549 browser_view()->ShouldShowWindowTitle();
550 } 550 }
551 551
552 bool GlassBrowserFrameView::ShowSystemIcon() const { 552 bool GlassBrowserFrameView::ShowSystemIcon() const {
553 return !ShouldCustomDrawSystemTitlebar() && 553 return !ShouldCustomDrawSystemTitlebar() &&
554 browser_view()->ShouldShowWindowIcon(); 554 browser_view()->ShouldShowWindowIcon();
555 } 555 }
556 556
557 SkColor GlassBrowserFrameView::GetTitlebarColor() const { 557 SkColor GlassBrowserFrameView::GetTitlebarColor() const {
558 return GetThemeProvider()->GetColor(ThemeProperties::COLOR_FRAME); 558 const ui::ThemeProvider* tp = GetThemeProvider();
559 return ShouldPaintAsActive()
560 ? tp->GetColor(ThemeProperties::COLOR_FRAME)
561 : tp->GetColor(ThemeProperties::COLOR_FRAME_INACTIVE);
559 } 562 }
560 563
561 Windows10CaptionButton* GlassBrowserFrameView::CreateCaptionButton( 564 Windows10CaptionButton* GlassBrowserFrameView::CreateCaptionButton(
562 ViewID button_type) { 565 ViewID button_type) {
563 Windows10CaptionButton* button = 566 Windows10CaptionButton* button =
564 new Windows10CaptionButton(this, button_type); 567 new Windows10CaptionButton(this, button_type);
565 AddChildView(button); 568 AddChildView(button);
566 return button; 569 return button;
567 } 570 }
568 571
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 static bool initialized = false; 912 static bool initialized = false;
910 if (!initialized) { 913 if (!initialized) {
911 for (int i = 0; i < kThrobberIconCount; ++i) { 914 for (int i = 0; i < kThrobberIconCount; ++i) {
912 throbber_icons_[i] = 915 throbber_icons_[i] =
913 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); 916 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i);
914 DCHECK(throbber_icons_[i]); 917 DCHECK(throbber_icons_[i]);
915 } 918 }
916 initialized = true; 919 initialized = true;
917 } 920 }
918 } 921 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698