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

Side by Side Diff: webkit/port/bindings/v8/RGBColor.h

Issue 155049: Add RGBColor::create to handle ref counts for RGBColor objects... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months 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
« no previous file with comments | « no previous file | webkit/port/bindings/v8/RGBColor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « no previous file | webkit/port/bindings/v8/RGBColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698