We are trying to modify the Chrome PDF viewer so that we can hide/show the print button based on our settings. We have everything working except one issue: chrome.runtime.connectNative is always undefined.
The sources we're modifying are all in: chromium\src\chrome\browser\resources\pdf
We have added the nativeMessaging permission to manifest.json. However, when viewing the manifest file at runtime, we see that the permission has been removed. We're viewing it with: alert(JSON.stringify(chrome.runtime.getManifest()));
How is the permission being removed? Maybe we're modifying the wrong manifest file?