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

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

Issue 10834125: When committing a provisional load that didn't change the RVH, still abort pending navigations. (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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE; 94 virtual void WebContentsDestroyed(content::WebContents* tab) OVERRIDE;
95 95
96 private: 96 private:
97 // True if the transition and target url correspond to a reference fragment 97 // True if the transition and target url correspond to a reference fragment
98 // navigation. 98 // navigation.
99 bool IsReferenceFragmentNavigation(FrameNavigationState::FrameID frame_id, 99 bool IsReferenceFragmentNavigation(FrameNavigationState::FrameID frame_id,
100 const GURL& url); 100 const GURL& url);
101 101
102 // Creates and sends onErrorOccurred events for all on-going navigations. If 102 // Creates and sends onErrorOccurred events for all on-going navigations. If
103 // |render_view_host| is non-NULL, only generates events for frames in this 103 // |render_view_host| is non-NULL, only generates events for frames in this
104 // render view host. 104 // render view host. If |id_to_skip| is given, no events are sent for that
105 // frame.
105 void SendErrorEvents(content::WebContents* web_contents, 106 void SendErrorEvents(content::WebContents* web_contents,
106 content::RenderViewHost* render_view_host); 107 content::RenderViewHost* render_view_host,
108 FrameNavigationState::FrameID id_to_skip);
107 109
108 // Tracks the state of the frames we are sending events for. 110 // Tracks the state of the frames we are sending events for.
109 FrameNavigationState navigation_state_; 111 FrameNavigationState navigation_state_;
110 112
111 // Used for tracking registrations to redirect notifications. 113 // Used for tracking registrations to redirect notifications.
112 content::NotificationRegistrar registrar_; 114 content::NotificationRegistrar registrar_;
113 115
114 content::RenderViewHost* render_view_host_; 116 content::RenderViewHost* render_view_host_;
115 content::RenderViewHost* pending_render_view_host_; 117 content::RenderViewHost* pending_render_view_host_;
116 118
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // API function that returns the states of all frames in a given tab. 201 // API function that returns the states of all frames in a given tab.
200 class GetAllFramesFunction : public SyncExtensionFunction { 202 class GetAllFramesFunction : public SyncExtensionFunction {
201 virtual ~GetAllFramesFunction() {} 203 virtual ~GetAllFramesFunction() {}
202 virtual bool RunImpl() OVERRIDE; 204 virtual bool RunImpl() OVERRIDE;
203 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames") 205 DECLARE_EXTENSION_FUNCTION_NAME("webNavigation.getAllFrames")
204 }; 206 };
205 207
206 } // namespace extensions 208 } // namespace extensions
207 209
208 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_ 210 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698