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

Side by Side Diff: chrome/common/resource_bundle.cc

Issue 40226: Fix files with lines > 80 cols. Part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « chrome/common/render_messages.h ('k') | chrome/common/resource_bundle_win.cc » ('j') | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/common/resource_bundle.h" 5 #include "chrome/common/resource_bundle.h"
6 6
7 #include "base/gfx/png_decoder.h" 7 #include "base/gfx/png_decoder.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_piece.h" 9 #include "base/string_piece.h"
10 #include "net/base/file_stream.h" 10 #include "net/base/file_stream.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 } 86 }
87 if (!success) 87 if (!success)
88 success = LoadResourceBytes(data_handle, resource_id, &raw_data); 88 success = LoadResourceBytes(data_handle, resource_id, &raw_data);
89 if (!success) 89 if (!success)
90 return NULL; 90 return NULL;
91 91
92 // Decode the PNG. 92 // Decode the PNG.
93 int image_width; 93 int image_width;
94 int image_height; 94 int image_height;
95 if (!PNGDecoder::Decode(&raw_data.front(), raw_data.size(), 95 if (!PNGDecoder::Decode(&raw_data.front(), raw_data.size(),
96 PNGDecoder::FORMAT_BGRA, 96 PNGDecoder::FORMAT_BGRA,
97 &png_data, &image_width, &image_height)) { 97 &png_data, &image_width, &image_height)) {
98 NOTREACHED() << "Unable to decode image resource " << resource_id; 98 NOTREACHED() << "Unable to decode image resource " << resource_id;
99 return NULL; 99 return NULL;
100 } 100 }
101 101
102 return PNGDecoder::CreateSkBitmapFromBGRAFormat(png_data, 102 return PNGDecoder::CreateSkBitmapFromBGRAFormat(png_data,
103 image_width, 103 image_width,
104 image_height); 104 image_height);
105 } 105 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 case MediumBoldFont: 202 case MediumBoldFont:
203 return *medium_bold_font_; 203 return *medium_bold_font_;
204 case LargeFont: 204 case LargeFont:
205 return *large_font_; 205 return *large_font_;
206 case WebFont: 206 case WebFont:
207 return *web_font_; 207 return *web_font_;
208 default: 208 default:
209 return *base_font_; 209 return *base_font_;
210 } 210 }
211 } 211 }
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | chrome/common/resource_bundle_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698