| Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.h
|
| diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
|
| index 47a2915470d4df2f34b45667434d48565723c80e..c663e68fb58ebd86a4e56a06cd6ff47510787e3e 100644
|
| --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
|
| +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.h
|
| @@ -71,6 +71,9 @@ class WebNavigationTabObserver
|
| ui::PageTransition transition) override;
|
| void WebContentsDestroyed() override;
|
|
|
| + // This method dispatches the already created onBeforeNavigate event.
|
| + void DispatchCachedOnBeforeNavigate();
|
| +
|
| private:
|
| explicit WebNavigationTabObserver(content::WebContents* web_contents);
|
| friend class content::WebContentsUserData<WebNavigationTabObserver>;
|
| @@ -95,6 +98,11 @@ class WebNavigationTabObserver
|
| // Tracks the state of the frames we are sending events for.
|
| FrameNavigationState navigation_state_;
|
|
|
| + // The latest onBeforeNavigate event this frame has generated. It is stored
|
| + // as it might not be sent immediately, but delayed until the tab is added to
|
| + // the tab strip and is ready to dispatch events.
|
| + std::unique_ptr<Event> pending_on_before_navigate_event_;
|
| +
|
| // Used for tracking registrations to redirect notifications.
|
| content::NotificationRegistrar registrar_;
|
|
|
|
|