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

Issue 17382005: Unbreak tabs.onRemove extension API in face of fast tab closure

Created:
7 years, 6 months ago by jeremy
Modified:
6 years, 2 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, extensions-reviews_chromium.org, tonyg
Visibility:
Public.

Description

Unbreak tabs.onRemove extension API in face of fast tab closure Fast tab closure changes the way tabs are closed: * Run onbeforeunload event handler * Web contents are first detached from containing view. * Unload handler is run independently of GUI and tab is closed asynchronously. This means that a state exists where a tab is detached as an initial step to closing it. The problem is that the extension API was sending a tabs.onDetached event for this scenario rather than tabs.onRemoved. Fix this by: * Making CoreTabHealper aware of the fact it's being detached as part of an unload via OnUnloadAboutToDetach() and GetWebContentsDetachedToClose(). * Teach the extension system's BrowserEventRouter about this state and have it dispatch the right event. BUG=248998 TEST=ExtensionApiTest.TabOnRemoved

Patch Set 1 #

Total comments: 1

Patch Set 2 : Don't modify content #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -64 lines) Patch
M chrome/browser/automation/automation_provider_observers.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/automation/automation_provider_observers.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/browser_event_router.h View 1 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/extensions/browser_event_router.cc View 1 3 chunks +54 lines, -34 lines 0 comments Download
M chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser_command_controller.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_command_controller.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.mm View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/browser_window_gtk.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_strip_gtk.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.h View 1 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_contents/core_tab_helper.cc View 1 3 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model_observer.h View 1 1 chunk +3 lines, -1 line 1 comment Download
M chrome/browser/ui/tabs/tab_strip_model_observer.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/tabs/tab_strip_model_unittest.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/unload_controller.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/unload_controller.cc View 1 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/ash/tab_scrubber_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/unload_browsertest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 14 (1 generated)
jeremy
slamm/avi: main reviewers. joi: content/public/browser/ asargent: browser/extensions Sending this out for early review to make ...
7 years, 6 months ago (2013-06-18 14:52:11 UTC) #1
Avi (use Gerrit)
I'm just now catching the whole "detach" thing; sorry to be springing it on you ...
7 years, 6 months ago (2013-06-18 15:04:13 UTC) #2
asargent_no_longer_on_chrome
I'm at a 2-day hackathon and will be slow to respond to codereviews. If you ...
7 years, 6 months ago (2013-06-18 16:16:53 UTC) #3
jam
On 2013/06/18 15:04:13, Avi wrote: > I'm just now catching the whole "detach" thing; sorry ...
7 years, 6 months ago (2013-06-18 16:20:59 UTC) #4
jam
On 2013/06/18 16:20:59, jam wrote: > On 2013/06/18 15:04:13, Avi wrote: > > I'm just ...
7 years, 6 months ago (2013-06-18 16:22:12 UTC) #5
jam
I've landed https://codereview.chromium.org/17151010 which moves this unload timing stuff to chrome. feel free to follow ...
7 years, 6 months ago (2013-06-19 00:07:46 UTC) #6
jeremy
Most of this change is adding a close_all boolean to the TaDetach() function. Avi/sky: does ...
7 years, 6 months ago (2013-06-19 10:29:34 UTC) #7
Avi (use Gerrit)
Whoa. This isn't what I remember us talking about. What I remember agreeing to is ...
7 years, 6 months ago (2013-06-19 14:18:33 UTC) #8
jeremy
Yes, sorry for not mentioning that - What we discussed was for tab_strip_model to send ...
7 years, 6 months ago (2013-06-19 15:34:18 UTC) #9
Avi (use Gerrit)
The questions that I ask then about this CL still remain. And if it's this ...
7 years, 6 months ago (2013-06-19 16:13:37 UTC) #10
sky
We're close to a branch point. Your patch has broken extensions. It has also broken ...
7 years, 6 months ago (2013-06-19 17:12:12 UTC) #11
jeremy
Totally agree, revert seems like the right thing to do here - I'll do it ...
7 years, 6 months ago (2013-06-19 17:48:36 UTC) #12
Avi (use Gerrit)
7 years, 6 months ago (2013-06-19 18:23:56 UTC) #13
On 2013/06/19 17:48:36, jeremy wrote:
> Totally agree, revert seems like the right thing to do here - I'll do it
> when I'm back in the office tomorrow morning unless someone beats me to it.

Looks like the tree will be broken all of today, so no one _can_ revert your
change even if they wanted to.

You'll have to do it once things green up.

Powered by Google App Engine
This is Rietveld 408576698