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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.h

Issue 10823169: Another attempt at fixing dead frames being tracked by webNavigation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Defines the Chrome Extensions WebNavigation API functions for observing and 5 // Defines the Chrome Extensions WebNavigation API functions for observing and
6 // intercepting navigation events, as specified in the extension JSON API. 6 // intercepting navigation events, as specified in the extension JSON API.
7 7
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_
9 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ 9 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void SendErrorEvents(content::WebContents* web_contents, 106 void SendErrorEvents(content::WebContents* web_contents,
107 content::RenderViewHost* render_view_host, 107 content::RenderViewHost* render_view_host,
108 FrameNavigationState::FrameID id_to_skip); 108 FrameNavigationState::FrameID id_to_skip);
109 109
110 // Tracks the state of the frames we are sending events for. 110 // Tracks the state of the frames we are sending events for.
111 FrameNavigationState navigation_state_; 111 FrameNavigationState navigation_state_;
112 112
113 // Used for tracking registrations to redirect notifications. 113 // Used for tracking registrations to redirect notifications.
114 content::NotificationRegistrar registrar_; 114 content::NotificationRegistrar registrar_;
115 115
116 // The current RenderViewHost of the observed WebContents.
116 content::RenderViewHost* render_view_host_; 117 content::RenderViewHost* render_view_host_;
118
119 // During a cross site navigation, the WebContents has a second, pending
120 // RenderViewHost.
117 content::RenderViewHost* pending_render_view_host_; 121 content::RenderViewHost* pending_render_view_host_;
118 122
119 DISALLOW_COPY_AND_ASSIGN(WebNavigationTabObserver); 123 DISALLOW_COPY_AND_ASSIGN(WebNavigationTabObserver);
120 }; 124 };
121 125
122 // Observes navigation notifications and routes them as events to the extension 126 // Observes navigation notifications and routes them as events to the extension
123 // system. 127 // system.
124 class WebNavigationEventRouter : public TabStripModelObserver, 128 class WebNavigationEventRouter : public TabStripModelObserver,
125 public chrome::BrowserListObserver, 129 public chrome::BrowserListObserver,
126 public content::NotificationObserver { 130 public content::NotificationObserver {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // API function that returns the states of all frames in a given tab. 205 // API function that returns the states of all frames in a given tab.
202 class GetAllFramesFunction : public SyncExtensionFunction { 206 class GetAllFramesFunction : public SyncExtensionFunction {
203 virtual ~GetAllFramesFunction() {} 207 virtual ~GetAllFramesFunction() {}
204 virtual bool RunImpl() OVERRIDE; 208 virtual bool RunImpl() OVERRIDE;
205 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames") 209 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames")
206 }; 210 };
207 211
208 } // namespace extensions 212 } // namespace extensions
209 213
210 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ 214 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698