|
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
Total comments: 1
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
|
Total messages: 14 (1 generated)
|