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;
43 [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
44 [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
45 [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
46 public class HttpBrowserCapabilitiesWrapper : HttpBrowserCapabilitiesBase
48 HttpBrowserCapabilities w;
50 public HttpBrowserCapabilitiesWrapper (HttpBrowserCapabilities httpBrowserCapabilities)
52 if (httpBrowserCapabilities == null)
53 throw new ArgumentNullException ("httpBrowserCapabilities");
54 w = httpBrowserCapabilities;
58 public override bool ActiveXControls {
59 get { return w.ActiveXControls; }
62 public override IDictionary Adapters {
63 get { return w.Adapters; }
66 public override bool AOL {
70 public override bool BackgroundSounds {
71 get { return w.BackgroundSounds; }
74 public override bool Beta {
75 get { return w.Beta; }
78 public override string Browser {
79 get { return w.Browser; }
82 public override ArrayList Browsers {
83 get { return w.Browsers; }
86 public override bool CanCombineFormsInDeck {
87 get { return w.CanCombineFormsInDeck; }
90 public override bool CanInitiateVoiceCall {
91 get { return w.CanInitiateVoiceCall; }
94 public override bool CanRenderAfterInputOrSelectElement {
95 get { return w.CanRenderAfterInputOrSelectElement; }
98 public override bool CanRenderEmptySelects {
99 get { return w.CanRenderEmptySelects; }
102 public override bool CanRenderInputAndSelectElementsTogether {
103 get { return w.CanRenderInputAndSelectElementsTogether; }
106 public override bool CanRenderMixedSelects {
107 get { return w.CanRenderMixedSelects; }
110 public override bool CanRenderOneventAndPrevElementsTogether {
111 get { return w.CanRenderOneventAndPrevElementsTogether; }
114 public override bool CanRenderPostBackCards {
115 get { return w.CanRenderPostBackCards; }
118 public override bool CanRenderSetvarZeroWithMultiSelectionList {
119 get { return w.CanRenderSetvarZeroWithMultiSelectionList; }
122 public override bool CanSendMail {
123 get { return w.CanSendMail; }
126 public override IDictionary Capabilities {
127 get { return w.Capabilities; } set { w.Capabilities = value; }
130 public override bool CDF {
131 get { return w.CDF; }
134 public override Version ClrVersion {
135 get { return w.ClrVersion; }
138 public override bool Cookies {
139 get { return w.Cookies; }
142 public override bool Crawler {
143 get { return w.Crawler; }
146 public override int DefaultSubmitButtonLimit {
147 get { return w.DefaultSubmitButtonLimit; }
150 public override Version EcmaScriptVersion {
151 get { return w.EcmaScriptVersion; }
154 public override bool Frames {
155 get { return w.Frames; }
158 public override int GatewayMajorVersion {
159 get { return w.GatewayMajorVersion; }
162 public override double GatewayMinorVersion {
163 get { return w.GatewayMinorVersion; }
166 public override string GatewayVersion {
167 get { return w.GatewayVersion; }
170 public override bool HasBackButton {
171 get { return w.HasBackButton; }
174 public override bool HidesRightAlignedMultiselectScrollbars {
175 get { return w.HidesRightAlignedMultiselectScrollbars; }
178 public override string HtmlTextWriter {
179 get { return w.HtmlTextWriter; } set { w.HtmlTextWriter = value; }
182 public override string Id {
186 public override string InputType {
187 get { return w.InputType; }
190 public override bool IsColor {
191 get { return w.IsColor; }
194 public override bool IsMobileDevice {
195 get { return w.IsMobileDevice; }
198 public override string this [string key] {
199 get { throw new NotImplementedException (); }
202 public override bool JavaApplets {
203 get { return w.JavaApplets; }
206 public override Version JScriptVersion {
207 get { return w.JScriptVersion; }
210 public override int MajorVersion {
211 get { return w.MajorVersion; }
214 public override int MaximumHrefLength {
215 get { return w.MaximumHrefLength; }
218 public override int MaximumRenderedPageSize {
219 get { return w.MaximumRenderedPageSize; }
222 public override int MaximumSoftkeyLabelLength {
223 get { return w.MaximumSoftkeyLabelLength; }
226 public override double MinorVersion {
227 get { return w.MinorVersion; }
230 public override string MinorVersionString {
231 get { return w.MinorVersionString; }
234 public override string MobileDeviceManufacturer {
235 get { return w.MobileDeviceManufacturer; }
238 public override string MobileDeviceModel {
239 get { return w.MobileDeviceModel; }
242 public override Version MSDomVersion {
243 get { return w.MSDomVersion; }
246 public override int NumberOfSoftkeys {
247 get { return w.NumberOfSoftkeys; }
250 public override string Platform {
251 get { return w.Platform; }
254 public override string PreferredImageMime {
255 get { return w.PreferredImageMime; }
258 public override string PreferredRenderingMime {
259 get { return w.PreferredRenderingMime; }
262 public override string PreferredRenderingType {
263 get { return w.PreferredRenderingType; }
266 public override string PreferredRequestEncoding {
267 get { return w.PreferredRequestEncoding; }
270 public override string PreferredResponseEncoding {
271 get { return w.PreferredResponseEncoding; }
274 public override bool RendersBreakBeforeWmlSelectAndInput {
275 get { return w.RendersBreakBeforeWmlSelectAndInput; }
278 public override bool RendersBreaksAfterHtmlLists {
279 get { return w.RendersBreaksAfterHtmlLists; }
282 public override bool RendersBreaksAfterWmlAnchor {
283 get { return w.RendersBreaksAfterWmlAnchor; }
286 public override bool RendersBreaksAfterWmlInput {
287 get { return w.RendersBreaksAfterWmlInput; }
290 public override bool RendersWmlDoAcceptsInline {
291 get { return w.RendersWmlDoAcceptsInline; }
294 public override bool RendersWmlSelectsAsMenuCards {
295 get { return w.RendersWmlSelectsAsMenuCards; }
298 public override string RequiredMetaTagNameValue {
299 get { return w.RequiredMetaTagNameValue; }
302 public override bool RequiresAttributeColonSubstitution {
303 get { return w.RequiresAttributeColonSubstitution; }
306 public override bool RequiresContentTypeMetaTag {
307 get { return w.RequiresContentTypeMetaTag; }
310 public override bool RequiresControlStateInSession {
311 get { return w.RequiresControlStateInSession; }
314 public override bool RequiresDBCSCharacter {
315 get { return w.RequiresDBCSCharacter; }
318 public override bool RequiresHtmlAdaptiveErrorReporting {
319 get { return w.RequiresHtmlAdaptiveErrorReporting; }
322 public override bool RequiresLeadingPageBreak {
323 get { return w.RequiresLeadingPageBreak; }
326 public override bool RequiresNoBreakInFormatting {
327 get { return w.RequiresNoBreakInFormatting; }
330 public override bool RequiresOutputOptimization {
331 get { return w.RequiresOutputOptimization; }
334 public override bool RequiresPhoneNumbersAsPlainText {
335 get { return w.RequiresPhoneNumbersAsPlainText; }
338 public override bool RequiresSpecialViewStateEncoding {
339 get { return w.RequiresSpecialViewStateEncoding; }
342 public override bool RequiresUniqueFilePathSuffix {
343 get { return w.RequiresUniqueFilePathSuffix; }
346 public override bool RequiresUniqueHtmlCheckboxNames {
347 get { return w.RequiresUniqueHtmlCheckboxNames; }
350 public override bool RequiresUniqueHtmlInputNames {
351 get { return w.RequiresUniqueHtmlInputNames; }
354 public override bool RequiresUrlEncodedPostfieldValues {
355 get { return w.RequiresUrlEncodedPostfieldValues; }
358 public override int ScreenBitDepth {
359 get { return w.ScreenBitDepth; }
362 public override int ScreenCharactersHeight {
363 get { return w.ScreenCharactersHeight; }
366 public override int ScreenCharactersWidth {
367 get { return w.ScreenCharactersWidth; }
370 public override int ScreenPixelsHeight {
371 get { return w.ScreenPixelsHeight; }
374 public override int ScreenPixelsWidth {
375 get { return w.ScreenPixelsWidth; }
378 public override bool SupportsAccesskeyAttribute {
379 get { return w.SupportsAccesskeyAttribute; }
382 public override bool SupportsBodyColor {
383 get { return w.SupportsBodyColor; }
386 public override bool SupportsBold {
387 get { return w.SupportsBold; }
390 public override bool SupportsCacheControlMetaTag {
391 get { return w.SupportsCacheControlMetaTag; }
394 public override bool SupportsCallback {
395 get { return w.SupportsCallback; }
398 public override bool SupportsCss {
399 get { return w.SupportsCss; }
402 public override bool SupportsDivAlign {
403 get { return w.SupportsDivAlign; }
406 public override bool SupportsDivNoWrap {
407 get { return w.SupportsDivNoWrap; }
410 public override bool SupportsEmptyStringInCookieValue {
411 get { return w.SupportsEmptyStringInCookieValue; }
414 public override bool SupportsFontColor {
415 get { return w.SupportsFontColor; }
418 public override bool SupportsFontName {
419 get { return w.SupportsFontName; }
422 public override bool SupportsFontSize {
423 get { return w.SupportsFontSize; }
426 public override bool SupportsImageSubmit {
427 get { return w.SupportsImageSubmit; }
430 public override bool SupportsIModeSymbols {
431 get { return w.SupportsIModeSymbols; }
434 public override bool SupportsInputIStyle {
435 get { return w.SupportsInputIStyle; }
438 public override bool SupportsInputMode {
439 get { return w.SupportsInputMode; }
442 public override bool SupportsItalic {
443 get { return w.SupportsItalic; }
446 public override bool SupportsJPhoneMultiMediaAttributes {
447 get { return w.SupportsJPhoneMultiMediaAttributes; }
450 public override bool SupportsJPhoneSymbols {
451 get { return w.SupportsJPhoneSymbols; }
454 public override bool SupportsQueryStringInFormAction {
455 get { return w.SupportsQueryStringInFormAction; }
458 public override bool SupportsRedirectWithCookie {
459 get { return w.SupportsRedirectWithCookie; }
462 public override bool SupportsSelectMultiple {
463 get { return w.SupportsSelectMultiple; }
466 public override bool SupportsUncheck {
467 get { return w.SupportsUncheck; }
470 public override bool SupportsXmlHttp {
471 get { return w.SupportsXmlHttp; }
474 public override bool Tables {
475 get { return w.Tables; }
478 public override Type TagWriter {
479 get { return w.TagWriter; }
482 public override string Type {
483 get { return w.Type; }
486 public override bool UseOptimizedCacheKey {
487 get { return w.UseOptimizedCacheKey; }
490 public override bool VBScript {
491 get { return w.VBScript; }
494 public override string Version {
495 get { return w.Version; }
498 public override Version W3CDomVersion {
499 get { return w.W3CDomVersion; }
502 public override bool Win16 {
503 get { return w.Win16; }
506 public override bool Win32 {
507 get { return w.Win32; }
510 public override void AddBrowser (string browserName)
512 w.AddBrowser (browserName);
516 public override int CompareFilters (string filter1, string filter2)
518 throw new NotImplementedException ();
522 public override HtmlTextWriter CreateHtmlTextWriter (TextWriter w)
524 throw new NotImplementedException ();
527 public override void DisableOptimizedCacheKey ()
529 w.DisableOptimizedCacheKey ();
533 public override bool EvaluateFilter (string filterName)
535 throw new NotImplementedException ();
538 public override Version [] GetClrVersions ()
540 return w.GetClrVersions ();
543 public override bool IsBrowser (string browserName)
545 return w.IsBrowser (browserName);