Commit 9baab257 authored by tfarina@chromium.org's avatar tfarina@chromium.org

ui/aura: Use base::string16 now that string16 was moved into base namespace.

base/string16.h was moved into base namespace in r191198 by Brett.

BUG=None
TBR=ben@chromium.org

Review URL: https://codereview.chromium.org/15759009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203079 0039d316-1c4b-4281-b951-d872f2087c98
parent bae7d75e
...@@ -62,7 +62,7 @@ class AURA_EXPORT CursorClient { ...@@ -62,7 +62,7 @@ class AURA_EXPORT CursorClient {
// Used to pass the cursor resource module name to the cursor loader. This is // Used to pass the cursor resource module name to the cursor loader. This is
// typically used to load non system cursors. // typically used to load non system cursors.
virtual void SetCursorResourceModule(const string16& module_name) = 0; virtual void SetCursorResourceModule(const base::string16& module_name) = 0;
// Used to add or remove a CursorClientObserver. // Used to add or remove a CursorClientObserver.
virtual void AddObserver(CursorClientObserver* observer) = 0; virtual void AddObserver(CursorClientObserver* observer) = 0;
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
#include "ui/aura/window_property.h" #include "ui/aura/window_property.h"
DECLARE_WINDOW_PROPERTY_TYPE(aura::client::TooltipClient*) DECLARE_WINDOW_PROPERTY_TYPE(aura::client::TooltipClient*)
DECLARE_WINDOW_PROPERTY_TYPE(string16*) DECLARE_WINDOW_PROPERTY_TYPE(base::string16*)
namespace aura { namespace aura {
namespace client { namespace client {
DEFINE_LOCAL_WINDOW_PROPERTY_KEY( DEFINE_LOCAL_WINDOW_PROPERTY_KEY(
TooltipClient*, kRootWindowTooltipClientKey, NULL); TooltipClient*, kRootWindowTooltipClientKey, NULL);
DEFINE_LOCAL_WINDOW_PROPERTY_KEY(string16*, kTooltipTextKey, NULL); DEFINE_LOCAL_WINDOW_PROPERTY_KEY(base::string16*, kTooltipTextKey, NULL);
void SetTooltipClient(RootWindow* root_window, TooltipClient* client) { void SetTooltipClient(RootWindow* root_window, TooltipClient* client) {
root_window->SetProperty(kRootWindowTooltipClientKey, client); root_window->SetProperty(kRootWindowTooltipClientKey, client);
...@@ -26,13 +26,13 @@ TooltipClient* GetTooltipClient(RootWindow* root_window) { ...@@ -26,13 +26,13 @@ TooltipClient* GetTooltipClient(RootWindow* root_window) {
root_window->GetProperty(kRootWindowTooltipClientKey) : NULL; root_window->GetProperty(kRootWindowTooltipClientKey) : NULL;
} }
void SetTooltipText(Window* window, string16* tooltip_text) { void SetTooltipText(Window* window, base::string16* tooltip_text) {
window->SetProperty(kTooltipTextKey, tooltip_text); window->SetProperty(kTooltipTextKey, tooltip_text);
} }
const string16 GetTooltipText(Window* window) { const base::string16 GetTooltipText(Window* window) {
string16* string_ptr = window->GetProperty(kTooltipTextKey); base::string16* string_ptr = window->GetProperty(kTooltipTextKey);
return string_ptr ? *string_ptr : string16(); return string_ptr ? *string_ptr : base::string16();
} }
} // namespace client } // namespace client
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
namespace aura { namespace aura {
class RootWindow; class RootWindow;
class Window; class Window;
namespace client { namespace client {
class AURA_EXPORT TooltipClient { class AURA_EXPORT TooltipClient {
...@@ -29,8 +30,9 @@ class AURA_EXPORT TooltipClient { ...@@ -29,8 +30,9 @@ class AURA_EXPORT TooltipClient {
AURA_EXPORT void SetTooltipClient(RootWindow* root_window, AURA_EXPORT void SetTooltipClient(RootWindow* root_window,
TooltipClient* client); TooltipClient* client);
AURA_EXPORT TooltipClient* GetTooltipClient(RootWindow* root_window); AURA_EXPORT TooltipClient* GetTooltipClient(RootWindow* root_window);
AURA_EXPORT void SetTooltipText(Window* window, string16* tooltip_text);
AURA_EXPORT const string16 GetTooltipText(Window* window); AURA_EXPORT void SetTooltipText(Window* window, base::string16* tooltip_text);
AURA_EXPORT const base::string16 GetTooltipText(Window* window);
} // namespace client } // namespace client
} // namespace aura } // namespace aura
......
...@@ -53,10 +53,9 @@ void SetVirtualKeyStates(uint32 flags) { ...@@ -53,10 +53,9 @@ void SetVirtualKeyStates(uint32 flags) {
} // namespace } // namespace
void HandleOpenFile( void HandleOpenFile(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenFileCompletion& callback) { const OpenFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance()); DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title, aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title,
...@@ -65,10 +64,9 @@ void HandleOpenFile( ...@@ -65,10 +64,9 @@ void HandleOpenFile(
callback); callback);
} }
void HandleOpenMultipleFiles( void HandleOpenMultipleFiles(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenMultipleFilesCompletion& callback) { const OpenMultipleFilesCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance()); DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles( aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles(
...@@ -78,12 +76,11 @@ void HandleOpenMultipleFiles( ...@@ -78,12 +76,11 @@ void HandleOpenMultipleFiles(
callback); callback);
} }
void HandleSaveFile( void HandleSaveFile(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
int filter_index, int filter_index,
const string16& default_extension, const base::string16& default_extension,
const SaveFileCompletion& callback) { const SaveFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance()); DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title, aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title,
...@@ -94,7 +91,7 @@ void HandleSaveFile( ...@@ -94,7 +91,7 @@ void HandleSaveFile(
callback); callback);
} }
void HandleSelectFolder(const string16& title, void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback) { const SelectFolderCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance()); DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title, aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title,
...@@ -167,9 +164,9 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) { ...@@ -167,9 +164,9 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
} }
void RemoteRootWindowHostWin::HandleOpenFile( void RemoteRootWindowHostWin::HandleOpenFile(
const string16& title, const base::string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenFileCompletion& callback) { const OpenFileCompletion& callback) {
if (!host_) if (!host_)
return; return;
...@@ -185,9 +182,9 @@ void RemoteRootWindowHostWin::HandleOpenFile( ...@@ -185,9 +182,9 @@ void RemoteRootWindowHostWin::HandleOpenFile(
} }
void RemoteRootWindowHostWin::HandleOpenMultipleFiles( void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
const string16& title, const base::string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenMultipleFilesCompletion& callback) { const OpenMultipleFilesCompletion& callback) {
if (!host_) if (!host_)
return; return;
...@@ -203,11 +200,11 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles( ...@@ -203,11 +200,11 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
} }
void RemoteRootWindowHostWin::HandleSaveFile( void RemoteRootWindowHostWin::HandleSaveFile(
const string16& title, const base::string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
int filter_index, int filter_index,
const string16& default_extension, const base::string16& default_extension,
const SaveFileCompletion& callback) { const SaveFileCompletion& callback) {
if (!host_) if (!host_)
return; return;
...@@ -226,7 +223,7 @@ void RemoteRootWindowHostWin::HandleSaveFile( ...@@ -226,7 +223,7 @@ void RemoteRootWindowHostWin::HandleSaveFile(
} }
void RemoteRootWindowHostWin::HandleSelectFolder( void RemoteRootWindowHostWin::HandleSelectFolder(
const string16& title, const base::string16& title,
const SelectFolderCompletion& callback) { const SelectFolderCompletion& callback) {
if (!host_) if (!host_)
return; return;
......
...@@ -43,34 +43,32 @@ typedef base::Callback<void(const base::FilePath&, int, void*)> ...@@ -43,34 +43,32 @@ typedef base::Callback<void(const base::FilePath&, int, void*)>
// Handles the open file operation for Metro Chrome Ash. The callback passed in // 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. // is invoked when we receive the opened file name from the metro viewer.
AURA_EXPORT void HandleOpenFile( AURA_EXPORT void HandleOpenFile(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenFileCompletion& callback); const OpenFileCompletion& callback);
// Handles the open multiple file operation for Metro Chrome Ash. The callback // Handles the open multiple file operation for Metro Chrome Ash. The callback
// passed in is invoked when we receive the opened file names from the metro // passed in is invoked when we receive the opened file names from the metro
// viewer. // viewer.
AURA_EXPORT void HandleOpenMultipleFiles( AURA_EXPORT void HandleOpenMultipleFiles(
const string16& title, const base::string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenMultipleFilesCompletion& callback); const OpenMultipleFilesCompletion& callback);
// Handles the save file operation for Metro Chrome Ash. The callback passed in // Handles the save file operation for Metro Chrome Ash. The callback passed in
// is invoked when we receive the saved file name from the metro viewer. // is invoked when we receive the saved file name from the metro viewer.
AURA_EXPORT void HandleSaveFile( AURA_EXPORT void HandleSaveFile(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
int filter_index, int filter_index,
const string16& default_extension, const base::string16& default_extension,
const SaveFileCompletion& callback); const SaveFileCompletion& callback);
// Handles the select folder for Metro Chrome Ash. The callback passed in // Handles the select folder for Metro Chrome Ash. The callback passed in
// is invoked when we receive the folder name from the metro viewer. // is invoked when we receive the folder name from the metro viewer.
AURA_EXPORT void HandleSelectFolder(const string16& title, AURA_EXPORT void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback); const SelectFolderCompletion& callback);
// RootWindowHost implementaton that receives events from a different // RootWindowHost implementaton that receives events from a different
...@@ -90,27 +88,24 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost { ...@@ -90,27 +88,24 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
// Called when we have a message from the remote process. // Called when we have a message from the remote process.
bool OnMessageReceived(const IPC::Message& message); bool OnMessageReceived(const IPC::Message& message);
void HandleOpenFile( void HandleOpenFile(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenFileCompletion& callback); const OpenFileCompletion& callback);
void HandleOpenMultipleFiles( void HandleOpenMultipleFiles(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
const OpenMultipleFilesCompletion& callback); const OpenMultipleFilesCompletion& callback);
void HandleSaveFile( void HandleSaveFile(const base::string16& title,
const string16& title,
const base::FilePath& default_path, const base::FilePath& default_path,
const string16& filter, const base::string16& filter,
int filter_index, int filter_index,
const string16& default_extension, const base::string16& default_extension,
const SaveFileCompletion& callback); const SaveFileCompletion& callback);
void HandleSelectFolder(const string16& title, void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback); const SelectFolderCompletion& callback);
private: private:
......
...@@ -93,8 +93,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate, ...@@ -93,8 +93,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
const std::string& name() const { return name_; } const std::string& name() const { return name_; }
void SetName(const std::string& name); void SetName(const std::string& name);
const string16 title() const { return title_; } const base::string16 title() const { return title_; }
void set_title(const string16& title) { title_ = title; } void set_title(const base::string16& title) { title_ = title; }
bool transparent() const { return transparent_; } bool transparent() const { return transparent_; }
void SetTransparent(bool transparent); void SetTransparent(bool transparent);
...@@ -489,7 +489,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate, ...@@ -489,7 +489,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
int id_; int id_;
std::string name_; std::string name_;
string16 title_; base::string16 title_;
// Whether layer is initialized as non-opaque. // Whether layer is initialized as non-opaque.
bool transparent_; bool transparent_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment