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 {
// Used to pass the cursor resource module name to the cursor loader. This is
// 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.
virtual void AddObserver(CursorClientObserver* observer) = 0;
......
......@@ -8,14 +8,14 @@
#include "ui/aura/window_property.h"
DECLARE_WINDOW_PROPERTY_TYPE(aura::client::TooltipClient*)
DECLARE_WINDOW_PROPERTY_TYPE(string16*)
DECLARE_WINDOW_PROPERTY_TYPE(base::string16*)
namespace aura {
namespace client {
DEFINE_LOCAL_WINDOW_PROPERTY_KEY(
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) {
root_window->SetProperty(kRootWindowTooltipClientKey, client);
......@@ -26,13 +26,13 @@ TooltipClient* GetTooltipClient(RootWindow* root_window) {
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);
}
const string16 GetTooltipText(Window* window) {
string16* string_ptr = window->GetProperty(kTooltipTextKey);
return string_ptr ? *string_ptr : string16();
const base::string16 GetTooltipText(Window* window) {
base::string16* string_ptr = window->GetProperty(kTooltipTextKey);
return string_ptr ? *string_ptr : base::string16();
}
} // namespace client
......
......@@ -11,6 +11,7 @@
namespace aura {
class RootWindow;
class Window;
namespace client {
class AURA_EXPORT TooltipClient {
......@@ -29,8 +30,9 @@ class AURA_EXPORT TooltipClient {
AURA_EXPORT void SetTooltipClient(RootWindow* root_window,
TooltipClient* client);
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 aura
......
......@@ -53,11 +53,10 @@ void SetVirtualKeyStates(uint32 flags) {
} // namespace
void HandleOpenFile(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback) {
void HandleOpenFile(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
const OpenFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleOpenFile(title,
default_path,
......@@ -65,11 +64,10 @@ void HandleOpenFile(
callback);
}
void HandleOpenMultipleFiles(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback) {
void HandleOpenMultipleFiles(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
const OpenMultipleFilesCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleOpenMultipleFiles(
title,
......@@ -78,13 +76,12 @@ void HandleOpenMultipleFiles(
callback);
}
void HandleSaveFile(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
const SaveFileCompletion& callback) {
void HandleSaveFile(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
int filter_index,
const base::string16& default_extension,
const SaveFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleSaveFile(title,
default_path,
......@@ -94,7 +91,7 @@ void HandleSaveFile(
callback);
}
void HandleSelectFolder(const string16& title,
void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
aura::RemoteRootWindowHostWin::Instance()->HandleSelectFolder(title,
......@@ -167,9 +164,9 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
}
void RemoteRootWindowHostWin::HandleOpenFile(
const string16& title,
const base::string16& title,
const base::FilePath& default_path,
const string16& filter,
const base::string16& filter,
const OpenFileCompletion& callback) {
if (!host_)
return;
......@@ -185,10 +182,10 @@ void RemoteRootWindowHostWin::HandleOpenFile(
}
void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback) {
const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
const OpenMultipleFilesCompletion& callback) {
if (!host_)
return;
......@@ -203,11 +200,11 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
}
void RemoteRootWindowHostWin::HandleSaveFile(
const string16& title,
const base::string16& title,
const base::FilePath& default_path,
const string16& filter,
const base::string16& filter,
int filter_index,
const string16& default_extension,
const base::string16& default_extension,
const SaveFileCompletion& callback) {
if (!host_)
return;
......@@ -226,7 +223,7 @@ void RemoteRootWindowHostWin::HandleSaveFile(
}
void RemoteRootWindowHostWin::HandleSelectFolder(
const string16& title,
const base::string16& title,
const SelectFolderCompletion& callback) {
if (!host_)
return;
......
......@@ -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
// is invoked when we receive the opened file name from the metro viewer.
AURA_EXPORT void HandleOpenFile(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback);
AURA_EXPORT void HandleOpenFile(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
const OpenFileCompletion& 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
// viewer.
AURA_EXPORT void HandleOpenMultipleFiles(
const string16& title,
const base::string16& title,
const base::FilePath& default_path,
const string16& filter,
const base::string16& filter,
const OpenMultipleFilesCompletion& callback);
// 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.
AURA_EXPORT void HandleSaveFile(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
const SaveFileCompletion& callback);
AURA_EXPORT void HandleSaveFile(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
int filter_index,
const base::string16& default_extension,
const SaveFileCompletion& callback);
// Handles the select folder for Metro Chrome Ash. The callback passed in
// 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);
// RootWindowHost implementaton that receives events from a different
......@@ -90,27 +88,24 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
// Called when we have a message from the remote process.
bool OnMessageReceived(const IPC::Message& message);
void HandleOpenFile(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback);
void HandleOpenMultipleFiles(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback);
void HandleSaveFile(
const string16& title,
const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
const SaveFileCompletion& callback);
void HandleSelectFolder(const string16& title,
void HandleOpenFile(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
const OpenFileCompletion& callback);
void HandleOpenMultipleFiles(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
const OpenMultipleFilesCompletion& callback);
void HandleSaveFile(const base::string16& title,
const base::FilePath& default_path,
const base::string16& filter,
int filter_index,
const base::string16& default_extension,
const SaveFileCompletion& callback);
void HandleSelectFolder(const base::string16& title,
const SelectFolderCompletion& callback);
private:
......
......@@ -93,8 +93,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
const std::string& name() const { return name_; }
void SetName(const std::string& name);
const string16 title() const { return title_; }
void set_title(const string16& title) { title_ = title; }
const base::string16 title() const { return title_; }
void set_title(const base::string16& title) { title_ = title; }
bool transparent() const { return transparent_; }
void SetTransparent(bool transparent);
......@@ -489,7 +489,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
int id_;
std::string name_;
string16 title_;
base::string16 title_;
// Whether layer is initialized as non-opaque.
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