Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Issue 1733173002: Mac: Make calling WebContents::WasShown/WasHidden the responsibility of the content layer (Closed)

Created:
4 years, 10 months ago by tapted
Modified:
4 years, 9 months ago
CC:
chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mac: Make calling WebContents::WasShown/WasHidden the responsibility of the content layer This makes it behave the same way as on Aura platforms, and allows a views::WebView to not worry about calling WasShown/Hidden on Mac. After this, WasShown no longer needs to be part of the public WebContents API. However, a lot of calls are still made in tests, so they will be transitioned to a test header in a follow-up. On Mac, WasShown was only called for WebContents in browser Tabs (i.e. when the TabStripController switched tabs). So this change could (in theory) affect extensions (e.g. BrowserAction popups), Platform Apps, and PrintPreview. However, since the windows containing these do not manipulate their view hierarchy, nothing about the behaviour should actually change. BUG=587030 Committed: https://crrev.com/65ff2ea7a5599fa69fed2f2bbae68470af0baf97 Cr-Commit-Position: refs/heads/master@{#378605}

Patch Set 1 : plus webview test #

Patch Set 2 : Ignore window visibility #

Patch Set 3 : fix gn, Handle background tabs #

Patch Set 4 : rebase (patch failure) #

Patch Set 5 : Likely fix for WebContentsModalDialogManagerViewsMacTest.TwoDialogsThenCloseTabs #

Patch Set 6 : rollback unnecessary test diffs #

Total comments: 12

Patch Set 7 : Respond to comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -48 lines) Patch
M chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm View 1 2 3 4 5 6 3 chunks +5 lines, -5 lines 1 comment Download
M chrome/chrome_tests_unit.gypi View 1 2 3 2 chunks +1 line, -4 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 1 chunk +0 lines, -1 line 2 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 2 chunks +9 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 2 chunks +24 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.h View 1 2 2 chunks +0 lines, -7 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 2 3 2 chunks +2 lines, -27 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.mm View 1 2 3 4 5 6 3 chunks +22 lines, -0 lines 0 comments Download
M ui/views/controls/webview/webview_unittest.cc View 1 2 3 4 5 6 7 chunks +24 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 25 (16 generated)
tapted
Hi Avi, please take a look
4 years, 10 months ago (2016-02-26 08:20:48 UTC) #11
Avi (use Gerrit)
Naming issues, but I'm liking it. https://codereview.chromium.org/1733173002/diff/200001/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm File chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (right): https://codereview.chromium.org/1733173002/diff/200001/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm#newcode682 chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm:682: // Remove the ...
4 years, 10 months ago (2016-02-26 17:50:23 UTC) #12
tapted
PTAL I've also explored the follow-up to remove WebShown/WasHidden from the public interface: https://codereview.chromium.org/1743143002/ And... ...
4 years, 9 months ago (2016-02-29 06:49:00 UTC) #15
Avi (use Gerrit)
lgtm 👍 https://codereview.chromium.org/1733173002/diff/220001/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm File chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm (right): https://codereview.chromium.org/1733173002/diff/220001/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm#newcode683 chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm:683: // old WebContents are removed before adding ...
4 years, 9 months ago (2016-02-29 17:27:24 UTC) #16
tapted
+Paweł for OWNERS in chrome/test/BUILD.gn (just removing a sources += 'file' which is now in ...
4 years, 9 months ago (2016-03-01 03:02:46 UTC) #18
Paweł Hajdan Jr.
LGTM
4 years, 9 months ago (2016-03-01 14:38:50 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1733173002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1733173002/220001
4 years, 9 months ago (2016-03-01 22:23:13 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:220001)
4 years, 9 months ago (2016-03-01 23:39:08 UTC) #23
commit-bot: I haz the power
4 years, 9 months ago (2016-03-01 23:40:55 UTC) #25
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/65ff2ea7a5599fa69fed2f2bbae68470af0baf97
Cr-Commit-Position: refs/heads/master@{#378605}

Powered by Google App Engine
This is Rietveld 408576698