| Index: printing/image.cc
 | 
| ===================================================================
 | 
| --- printing/image.cc	(revision 27832)
 | 
| +++ printing/image.cc	(working copy)
 | 
| @@ -1,12 +1,11 @@
 | 
| -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
 | 
| +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
 | 
|  // Use of this source code is governed by a BSD-style license that can be
 | 
|  // found in the LICENSE file.
 | 
|  
 | 
|  #include "printing/image.h"
 | 
|  
 | 
| +#include "app/gfx/codec/png_codec.h"
 | 
|  #include "base/file_util.h"
 | 
| -#include "base/gfx/png_decoder.h"
 | 
| -#include "base/gfx/png_encoder.h"
 | 
|  #include "base/gfx/rect.h"
 | 
|  #include "base/md5.h"
 | 
|  #include "base/string_util.h"
 | 
| @@ -101,13 +100,13 @@
 | 
|  bool Image::SaveToPng(const std::wstring& filename) const {
 | 
|    DCHECK(!data_.empty());
 | 
|    std::vector<unsigned char> compressed;
 | 
| -  bool success = PNGEncoder::Encode(&*data_.begin(),
 | 
| -                                    PNGEncoder::FORMAT_BGRA,
 | 
| -                                    size_.width(),
 | 
| -                                    size_.height(),
 | 
| -                                    row_length_,
 | 
| -                                    true,
 | 
| -                                    &compressed);
 | 
| +  bool success = gfx::PNGCodec::Encode(&*data_.begin(),
 | 
| +                                       gfx::PNGCodec::FORMAT_BGRA,
 | 
| +                                       size_.width(),
 | 
| +                                       size_.height(),
 | 
| +                                       row_length_,
 | 
| +                                       true,
 | 
| +                                       &compressed);
 | 
|    DCHECK(success && compressed.size());
 | 
|    if (success) {
 | 
|      int write_bytes = file_util::WriteFile(
 | 
| @@ -179,9 +178,9 @@
 | 
|  bool Image::LoadPng(const std::string& compressed) {
 | 
|    int w;
 | 
|    int h;
 | 
| -  bool success = PNGDecoder::Decode(
 | 
| +  bool success = gfx::PNGCodec::Decode(
 | 
|        reinterpret_cast<const unsigned char*>(compressed.c_str()),
 | 
| -      compressed.size(), PNGDecoder::FORMAT_BGRA, &data_, &w, &h);
 | 
| +      compressed.size(), gfx::PNGCodec::FORMAT_BGRA, &data_, &w, &h);
 | 
|    size_.SetSize(w, h);
 | 
|    row_length_ = size_.width() * sizeof(uint32);
 | 
|    return success;
 | 
| 
 |