2 // HttpBrowserCapabilitiesWrapper.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2008 Novell Inc. http://novell.com
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Globalization;
35 using System.Runtime.CompilerServices;
36 using System.Security.Permissions;
37 using System.Security.Principal;
38 using System.Web.Caching;
44 [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
46 [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
47 [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
48 public class HttpBrowserCapabilitiesWrapper : HttpBrowserCapabilitiesBase
50 HttpBrowserCapabilities w;
52 public HttpBrowserCapabilitiesWrapper (HttpBrowserCapabilities httpBrowserCapabilities)
54 if (httpBrowserCapabilities == null)
55 throw new ArgumentNullException ("httpBrowserCapabilities");
56 w = httpBrowserCapabilities;
60 public override bool ActiveXControls {
61 get { return w.ActiveXControls; }
64 public override IDictionary Adapters {
65 get { return w.Adapters; }
68 public override bool AOL {
72 public override bool BackgroundSounds {
73 get { return w.BackgroundSounds; }
76 public override bool Beta {
77 get { return w.Beta; }
80 public override string Browser {
81 get { return w.Browser; }
84 public override ArrayList Browsers {
85 get { return w.Browsers; }
88 public override bool CanCombineFormsInDeck {
89 get { return w.CanCombineFormsInDeck; }
92 public override bool CanInitiateVoiceCall {
93 get { return w.CanInitiateVoiceCall; }
96 public override bool CanRenderAfterInputOrSelectElement {
97 get { return w.CanRenderAfterInputOrSelectElement; }
100 public override bool CanRenderEmptySelects {
101 get { return w.CanRenderEmptySelects; }
104 public override bool CanRenderInputAndSelectElementsTogether {
105 get { return w.CanRenderInputAndSelectElementsTogether; }
108 public override bool CanRenderMixedSelects {
109 get { return w.CanRenderMixedSelects; }
112 public override bool CanRenderOneventAndPrevElementsTogether {
113 get { return w.CanRenderOneventAndPrevElementsTogether; }
116 public override bool CanRenderPostBackCards {
117 get { return w.CanRenderPostBackCards; }
120 public override bool CanRenderSetvarZeroWithMultiSelectionList {
121 get { return w.CanRenderSetvarZeroWithMultiSelectionList; }
124 public override bool CanSendMail {
125 get { return w.CanSendMail; }
128 public override IDictionary Capabilities {
129 get { return w.Capabilities; } set { w.Capabilities = value; }
132 public override bool CDF {
133 get { return w.CDF; }
136 public override Version ClrVersion {
137 get { return w.ClrVersion; }
140 public override bool Cookies {
141 get { return w.Cookies; }
144 public override bool Crawler {
145 get { return w.Crawler; }
148 public override int DefaultSubmitButtonLimit {
149 get { return w.DefaultSubmitButtonLimit; }
152 public override Version EcmaScriptVersion {
153 get { return w.EcmaScriptVersion; }
156 public override bool Frames {
157 get { return w.Frames; }
160 public override int GatewayMajorVersion {
161 get { return w.GatewayMajorVersion; }
164 public override double GatewayMinorVersion {
165 get { return w.GatewayMinorVersion; }
168 public override string GatewayVersion {
169 get { return w.GatewayVersion; }
172 public override bool HasBackButton {
173 get { return w.HasBackButton; }
176 public override bool HidesRightAlignedMultiselectScrollbars {
177 get { return w.HidesRightAlignedMultiselectScrollbars; }
180 public override string HtmlTextWriter {
181 get { return w.HtmlTextWriter; } set { w.HtmlTextWriter = value; }
184 public override string Id {
188 public override string InputType {
189 get { return w.InputType; }
192 public override bool IsColor {
193 get { return w.IsColor; }
196 public override bool IsMobileDevice {
197 get { return w.IsMobileDevice; }
200 public override string this [string key] {
201 get { throw new NotImplementedException (); }
204 public override bool JavaApplets {
205 get { return w.JavaApplets; }
208 public override Version JScriptVersion {
209 get { return w.JScriptVersion; }
212 public override int MajorVersion {
213 get { return w.MajorVersion; }
216 public override int MaximumHrefLength {
217 get { return w.MaximumHrefLength; }
220 public override int MaximumRenderedPageSize {
221 get { return w.MaximumRenderedPageSize; }
224 public override int MaximumSoftkeyLabelLength {
225 get { return w.MaximumSoftkeyLabelLength; }
228 public override double MinorVersion {
229 get { return w.MinorVersion; }
232 public override string MinorVersionString {
233 get { return w.MinorVersionString; }
236 public override string MobileDeviceManufacturer {
237 get { return w.MobileDeviceManufacturer; }
240 public override string MobileDeviceModel {
241 get { return w.MobileDeviceModel; }
244 public override Version MSDomVersion {
245 get { return w.MSDomVersion; }
248 public override int NumberOfSoftkeys {
249 get { return w.NumberOfSoftkeys; }
252 public override string Platform {
253 get { return w.Platform; }
256 public override string PreferredImageMime {
257 get { return w.PreferredImageMime; }
260 public override string PreferredRenderingMime {
261 get { return w.PreferredRenderingMime; }
264 public override string PreferredRenderingType {
265 get { return w.PreferredRenderingType; }
268 public override string PreferredRequestEncoding {
269 get { return w.PreferredRequestEncoding; }
272 public override string PreferredResponseEncoding {
273 get { return w.PreferredResponseEncoding; }
276 public override bool RendersBreakBeforeWmlSelectAndInput {
277 get { return w.RendersBreakBeforeWmlSelectAndInput; }
280 public override bool RendersBreaksAfterHtmlLists {
281 get { return w.RendersBreaksAfterHtmlLists; }
284 public override bool RendersBreaksAfterWmlAnchor {
285 get { return w.RendersBreaksAfterWmlAnchor; }
288 public override bool RendersBreaksAfterWmlInput {
289 get { return w.RendersBreaksAfterWmlInput; }
292 public override bool RendersWmlDoAcceptsInline {
293 get { return w.RendersWmlDoAcceptsInline; }
296 public override bool RendersWmlSelectsAsMenuCards {
297 get { return w.RendersWmlSelectsAsMenuCards; }
300 public override string RequiredMetaTagNameValue {
301 get { return w.RequiredMetaTagNameValue; }
304 public override bool RequiresAttributeColonSubstitution {
305 get { return w.RequiresAttributeColonSubstitution; }
308 public override bool RequiresContentTypeMetaTag {
309 get { return w.RequiresContentTypeMetaTag; }
312 public override bool RequiresControlStateInSession {
313 get { return w.RequiresControlStateInSession; }
316 public override bool RequiresDBCSCharacter {
317 get { return w.RequiresDBCSCharacter; }
320 public override bool RequiresHtmlAdaptiveErrorReporting {
321 get { return w.RequiresHtmlAdaptiveErrorReporting; }
324 public override bool RequiresLeadingPageBreak {
325 get { return w.RequiresLeadingPageBreak; }
328 public override bool RequiresNoBreakInFormatting {
329 get { return w.RequiresNoBreakInFormatting; }
332 public override bool RequiresOutputOptimization {
333 get { return w.RequiresOutputOptimization; }
336 public override bool RequiresPhoneNumbersAsPlainText {
337 get { return w.RequiresPhoneNumbersAsPlainText; }
340 public override bool RequiresSpecialViewStateEncoding {
341 get { return w.RequiresSpecialViewStateEncoding; }
344 public override bool RequiresUniqueFilePathSuffix {
345 get { return w.RequiresUniqueFilePathSuffix; }
348 public override bool RequiresUniqueHtmlCheckboxNames {
349 get { return w.RequiresUniqueHtmlCheckboxNames; }
352 public override bool RequiresUniqueHtmlInputNames {
353 get { return w.RequiresUniqueHtmlInputNames; }
356 public override bool RequiresUrlEncodedPostfieldValues {
357 get { return w.RequiresUrlEncodedPostfieldValues; }
360 public override int ScreenBitDepth {
361 get { return w.ScreenBitDepth; }
364 public override int ScreenCharactersHeight {
365 get { return w.ScreenCharactersHeight; }
368 public override int ScreenCharactersWidth {
369 get { return w.ScreenCharactersWidth; }
372 public override int ScreenPixelsHeight {
373 get { return w.ScreenPixelsHeight; }
376 public override int ScreenPixelsWidth {
377 get { return w.ScreenPixelsWidth; }
380 public override bool SupportsAccesskeyAttribute {
381 get { return w.SupportsAccesskeyAttribute; }
384 public override bool SupportsBodyColor {
385 get { return w.SupportsBodyColor; }
388 public override bool SupportsBold {
389 get { return w.SupportsBold; }
392 public override bool SupportsCacheControlMetaTag {
393 get { return w.SupportsCacheControlMetaTag; }
396 public override bool SupportsCallback {
397 get { return w.SupportsCallback; }
400 public override bool SupportsCss {
401 get { return w.SupportsCss; }
404 public override bool SupportsDivAlign {
405 get { return w.SupportsDivAlign; }
408 public override bool SupportsDivNoWrap {
409 get { return w.SupportsDivNoWrap; }
412 public override bool SupportsEmptyStringInCookieValue {
413 get { return w.SupportsEmptyStringInCookieValue; }
416 public override bool SupportsFontColor {
417 get { return w.SupportsFontColor; }
420 public override bool SupportsFontName {
421 get { return w.SupportsFontName; }
424 public override bool SupportsFontSize {
425 get { return w.SupportsFontSize; }
428 public override bool SupportsImageSubmit {
429 get { return w.SupportsImageSubmit; }
432 public override bool SupportsIModeSymbols {
433 get { return w.SupportsIModeSymbols; }
436 public override bool SupportsInputIStyle {
437 get { return w.SupportsInputIStyle; }
440 public override bool SupportsInputMode {
441 get { return w.SupportsInputMode; }
444 public override bool SupportsItalic {
445 get { return w.SupportsItalic; }
448 public override bool SupportsJPhoneMultiMediaAttributes {
449 get { return w.SupportsJPhoneMultiMediaAttributes; }
452 public override bool SupportsJPhoneSymbols {
453 get { return w.SupportsJPhoneSymbols; }
456 public override bool SupportsQueryStringInFormAction {
457 get { return w.SupportsQueryStringInFormAction; }
460 public override bool SupportsRedirectWithCookie {
461 get { return w.SupportsRedirectWithCookie; }
464 public override bool SupportsSelectMultiple {
465 get { return w.SupportsSelectMultiple; }
468 public override bool SupportsUncheck {
469 get { return w.SupportsUncheck; }
472 public override bool SupportsXmlHttp {
473 get { return w.SupportsXmlHttp; }
476 public override bool Tables {
477 get { return w.Tables; }
480 public override Type TagWriter {
481 get { return w.TagWriter; }
484 public override string Type {
485 get { return w.Type; }
488 public override bool UseOptimizedCacheKey {
489 get { return w.UseOptimizedCacheKey; }
492 public override bool VBScript {
493 get { return w.VBScript; }
496 public override string Version {
497 get { return w.Version; }
500 public override Version W3CDomVersion {
501 get { return w.W3CDomVersion; }
504 public override bool Win16 {
505 get { return w.Win16; }
508 public override bool Win32 {
509 get { return w.Win32; }
512 public override void AddBrowser (string browserName)
514 w.AddBrowser (browserName);
518 public override int CompareFilters (string filter1, string filter2)
520 throw new NotImplementedException ();
524 public override HtmlTextWriter CreateHtmlTextWriter (TextWriter w)
526 throw new NotImplementedException ();
529 public override void DisableOptimizedCacheKey ()
531 w.DisableOptimizedCacheKey ();
535 public override bool EvaluateFilter (string filterName)
537 throw new NotImplementedException ();
540 public override Version [] GetClrVersions ()
542 return w.GetClrVersions ();
545 public override bool IsBrowser (string browserName)
547 return w.IsBrowser (browserName);