Skip to content

Commit

Permalink
pip2: Always elide the URL in the titlebar
Browse files Browse the repository at this point in the history
This CL ensures that the URL in a document picture-in-picture window is
always elided, even when the user has selected "Always Show Full URLs"
in the omnibox.

Bug: 1450376
Change-Id: I6275e0ff9d3a9a860e5e4086732d717c47bdc3fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4581312
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152637}
  • Loading branch information
steimelchrome authored and Chromium LUCI CQ committed Jun 2, 2023
1 parent a094bba commit dc77f98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,12 @@ bool PictureInPictureBrowserFrameView::GetURL(GURL* url) const {
return false;
}

bool PictureInPictureBrowserFrameView::ShouldPreventElision() {
// We should never allow the full URL to show, as the PiP window only cares
// about the origin of the opener.
return false;
}

bool PictureInPictureBrowserFrameView::ShouldTrimDisplayUrlAfterHostName()
const {
// We need to set the window title URL to be eTLD+1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class PictureInPictureBrowserFrameView
// ChromeLocationBarModelDelegate:
content::WebContents* GetActiveWebContents() const override;
bool GetURL(GURL* url) const override;
bool ShouldPreventElision() override;
bool ShouldTrimDisplayUrlAfterHostName() const override;
bool ShouldDisplayURL() const override;

Expand Down

0 comments on commit dc77f98

Please sign in to comment.