| 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 21 matching lines...) Expand all Loading... |
| 32 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 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 public: | 43 public: |
| 43 virtual ~Canvas2DContextAttributes(); | |
| 44 | |
| 45 // Create a new attributes object | 44 // Create a new attributes object |
| 46 static PassRefPtr<Canvas2DContextAttributes> create(); | 45 static PassRefPtrWillBeRawPtr<Canvas2DContextAttributes> create(); |
| 47 | 46 |
| 48 // Whether or not the drawing buffer has an alpha channel; default=true | 47 // Whether or not the drawing buffer has an alpha channel; default=true |
| 49 bool alpha() const; | 48 bool alpha() const; |
| 50 void setAlpha(bool); | 49 void setAlpha(bool); |
| 51 | 50 |
| 52 String storage() const; | 51 String storage() const; |
| 53 void setStorage(const String&); | 52 void setStorage(const String&); |
| 54 Canvas2DContextStorage parsedStorage() const; | 53 Canvas2DContextStorage parsedStorage() const; |
| 55 | 54 |
| 56 protected: | 55 protected: |
| 57 Canvas2DContextAttributes(); | 56 Canvas2DContextAttributes(); |
| 58 | 57 |
| 59 bool m_alpha; | 58 bool m_alpha; |
| 60 Canvas2DContextStorage m_storage; | 59 Canvas2DContextStorage m_storage; |
| 61 }; | 60 }; |
| 62 | 61 |
| 63 } // namespace blink | 62 } // namespace blink |
| 64 | 63 |
| 65 #endif // Canvas2DContextAttributes_h | 64 #endif // Canvas2DContextAttributes_h |
| OLD | NEW |