Where is handler.reg
Use the apartment threading model. An example is shown here:. Any time the Shell takes an action that can involve a Shell extension handler, it checks the appropriate registry subkey.
The subkey under which an extension handler is registered controls when it will be called. For instance, it is a common practice to have a shortcut menu handler called when the Shell displays a shortcut menu for a member of a file type.
In this case, the handler must be registered under the file type's ProgID subkey. For example, if you wanted to register a shortcut menu extension handler for MyProgram. For the following handlers, create a subkey underneath the "Handler Subkey name" subkey named as the string version of the class identifier CLSID of the Shell extension.
Multiple extensions can be registered under the handler subkey name by creating multiple subkeys. Only one extension can be registered for these handlers. The subkeys specified to add Pin to Start Menu and Pin to Taskbar to an item's shortcut menu are only required for file types that include the IsShortCut entry.
For example, to add a property sheet handler for all files, you can register under the PropertySheetHandlers subkey. Note that many extension handlers cannot be registered under all of the listed subkeys.
For further details, see the specific handler's documentation. To enable a particular handler, create a subkey under the extension handler type subkey with the name of the handler. The Shell does not use the handler's name, but it must be different from all other names under that type subkey. If the TID is not provided, the event manager listens to the event signaled by a notifier located on any workstation with which the client workstation has a session.
The event manager adds only listeners for remote events to its list of handlers. All local handlers register with the notifier that signals the event. If the application has registered interest in a remote event with the client event manager, it does not have to do any registration on the remote workstation. The remote operation, if it is responsible for registering a remote handler, or the local operation takes care of the registration process before the handler is instantiated and registered.
The remote operation uses the addHandler method of the specific notifier to do this while the local operation uses the registerInterestInRemoteEvent or the registerServerInterestInEvent methods.
At any time, the application can remove itself as a listener for a remote event. The event manager provides the deregisterInterestInRemoteEvent and deregisterServerInterestInEvent methods to disable a remote event notification to a workstation. Opening the selected app is the first step. With that property, extensions can register a website as a handler for a particular protocol. Just like in this proposal, the syntax and semantics of this WebExtensions property is very similar to registerProtocolHandler , except that with registerProtocolHandler a website can only register itself as a handler.
To avoid confusion for developers, it would be wise to keep the extensions API Chromium proposal , the web app API proposed here and registerProtocolHandler as aligned as possible. Keeping compatibility with all these APIs might also make it easier for user agents to share as much logic as possible among all the implementations. Issue provides more context on this. Issue suggested an alternative where "this manifest addition serves to just 'enhance' the existing register protocol handler API.
For instance, it could supplement the existing API with icons and other data that would be useful in an App context, but not as useful in a web site context. Even though the author of the issue lists several good reasons as to why this could be an interesting alternative, this option will not be pursued because we believe this will not be ergonomic enough for developers.
We could not find good examples on the web app space where manifest properties depend on calls to existing HTML5 APIs and having a dependency on that API being called at some point in time would work against the goal of having an app being able to handle protocols immediately after being installed. Having the APIs interact with each other would also cause confusion with regards to the order of API calls: "Do I first call registerProtocolHandler and then install the app, or the other way around?
Registering a protocol handler represents an important state change in the user's operating environment, and we must work to ensure that it is not abused. The registerProtocolHandler API implements an allow list of schemes that may be registered; we should start with that same restriction and evaluate whether it meets the needs, but possibly adding a few schemes to the list.
However, PWAs that implement protocol handlers must still take care to avoid sending potentially-sensitive URL data over insecure channels. To provide a smooth install experience, protocol handlers will be registered with the OS silently as part of PWA installation, however, the following security mitigations will be implemented:. On some OSs, a handler registered for an uncontested protocol automatically takes over as the default handler during registration.
Though no OS disambiguation dialog will display in this case, the user will still give consent through launch time permission prompt. A common concern for protocol handling APIs is that bad actors could try to enumerate which apps are registered as protocol handlers as a fingerprinting technique.
One can imagine that a lot about a user can be revealed from which apps are installed to handle certain protocols e. To prevent fingerprinting, we plan to follow the footsteps of the registerProtocolHandler by not exposing the list of protocol handlers to the web.
What ensures that registration through manifest will never conflict with a registerProtocolHandler call from the PWA? This might not be the desired behavior, though, and needs to be thought about more carefully.
One can imagine a scenario where a developer wants to control the experience and uses both registration mechanisms to indicate that if the user is currently navigating the web on the browser, the protocol is to be handled by the website, and if the user is outside the browser, the protocol is to be handled by the app.
Skip to content. Star Permalink main.
0コメント