OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Google Inc. All rights reserved. | 2 * Copyright (c) 2013, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * * Redistributions in binary form must reproduce the above | 9 * * Redistributions in binary form must reproduce the above |
10 * copyright notice, this list of conditions and the following disclaimer | 10 * copyright notice, this list of conditions and the following disclaimer |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 enum Canvas2DContextStorage { | 36 enum Canvas2DContextStorage { |
37 PersistentStorage, | 37 PersistentStorage, |
38 DiscardableStorage | 38 DiscardableStorage |
39 }; | 39 }; |
40 | 40 |
41 class Canvas2DContextAttributes : public CanvasContextAttributes, public ScriptW
rappable { | 41 class Canvas2DContextAttributes : public CanvasContextAttributes, public ScriptW
rappable { |
42 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(Canvas2DContextAttributes); | 42 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(Canvas2DContextAttributes); |
| 43 DEFINE_WRAPPERTYPEINFO(); |
43 public: | 44 public: |
44 // Create a new attributes object | 45 // Create a new attributes object |
45 static PassRefPtrWillBeRawPtr<Canvas2DContextAttributes> create(); | 46 static PassRefPtrWillBeRawPtr<Canvas2DContextAttributes> create(); |
46 | 47 |
47 // Whether or not the drawing buffer has an alpha channel; default=true | 48 // Whether or not the drawing buffer has an alpha channel; default=true |
48 bool alpha() const; | 49 bool alpha() const; |
49 void setAlpha(bool); | 50 void setAlpha(bool); |
50 | 51 |
51 String storage() const; | 52 String storage() const; |
52 void setStorage(const String&); | 53 void setStorage(const String&); |
53 Canvas2DContextStorage parsedStorage() const; | 54 Canvas2DContextStorage parsedStorage() const; |
54 | 55 |
55 protected: | 56 protected: |
56 Canvas2DContextAttributes(); | 57 Canvas2DContextAttributes(); |
57 | 58 |
58 bool m_alpha; | 59 bool m_alpha; |
59 Canvas2DContextStorage m_storage; | 60 Canvas2DContextStorage m_storage; |
60 }; | 61 }; |
61 | 62 |
62 } // namespace blink | 63 } // namespace blink |
63 | 64 |
64 #endif // Canvas2DContextAttributes_h | 65 #endif // Canvas2DContextAttributes_h |
OLD | NEW |