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

Side by Side Diff: chrome/browser/ui/search/search_ui.cc

Issue 1408273002: Make some updates to BM bar for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: eschew redundancy Created 5 years, 1 month 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 | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc » ('j') | 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/search/search_ui.h" 5 #include "chrome/browser/ui/search/search_ui.h"
6 6
7 #include "chrome/browser/themes/theme_properties.h" 7 #include "chrome/browser/themes/theme_properties.h"
8 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/themes/theme_service.h"
9 #include "ui/base/resource/material_design/material_design_controller.h"
9 10
10 namespace chrome { 11 namespace chrome {
11 12
12 SkColor GetDetachedBookmarkBarBackgroundColor(ThemeService* theme_service) { 13 SkColor GetDetachedBookmarkBarBackgroundColor(ThemeService* theme_service) {
13 if (!theme_service->UsingDefaultTheme()) 14 if (!theme_service->UsingDefaultTheme())
14 return theme_service->GetColor(ThemeProperties::COLOR_TOOLBAR); 15 return theme_service->GetColor(ThemeProperties::COLOR_TOOLBAR);
15 return SkColorSetARGB(0xFF, 0xF1, 0xF1, 0xF1); 16
17 return ui::MaterialDesignController::IsModeMaterial()
18 ? SK_ColorWHITE
19 : SkColorSetARGB(0xFF, 0xF1, 0xF1, 0xF1);
16 } 20 }
17 21
18 SkColor GetDetachedBookmarkBarSeparatorColor(ThemeService* theme_service) { 22 SkColor GetDetachedBookmarkBarSeparatorColor(ThemeService* theme_service) {
19 if (theme_service->UsingDefaultTheme()) { 23 if (theme_service->UsingDefaultTheme()) {
20 return ThemeProperties::GetDefaultColor( 24 return ThemeProperties::GetDefaultColor(
21 ThemeProperties::COLOR_TOOLBAR_SEPARATOR); 25 ThemeProperties::COLOR_TOOLBAR_SEPARATOR);
22 } 26 }
23 27
24 // Use 50% of bookmark text color as separator color. 28 // Use 50% of bookmark text color as separator color.
25 return SkColorSetA( 29 return SkColorSetA(
26 theme_service->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT), 128); 30 theme_service->GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT), 128);
27 } 31 }
28 32
29 } // namespace chrome 33 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698