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

Side by Side Diff: ash/app_list/drop_shadow_label.cc

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/app_list/drop_shadow_label.h" 5 #include "ash/app_list/drop_shadow_label.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "third_party/skia/include/effects/SkGradientShader.h" 8 #include "third_party/skia/include/effects/SkGradientShader.h"
9 #include "ui/gfx/canvas_skia.h" 9 #include "ui/gfx/canvas_skia.h"
10 #include "ui/gfx/color_utils.h" 10 #include "ui/gfx/color_utils.h"
11 #include "ui/gfx/skbitmap_operations.h" 11 #include "ui/gfx/skbitmap_operations.h"
12 12
13 using views::Label; 13 using views::Label;
14 14
15 namespace aura_shell { 15 namespace ash {
16 16
17 static const int kDefaultDropShadowSize = 2; 17 static const int kDefaultDropShadowSize = 2;
18 18
19 DropShadowLabel::DropShadowLabel() : drop_shadow_size_(kDefaultDropShadowSize) { 19 DropShadowLabel::DropShadowLabel() : drop_shadow_size_(kDefaultDropShadowSize) {
20 } 20 }
21 21
22 void DropShadowLabel::SetDropShadowSize(int drop_shadow_size) { 22 void DropShadowLabel::SetDropShadowSize(int drop_shadow_size) {
23 if (drop_shadow_size != drop_shadow_size_) { 23 if (drop_shadow_size != drop_shadow_size_) {
24 drop_shadow_size_ = drop_shadow_size; 24 drop_shadow_size_ = drop_shadow_size;
25 invalidate_text_size(); 25 invalidate_text_size();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 } 109 }
110 110
111 gfx::Size DropShadowLabel::GetTextSize() const { 111 gfx::Size DropShadowLabel::GetTextSize() const {
112 gfx::Size text_size = Label::GetTextSize(); 112 gfx::Size text_size = Label::GetTextSize();
113 text_size.SetSize(text_size.width() + drop_shadow_size_, 113 text_size.SetSize(text_size.width() + drop_shadow_size_,
114 text_size.height() + drop_shadow_size_); 114 text_size.height() + drop_shadow_size_);
115 return text_size; 115 return text_size;
116 } 116 }
117 117
118 } // namespace aura_shell 118 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698