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

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

Issue 2062353002: Replace CONTROL_BACKGROUND and DETACHED_BOOKMARK_BAR_BACKGROUND by COLOR_NTP_BACKGROUND (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More clang build fix Created 4 years, 6 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/browser_theme_pack.h" 5 #include "chrome/browser/themes/browser_theme_pack.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 using content::BrowserThread; 43 using content::BrowserThread;
44 using extensions::Extension; 44 using extensions::Extension;
45 45
46 namespace { 46 namespace {
47 47
48 // Version number of the current theme pack. We just throw out and rebuild 48 // Version number of the current theme pack. We just throw out and rebuild
49 // theme packs that aren't int-equal to this. Increment this number if you 49 // theme packs that aren't int-equal to this. Increment this number if you
50 // change default theme assets or if you need themes to recreate their generated 50 // change default theme assets or if you need themes to recreate their generated
51 // images (which are cached). 51 // images (which are cached).
52 const int kThemePackVersion = 42; 52 const int kThemePackVersion = 43;
53 53
54 // IDs that are in the DataPack won't clash with the positive integer 54 // IDs that are in the DataPack won't clash with the positive integer
55 // uint16_t. kHeaderID should always have the maximum value because we want the 55 // uint16_t. kHeaderID should always have the maximum value because we want the
56 // "header" to be written last. That way we can detect whether the pack was 56 // "header" to be written last. That way we can detect whether the pack was
57 // successfully written and ignore and regenerate if it was only partially 57 // successfully written and ignore and regenerate if it was only partially
58 // written (i.e. chrome crashed on a different thread while writing the pack). 58 // written (i.e. chrome crashed on a different thread while writing the pack).
59 const int kMaxID = 0x0000FFFF; // Max unsigned 16-bit int. 59 const int kMaxID = 0x0000FFFF; // Max unsigned 16-bit int.
60 const int kHeaderID = kMaxID - 1; 60 const int kHeaderID = kMaxID - 1;
61 const int kTintsID = kMaxID - 2; 61 const int kTintsID = kMaxID - 2;
62 const int kColorsID = kMaxID - 3; 62 const int kColorsID = kMaxID - 3;
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 false, 1537 false,
1538 &bitmap_data)) { 1538 &bitmap_data)) {
1539 NOTREACHED() << "Unable to encode theme image for prs_id=" 1539 NOTREACHED() << "Unable to encode theme image for prs_id="
1540 << prs_id << " for scale_factor=" << scale_factors_[i]; 1540 << prs_id << " for scale_factor=" << scale_factors_[i];
1541 break; 1541 break;
1542 } 1542 }
1543 image_memory_[scaled_raw_id] = 1543 image_memory_[scaled_raw_id] =
1544 base::RefCountedBytes::TakeVector(&bitmap_data); 1544 base::RefCountedBytes::TakeVector(&bitmap_data);
1545 } 1545 }
1546 } 1546 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_pack_unittest.cc » ('j') | chrome/browser/ui/views/frame/browser_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698