Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / TrustUi / MS / Internal / documents / Application / HostedController.cs / 1 / HostedController.cs
//------------------------------------------------------------------------------ //// Copyright (C) Microsoft Corporation. All rights reserved. // //// Responsible for the lifecycle of the Document when hosted in a browser. // // // History: // 10/04/2005: [....]: Initial implementation. //----------------------------------------------------------------------------- using System; using System.Security; using System.Windows.TrustUI; using System.Windows.Interop; using MS.Internal; using MS.Internal.PresentationUI; namespace MS.Internal.Documents.Application { ////// Responsible for the lifecycle of the Document when hosted in a browser. /// [FriendAccessAllowed] internal class HostedController : IDocumentController { #region IDocumentController Members //------------------------------------------------------------------------- // IDocumentController Members //------------------------------------------------------------------------- ////// /// bool IDocumentController.EnableEdit(Document document) { return false; } ////// /// bool IDocumentController.Open(Document document) { return false; } ////// /// ////// /// Critical: /// - uses Document.Uri /// - passes document to security critical method, NavigateToDocument. /// TreatAsSafe: /// - provides uri to security critical method, NavigateToDocument, /// for navigation only. /// [SecurityCritical, SecurityTreatAsSafe] bool IDocumentController.Rebind(Document document) { bool handled = false; if (document.IsReloadNeeded) { Trace.SafeWrite( Trace.File, "Navigation requested for Rebind."); NavigationHelper.NavigateToDocument(document); document.IsReloadNeeded = false; handled = true; } return handled; } ////// bool IDocumentController.SaveAsPreperation(Document document) { return false; } ////// /// bool IDocumentController.SaveCommit(Document document) { return false; } ////// /// bool IDocumentController.SavePreperation(Document document) { return false; } #endregion IDocumentController Members #region IChainOfResponsibiltyNode/// Members //-------------------------------------------------------------------------- // IChainOfResponsibiltyNode Members //------------------------------------------------------------------------- /// /// ////// /// Critical: /// - accesses delegate from framework /// TreatAsSafe: /// - does not leak it, only checks if it's null /// [SecurityCritical, SecurityTreatAsSafe] bool IChainOfResponsibiltyNode.IsResponsible(Document subject) { return NavigationHelper.Navigate != null; } #endregion IChainOfResponsibiltyNode Members } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CommonObjectSecurity.cs
- ScrollChrome.cs
- Themes.cs
- ObjectHandle.cs
- AncillaryOps.cs
- TypeForwardedFromAttribute.cs
- MultipleViewProviderWrapper.cs
- ToolStripHighContrastRenderer.cs
- WebPartEditorOkVerb.cs
- TextComposition.cs
- InstanceNameConverter.cs
- ResourceProviderFactory.cs
- SqlDataSourceEnumerator.cs
- HashAlgorithm.cs
- TextDocumentView.cs
- TextServicesDisplayAttribute.cs
- StateManagedCollection.cs
- EntityObject.cs
- SqlConnection.cs
- Oci.cs
- TemplatingOptionsDialog.cs
- DashStyles.cs
- OutputCacheModule.cs
- Win32.cs
- ByteConverter.cs
- GeometryModel3D.cs
- AuditLevel.cs
- Int16Converter.cs
- ValidatedControlConverter.cs
- ToolStripDropDownItem.cs
- ScaleTransform3D.cs
- HttpModulesSection.cs
- TypeUsageBuilder.cs
- XmlValidatingReader.cs
- TextRenderer.cs
- ToolBar.cs
- Native.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SubpageParaClient.cs
- AnnotationResource.cs
- WebPartsSection.cs
- MinMaxParagraphWidth.cs
- StrongNameIdentityPermission.cs
- GridItemPattern.cs
- SectionUpdates.cs
- EntityKey.cs
- WebPartZoneBase.cs
- SafeViewOfFileHandle.cs
- EnumBuilder.cs
- ContextDataSourceView.cs
- TripleDESCryptoServiceProvider.cs
- SqlDataReaderSmi.cs
- ZoneLinkButton.cs
- VariableDesigner.xaml.cs
- CryptoKeySecurity.cs
- LogEntryUtils.cs
- Inline.cs
- MatrixUtil.cs
- TaiwanLunisolarCalendar.cs
- SiteMapHierarchicalDataSourceView.cs
- Scanner.cs
- FacetEnabledSchemaElement.cs
- HierarchicalDataSourceControl.cs
- ElementProxy.cs
- DeviceOverridableAttribute.cs
- SymLanguageType.cs
- TdsValueSetter.cs
- SiblingIterators.cs
- DataGrid.cs
- TranslateTransform3D.cs
- HyperLinkField.cs
- ReverseInheritProperty.cs
- ChannelBinding.cs
- RawStylusActions.cs
- CustomCredentialPolicy.cs
- SignedInfo.cs
- Maps.cs
- FacetEnabledSchemaElement.cs
- CqlLexerHelpers.cs
- BaseResourcesBuildProvider.cs
- InputGestureCollection.cs
- SqlTriggerAttribute.cs
- XmlQualifiedNameTest.cs
- wgx_commands.cs
- Evaluator.cs
- InitializationEventAttribute.cs
- TypeDescriptor.cs
- DivideByZeroException.cs
- IndexingContentUnit.cs
- XXXInfos.cs
- BatchServiceHost.cs
- XmlSiteMapProvider.cs
- CDSCollectionETWBCLProvider.cs
- MethodImplAttribute.cs
- CopyNodeSetAction.cs
- Freezable.cs
- UpdatePanel.cs
- ExpandCollapsePattern.cs
- EntitySqlException.cs
- PieceNameHelper.cs