ChromeAndroidTask: Add custom_tab browser window type for Android Custom Tabs [chromium/src : main]

0 views
Skip to first unread message

Lijin Shen (Gerrit)

unread,
Mar 11, 2026, 3:45:09 PM (21 hours ago) Mar 11
to Linyu He, chromium...@chromium.org, Peter Beverloo, chromium-a...@chromium.org, extension...@chromium.org, lizeb+watch...@chromium.org
Attention needed from Linyu He

Lijin Shen added 3 comments

File chrome/browser/extensions/api/tabs/tabs_api.cc
Line 899, Patchset 1 (Latest): case windows::CreateType::kCustomTab:
Lijin Shen . unresolved

I don't think we'll allow extension to create a CCT. This is probably not needed.

File chrome/browser/extensions/browser_extension_window_controller.cc
Line 81, Patchset 1 (Latest): return api::tabs::WindowType::kCustomTab;
Lijin Shen . unresolved

Not sure if it is okay to return as a Popup.

File third_party/closure_compiler/externs/tabs.js
File-level comment, Patchset 1 (Parent):
Lijin Shen . unresolved

Files under third_party in this Cl are auto updated by scripts.

Open in Gerrit

Related details

Attention is currently required from:
  • Linyu He
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib377d7dd50ec6ab6a8750823e03f4e9df8208780
Gerrit-Change-Number: 7658874
Gerrit-PatchSet: 1
Gerrit-Owner: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Linyu He <lin...@google.com>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-Attention: Linyu He <lin...@google.com>
Gerrit-Comment-Date: Wed, 11 Mar 2026 19:44:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Linyu He (Gerrit)

unread,
Mar 11, 2026, 4:21:19 PM (20 hours ago) Mar 11
to Lijin Shen, Devlin Cronin, chromium...@chromium.org, Peter Beverloo, chromium-a...@chromium.org, extension...@chromium.org, lizeb+watch...@chromium.org
Attention needed from Devlin Cronin and Lijin Shen

Linyu He added 4 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Linyu He . resolved

Hi @rdevlin...@chromium.org,

Could you help review this CL? It adds a new "custom tab" window type to `BrowserWindowInterface::Type` for CCT (an Android-specific type).

Thank you!

File chrome/browser/extensions/api/tabs/tabs_api.cc
Line 899, Patchset 1 (Latest): case windows::CreateType::kCustomTab:
Lijin Shen . unresolved

I don't think we'll allow extension to create a CCT. This is probably not needed.

Linyu He

I don't think we'll allow extension to create a CCT.

I think so.

File chrome/browser/extensions/browser_extension_window_controller.cc
Line 81, Patchset 1 (Latest): return api::tabs::WindowType::kCustomTab;
Lijin Shen . unresolved

Not sure if it is okay to return as a Popup.

Linyu He

I think we need to return `api::tabs::WindowType::kCustomTab` since custom tabs are a special window type where we don't plan to support all extension APIs in the short term.

So extensions need to know the `kCustomTab` type and that it's different from the `kPopup` type.

File chrome/browser/ui/browser.h
File-level comment, Patchset 1 (Latest):
Linyu He . unresolved

`browser.{h|cc}` won't be compiled into Android. Can we revert the changes here?

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Lijin Shen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib377d7dd50ec6ab6a8750823e03f4e9df8208780
Gerrit-Change-Number: 7658874
Gerrit-PatchSet: 1
Gerrit-Owner: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Linyu He <lin...@google.com>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Lijin Shen <laz...@google.com>
Gerrit-Comment-Date: Wed, 11 Mar 2026 20:21:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Lijin Shen <laz...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lijin Shen (Gerrit)

unread,
Mar 11, 2026, 5:19:54 PM (19 hours ago) Mar 11
to Devlin Cronin, Linyu He, chromium...@chromium.org, Peter Beverloo, chromium-a...@chromium.org, extension...@chromium.org, lizeb+watch...@chromium.org
Attention needed from Devlin Cronin and Linyu He

Lijin Shen voted and added 1 comment

Votes added by Lijin Shen

Commit-Queue+1

1 comment

File chrome/browser/extensions/api/tabs/tabs_api.cc
Line 899, Patchset 1: case windows::CreateType::kCustomTab:
Lijin Shen . resolved

I don't think we'll allow extension to create a CCT. This is probably not needed.

Linyu He

I don't think we'll allow extension to create a CCT.

I think so.

Lijin Shen

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Linyu He
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib377d7dd50ec6ab6a8750823e03f4e9df8208780
Gerrit-Change-Number: 7658874
Gerrit-PatchSet: 2
Gerrit-Owner: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Linyu He <lin...@google.com>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Linyu He <lin...@google.com>
Gerrit-Comment-Date: Wed, 11 Mar 2026 21:19:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Lijin Shen <laz...@google.com>
Comment-In-Reply-To: Linyu He <lin...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Devlin Cronin (Gerrit)

unread,
Mar 11, 2026, 9:17:11 PM (15 hours ago) Mar 11
to Lijin Shen, Tim, Chromium LUCI CQ, Devlin Cronin, Linyu He, chromium...@chromium.org, Peter Beverloo, chromium-a...@chromium.org, extension...@chromium.org, lizeb+watch...@chromium.org
Attention needed from Lijin Shen, Linyu He and Tim

Devlin Cronin added 5 comments

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Devlin Cronin . resolved

Thanks! I think this mostly looks good, but tagging in @tjud...@chromium.org for the JSON changes

File chrome/common/extensions/api/tabs.json
Line 147, Patchset 3 (Latest): "enum": ["normal", "popup", "panel", "app", "devtools", "custom_tab"],
Devlin Cronin . unresolved

@tjud...@chromium.org, can we nodoc an enum type while we work on it?

Otherwise, this will show up in the public documentation (for all platforms).

File chrome/common/extensions/api/windows.json
Line 33, Patchset 3 (Latest): "name": "custom_tab",
Devlin Cronin . unresolved

ditto

File third_party/closure_compiler/externs/tabs.js
Line 12, Patchset 3 (Parent):// TODO(crbug.com/543822): Disable automatic extern generation until fixed.
Devlin Cronin . unresolved

As mentioned in this TODO, we can't fully auto-generate this file -- it needs custom handling

File third_party/closure_compiler/externs/windows.js
Line 12, Patchset 3 (Parent):// TODO(crbug.com/543822): Disable automatic extern generation until fixed.
Devlin Cronin . unresolved

ditto

Open in Gerrit

Related details

Attention is currently required from:
  • Lijin Shen
  • Linyu He
  • Tim
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib377d7dd50ec6ab6a8750823e03f4e9df8208780
Gerrit-Change-Number: 7658874
Gerrit-PatchSet: 3
Gerrit-Owner: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Linyu He <lin...@google.com>
Gerrit-Reviewer: Tim <tjud...@chromium.org>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-Attention: Tim <tjud...@chromium.org>
Gerrit-Attention: Lijin Shen <laz...@google.com>
Gerrit-Attention: Linyu He <lin...@google.com>
Gerrit-Comment-Date: Thu, 12 Mar 2026 01:17:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Lijin Shen (Gerrit)

unread,
12:06 AM (12 hours ago) 12:06 AM
to Tim, Chromium LUCI CQ, Devlin Cronin, Linyu He, chromium...@chromium.org, Peter Beverloo, chromium-a...@chromium.org, extension...@chromium.org, lizeb+watch...@chromium.org
Attention needed from Linyu He and Tim

Lijin Shen voted and added 6 comments

Votes added by Lijin Shen

Commit-Queue+1

6 comments

File chrome/browser/extensions/browser_extension_window_controller.cc
Line 81, Patchset 1: return api::tabs::WindowType::kCustomTab;
Lijin Shen . resolved

Not sure if it is okay to return as a Popup.

Linyu He

I think we need to return `api::tabs::WindowType::kCustomTab` since custom tabs are a special window type where we don't plan to support all extension APIs in the short term.

So extensions need to know the `kCustomTab` type and that it's different from the `kPopup` type.

Lijin Shen

Done

File chrome/browser/ui/browser.h

`browser.{h|cc}` won't be compiled into Android. Can we revert the changes here?

Lijin Shen

Done

File chrome/common/extensions/api/windows.json
Line 33, Patchset 3: "name": "custom_tab",
Devlin Cronin . resolved

ditto

Lijin Shen

Done

File third_party/closure_compiler/externs/tabs.js
Lijin Shen . resolved

Files under third_party in this Cl are auto updated by scripts.

Lijin Shen

Done

Line 12, Patchset 3 (Parent):// TODO(crbug.com/543822): Disable automatic extern generation until fixed.
Devlin Cronin . resolved

As mentioned in this TODO, we can't fully auto-generate this file -- it needs custom handling

Lijin Shen

Done

File third_party/closure_compiler/externs/windows.js
Line 12, Patchset 3 (Parent):// TODO(crbug.com/543822): Disable automatic extern generation until fixed.
Devlin Cronin . resolved

ditto

Lijin Shen

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Linyu He
  • Tim
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ib377d7dd50ec6ab6a8750823e03f4e9df8208780
Gerrit-Change-Number: 7658874
Gerrit-PatchSet: 4
Gerrit-Owner: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Lijin Shen <laz...@google.com>
Gerrit-Reviewer: Linyu He <lin...@google.com>
Gerrit-Reviewer: Tim <tjud...@chromium.org>
Gerrit-CC: Peter Beverloo <pe...@chromium.org>
Gerrit-Attention: Tim <tjud...@chromium.org>
Gerrit-Attention: Linyu He <lin...@google.com>
Gerrit-Comment-Date: Thu, 12 Mar 2026 04:06:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lijin Shen (Gerrit)

unread,
12:38 AM (12 hours ago) 12:38 AM
to Tim, Chromium LUCI CQ, Devlin Cronin, Linyu He, chromium...@chromium.org, Peter Beverloo, chromium-a...@chromium.org, extension...@chromium.org, lizeb+watch...@chromium.org
Attention needed from Linyu He and Tim

Lijin Shen added 1 comment

File chrome/browser/extensions/browser_extension_window_controller.cc
Line 81, Patchset 4 (Latest): return api::tabs::WindowType::kCustomTab;
Lijin Shen . unresolved

If `custom_tab` is not added into chrome/common/extensions/api/windows.json, this type will be missing. Is it okay to set `NOTREACHED()`?

Gerrit-Comment-Date: Thu, 12 Mar 2026 04:37:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages