0
Go to file
Ted Choc 3e8c06cfff Cleanup of the destroy logic in Android's WebContentsObserver.
Prior to this CL, destroy() was the method you called when you
wanted to cleanup a WebContentsObserver, but it was also the
method that was called when a WebContents was being destroyed
(e.g. both the action to destroy, and the response to being
destroyed).

This introduces onDestroy(), which will be called
both during web contents destruction, but also during a java
side destruction (as if you deleted a C++ object). While normally, I
try to keep C++ and Java API names consistent, I chose the generic
#onDestroy vs #webContentsDestroyed because this could be triggered from
cases where the web contents was not destroyed. If clients actually
needed to distinguish between Java destruction and WebContents
destruction, I would likely recommend we simply introduce a boolean
`wasWebContentsDestroyed` that most clients would likely ignore as
opposed to introducing two separate destruction paths. For now, we can
keep this simpler.

This also introduces an #observe(WebContents) method to be
consistent with C++ in prep for a future CL to remove
the addObserver / removeObserver from the public content API.

Bug: None
Change-Id: I541ea056968639e024aca8e6f87b08f33a6b10f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6169275
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1406336}
2025-01-14 13:44:02 -08:00
2025-01-14 11:16:57 -08:00
2025-01-09 06:41:03 -08:00
2025-01-14 11:16:57 -08:00
2025-01-09 13:37:04 -08:00
2025-01-10 13:26:48 -08:00
2024-12-10 15:32:48 +00:00

Logo Chromium

Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.

The project's web site is https://www.chromium.org.

To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.

Documentation in the source is rooted in docs/README.md.

Learn how to Get Around the Chromium Source Code Directory Structure.

For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.

If you found a bug, please file it at https://crbug.com/new.

Description
Chromium是一个开源浏览器项目,提供了一种安全、快速、稳定的方法来体验Web。该浏览器可以在多个平台上下载,包括Mac、Windows、Linux和ChromiumOS。项目原始地址: https://chromium.googlesource.com/chromium/src.git
https://www.mobibrw.com/gitea-mirrors/chromium/src.git
Readme BSD-3-Clause 89 GiB
Languages
C++ 74.4%
Java 8.2%
Objective-C++ 4.6%
TypeScript 4%
Python 2.5%
Other 6.1%