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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h

Issue 1670673003: Refactor the implementation of the webNavigation extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Bug-532666-NavigationHandleAPI
Patch Set: Remove UI thread DCHECKs. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
index 2250b8034c16c5e4d884ee2a6f2b35ce33e4206d..db2832c17f69e42cb3db5f3ef51df3a236873092 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.h
@@ -12,6 +12,7 @@
namespace content {
class BrowserContext;
+class NavigationHandle;
class RenderFrameHost;
class WebContents;
}
@@ -28,16 +29,11 @@ namespace web_navigation_api_helpers {
int GetFrameId(content::RenderFrameHost* frame_host);
// Create and dispatch the various events of the webNavigation API.
-void DispatchOnBeforeNavigate(content::WebContents* web_contents,
- content::RenderFrameHost* frame_host,
- const GURL& validated_url);
+void DispatchOnBeforeNavigate(content::NavigationHandle* navigation_handle);
void DispatchOnCommitted(events::HistogramValue histogram_value,
const std::string& event_name,
- content::WebContents* web_contents,
- content::RenderFrameHost* frame_host,
- const GURL& url,
- ui::PageTransition transition_type);
+ content::NavigationHandle* navigation_handle);
void DispatchOnDOMContentLoaded(content::WebContents* web_contents,
content::RenderFrameHost* frame_host,
@@ -58,6 +54,7 @@ void DispatchOnErrorOccurred(content::WebContents* web_contents,
content::RenderFrameHost* frame_host,
const GURL& url,
int error_code);
+void DispatchOnErrorOccurred(content::NavigationHandle* navigation_handle);
void DispatchOnTabReplaced(
content::WebContents* old_web_contents,

Powered by Google App Engine
This is Rietveld 408576698