Encrypted chat is an app, not an OS API.
Chat apps could then delegate security to the OS, rather than having to trust that the app developer has a security team that knows what they're doing.
You could even take it one step further and have the plaintext of the users messages secret from the app - the OS would draw them direct to the screen. A bit like opaque cross-origin data in webpages is secret from JavaScript on the page.