| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef RGBColor_h | 5 #ifndef RGBColor_h |
| 6 #define RGBColor_h | 6 #define RGBColor_h |
| 7 | 7 |
| 8 #include "config.h" | 8 #include "config.h" |
| 9 #include "CSSPrimitiveValue.h" | 9 #include "CSSPrimitiveValue.h" |
| 10 #include <wtf/RefCounted.h> | 10 #include <wtf/RefCounted.h> |
| 11 | 11 |
| 12 namespace WebCore { | 12 namespace WebCore { |
| 13 | 13 |
| 14 class RGBColor : public RefCounted<RGBColor> { | 14 class RGBColor : public RefCounted<RGBColor> { |
| 15 public: | 15 public: |
| 16 RGBColor(unsigned rgbcolor) : m_rgbcolor(rgbcolor) { } | 16 // TODO(ager): Make constructor private once codegenerator changes |
| 17 // have landed upstream. |
| 18 RGBColor(unsigned rgbcolor) : m_rgbcolor(rgbcolor) { } |
| 17 | 19 |
| 18 PassRefPtr<CSSPrimitiveValue> red(); | 20 static PassRefPtr<RGBColor> create(unsigned rgbcolor); |
| 19 PassRefPtr<CSSPrimitiveValue> green(); | |
| 20 PassRefPtr<CSSPrimitiveValue> blue(); | |
| 21 | 21 |
| 22 private: | 22 PassRefPtr<CSSPrimitiveValue> red(); |
| 23 unsigned m_rgbcolor; | 23 PassRefPtr<CSSPrimitiveValue> green(); |
| 24 PassRefPtr<CSSPrimitiveValue> blue(); |
| 25 |
| 26 private: |
| 27 unsigned m_rgbcolor; |
| 24 }; | 28 }; |
| 25 | 29 |
| 26 } // namespace WebCore | 30 } // namespace WebCore |
| 27 | 31 |
| 28 #endif // RGBColor_h | 32 #endif // RGBColor_h |
| OLD | NEW |