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

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

Issue 19471005: Add custom default theme support and create a managed user default theme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix bugs. Created 7 years, 5 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 "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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 if (*img == prs_id) 915 if (*img == prs_id)
916 return true; 916 return true;
917 } 917 }
918 918
919 return false; 919 return false;
920 } 920 }
921 921
922 // private: 922 // private:
923 923
924 BrowserThemePack::BrowserThemePack() 924 BrowserThemePack::BrowserThemePack()
925 : header_(NULL), 925 : CustomThemeProvider(EXTENSION),
926 header_(NULL),
926 tints_(NULL), 927 tints_(NULL),
927 colors_(NULL), 928 colors_(NULL),
928 display_properties_(NULL), 929 display_properties_(NULL),
929 source_images_(NULL) { 930 source_images_(NULL) {
930 scale_factors_ = ui::GetSupportedScaleFactors(); 931 scale_factors_ = ui::GetSupportedScaleFactors();
931 } 932 }
932 933
933 void BrowserThemePack::BuildHeader(const Extension* extension) { 934 void BrowserThemePack::BuildHeader(const Extension* extension) {
934 header_ = new BrowserThemePackHeader; 935 header_ = new BrowserThemePackHeader;
935 header_->version = kThemePackVersion; 936 header_->version = kThemePackVersion;
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 false, 1605 false,
1605 &bitmap_data)) { 1606 &bitmap_data)) {
1606 NOTREACHED() << "Unable to encode theme image for prs_id=" 1607 NOTREACHED() << "Unable to encode theme image for prs_id="
1607 << prs_id << " for scale_factor=" << scale_factors_[i]; 1608 << prs_id << " for scale_factor=" << scale_factors_[i];
1608 break; 1609 break;
1609 } 1610 }
1610 image_memory_[scaled_raw_id] = 1611 image_memory_[scaled_raw_id] =
1611 base::RefCountedBytes::TakeVector(&bitmap_data); 1612 base::RefCountedBytes::TakeVector(&bitmap_data);
1612 } 1613 }
1613 } 1614 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698