summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 03:55:47 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-30 03:55:47 +0000
commit542bdfe5dde965d920bfca1328d0f6e70e8dbb9b (patch)
tree69f191ddc519eef4fd2ad6c0fae3fc3e3f9f780e /printing
parent4e212c3b271b13d22156945997443d00feed6e02 (diff)
downloadchromium_src-542bdfe5dde965d920bfca1328d0f6e70e8dbb9b.zip
chromium_src-542bdfe5dde965d920bfca1328d0f6e70e8dbb9b.tar.gz
chromium_src-542bdfe5dde965d920bfca1328d0f6e70e8dbb9b.tar.bz2
Revert 67662 - FBTF: Remove unneeded headers from base/ (part 10)
BUG=none TEST=none Review URL: http://codereview.chromium.org/5139006 TBR=thestig@chromium.org Review URL: http://codereview.chromium.org/5270010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67674 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/image.cc11
-rw-r--r--printing/image.h11
-rw-r--r--printing/image_mac.cc1
-rw-r--r--printing/image_win.cc1
4 files changed, 9 insertions, 15 deletions
diff --git a/printing/image.cc b/printing/image.cc
index affd5db..dd52380 100644
--- a/printing/image.cc
+++ b/printing/image.cc
@@ -4,10 +4,7 @@
#include "printing/image.h"
-#include <algorithm>
-
#include "base/file_util.h"
-#include "base/logging.h"
#include "base/md5.h"
#include "base/string_number_conversions.h"
#include "gfx/codec/png_codec.h"
@@ -134,14 +131,6 @@ double Image::PercentageDifferent(const Image& rhs) const {
return static_cast<double>(pixels_different) / total_pixels * 100.;
}
-uint32 Image::pixel_at(int x, int y) const {
- DCHECK(x >= 0 && x < size_.width());
- DCHECK(y >= 0 && y < size_.height());
- const uint32* data = reinterpret_cast<const uint32*>(&*data_.begin());
- const uint32* data_row = data + y * row_length_ / sizeof(uint32);
- return Color(data_row[x]);
-}
-
bool Image::LoadPng(const std::string& compressed) {
int w;
int h;
diff --git a/printing/image.h b/printing/image.h
index 8336a92..d10c61b 100644
--- a/printing/image.h
+++ b/printing/image.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 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.
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/logging.h"
#include "gfx/size.h"
#include "printing/native_metafile.h"
@@ -55,7 +56,13 @@ class Image {
return color;
}
- uint32 pixel_at(int x, int y) const;
+ uint32 pixel_at(int x, int y) const {
+ DCHECK(x >= 0 && x < size_.width());
+ DCHECK(y >= 0 && y < size_.height());
+ const uint32* data = reinterpret_cast<const uint32*>(&*data_.begin());
+ const uint32* data_row = data + y * row_length_ / sizeof(uint32);
+ return Color(data_row[x]);
+ }
private:
// Construct from metafile. This is kept internal since it's ambiguous what
diff --git a/printing/image_mac.cc b/printing/image_mac.cc
index 842e0a6..8b3d638 100644
--- a/printing/image_mac.cc
+++ b/printing/image_mac.cc
@@ -6,7 +6,6 @@
#include <ApplicationServices/ApplicationServices.h>
-#include "base/logging.h"
#include "base/mac/scoped_cftyperef.h"
#include "gfx/rect.h"
diff --git a/printing/image_win.cc b/printing/image_win.cc
index 02d36b8..e8bd368 100644
--- a/printing/image_win.cc
+++ b/printing/image_win.cc
@@ -4,7 +4,6 @@
#include "printing/image.h"
-#include "base/logging.h"
#include "gfx/gdi_util.h" // EMF support
#include "gfx/rect.h"
#include "skia/ext/platform_device.h"