OLD | NEW |
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 { "frame_inactive", ThemeProperties::TINT_FRAME_INACTIVE }, | 259 { "frame_inactive", ThemeProperties::TINT_FRAME_INACTIVE }, |
260 { "frame_incognito", ThemeProperties::TINT_FRAME_INCOGNITO }, | 260 { "frame_incognito", ThemeProperties::TINT_FRAME_INCOGNITO }, |
261 { "frame_incognito_inactive", | 261 { "frame_incognito_inactive", |
262 ThemeProperties::TINT_FRAME_INCOGNITO_INACTIVE }, | 262 ThemeProperties::TINT_FRAME_INCOGNITO_INACTIVE }, |
263 { "background_tab", ThemeProperties::TINT_BACKGROUND_TAB }, | 263 { "background_tab", ThemeProperties::TINT_BACKGROUND_TAB }, |
264 }; | 264 }; |
265 const size_t kTintTableLength = arraysize(kTintTable); | 265 const size_t kTintTableLength = arraysize(kTintTable); |
266 | 266 |
267 // Strings used by themes to identify colors in the JSON. | 267 // Strings used by themes to identify colors in the JSON. |
268 StringToIntTable kColorTable[] = { | 268 StringToIntTable kColorTable[] = { |
| 269 { "control_background", ThemeProperties::COLOR_CONTROL_BACKGROUND }, |
269 { "frame", ThemeProperties::COLOR_FRAME }, | 270 { "frame", ThemeProperties::COLOR_FRAME }, |
270 { "frame_inactive", ThemeProperties::COLOR_FRAME_INACTIVE }, | 271 { "frame_inactive", ThemeProperties::COLOR_FRAME_INACTIVE }, |
271 { "frame_incognito", ThemeProperties::COLOR_FRAME_INCOGNITO }, | 272 { "frame_incognito", ThemeProperties::COLOR_FRAME_INCOGNITO }, |
272 { "frame_incognito_inactive", | 273 { "frame_incognito_inactive", |
273 ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE }, | 274 ThemeProperties::COLOR_FRAME_INCOGNITO_INACTIVE }, |
274 { "toolbar", ThemeProperties::COLOR_TOOLBAR }, | 275 { "toolbar", ThemeProperties::COLOR_TOOLBAR }, |
275 { "tab_text", ThemeProperties::COLOR_TAB_TEXT }, | 276 { "tab_text", ThemeProperties::COLOR_TAB_TEXT }, |
276 { "tab_background_text", ThemeProperties::COLOR_BACKGROUND_TAB_TEXT }, | 277 { "tab_background_text", ThemeProperties::COLOR_BACKGROUND_TAB_TEXT }, |
277 { "bookmark_text", ThemeProperties::COLOR_BOOKMARK_TEXT }, | 278 { "bookmark_text", ThemeProperties::COLOR_BOOKMARK_TEXT }, |
278 { "ntp_background", ThemeProperties::COLOR_NTP_BACKGROUND }, | 279 { "ntp_background", ThemeProperties::COLOR_NTP_BACKGROUND }, |
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 false, | 1538 false, |
1538 &bitmap_data)) { | 1539 &bitmap_data)) { |
1539 NOTREACHED() << "Unable to encode theme image for prs_id=" | 1540 NOTREACHED() << "Unable to encode theme image for prs_id=" |
1540 << prs_id << " for scale_factor=" << scale_factors_[i]; | 1541 << prs_id << " for scale_factor=" << scale_factors_[i]; |
1541 break; | 1542 break; |
1542 } | 1543 } |
1543 image_memory_[scaled_raw_id] = | 1544 image_memory_[scaled_raw_id] = |
1544 base::RefCountedBytes::TakeVector(&bitmap_data); | 1545 base::RefCountedBytes::TakeVector(&bitmap_data); |
1545 } | 1546 } |
1546 } | 1547 } |
OLD | NEW |