summaryrefslogtreecommitdiffstats
path: root/ui
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 /ui
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 'ui')
-rw-r--r--ui/aura/remote_root_window_host_win.h22
-rw-r--r--ui/base/clipboard/clipboard.h5
-rw-r--r--ui/base/dragdrop/download_file_interface.h2
-rw-r--r--ui/base/resource/data_pack.h7
-rw-r--r--ui/base/text/text_elider.h7
-rw-r--r--ui/base/win/shell.h6
-rw-r--r--ui/gfx/icon_util.h7
7 files changed, 35 insertions, 21 deletions
diff --git a/ui/aura/remote_root_window_host_win.h b/ui/aura/remote_root_window_host_win.h
index de69eb2..05959a9 100644
--- a/ui/aura/remote_root_window_host_win.h
+++ b/ui/aura/remote_root_window_host_win.h
@@ -14,7 +14,9 @@
#include "ui/base/events/event_constants.h"
#include "ui/gfx/native_widget_types.h"
+namespace base {
class FilePath;
+}
namespace ui {
class ViewProp;
@@ -27,20 +29,20 @@ class Sender;
namespace aura {
-typedef base::Callback<void(const FilePath&, int, void*)>
+typedef base::Callback<void(const base::FilePath&, int, void*)>
OpenFileCompletion;
-typedef base::Callback<void(const std::vector<FilePath>&, void*)>
+typedef base::Callback<void(const std::vector<base::FilePath>&, void*)>
OpenMultipleFilesCompletion;
-typedef base::Callback<void(const FilePath&, int, void*)>
+typedef base::Callback<void(const base::FilePath&, int, void*)>
SaveFileCompletion;
// Handles the open file operation for Metro Chrome Ash. The callback passed in
// is invoked when we receive the opened file name from the metro viewer.
AURA_EXPORT void HandleOpenFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback);
@@ -49,7 +51,7 @@ AURA_EXPORT void HandleOpenFile(
// viewer.
AURA_EXPORT void HandleOpenMultipleFiles(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback);
@@ -57,7 +59,7 @@ AURA_EXPORT void HandleOpenMultipleFiles(
// is invoked when we receive the saved file name from the metro viewer.
AURA_EXPORT void HandleSaveFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
@@ -83,19 +85,19 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
void HandleOpenFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback);
void HandleOpenMultipleFiles(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback);
void HandleSaveFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
@@ -133,7 +135,7 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
int filter_index);
void OnFileOpenDone(bool success, string16 filename);
void OnMultiFileOpenDone(bool success,
- const std::vector<FilePath>& files);
+ const std::vector<base::FilePath>& files);
// RootWindowHost overrides:
virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE;
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 94d78712..c85b90a 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -33,11 +33,14 @@
#include "base/memory/scoped_ptr.h"
#endif
+namespace base {
+class FilePath;
+}
+
namespace gfx {
class Size;
}
-class FilePath;
class SkBitmap;
#if defined(TOOLKIT_GTK)
diff --git a/ui/base/dragdrop/download_file_interface.h b/ui/base/dragdrop/download_file_interface.h
index 62d4df0..a3bed25 100644
--- a/ui/base/dragdrop/download_file_interface.h
+++ b/ui/base/dragdrop/download_file_interface.h
@@ -16,7 +16,9 @@
#include <objidl.h>
#endif
+namespace base {
class FilePath;
+}
namespace ui {
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 08947af..40913cb 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -19,9 +19,8 @@
#include "ui/base/resource/resource_handle.h"
#include "ui/base/ui_export.h"
-class FilePath;
-
namespace base {
+class FilePath;
class RefCountedStaticMemory;
}
@@ -37,7 +36,7 @@ class UI_EXPORT DataPack : public ResourceHandle {
virtual ~DataPack();
// Load a pack file from |path|, returning false on error.
- bool LoadFromPath(const FilePath& path);
+ bool LoadFromPath(const base::FilePath& path);
// Loads a pack file from |file|, returning false on error.
bool LoadFromFile(base::PlatformFile file);
@@ -46,7 +45,7 @@ class UI_EXPORT DataPack : public ResourceHandle {
// text resources to be written, their encoding must already agree to the
// |textEncodingType| specified. If no text resources are present, please
// indicate BINARY.
- static bool WritePack(const FilePath& path,
+ static bool WritePack(const base::FilePath& path,
const std::map<uint16, base::StringPiece>& resources,
TextEncodingType textEncodingType);
diff --git a/ui/base/text/text_elider.h b/ui/base/text/text_elider.h
index a311caf..a66845b 100644
--- a/ui/base/text/text_elider.h
+++ b/ui/base/text/text_elider.h
@@ -17,9 +17,12 @@
#include "ui/base/ui_export.h"
#include "ui/gfx/font.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace ui {
UI_EXPORT extern const char kEllipsis[];
@@ -79,7 +82,7 @@ UI_EXPORT string16 ElideText(const string16& text,
// filename is forced to have LTR directionality, which means that in RTL UI
// the elided filename is wrapped with LRE (Left-To-Right Embedding) mark and
// PDF (Pop Directional Formatting) mark.
-UI_EXPORT string16 ElideFilename(const FilePath& filename,
+UI_EXPORT string16 ElideFilename(const base::FilePath& filename,
const gfx::Font& font,
int available_pixel_width);
diff --git a/ui/base/win/shell.h b/ui/base/win/shell.h
index ada23de..3fd0dad 100644
--- a/ui/base/win/shell.h
+++ b/ui/base/win/shell.h
@@ -10,7 +10,9 @@
#include "base/string16.h"
#include "ui/base/ui_export.h"
+namespace base {
class FilePath;
+}
namespace ui {
namespace win {
@@ -18,12 +20,12 @@ namespace win {
// default application registered for the file specified by 'full_path',
// ask the user, via the Windows "Open With" dialog.
// Returns 'true' on successful open, 'false' otherwise.
-UI_EXPORT bool OpenItemViaShell(const FilePath& full_path);
+UI_EXPORT bool OpenItemViaShell(const base::FilePath& full_path);
// The download manager now writes the alternate data stream with the
// zone on all downloads. This function is equivalent to OpenItemViaShell
// without showing the zone warning dialog.
-UI_EXPORT bool OpenItemViaShellNoZoneCheck(const FilePath& full_path);
+UI_EXPORT bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path);
// Lower level function that allows opening of non-files like urls or GUIDs
// don't use it if one of the above will do. |mask| is a valid combination
diff --git a/ui/gfx/icon_util.h b/ui/gfx/icon_util.h
index 4aa2676..b48c0a5 100644
--- a/ui/gfx/icon_util.h
+++ b/ui/gfx/icon_util.h
@@ -16,10 +16,13 @@
#include "ui/gfx/point.h"
#include "ui/gfx/size.h"
+namespace base {
+class FilePath;
+}
+
namespace gfx {
class Size;
}
-class FilePath;
class SkBitmap;
///////////////////////////////////////////////////////////////////////////////
@@ -107,7 +110,7 @@ class UI_EXPORT IconUtil {
// The function returns true on success and false otherwise.
static bool CreateIconFileFromSkBitmap(const SkBitmap& bitmap,
const SkBitmap& large_bitmap,
- const FilePath& icon_path);
+ const base::FilePath& icon_path);
// Creates a cursor of the specified size from the DIB passed in.
// Returns the cursor on success or NULL on failure.