summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 23:09:19 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-29 23:09:19 +0000
commit25650681e39822b75080f481a7ca6e7ad621ed34 (patch)
tree21e4c84788ad79c4ef045d49ca3ca0750849f590 /ui
parentff5297bf7967d900a9f202ec51b1eaf979f5ec79 (diff)
downloadchromium_src-25650681e39822b75080f481a7ca6e7ad621ed34.zip
chromium_src-25650681e39822b75080f481a7ca6e7ad621ed34.tar.gz
chromium_src-25650681e39822b75080f481a7ca6e7ad621ed34.tar.bz2
Update std::vector<ShadowValue> to ShadowValues.
This is a follow-up clean up for http://crrev.com/139162. BUG=none. TEST=none. Review URL: https://chromiumcodereview.appspot.com/10453057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139412 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/app_list/drop_shadow_label.h2
-rw-r--r--ui/gfx/canvas.cc3
-rw-r--r--ui/gfx/canvas.h4
-rw-r--r--ui/gfx/canvas_android.cc2
-rw-r--r--ui/gfx/canvas_linux.cc2
-rw-r--r--ui/gfx/canvas_mac.mm2
-rw-r--r--ui/gfx/canvas_skia.cc2
-rw-r--r--ui/gfx/canvas_win.cc2
-rw-r--r--ui/gfx/render_text.cc3
-rw-r--r--ui/gfx/render_text.h6
10 files changed, 13 insertions, 15 deletions
diff --git a/ui/app_list/drop_shadow_label.h b/ui/app_list/drop_shadow_label.h
index faee5f0..104cb1a 100644
--- a/ui/app_list/drop_shadow_label.h
+++ b/ui/app_list/drop_shadow_label.h
@@ -36,7 +36,7 @@ class DropShadowLabel : public views::Label {
const gfx::Rect& text_bounds,
int flags) OVERRIDE;
- std::vector<gfx::ShadowValue> text_shadows_;
+ gfx::ShadowValues text_shadows_;
DISALLOW_COPY_AND_ASSIGN(DropShadowLabel);
};
diff --git a/ui/gfx/canvas.cc b/ui/gfx/canvas.cc
index dc09228..f3419fc 100644
--- a/ui/gfx/canvas.cc
+++ b/ui/gfx/canvas.cc
@@ -13,7 +13,6 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
-#include "ui/gfx/shadow_value.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/transform.h"
@@ -378,7 +377,7 @@ void Canvas::DrawStringInt(const string16& text,
color,
gfx::Rect(x, y, w, h),
flags,
- std::vector<ShadowValue>());
+ ShadowValues());
}
void Canvas::TileImageInt(const gfx::ImageSkia& image,
diff --git a/ui/gfx/canvas.h b/ui/gfx/canvas.h
index 6179981..5c7bb9f 100644
--- a/ui/gfx/canvas.h
+++ b/ui/gfx/canvas.h
@@ -14,6 +14,7 @@
#include "skia/ext/platform_canvas.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/shadow_value.h"
class SkBitmap;
@@ -27,7 +28,6 @@ class Brush;
class Rect;
class Font;
class Point;
-class ShadowValue;
class Size;
// Canvas is a SkCanvas wrapper that provides a number of methods for
@@ -306,7 +306,7 @@ class UI_EXPORT Canvas {
SkColor color,
const gfx::Rect& text_bounds,
int flags,
- const std::vector<ShadowValue>& shadows);
+ const ShadowValues& shadows);
// Draws a dotted gray rectangle used for focus purposes.
void DrawFocusRect(const gfx::Rect& rect);
diff --git a/ui/gfx/canvas_android.cc b/ui/gfx/canvas_android.cc
index 3d8a823..73ddee8 100644
--- a/ui/gfx/canvas_android.cc
+++ b/ui/gfx/canvas_android.cc
@@ -21,7 +21,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
SkColor color,
const gfx::Rect& text_bounds,
int flags,
- const std::vector<ShadowValue>& shadows) {
+ const ShadowValues& shadows) {
NOTIMPLEMENTED();
}
diff --git a/ui/gfx/canvas_linux.cc b/ui/gfx/canvas_linux.cc
index 18ce2a4..576eed2 100644
--- a/ui/gfx/canvas_linux.cc
+++ b/ui/gfx/canvas_linux.cc
@@ -249,7 +249,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
SkColor color,
const gfx::Rect& text_bounds,
int flags,
- const std::vector<ShadowValue>& shadows) {
+ const ShadowValues& shadows) {
DLOG_IF(WARNING, !shadows.empty()) << "Text shadow not implemented.";
if (!IntersectsClipRect(text_bounds))
diff --git a/ui/gfx/canvas_mac.mm b/ui/gfx/canvas_mac.mm
index 23025e9..2b8f39e 100644
--- a/ui/gfx/canvas_mac.mm
+++ b/ui/gfx/canvas_mac.mm
@@ -56,7 +56,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
SkColor color,
const gfx::Rect& text_bounds,
int flags,
- const std::vector<ShadowValue>& shadows) {
+ const ShadowValues& shadows) {
DLOG_IF(WARNING, !shadows.empty()) << "Text shadow not implemented.";
SkTypeface* typeface = SkTypeface::CreateFromName(font.GetFontName().c_str(),
diff --git a/ui/gfx/canvas_skia.cc b/ui/gfx/canvas_skia.cc
index b0c376c..2ab2fcc 100644
--- a/ui/gfx/canvas_skia.cc
+++ b/ui/gfx/canvas_skia.cc
@@ -252,7 +252,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
SkColor color,
const gfx::Rect& text_bounds,
int flags,
- const std::vector<ShadowValue>& shadows) {
+ const ShadowValues& shadows) {
if (!IntersectsClipRect(text_bounds))
return;
diff --git a/ui/gfx/canvas_win.cc b/ui/gfx/canvas_win.cc
index 33078b0..6e1249a 100644
--- a/ui/gfx/canvas_win.cc
+++ b/ui/gfx/canvas_win.cc
@@ -375,7 +375,7 @@ void Canvas::DrawStringWithShadows(const string16& text,
SkColor color,
const gfx::Rect& text_bounds,
int flags,
- const std::vector<ShadowValue>& shadows) {
+ const ShadowValues& shadows) {
DLOG_IF(WARNING, !shadows.empty()) << "Text shadow not implemented.";
DrawStringInt(text, font.GetNativeFont(), color, text_bounds, flags);
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 5b55c67..abdffe9 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -16,7 +16,6 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/skia_util.h"
-#include "ui/gfx/shadow_value.h"
namespace {
@@ -685,7 +684,7 @@ SelectionModel RenderText::GetSelectionModelForSelectionStart() {
sel.is_reversed() ? CURSOR_BACKWARD : CURSOR_FORWARD);
}
-void RenderText::SetTextShadows(const std::vector<ShadowValue>& shadows) {
+void RenderText::SetTextShadows(const ShadowValues& shadows) {
text_shadows_ = shadows;
}
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index f50c1d1..0646e7d 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -22,6 +22,7 @@
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/selection_model.h"
+#include "ui/gfx/shadow_value.h"
class SkCanvas;
class SkDrawLooper;
@@ -34,7 +35,6 @@ namespace gfx {
class Canvas;
class Font;
class RenderTextTest;
-class ShadowValue;
struct StyleRange;
namespace internal {
@@ -277,7 +277,7 @@ class UI_EXPORT RenderText {
SelectionModel GetSelectionModelForSelectionStart();
// Sets shadows to drawn with text.
- void SetTextShadows(const std::vector<ShadowValue>& shadows);
+ void SetTextShadows(const ShadowValues& shadows);
typedef std::pair<Font, ui::Range> FontSpan;
// For testing purposes, returns which fonts were chosen for which parts of
@@ -483,7 +483,7 @@ class UI_EXPORT RenderText {
bool cached_bounds_and_offset_valid_;
// Text shadows to be drawn.
- std::vector<ShadowValue> text_shadows_;
+ ShadowValues text_shadows_;
DISALLOW_COPY_AND_ASSIGN(RenderText);
};