Skip to content

Commit fb45f61

Browse files
Added comments for documentation
1 parent cbcf415 commit fb45f61

1 file changed

Lines changed: 60 additions & 19 deletions

File tree

specs/SensitivityLabel.md

Lines changed: 60 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -232,50 +232,74 @@ interface ICoreWebView2StagingProfile3 : IUnknown {
232232

233233
## Sensitivity label change event
234234
```
235-
/// Enum for sensitivity label State.
235+
/// Represents the state of sensitivity label detection and processing
236+
/// for web content loaded in the WebView2 control. This enum indicates
237+
/// whether sensitivity labels have been detected, are being processed,
238+
/// or are fully determined for the current web page content.
236239
[v1_enum]
237240
typedef enum COREWEBVIEW2_SENSITIVITY_LABEL_STATE {
238-
/// There are no allow listed pages loaded that report sensitivity label
241+
/// Indicates that there are no allowlisted pages loaded that report
242+
/// sensitivity labels.
239243
COREWEBVIEW2_SENSITIVITY_LABEL_STATE_NONE,
240-
/// There are allow listed pages in the WebView2 and the sensitivity label is not determined yet.
244+
/// Indicates that there are allowlisted pages loaded in the WebView2
245+
/// that are capable of reporting sensitivity labels, but the label
246+
/// determination process is still in progress.
241247
COREWEBVIEW2_SENSITIVITY_LABEL_STATE_UNDETERMINED,
242-
/// There are allow listed pages in the WebView2 and the sensitivity label is determined.
248+
/// Indicates that there are allowlisted pages loaded in the WebView2
249+
/// and the content has reported label information to WebView2.
243250
COREWEBVIEW2_SENSITIVITY_LABEL_STATE_DETERMINED,
244251
} COREWEBVIEW2_SENSITIVITY_LABEL_STATE;
245252
```
246253

247254
```
248-
/// Enum for sensitivity label types.
255+
/// Represents the type of sensitivity label applied to web content.
256+
/// Sensitivity labels are used to classify and protect content based on
257+
/// its sensitivity level.
249258
[v1_enum]
250259
typedef enum COREWEBVIEW2_SENSITIVITY_LABEL_TYPE {
251-
/// Unknown or unsupported label type.
260+
/// Represents an unknown or unsupported sensitivity label type.
252261
COREWEBVIEW2_SENSITIVITY_LABEL_TYPE_UNKNOWN,
253-
/// Microsoft Information Protection label.
262+
/// Represents a Microsoft Information Protection (MIP) sensitivity label.
254263
COREWEBVIEW2_SENSITIVITY_LABEL_TYPE_MIP,
255264
} COREWEBVIEW2_SENSITIVITY_LABEL_TYPE;
256265
```
257266

258267
```
259-
/// Basic interface for all sensitivity label types.
268+
/// Base interface for all sensitivity label types used in WebView2.
269+
/// This interface provides common functionality for accessing sensitivity
270+
/// label information applied to web content. Different label types
271+
/// (such as Microsoft Information Protection labels) can implement
272+
/// this interface to provide specific label information and metadata.
260273
[uuid(e0288585-9f8c-5b29-bca8-5de14e024557), object, pointer_default(unique)]
261274
interface ICoreWebView2SensitivityLabel : IUnknown {
262-
/// Gets the type of this sensitivity label.
275+
/// Gets the type of the sensitivity label applied to the web content.
276+
/// This property identifies which sensitivity label system is being used
277+
/// (such as Microsoft Information Protection or other label providers).
278+
/// Applications can use this information to determine how to interpret
279+
/// and handle the label data, as different label types may have different
280+
/// metadata formats, protection requirements, and policy enforcement
281+
/// mechanisms.
263282
[propget] HRESULT LabelType([out, retval] COREWEBVIEW2_SENSITIVITY_LABEL_TYPE* value);
264283
}
265284
```
266-
267285
```
268-
/// Interface for MIP Sensitivity Label with label ID and organization ID.
286+
/// Interface for Microsoft Information Protection (MIP) sensitivity labels.
287+
/// This interface provides specific information about MIP labels, including
288+
/// label identification and organizational context.
269289
[uuid(1a562888-3031-5375-b8c5-8afd573e79c8), object, pointer_default(unique)]
270290
interface ICoreWebView2StagingMipSensitivityLabel : IUnknown {
271-
/// The string representing the label ID.
291+
/// Gets the unique identifier for the Microsoft Information Protection label.
292+
/// This string contains a GUID that uniquely identifies the specific
293+
/// sensitivity label within the organization's MIP policy configuration.
272294
///
273295
/// The caller must free the returned string with `CoTaskMemFree`. See
274296
/// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
275297
[propget] HRESULT LabelId([out, retval] LPWSTR* value);
276298
277299
278-
/// The string representing the organization ID.
300+
/// Gets the unique identifier for the organization that owns the MIP label.
301+
/// This string contains a GUID that identifies the Azure Active Directory
302+
/// tenant or organization that configured and deployed the sensitivity label.
279303
///
280304
/// The caller must free the returned string with `CoTaskMemFree`. See
281305
/// [API Conventions](/microsoft-edge/webview2/concepts/win32-api-conventions#strings).
@@ -297,14 +321,22 @@ interface ICoreWebView2StagingSensitivityLabelCollectionView : IUnknown {
297321
```
298322

299323
```
300-
/// Event args for the `SensitivityLabelChanged` event.
324+
/// Event arguments for the `SensitivityLabelChanged` event.
325+
/// This interface provides information about sensitivity label changes
326+
/// that occur when web content is loaded or updated in the WebView2 control.
327+
/// The event args contain the current state of sensitivity label detection
328+
/// and a collection of all sensitivity labels that have been reported by
329+
/// the web content via
330+
/// [`Page Interaction Restriction Manager`](https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/PageInteractionRestrictionManager/explainer.md).
301331
[uuid(36de2060-e013-5b03-939b-117d08d0abd5), object, pointer_default(unique)]
302332
interface ICoreWebView2StagingSensitivityLabelEventArgs : IUnknown {
303-
/// The vector of Sensitivity Labels associated with the current document.
333+
/// Gets a read-only collection of all sensitivity labels detected in the
334+
/// current web document. This collection contains instances of sensitivity
335+
/// labels that have been reported by the web content.
304336
[propget] HRESULT SensitivityLabels([out, retval] ICoreWebView2StagingSensitivityLabelCollectionView** value);
305337
306338
307-
/// The state of the sensitivity label.
339+
/// Gets the current state of sensitivity label detection.
308340
[propget] HRESULT SensitivityState([out, retval] COREWEBVIEW2_SENSITIVITY_LABEL_STATE* value);
309341
310342
}
@@ -322,12 +354,21 @@ interface ICoreWebView2StagingSensitivityLabelChangedEventHandler : IUnknown {
322354
```
323355

324356
```
325-
/// A continuation of the ICoreWebView2 interface to notify changes in
326-
/// web content sensitivity label.
357+
/// Extension of the ICoreWebView2 interface that provides sensitivity label
358+
/// change notification capabilities. This interface enables applications to
359+
/// monitor and respond to changes in the sensitivity classification of web
360+
/// content loaded in the WebView2 control. When sensitivity labels are
361+
/// detected, updated, or removed from web pages, the SensitivityLabelChanged
362+
/// event is raised.
327363
[uuid(ac4543d5-f466-5622-8b3b-24d3b195525c), object, pointer_default(unique)]
328364
interface ICoreWebView2Staging32 : IUnknown {
329365
/// Adds an event handler for the `SensitivityLabelChanged` event.
330-
/// This event is raised when the web content's sensitivity label changes.
366+
/// Event raised when the sensitivity label classification of web content changes.
367+
/// This event is triggered when the WebView2 control detects a change in the
368+
/// sensitivity labels associated with the currently loaded web content.
369+
/// Applications can subscribe to this event to receive notifications
370+
/// about sensitivity changes. The event args provide the current label state and
371+
/// the complete collection of detected sensitivity labels.
331372
HRESULT add_SensitivityLabelChanged(
332373
[in] ICoreWebView2StagingSensitivityLabelChangedEventHandler* eventHandler,
333374
[out] EventRegistrationToken* token);

0 commit comments

Comments
 (0)