summaryrefslogtreecommitdiffstats
path: root/printing
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-02 05:12:33 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-02 05:12:33 +0000
commita3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e (patch)
treebdd4dac76e6034ef6cf33450e203269a715ea0e6 /printing
parent8bc574c57115e9ffd0169f33131c0865997dcb35 (diff)
downloadchromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.zip
chromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.tar.gz
chromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.tar.bz2
Add FilePath to base namespace.
This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r--printing/emf_win.h8
-rw-r--r--printing/image.h6
-rw-r--r--printing/metafile.h4
-rw-r--r--printing/pdf_metafile_cg_mac.h4
-rw-r--r--printing/pdf_metafile_skia.h2
-rw-r--r--printing/printed_document.h9
6 files changed, 22 insertions, 11 deletions
diff --git a/printing/emf_win.h b/printing/emf_win.h
index 2f0772f..3516f4e 100644
--- a/printing/emf_win.h
+++ b/printing/emf_win.h
@@ -14,7 +14,9 @@
#include "base/gtest_prod_util.h"
#include "printing/metafile.h"
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -42,10 +44,10 @@ class PRINTING_EXPORT Emf : public Metafile {
// Generates a new metafile that will record every GDI command, and will
// be saved to |metafile_path|.
- virtual bool InitToFile(const FilePath& metafile_path);
+ virtual bool InitToFile(const base::FilePath& metafile_path);
// Initializes the Emf with the data in |metafile_path|.
- virtual bool InitFromFile(const FilePath& metafile_path);
+ virtual bool InitFromFile(const base::FilePath& metafile_path);
// Metafile methods.
virtual bool Init() OVERRIDE;
@@ -71,7 +73,7 @@ class PRINTING_EXPORT Emf : public Metafile {
// Saves the EMF data to a file as-is. It is recommended to use the .emf file
// extension but it is not enforced. This function synchronously writes to the
// file. For testing only.
- virtual bool SaveTo(const FilePath& file_path) const OVERRIDE;
+ virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
// Should be passed to Playback to keep the exact same size.
virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
diff --git a/printing/image.h b/printing/image.h
index e34c2c24..b40657a 100644
--- a/printing/image.h
+++ b/printing/image.h
@@ -13,7 +13,9 @@
#include "printing/printing_export.h"
#include "ui/gfx/size.h"
+namespace base {
class FilePath;
+}
namespace printing {
@@ -26,7 +28,7 @@ class PRINTING_EXPORT Image {
// Creates the image from the given file on disk. Uses extension to
// defer file type. PNG and EMF (on Windows) currently supported.
// If image loading fails size().IsEmpty() will be true.
- explicit Image(const FilePath& path);
+ explicit Image(const base::FilePath& path);
// Creates the image from the metafile. Deduces bounds based on bounds in
// metafile. If loading fails size().IsEmpty() will be true.
@@ -45,7 +47,7 @@ class PRINTING_EXPORT Image {
std::string checksum() const;
// Save image as PNG.
- bool SaveToPng(const FilePath& filepath) const;
+ bool SaveToPng(const base::FilePath& filepath) const;
// Returns % of pixels different
double PercentageDifferent(const Image& rhs) const;
diff --git a/printing/metafile.h b/printing/metafile.h
index a73c850..ca0901b 100644
--- a/printing/metafile.h
+++ b/printing/metafile.h
@@ -18,7 +18,9 @@
#include "base/mac/scoped_cftyperef.h"
#endif
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -117,7 +119,7 @@ class PRINTING_EXPORT Metafile {
// Saves the underlying data to the given file. This function should ONLY be
// called after the metafile is closed. Returns true if writing succeeded.
- virtual bool SaveTo(const FilePath& file_path) const = 0;
+ virtual bool SaveTo(const base::FilePath& file_path) const = 0;
// Returns the bounds of the given page. Pages use a 1-based index.
virtual gfx::Rect GetPageBounds(unsigned int page_number) const = 0;
diff --git a/printing/pdf_metafile_cg_mac.h b/printing/pdf_metafile_cg_mac.h
index 09fad56..f4dd81a 100644
--- a/printing/pdf_metafile_cg_mac.h
+++ b/printing/pdf_metafile_cg_mac.h
@@ -14,7 +14,9 @@
#include "base/threading/thread_checker.h"
#include "printing/metafile.h"
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -48,7 +50,7 @@ class PRINTING_EXPORT PdfMetafileCg : public Metafile {
virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE;
// For testing purposes only.
- virtual bool SaveTo(const FilePath& file_path) const OVERRIDE;
+ virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
virtual unsigned int GetPageCount() const OVERRIDE;
diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h
index 7a1a9da..33be6d2 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -44,7 +44,7 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
virtual uint32 GetDataSize() const OVERRIDE;
virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE;
- virtual bool SaveTo(const FilePath& file_path) const OVERRIDE;
+ virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
virtual unsigned int GetPageCount() const OVERRIDE;
diff --git a/printing/printed_document.h b/printing/printed_document.h
index bdb092f..3992386 100644
--- a/printing/printed_document.h
+++ b/printing/printed_document.h
@@ -13,9 +13,12 @@
#include "printing/print_settings.h"
#include "ui/gfx/native_widget_types.h"
-class FilePath;
class MessageLoop;
+namespace base {
+class FilePath;
+}
+
namespace printing {
class Metafile;
@@ -93,9 +96,9 @@ class PRINTING_EXPORT PrintedDocument
// Sets a path where to dump printing output files for debugging. If never set
// no files are generated.
- static void set_debug_dump_path(const FilePath& debug_dump_path);
+ static void set_debug_dump_path(const base::FilePath& debug_dump_path);
- static const FilePath& debug_dump_path();
+ static const base::FilePath& debug_dump_path();
private:
friend class base::RefCountedThreadSafe<PrintedDocument>;