links: gh-jcef -> gh-jcef-master

This commit is contained in:
Yann Cébron 2024-05-14 13:56:47 +02:00
parent 80b966611b
commit a02b113b5c
2 changed files with 9 additions and 9 deletions

View File

@ -114,7 +114,7 @@ Browser client provides an interface for setting up [handlers](#event-handlers)
Handlers allow reacting to these events in plugin code and change browser's behavior. Handlers allow reacting to these events in plugin code and change browser's behavior.
Each browser is tied to a single client and a single client can be shared with multiple browser instances. Each browser is tied to a single client and a single client can be shared with multiple browser instances.
Browser client is represented by [`JBCefClient`](%gh-ic%/platform/platform-api/src/com/intellij/ui/jcef/JBCefClient.java), which is a wrapper for JCEF's [`CefClient`](%gh-jcef%/org/cef/CefClient.java). Browser client is represented by [`JBCefClient`](%gh-ic%/platform/platform-api/src/com/intellij/ui/jcef/JBCefClient.java), which is a wrapper for JCEF's [`CefClient`](%gh-jcef-master%/org/cef/CefClient.java).
`JBCefClient` allows registering multiple handlers of the same type, which is not possible with `CefClient`. `JBCefClient` allows registering multiple handlers of the same type, which is not possible with `CefClient`.
To access the underlying `CefClient` and its API, call `JBCefClient.getCefClient()`. To access the underlying `CefClient` and its API, call `JBCefClient.getCefClient()`.
@ -132,21 +132,21 @@ To access the client associated with a browser, call `JBCefBrowser.getJBCefClien
JCEF API provides various event handler interfaces that allows handling a wide set of events emitted by the browser. JCEF API provides various event handler interfaces that allows handling a wide set of events emitted by the browser.
Example handlers: Example handlers:
- [`CefLoadHandler`](%gh-jcef%/org/cef/handler/CefLoadHandler.java) - handles browser loading events.<br/> - [`CefLoadHandler`](%gh-jcef-master%/org/cef/handler/CefLoadHandler.java) - handles browser loading events.<br/>
**Example**: Implement `CefLoadHandler.onLoadEnd()` to [execute scripts](#executing-javascript) after document is loaded. **Example**: Implement `CefLoadHandler.onLoadEnd()` to [execute scripts](#executing-javascript) after document is loaded.
- [`CefDisplayHandler`](%gh-jcef%/org/cef/handler/CefDisplayHandler.java) - handles events related to browser display state.<br/> - [`CefDisplayHandler`](%gh-jcef-master%/org/cef/handler/CefDisplayHandler.java) - handles events related to browser display state.<br/>
**Example**: Implement `CefDisplayHandler.onAddressChange()` to load project files in the browser when a local file link is clicked, or opening an external browser if an external link is clicked. **Example**: Implement `CefDisplayHandler.onAddressChange()` to load project files in the browser when a local file link is clicked, or opening an external browser if an external link is clicked.
- [`CefContextMenuHandler`](%gh-jcef%/org/cef/handler/CefContextMenuHandler.java) - handles context menu events.<br/> - [`CefContextMenuHandler`](%gh-jcef-master%/org/cef/handler/CefContextMenuHandler.java) - handles context menu events.<br/>
**Example**: Implement `CefContextMenuHandler.onBeforeContextMenu()` to change the items of the browser context menu. **Example**: Implement `CefContextMenuHandler.onBeforeContextMenu()` to change the items of the browser context menu.
- [`CefDownloadHandler`](%gh-jcef%/org/cef/handler/CefDownloadHandler.java) - file download events.<br/> - [`CefDownloadHandler`](%gh-jcef-master%/org/cef/handler/CefDownloadHandler.java) - file download events.<br/>
**Example**: Implement `CefDownloadHandler.onBeforeDownload()` to enable downloading files in the embedded browser. **Example**: Implement `CefDownloadHandler.onBeforeDownload()` to enable downloading files in the embedded browser.
See [org.cef.handler](%gh-jcef%/org/cef/handler) package for all available handlers. See [org.cef.handler](%gh-jcef-master%/org/cef/handler) package for all available handlers.
> For each handler interface, JCEF API provides an adapter class, which can be extended to avoid implementing unused methods, e.g., [`CefLoadHandlerAdapter`](%gh-jcef%/org/cef/handler/CefLoadHandlerAdapter.java). > For each handler interface, JCEF API provides an adapter class, which can be extended to avoid implementing unused methods, e.g., [`CefLoadHandlerAdapter`](%gh-jcef-master%/org/cef/handler/CefLoadHandlerAdapter.java).
Handlers should be registered with `JBCefClient.getCefClient().add*Handler()` methods. Handlers should be registered with `JBCefClient.getCefClient().add*Handler()` methods.
@ -235,7 +235,7 @@ In cases when a plugin feature implements a web-based UI, the plugin may provide
Such resources cannot be easily accessed by the browser. Such resources cannot be easily accessed by the browser.
They can be made accessible by implementing proper request [handlers](#event-handlers), which make them available to the browser at predefined URLs. They can be made accessible by implementing proper request [handlers](#event-handlers), which make them available to the browser at predefined URLs.
This approach requires implementing [`CefRequestHandler`](%gh-jcef%/org/cef/handler/CefRequestHandler.java), and [`CefResourceRequestHandler`](%gh-jcef%/org/cef/handler/CefResourceRequestHandler.java), which map resource paths to resource providers. This approach requires implementing [`CefRequestHandler`](%gh-jcef-master%/org/cef/handler/CefRequestHandler.java), and [`CefResourceRequestHandler`](%gh-jcef-master%/org/cef/handler/CefResourceRequestHandler.java), which map resource paths to resource providers.
Serving such resources is implemented by the Image Viewer component responsible for displaying SVG files in IntelliJ Platform-based IDEs. Serving such resources is implemented by the Image Viewer component responsible for displaying SVG files in IntelliJ Platform-based IDEs.
See [`JCefImageViewer`](%gh-ic%/images/src/org/intellij/images/editor/impl/jcef/JCefImageViewer.kt) and related classes for the implementation details. See [`JCefImageViewer`](%gh-ic%/images/src/org/intellij/images/editor/impl/jcef/JCefImageViewer.kt) and related classes for the implementation details.

2
v.list
View File

@ -19,7 +19,7 @@
<var name="gh-ij-plugins" value="https://github.com/JetBrains/intellij-plugins/tree/idea/%ijPlatformBuild%"/> <var name="gh-ij-plugins" value="https://github.com/JetBrains/intellij-plugins/tree/idea/%ijPlatformBuild%"/>
<var name="gh-ij-plugins-master" value="https://github.com/JetBrains/intellij-plugins/tree/master"/> <var name="gh-ij-plugins-master" value="https://github.com/JetBrains/intellij-plugins/tree/master"/>
<var name="gh-jcef" value="https://github.com/JetBrains/jcef/tree/master/java"/> <var name="gh-jcef-master" value="https://github.com/JetBrains/jcef/tree/master/java"/>
<var name="gh-java-annotations" value="https://github.com/JetBrains/java-annotations/tree/24.0.0"/> <var name="gh-java-annotations" value="https://github.com/JetBrains/java-annotations/tree/24.0.0"/>
<var name="gh-ijpgp" value="https://github.com/JetBrains/gradle-intellij-plugin/blob/main"/> <var name="gh-ijpgp" value="https://github.com/JetBrains/gradle-intellij-plugin/blob/main"/>