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

Side by Side Diff: chrome/browser/themes/theme_service.cc

Issue 2682803003: Gtk3: Add themable location bar border color (Closed)
Patch Set: Set upstream branch Created 3 years, 10 months 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
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/themes/theme_service.h" 5 #include "chrome/browser/themes/theme_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 switch (id) { 431 switch (id) {
432 case ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON: 432 case ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON:
433 return color_utils::HSLShift( 433 return color_utils::HSLShift(
434 gfx::kChromeIconGrey, 434 gfx::kChromeIconGrey,
435 GetTint(ThemeProperties::TINT_BUTTONS, incognito)); 435 GetTint(ThemeProperties::TINT_BUTTONS, incognito));
436 case ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON_INACTIVE: 436 case ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON_INACTIVE:
437 // The active color is overridden in GtkUi. 437 // The active color is overridden in GtkUi.
438 return SkColorSetA( 438 return SkColorSetA(
439 GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON, incognito), 439 GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON, incognito),
440 0x33); 440 0x33);
441 case ThemeProperties::COLOR_TOOLBAR_ENTRY_BORDER:
442 return SkColorSetA(SK_ColorBLACK, 0x4D);
Evan Stade 2017/02/08 16:31:12 should we just re-use COLOR_TOOLBAR_TOP_SEPARATOR?
Tom (Use chromium acct) 2017/02/08 21:20:25 I agree with erg that it's better to add the new c
441 case ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR: 443 case ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR:
442 case ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE: { 444 case ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR_INACTIVE: {
443 const SkColor tab_color = 445 const SkColor tab_color =
444 GetColor(ThemeProperties::COLOR_TOOLBAR, incognito); 446 GetColor(ThemeProperties::COLOR_TOOLBAR, incognito);
445 const int frame_id = (id == ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR) 447 const int frame_id = (id == ThemeProperties::COLOR_TOOLBAR_TOP_SEPARATOR)
446 ? ThemeProperties::COLOR_FRAME 448 ? ThemeProperties::COLOR_FRAME
447 : ThemeProperties::COLOR_FRAME_INACTIVE; 449 : ThemeProperties::COLOR_FRAME_INACTIVE;
448 const SkColor frame_color = GetColor(frame_id, incognito); 450 const SkColor frame_color = GetColor(frame_id, incognito);
449 const SeparatorColorKey key(tab_color, frame_color); 451 const SeparatorColorKey key(tab_color, frame_color);
450 auto i = separator_color_cache_.find(key); 452 auto i = separator_color_cache_.find(key);
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 869
868 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) 870 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
869 bool ThemeService::IsSupervisedUser() const { 871 bool ThemeService::IsSupervisedUser() const {
870 return profile_->IsSupervised(); 872 return profile_->IsSupervised();
871 } 873 }
872 874
873 void ThemeService::SetSupervisedUserTheme() { 875 void ThemeService::SetSupervisedUserTheme() {
874 SetCustomDefaultTheme(new SupervisedUserTheme); 876 SetCustomDefaultTheme(new SupervisedUserTheme);
875 } 877 }
876 #endif 878 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698