summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 18:40:55 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-16 18:40:55 +0000
commit660a3bc6e89109459c9692b864cb2eca485ffa61 (patch)
tree7806f5ed1d3f84d3f884da3ff3ac946cfd9ec961 /views
parent6bab95324e150f614ff630b6821f329a6ea38020 (diff)
downloadchromium_src-660a3bc6e89109459c9692b864cb2eca485ffa61.zip
chromium_src-660a3bc6e89109459c9692b864cb2eca485ffa61.tar.gz
chromium_src-660a3bc6e89109459c9692b864cb2eca485ffa61.tar.bz2
views: Change WidgetDelegate::GetWindowName() to use std::string.
This save us some conversions to and from wide string. R=sky@chromium.org Review URL: http://codereview.chromium.org/7910012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101540 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/desktop/desktop_views_delegate.cc4
-rw-r--r--views/desktop/desktop_views_delegate.h4
-rw-r--r--views/test/test_views_delegate.cc4
-rw-r--r--views/test/test_views_delegate.h4
-rw-r--r--views/views_delegate.h4
-rw-r--r--views/widget/widget_delegate.cc8
-rw-r--r--views/widget/widget_delegate.h2
7 files changed, 15 insertions, 15 deletions
diff --git a/views/desktop/desktop_views_delegate.cc b/views/desktop/desktop_views_delegate.cc
index b0f7ea2..983055c 100644
--- a/views/desktop/desktop_views_delegate.cc
+++ b/views/desktop/desktop_views_delegate.cc
@@ -33,13 +33,13 @@ View* DesktopViewsDelegate::GetDefaultParentView() {
}
void DesktopViewsDelegate::SaveWindowPlacement(const Widget* widget,
- const std::wstring& window_name,
+ const std::string& window_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state) {
}
bool DesktopViewsDelegate::GetSavedWindowPlacement(
- const std::wstring& window_name,
+ const std::string& window_name,
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
return false;
diff --git a/views/desktop/desktop_views_delegate.h b/views/desktop/desktop_views_delegate.h
index 1704a97..0b6e657 100644
--- a/views/desktop/desktop_views_delegate.h
+++ b/views/desktop/desktop_views_delegate.h
@@ -21,11 +21,11 @@ class DesktopViewsDelegate : public ViewsDelegate {
virtual ui::Clipboard* GetClipboard() const OVERRIDE;
virtual View* GetDefaultParentView() OVERRIDE;
virtual void SaveWindowPlacement(const Widget* widget,
- const std::wstring& window_name,
+ const std::string& window_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state) OVERRIDE;
virtual bool GetSavedWindowPlacement(
- const std::wstring& window_name,
+ const std::string& window_name,
gfx::Rect* bounds,
ui::WindowShowState* show_state) const OVERRIDE;
virtual void NotifyAccessibilityEvent(
diff --git a/views/test/test_views_delegate.cc b/views/test/test_views_delegate.cc
index 7793dc4..3b1bd3b 100644
--- a/views/test/test_views_delegate.cc
+++ b/views/test/test_views_delegate.cc
@@ -32,13 +32,13 @@ View* TestViewsDelegate::GetDefaultParentView() {
}
void TestViewsDelegate::SaveWindowPlacement(const Widget* window,
- const std::wstring& window_name,
+ const std::string& window_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state) {
}
bool TestViewsDelegate::GetSavedWindowPlacement(
- const std::wstring& window_name,
+ const std::string& window_name,
gfx::Rect* bounds,
ui:: WindowShowState* show_state) const {
return false;
diff --git a/views/test/test_views_delegate.h b/views/test/test_views_delegate.h
index 8d07bfc..a893851 100644
--- a/views/test/test_views_delegate.h
+++ b/views/test/test_views_delegate.h
@@ -33,11 +33,11 @@ class TestViewsDelegate : public ViewsDelegate {
virtual ui::Clipboard* GetClipboard() const OVERRIDE;
virtual View* GetDefaultParentView() OVERRIDE;
virtual void SaveWindowPlacement(const Widget* window,
- const std::wstring& window_name,
+ const std::string& window_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state) OVERRIDE;
virtual bool GetSavedWindowPlacement(
- const std::wstring& window_name,
+ const std::string& window_name,
gfx::Rect* bounds,
ui::WindowShowState* show_state) const OVERRIDE;
diff --git a/views/views_delegate.h b/views/views_delegate.h
index 4b032c3..3499cbc 100644
--- a/views/views_delegate.h
+++ b/views/views_delegate.h
@@ -50,14 +50,14 @@ class VIEWS_EXPORT ViewsDelegate {
// Saves the position, size and "show" state for the window with the
// specified name.
virtual void SaveWindowPlacement(const Widget* widget,
- const std::wstring& window_name,
+ const std::string& window_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state) = 0;
// Retrieves the saved position and size and "show" state for the window with
// the specified name.
virtual bool GetSavedWindowPlacement(
- const std::wstring& window_name,
+ const std::string& window_name,
gfx::Rect* bounds,
ui::WindowShowState* show_state) const = 0;
diff --git a/views/widget/widget_delegate.cc b/views/widget/widget_delegate.cc
index 25cb54a..fe447ee 100644
--- a/views/widget/widget_delegate.cc
+++ b/views/widget/widget_delegate.cc
@@ -93,13 +93,13 @@ bool WidgetDelegate::ExecuteWindowsCommand(int command_id) {
return false;
}
-std::wstring WidgetDelegate::GetWindowName() const {
- return std::wstring();
+std::string WidgetDelegate::GetWindowName() const {
+ return std::string();
}
void WidgetDelegate::SaveWindowPlacement(const gfx::Rect& bounds,
ui::WindowShowState show_state) {
- std::wstring window_name = GetWindowName();
+ std::string window_name = GetWindowName();
if (!ViewsDelegate::views_delegate || window_name.empty())
return;
@@ -110,7 +110,7 @@ void WidgetDelegate::SaveWindowPlacement(const gfx::Rect& bounds,
bool WidgetDelegate::GetSavedWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
- std::wstring window_name = GetWindowName();
+ std::string window_name = GetWindowName();
if (!ViewsDelegate::views_delegate || window_name.empty())
return false;
diff --git a/views/widget/widget_delegate.h b/views/widget/widget_delegate.h
index 5c73d4d..73f86a9 100644
--- a/views/widget/widget_delegate.h
+++ b/views/widget/widget_delegate.h
@@ -96,7 +96,7 @@ class VIEWS_EXPORT WidgetDelegate {
// Returns the window's name identifier. Used to identify this window for
// state restoration.
- virtual std::wstring GetWindowName() const;
+ virtual std::string GetWindowName() const;
// Saves the window's bounds and "show" state. By default this uses the
// process' local state keyed by window name (See GetWindowName above). This