| 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 19 matching lines...) Expand all Loading... |
| 30 #include "ui/base/resource/data_pack.h" | 30 #include "ui/base/resource/data_pack.h" |
| 31 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
| 32 #include "ui/gfx/canvas.h" | 32 #include "ui/gfx/canvas.h" |
| 33 #include "ui/gfx/codec/png_codec.h" | 33 #include "ui/gfx/codec/png_codec.h" |
| 34 #include "ui/gfx/geometry/safe_integer_conversions.h" | 34 #include "ui/gfx/geometry/safe_integer_conversions.h" |
| 35 #include "ui/gfx/geometry/size_conversions.h" | 35 #include "ui/gfx/geometry/size_conversions.h" |
| 36 #include "ui/gfx/image/canvas_image_source.h" | 36 #include "ui/gfx/image/canvas_image_source.h" |
| 37 #include "ui/gfx/image/image.h" | 37 #include "ui/gfx/image/image.h" |
| 38 #include "ui/gfx/image/image_skia.h" | 38 #include "ui/gfx/image/image_skia.h" |
| 39 #include "ui/gfx/image/image_skia_operations.h" | 39 #include "ui/gfx/image/image_skia_operations.h" |
| 40 #include "ui/gfx/screen.h" | |
| 41 #include "ui/gfx/skia_util.h" | 40 #include "ui/gfx/skia_util.h" |
| 42 #include "ui/resources/grit/ui_resources.h" | 41 #include "ui/resources/grit/ui_resources.h" |
| 43 | 42 |
| 44 using content::BrowserThread; | 43 using content::BrowserThread; |
| 45 using extensions::Extension; | 44 using extensions::Extension; |
| 46 | 45 |
| 47 namespace { | 46 namespace { |
| 48 | 47 |
| 49 // 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 |
| 50 // 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 |
| (...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 false, | 1540 false, |
| 1542 &bitmap_data)) { | 1541 &bitmap_data)) { |
| 1543 NOTREACHED() << "Unable to encode theme image for prs_id=" | 1542 NOTREACHED() << "Unable to encode theme image for prs_id=" |
| 1544 << prs_id << " for scale_factor=" << scale_factors_[i]; | 1543 << prs_id << " for scale_factor=" << scale_factors_[i]; |
| 1545 break; | 1544 break; |
| 1546 } | 1545 } |
| 1547 image_memory_[scaled_raw_id] = | 1546 image_memory_[scaled_raw_id] = |
| 1548 base::RefCountedBytes::TakeVector(&bitmap_data); | 1547 base::RefCountedBytes::TakeVector(&bitmap_data); |
| 1549 } | 1548 } |
| 1550 } | 1549 } |
| OLD | NEW |