Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: views/controls/label.h

Issue 8113031: Change std::wstring to string16 for views::Label and views::Link (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/label.h
diff --git a/views/controls/label.h b/views/controls/label.h
index 617d08ffefbd09c33d47659be2a3ae11d00bf847..74cf667e12ed37fc9b13c3041c4572f3dc2b4a60 100644
--- a/views/controls/label.h
+++ b/views/controls/label.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/gtest_prod_util.h"
+#include "base/string16.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/font.h"
@@ -52,21 +53,21 @@ class VIEWS_EXPORT Label : public View {
static const int kFocusBorderPadding;
Label();
- explicit Label(const std::wstring& text);
- Label(const std::wstring& text, const gfx::Font& font);
+ explicit Label(const string16& text);
+ Label(const string16& text, const gfx::Font& font);
virtual ~Label();
// Set the font.
virtual void SetFont(const gfx::Font& font);
// Set the label text.
- void SetText(const std::wstring& text);
+ void SetText(const string16& text);
// Return the font used by this label.
gfx::Font font() const { return font_; }
// Return the label text.
- const std::wstring GetText() const;
+ const string16 GetText() const;
// Set URL Value - text_ is set to spec().
void SetURL(const GURL& url);
@@ -182,7 +183,7 @@ class VIEWS_EXPORT Label : public View {
// Called by Paint to paint the text. Override this to change how
// text is painted.
virtual void PaintText(gfx::Canvas* canvas,
- const std::wstring& text,
+ const string16& text,
const gfx::Rect& text_bounds,
int flags);
@@ -208,7 +209,7 @@ class VIEWS_EXPORT Label : public View {
static gfx::Font GetDefaultFont();
- void Init(const std::wstring& text, const gfx::Font& font);
+ void Init(const string16& text, const gfx::Font& font);
// If the mouse is over the text, SetContainsMouse(true) is invoked, otherwise
// SetContainsMouse(false) is invoked.
@@ -227,7 +228,7 @@ class VIEWS_EXPORT Label : public View {
gfx::Rect GetAvailableRect() const;
// Returns parameters to be used for the DrawString call.
- void CalculateDrawStringParams(std::wstring* paint_text,
+ void CalculateDrawStringParams(string16* paint_text,
gfx::Rect* text_bounds,
int* flags) const;
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.cc ('k') | views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698