LightBlog

samedi 11 août 2018

Google Chrome on Android may soon support Incognito Chrome Custom Tabs

Google Chrome Incognito Custom Tab

The Google Chrome browser is by far the most dominant browser on Android. After all, it’s pre-installed on most Android devices (which recently landed Google in trouble with the EU) and even if you use another browser, it’s probably still based on Chromium. Android’s default WebView client became Chromium-based in Android 4.4 KitKat and then Android Nougat made the Chrome app take over as the WebView process. As if that isn’t enough, Google Chrome 45 introduced Chrome Custom Tabs which encouraged app developers to open browser links in Chrome to better their users’ experiences. Chrome Custom Tabs allow developers to show a Chrome tab with some customizations such as theming the title bar and showing special buttons in the menu, but a new commit we spotted in the Chromium Gerrit suggests that Chrome Custom Tabs will soon support opening up in Incognito Mode.

Google Chrome on Android's Incognito Chrome Custom Tabs

Chrome Custom Tabs in XDA Labs

The commit, titled “Introduced Incognito Custom Tabs,” details how this new variant of Custom Tabs will work. Here’s a summary:

  • A flag (not accessible to the user, but at build time) called enable_incognito_custom_tabs controls whether the feature should be enabled for purposes other than payment flows.
  • Another flag (also not accessible to the user) called allow_incognito_custom_tabs_from_third_party controls whether third-party apps can open Incognito Custom Tabs. ICT are opened by adding the intent extra com.google.android.apps.chrome.EXTRA_OPEN_NEW_INCOGNITO_TAB, which can only be done by first-party Google apps by default.
  • Once an ICT is open, there’s a new menu item called “Open in Incognito Chrome” which re-opens the tab into an Incognito Tab in Chrome. Unlike regular CCTs, the app picker isn’t shown.
  • The toolbar is, by default, a grey color but can be overridden by the app developer.
  • The notification to “close all incognito tabs” will also close any ICTs that are open.
  • Like regular Incognito Mode tabs, screenshots aren’t allowed in ICTs and their contents aren’t shown in the recent app view. (This can be bypassed by modifying services.jar to disable the secure flag.)

The code for this change hasn’t yet merged, so we won’t see it in Chrome just yet. Once it is merged, the feature will be available in Chrome Canary, however, we won’t see it in action until Google starts implementing it in their apps or possibly opens it up for third-party apps. We’ll keep an eye out for this feature and keep you updated when it becomes available.



from xda-developers https://ift.tt/2nvrDDc
via IFTTT

.

Aucun commentaire:

Enregistrer un commentaire