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
- PathTooLongException.cs
- CookieHandler.cs
- AnimationClock.cs
- SqlErrorCollection.cs
- StylusPointPropertyInfoDefaults.cs
- MyContact.cs
- TransactionFlowOption.cs
- Int64.cs
- DeviceContext2.cs
- AutomationProperty.cs
- SqlDelegatedTransaction.cs
- KeyGesture.cs
- DocumentPaginator.cs
- _NetRes.cs
- PreloadHost.cs
- FilteredXmlReader.cs
- MimeTypePropertyAttribute.cs
- AtomPub10CategoriesDocumentFormatter.cs
- SQLResource.cs
- ApplicationSecurityInfo.cs
- Metadata.cs
- TrackingDataItem.cs
- ExceptionRoutedEventArgs.cs
- CommonProperties.cs
- Compiler.cs
- ComponentEvent.cs
- WindowsTooltip.cs
- Propagator.ExtentPlaceholderCreator.cs
- ConfigurationLocation.cs
- XmlTypeMapping.cs
- ContextBase.cs
- Nodes.cs
- Dictionary.cs
- sitestring.cs
- WindowsSolidBrush.cs
- NamespaceCollection.cs
- SemanticTag.cs
- FamilyCollection.cs
- SharedStream.cs
- QualifiedCellIdBoolean.cs
- XmlSubtreeReader.cs
- WebBaseEventKeyComparer.cs
- BamlVersionHeader.cs
- ScriptingJsonSerializationSection.cs
- Label.cs
- SerializationInfo.cs
- Invariant.cs
- _HTTPDateParse.cs
- RunWorkerCompletedEventArgs.cs
- IndexerHelper.cs
- CommandEventArgs.cs
- RolePrincipal.cs
- SizeConverter.cs
- DialogWindow.cs
- Visitors.cs
- DefaultSection.cs
- NameValuePermission.cs
- LogExtentCollection.cs
- BooleanFunctions.cs
- EntityDescriptor.cs
- AssemblyHash.cs
- Brush.cs
- XsltInput.cs
- EntityDataSourceConfigureObjectContext.cs
- String.cs
- Roles.cs
- ResourceExpressionEditor.cs
- Hyperlink.cs
- ExternalCalls.cs
- SqlTriggerAttribute.cs
- PersonalizationEntry.cs
- SharedUtils.cs
- WebPartMenuStyle.cs
- GridViewUpdateEventArgs.cs
- WinHttpWebProxyFinder.cs
- ObjectDataSourceEventArgs.cs
- WindowsFormsHostAutomationPeer.cs
- PartialCachingControl.cs
- WsdlBuildProvider.cs
- RepeaterItemEventArgs.cs
- OperatorExpressions.cs
- MasterPageBuildProvider.cs
- XpsS0ValidatingLoader.cs
- UrlPropertyAttribute.cs
- DbProviderSpecificTypePropertyAttribute.cs
- AttachedAnnotationChangedEventArgs.cs
- SecurityTokenAttachmentMode.cs
- SerializationHelper.cs
- DataGridViewAccessibleObject.cs
- DbParameterCollection.cs
- TcpPortSharing.cs
- MaskedTextProvider.cs
- SubpageParagraph.cs
- TextRange.cs
- DefaultProxySection.cs
- ValidateNames.cs
- HttpValueCollection.cs
- NotSupportedException.cs
- backend.cs
- ProcessModelInfo.cs