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

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

Issue 10832313: Use HiDPI app icons on CrOS when a theme is present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | 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/themes/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/memory/ref_counted_memory.h" 9 #include "base/memory/ref_counted_memory.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 } 678 }
679 679
680 // private: 680 // private:
681 681
682 BrowserThemePack::BrowserThemePack() 682 BrowserThemePack::BrowserThemePack()
683 : header_(NULL), 683 : header_(NULL),
684 tints_(NULL), 684 tints_(NULL),
685 colors_(NULL), 685 colors_(NULL),
686 display_properties_(NULL), 686 display_properties_(NULL),
687 source_images_(NULL) { 687 source_images_(NULL) {
688 #if defined(OS_MACOSX)
689 scale_factors_ = ui::GetSupportedScaleFactors(); 688 scale_factors_ = ui::GetSupportedScaleFactors();
690 #else
691 scale_factors_.push_back(ui::SCALE_FACTOR_100P);
692 #endif
693 } 689 }
694 690
695 void BrowserThemePack::BuildHeader(const Extension* extension) { 691 void BrowserThemePack::BuildHeader(const Extension* extension) {
696 header_ = new BrowserThemePackHeader; 692 header_ = new BrowserThemePackHeader;
697 header_->version = kThemePackVersion; 693 header_->version = kThemePackVersion;
698 694
699 // TODO(erg): Need to make this endian safe on other computers. Prerequisite 695 // TODO(erg): Need to make this endian safe on other computers. Prerequisite
700 // is that ui::DataPack removes this same check. 696 // is that ui::DataPack removes this same check.
701 #if defined(__BYTE_ORDER) 697 #if defined(__BYTE_ORDER)
702 // Linux check 698 // Linux check
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 ui::ScaleFactor scale_factor) const { 1224 ui::ScaleFactor scale_factor) const {
1229 if (prs_id < 0) 1225 if (prs_id < 0)
1230 return -1; 1226 return -1;
1231 1227
1232 for (size_t i = 0; i < scale_factors_.size(); ++i) { 1228 for (size_t i = 0; i < scale_factors_.size(); ++i) {
1233 if (scale_factors_[i] == scale_factor) 1229 if (scale_factors_[i] == scale_factor)
1234 return static_cast<int>(kPersistingImagesLength * i) + prs_id; 1230 return static_cast<int>(kPersistingImagesLength * i) + prs_id;
1235 } 1231 }
1236 return -1; 1232 return -1;
1237 } 1233 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698