diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 21:13:52 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 21:13:52 +0000 |
commit | 01f43ee8a0eebb3068fdca5ad28554040e853b9a (patch) | |
tree | 737a8ffff864523c5ec4c9353753ce782923c48c /base/gfx | |
parent | 2cd861458d4a6b3a882e51a8ef5b299a3fe14e2e (diff) | |
download | chromium_src-01f43ee8a0eebb3068fdca5ad28554040e853b9a.zip chromium_src-01f43ee8a0eebb3068fdca5ad28554040e853b9a.tar.gz chromium_src-01f43ee8a0eebb3068fdca5ad28554040e853b9a.tar.bz2 |
Headers cleanup:
- reduce header dependencies by using bookmark_model_observer.h
- replace #include <iostream> by #include <iosfwd> in headers
Review URL: http://codereview.chromium.org/159280
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21444 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/gfx')
-rw-r--r-- | base/gfx/point.cc | 6 | ||||
-rw-r--r-- | base/gfx/point.h | 6 | ||||
-rw-r--r-- | base/gfx/rect.cc | 6 | ||||
-rw-r--r-- | base/gfx/rect.h | 6 | ||||
-rw-r--r-- | base/gfx/size.cc | 8 | ||||
-rw-r--r-- | base/gfx/size.h | 6 |
6 files changed, 24 insertions, 14 deletions
diff --git a/base/gfx/point.cc b/base/gfx/point.cc index 8fb958e..4fc031d 100644 --- a/base/gfx/point.cc +++ b/base/gfx/point.cc @@ -8,6 +8,8 @@ #include <windows.h> #endif +#include <iostream> + namespace gfx { Point::Point() : x_(0), y_(0) { @@ -42,3 +44,7 @@ CGPoint Point::ToCGPoint() const { #endif } // namespace gfx + +std::ostream& operator<<(std::ostream& out, const gfx::Point& p) { + return out << p.x() << "," << p.y(); +} diff --git a/base/gfx/point.h b/base/gfx/point.h index 377efb1..7f95096 100644 --- a/base/gfx/point.h +++ b/base/gfx/point.h @@ -7,7 +7,7 @@ #include "build/build_config.h" -#include <iostream> +#include <iosfwd> #if defined(OS_WIN) typedef struct tagPOINT POINT; @@ -70,8 +70,6 @@ class Point { } // namespace gfx -inline std::ostream& operator<<(std::ostream& out, const gfx::Point& p) { - return out << p.x() << "," << p.y(); -} +std::ostream& operator<<(std::ostream& out, const gfx::Point& p); #endif // BASE_GFX_POINT_H__ diff --git a/base/gfx/rect.cc b/base/gfx/rect.cc index e0226f3..1e067e7 100644 --- a/base/gfx/rect.cc +++ b/base/gfx/rect.cc @@ -12,6 +12,8 @@ #include <gdk/gdk.h> #endif +#include <iostream> + #include "base/logging.h" namespace { @@ -224,3 +226,7 @@ Point Rect::CenterPoint() const { } } // namespace gfx + +std::ostream& operator<<(std::ostream& out, const gfx::Rect& r) { + return out << r.origin() << " " << r.size(); +} diff --git a/base/gfx/rect.h b/base/gfx/rect.h index 6da1b55..f944dd7 100644 --- a/base/gfx/rect.h +++ b/base/gfx/rect.h @@ -12,7 +12,7 @@ #ifndef BASE_GFX_RECT_H__ #define BASE_GFX_RECT_H__ -#include <iostream> +#include <iosfwd> #include "base/gfx/point.h" #include "base/gfx/size.h" @@ -155,8 +155,6 @@ class Rect { } // namespace gfx -inline std::ostream& operator<<(std::ostream& out, const gfx::Rect& r) { - return out << r.origin() << " " << r.size(); -} +std::ostream& operator<<(std::ostream& out, const gfx::Rect& r); #endif // BASE_GFX_RECT_H__ diff --git a/base/gfx/size.cc b/base/gfx/size.cc index 018a42c..76dc023 100644 --- a/base/gfx/size.cc +++ b/base/gfx/size.cc @@ -10,8 +10,9 @@ #include <CoreGraphics/CGGeometry.h> #endif -#include "base/logging.h" +#include <iostream> +#include "base/logging.h" namespace gfx { @@ -49,5 +50,8 @@ void Size::set_height(int height) { height_ = height; } - } // namespace gfx + +std::ostream& operator<<(std::ostream& out, const gfx::Size& s) { + return out << s.width() << "x" << s.height(); +} diff --git a/base/gfx/size.h b/base/gfx/size.h index 57e080b..3e74e80 100644 --- a/base/gfx/size.h +++ b/base/gfx/size.h @@ -7,7 +7,7 @@ #include "build/build_config.h" -#include <iostream> +#include <iosfwd> #if defined(OS_WIN) typedef struct tagSIZE SIZE; @@ -71,8 +71,6 @@ class Size { } // namespace gfx -inline std::ostream& operator<<(std::ostream& out, const gfx::Size& s) { - return out << s.width() << "x" << s.height(); -} +std::ostream& operator<<(std::ostream& out, const gfx::Size& s); #endif // BASE_GFX_SIZE_H_ |