Revert 284234 "Pass signin_scoped_device_id to DeviceInfoSpecifics."
[chromium-blink-merge.git] / ui / views / shadow_border.h
blob60439f5363190fdc9d31f493adc6cc66223d6861
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_SHADOW_BORDER_H_
6 #define UI_VIEWS_SHADOW_BORDER_H_
8 #include "third_party/skia/include/core/SkColor.h"
9 #include "ui/views/border.h"
10 #include "ui/views/views_export.h"
12 namespace views {
14 // Creates a css box-shadow like border which fades into SK_ColorTRANSPARENT.
15 class VIEWS_EXPORT ShadowBorder : public views::Border {
16 public:
17 ShadowBorder(int blur,
18 SkColor color,
19 int vertical_offset,
20 int horizontal_offset);
21 virtual ~ShadowBorder();
23 protected:
24 // Overridden from views::Border:
25 virtual void Paint(const views::View& view, gfx::Canvas* canvas) OVERRIDE;
26 virtual gfx::Insets GetInsets() const OVERRIDE;
27 virtual gfx::Size GetMinimumSize() const OVERRIDE;
29 private:
30 // Blur amount of the shadow in pixels. For details on how blur is defined see
31 // comments for blur_ in class ShadowValue.
32 const int blur_;
34 // Shadow color.
35 const SkColor color_;
37 // Number of pixels to shift shadow to bottom.
38 const int vertical_offset_;
40 // Number of pixels to shift shadow to right.
41 const int horizontal_offset_;
43 DISALLOW_COPY_AND_ASSIGN(ShadowBorder);
46 } // namespace views
48 #endif // UI_VIEWS_SHADOW_BORDER_H_