Skip to content

Extension Support and UI Optimisation

Pre-release
Pre-release
Compare
Choose a tag to compare
@pandey019 pandey019 released this 25 Oct 14:22
· 139 commits to chromium since this release
28e5f83

Key Files and Changes

  • Browser Startup:

    • src/chrome/browser/chrome_browser_main.cc
      Modifications are made to initialize the extension systems as part of Chromium's startup process.
    • Post-Browser Startup Initialization:
      • void ChromeBrowserMainParts::PostBrowserStart()
        Extensions-related services are initialized after the browser startup, including API hooks for extensions to interact with the Android environment. Here, a test extension is loaded from disk as part of the startup process.
  • Main Classes in Chromium Codebase:

    • Extension: Represents a single Chrome extension and handles metadata such as permissions, version, etc.
    • ExtensionService: Manages the lifecycle of extensions, including loading, updating, and unloading extensions.
    • ExtensionsRegistry: A centralized registry that tracks all installed extensions, providing APIs to query extension data.
  • JNI Wrapper and Java Part:

    • Native C++ part: src/chrome/browser/extensions/extensions_android.cc
    • Java part: src/chrome/android/java/src/org/chromium/chrome/browser/extensions/Extensions.java
      This file provides the Java interface to interact with Chrome extensions on Android. It facilitates communication between the native extension system and the Java components on Android.
    • Extensions Confirmation Dialog:
      • src/chrome/android/java/src/org/chromium/chrome/browser/extensions/ExtensionsConfirmationDialog.java
        This Java class handles UI dialogs for extension installation confirmation, using the Java interface to connect to native C++.
  • Extension Installation:

    • src/chrome/browser/download/chrome_download_manager_delegate.cc
      This file was updated to check if a downloaded file is a .crx (Chrome extension) file, and if so, to handle its installation directly within Android Chromium.
  • Wootz API:

    • Definitions: src/chrome/common/extensions/api/wootz.json
    • Implementation: src/chrome/browser/extensions/api/wootz/wootz_api.h
      For now, the chrome.wootz.info() function is implemented, which provides detailed information about the device.

Extending chrome.wootz API:

The chrome.wootz API was extended to provide access to specific browser internals. A corresponding wootz.json file defines the API, while the C++ implementation handles API requests from JavaScript. This allows extensions to interact with Android Chromium’s environment seamlessly.