Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 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. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_SEPARATOR_VIEW_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_SEPARATOR_VIEW_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "ui/gfx/size.h" | |
| 10 #include "ui/views/view.h" | |
| 11 | |
| 12 // LocationBarSeparatorView is used by the location bar view to display a | |
| 13 // separator between decorations. | |
| 14 // Internally LocationBarSeparatorView draws a 1-px thick vertical line. | |
| 15 class LocationBarSeparatorView : public views::View { | |
| 16 public: | |
| 17 LocationBarSeparatorView(); | |
| 18 virtual ~LocationBarSeparatorView(); | |
| 19 | |
| 20 // Default is solid black color. | |
| 21 void set_separator_color(SkColor color) { | |
| 22 separator_color_ = color; | |
| 23 } | |
| 24 | |
| 25 // views::View overrides. | |
|
Peter Kasting
2013/01/17 04:14:22
Nit: I've been trying to standardize on "views::Vi
kuan
2013/01/17 17:57:43
Done.
| |
| 26 virtual gfx::Size GetPreferredSize() OVERRIDE; | |
| 27 | |
| 28 protected: | |
|
Peter Kasting
2013/01/17 04:14:23
Why protected? Why not private (for both override
kuan
2013/01/17 17:57:43
Done.
| |
| 29 // views::View overrides. | |
| 30 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | |
| 31 | |
| 32 private: | |
| 33 SkColor separator_color_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(LocationBarSeparatorView); | |
| 36 }; | |
| 37 | |
| 38 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_SEPARATOR_VIEW_H_ | |
| OLD | NEW |