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

Side by Side Diff: ui/base/resource/resource_bundle.cc

Issue 144073004: rAc: remove bold section labels on linux_aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ui::ResourceBundle::BoldOnlyIfItLooksGood() Created 6 years, 11 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 | Annotate | Revision Log
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 "ui/base/resource/resource_bundle.h" 5 #include "ui/base/resource/resource_bundle.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 return *large_bold_font_list_; 508 return *large_bold_font_list_;
509 default: 509 default:
510 return *base_font_list_; 510 return *base_font_list_;
511 } 511 }
512 } 512 }
513 513
514 const gfx::Font& ResourceBundle::GetFont(FontStyle style) { 514 const gfx::Font& ResourceBundle::GetFont(FontStyle style) {
515 return GetFontList(style).GetPrimaryFont(); 515 return GetFontList(style).GetPrimaryFont();
516 } 516 }
517 517
518 // static
519 ResourceBundle::FontStyle ResourceBundle::BoldOnlyIfItLooksGood() {
520 #if defined(USE_AURA) && defined(OS_LINUX)
521 return BaseFont;
522 #else
523 return BoldFont;
524 #endif // defined(USE_AURA) && defined(OS_LINUX)
525 }
526
518 void ResourceBundle::ReloadFonts() { 527 void ResourceBundle::ReloadFonts() {
519 base::AutoLock lock_scope(*images_and_fonts_lock_); 528 base::AutoLock lock_scope(*images_and_fonts_lock_);
520 base_font_list_.reset(); 529 base_font_list_.reset();
521 LoadFontsIfNecessary(); 530 LoadFontsIfNecessary();
522 } 531 }
523 532
524 ScaleFactor ResourceBundle::GetMaxScaleFactor() const { 533 ScaleFactor ResourceBundle::GetMaxScaleFactor() const {
525 #if defined(OS_CHROMEOS) 534 #if defined(OS_CHROMEOS)
526 return max_scale_factor_; 535 return max_scale_factor_;
527 #else 536 #else
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 // static 807 // static
799 bool ResourceBundle::DecodePNG(const unsigned char* buf, 808 bool ResourceBundle::DecodePNG(const unsigned char* buf,
800 size_t size, 809 size_t size,
801 SkBitmap* bitmap, 810 SkBitmap* bitmap,
802 bool* fell_back_to_1x) { 811 bool* fell_back_to_1x) {
803 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size); 812 *fell_back_to_1x = PNGContainsFallbackMarker(buf, size);
804 return gfx::PNGCodec::Decode(buf, size, bitmap); 813 return gfx::PNGCodec::Decode(buf, size, bitmap);
805 } 814 }
806 815
807 } // namespace ui 816 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698