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

Unified Diff: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart

Issue 27033009: Making all base class DOM types throw as well (to prevent a default constructor for DOM types that … (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | sdk/lib/web_gl/dartium/web_gl_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index 010c2dbb8f6d65bacc3e345f5a0bb64817478194..747c6860094fc8d3e9a7be6e1ed8f7964fe7ab10 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -329,6 +329,8 @@ const int ZERO = RenderingContext.ZERO;
@DomName('WebGLActiveInfo')
@Unstable()
class ActiveInfo extends Interceptor native "WebGLActiveInfo" {
+ // To suppress missing implicit constructor warnings.
+ factory ActiveInfo._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLActiveInfo.name')
@DocsEditable()
@@ -351,6 +353,8 @@ class ActiveInfo extends Interceptor native "WebGLActiveInfo" {
@DomName('ANGLEInstancedArrays')
@Experimental() // untriaged
class AngleInstancedArrays extends Interceptor native "ANGLEInstancedArrays" {
+ // To suppress missing implicit constructor warnings.
+ factory AngleInstancedArrays._() { throw new UnsupportedError("Not supported"); }
@DomName('ANGLEInstancedArrays.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE')
@DocsEditable()
@@ -384,6 +388,8 @@ class AngleInstancedArrays extends Interceptor native "ANGLEInstancedArrays" {
@DomName('WebGLBuffer')
@Unstable()
class Buffer extends Interceptor native "WebGLBuffer" {
+ // To suppress missing implicit constructor warnings.
+ factory Buffer._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -395,6 +401,8 @@ class Buffer extends Interceptor native "WebGLBuffer" {
// http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_atc/
@Experimental()
class CompressedTextureAtc extends Interceptor native "WebGLCompressedTextureATC" {
+ // To suppress missing implicit constructor warnings.
+ factory CompressedTextureAtc._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLCompressedTextureATC.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL')
@DocsEditable()
@@ -418,6 +426,8 @@ class CompressedTextureAtc extends Interceptor native "WebGLCompressedTextureATC
// http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/
@Experimental() // experimental
class CompressedTexturePvrtc extends Interceptor native "WebGLCompressedTexturePVRTC" {
+ // To suppress missing implicit constructor warnings.
+ factory CompressedTexturePvrtc._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLCompressedTexturePVRTC.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG')
@DocsEditable()
@@ -445,6 +455,8 @@ class CompressedTexturePvrtc extends Interceptor native "WebGLCompressedTextureP
// http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/
@Experimental() // experimental
class CompressedTextureS3TC extends Interceptor native "WebGLCompressedTextureS3TC" {
+ // To suppress missing implicit constructor warnings.
+ factory CompressedTextureS3TC._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLCompressedTextureS3TC.COMPRESSED_RGBA_S3TC_DXT1_EXT')
@DocsEditable()
@@ -471,6 +483,8 @@ class CompressedTextureS3TC extends Interceptor native "WebGLCompressedTextureS3
@DomName('WebGLContextAttributes')
@Unstable()
class ContextAttributes extends Interceptor native "WebGLContextAttributes" {
+ // To suppress missing implicit constructor warnings.
+ factory ContextAttributes._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLContextAttributes.alpha')
@DocsEditable()
@@ -522,6 +536,8 @@ class ContextEvent extends Event native "WebGLContextEvent" {
// http://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/
@Experimental() // experimental
class DebugRendererInfo extends Interceptor native "WebGLDebugRendererInfo" {
+ // To suppress missing implicit constructor warnings.
+ factory DebugRendererInfo._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLDebugRendererInfo.UNMASKED_RENDERER_WEBGL')
@DocsEditable()
@@ -541,6 +557,8 @@ class DebugRendererInfo extends Interceptor native "WebGLDebugRendererInfo" {
// http://www.khronos.org/registry/webgl/extensions/WEBGL_debug_shaders/
@Experimental() // experimental
class DebugShaders extends Interceptor native "WebGLDebugShaders" {
+ // To suppress missing implicit constructor warnings.
+ factory DebugShaders._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLDebugShaders.getTranslatedShaderSource')
@DocsEditable()
@@ -556,6 +574,8 @@ class DebugShaders extends Interceptor native "WebGLDebugShaders" {
// http://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/
@Experimental() // experimental
class DepthTexture extends Interceptor native "WebGLDepthTexture" {
+ // To suppress missing implicit constructor warnings.
+ factory DepthTexture._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLDepthTexture.UNSIGNED_INT_24_8_WEBGL')
@DocsEditable()
@@ -571,6 +591,8 @@ class DepthTexture extends Interceptor native "WebGLDepthTexture" {
// http://www.khronos.org/registry/webgl/specs/latest/
@Experimental() // stable
class DrawBuffers extends Interceptor native "WebGLDrawBuffers" {
+ // To suppress missing implicit constructor warnings.
+ factory DrawBuffers._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLDrawBuffers.COLOR_ATTACHMENT0_WEBGL')
@DocsEditable()
@@ -723,6 +745,8 @@ class DrawBuffers extends Interceptor native "WebGLDrawBuffers" {
// http://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/
@Experimental()
class ExtFragDepth extends Interceptor native "EXTFragDepth" {
+ // To suppress missing implicit constructor warnings.
+ factory ExtFragDepth._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -734,6 +758,8 @@ class ExtFragDepth extends Interceptor native "EXTFragDepth" {
// http://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/
@Experimental()
class ExtTextureFilterAnisotropic extends Interceptor native "EXTTextureFilterAnisotropic" {
+ // To suppress missing implicit constructor warnings.
+ factory ExtTextureFilterAnisotropic._() { throw new UnsupportedError("Not supported"); }
@DomName('EXTTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT')
@DocsEditable()
@@ -752,6 +778,8 @@ class ExtTextureFilterAnisotropic extends Interceptor native "EXTTextureFilterAn
@DomName('WebGLFramebuffer')
@Unstable()
class Framebuffer extends Interceptor native "WebGLFramebuffer" {
+ // To suppress missing implicit constructor warnings.
+ factory Framebuffer._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -763,6 +791,8 @@ class Framebuffer extends Interceptor native "WebGLFramebuffer" {
// http://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/
@Experimental()
class LoseContext extends Interceptor native "WebGLLoseContext,WebGLExtensionLoseContext" {
+ // To suppress missing implicit constructor warnings.
+ factory LoseContext._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLLoseContext.loseContext')
@DocsEditable()
@@ -782,6 +812,8 @@ class LoseContext extends Interceptor native "WebGLLoseContext,WebGLExtensionLos
// http://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/
@Experimental() // experimental
class OesElementIndexUint extends Interceptor native "OESElementIndexUint" {
+ // To suppress missing implicit constructor warnings.
+ factory OesElementIndexUint._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -793,6 +825,8 @@ class OesElementIndexUint extends Interceptor native "OESElementIndexUint" {
// http://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/
@Experimental() // experimental
class OesStandardDerivatives extends Interceptor native "OESStandardDerivatives" {
+ // To suppress missing implicit constructor warnings.
+ factory OesStandardDerivatives._() { throw new UnsupportedError("Not supported"); }
@DomName('OESStandardDerivatives.FRAGMENT_SHADER_DERIVATIVE_HINT_OES')
@DocsEditable()
@@ -808,6 +842,8 @@ class OesStandardDerivatives extends Interceptor native "OESStandardDerivatives"
// http://www.khronos.org/registry/webgl/extensions/OES_texture_float/
@Experimental() // experimental
class OesTextureFloat extends Interceptor native "OESTextureFloat" {
+ // To suppress missing implicit constructor warnings.
+ factory OesTextureFloat._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -819,6 +855,8 @@ class OesTextureFloat extends Interceptor native "OESTextureFloat" {
// http://www.khronos.org/registry/webgl/extensions/OES_texture_float_linear/
@Experimental()
class OesTextureFloatLinear extends Interceptor native "OESTextureFloatLinear" {
+ // To suppress missing implicit constructor warnings.
+ factory OesTextureFloatLinear._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -830,6 +868,8 @@ class OesTextureFloatLinear extends Interceptor native "OESTextureFloatLinear" {
// http://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/
@Experimental() // experimental
class OesTextureHalfFloat extends Interceptor native "OESTextureHalfFloat" {
+ // To suppress missing implicit constructor warnings.
+ factory OesTextureHalfFloat._() { throw new UnsupportedError("Not supported"); }
@DomName('OESTextureHalfFloat.HALF_FLOAT_OES')
@DocsEditable()
@@ -845,6 +885,8 @@ class OesTextureHalfFloat extends Interceptor native "OESTextureHalfFloat" {
// http://www.khronos.org/registry/webgl/extensions/OES_texture_half_float_linear/
@Experimental()
class OesTextureHalfFloatLinear extends Interceptor native "OESTextureHalfFloatLinear" {
+ // To suppress missing implicit constructor warnings.
+ factory OesTextureHalfFloatLinear._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -856,6 +898,8 @@ class OesTextureHalfFloatLinear extends Interceptor native "OESTextureHalfFloatL
// http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
@Experimental() // experimental
class OesVertexArrayObject extends Interceptor native "OESVertexArrayObject" {
+ // To suppress missing implicit constructor warnings.
+ factory OesVertexArrayObject._() { throw new UnsupportedError("Not supported"); }
@DomName('OESVertexArrayObject.VERTEX_ARRAY_BINDING_OES')
@DocsEditable()
@@ -890,6 +934,8 @@ class OesVertexArrayObject extends Interceptor native "OESVertexArrayObject" {
@DomName('WebGLProgram')
@Unstable()
class Program extends Interceptor native "WebGLProgram" {
+ // To suppress missing implicit constructor warnings.
+ factory Program._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -900,6 +946,8 @@ class Program extends Interceptor native "WebGLProgram" {
@DomName('WebGLRenderbuffer')
@Unstable()
class Renderbuffer extends Interceptor native "WebGLRenderbuffer" {
+ // To suppress missing implicit constructor warnings.
+ factory Renderbuffer._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -2783,6 +2831,8 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
@DocsEditable()
@DomName('WebGLShader')
class Shader extends Interceptor native "WebGLShader" {
+ // To suppress missing implicit constructor warnings.
+ factory Shader._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -2792,6 +2842,8 @@ class Shader extends Interceptor native "WebGLShader" {
@DocsEditable()
@DomName('WebGLShaderPrecisionFormat')
class ShaderPrecisionFormat extends Interceptor native "WebGLShaderPrecisionFormat" {
+ // To suppress missing implicit constructor warnings.
+ factory ShaderPrecisionFormat._() { throw new UnsupportedError("Not supported"); }
@DomName('WebGLShaderPrecisionFormat.precision')
@DocsEditable()
@@ -2813,6 +2865,8 @@ class ShaderPrecisionFormat extends Interceptor native "WebGLShaderPrecisionForm
@DocsEditable()
@DomName('WebGLTexture')
class Texture extends Interceptor native "WebGLTexture" {
+ // To suppress missing implicit constructor warnings.
+ factory Texture._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -2822,6 +2876,8 @@ class Texture extends Interceptor native "WebGLTexture" {
@DocsEditable()
@DomName('WebGLUniformLocation')
class UniformLocation extends Interceptor native "WebGLUniformLocation" {
+ // To suppress missing implicit constructor warnings.
+ factory UniformLocation._() { throw new UnsupportedError("Not supported"); }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -2833,4 +2889,6 @@ class UniformLocation extends Interceptor native "WebGLUniformLocation" {
// http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
@Experimental() // experimental
class VertexArrayObject extends Interceptor native "WebGLVertexArrayObjectOES" {
+ // To suppress missing implicit constructor warnings.
+ factory VertexArrayObject._() { throw new UnsupportedError("Not supported"); }
}
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | sdk/lib/web_gl/dartium/web_gl_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698