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

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

Issue 2545133002: PlzNavigate: Fix ordering of onBeforeNavigate and onCreatedNavigationTarget. (Closed)
Patch Set: Another round of review fixes. Created 4 years 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 db2832c17f69e42cb3db5f3ef51df3a236873092..5a447c9285af1e4e9daea8a5951dc7b2d8e27f5a 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
@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPERS_H_
#define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPERS_H_
+#include <memory>
#include <string>
#include "extensions/browser/extension_event_histogram_value.h"
@@ -21,6 +22,8 @@ class GURL;
namespace extensions {
+struct Event;
+
namespace web_navigation_api_helpers {
// Returns the frame ID as it will be passed to the extension:
@@ -29,7 +32,8 @@ namespace web_navigation_api_helpers {
int GetFrameId(content::RenderFrameHost* frame_host);
// Create and dispatch the various events of the webNavigation API.
-void DispatchOnBeforeNavigate(content::NavigationHandle* navigation_handle);
+std::unique_ptr<Event> CreateOnBeforeNavigateEvent(
+ content::NavigationHandle* navigation_handle);
void DispatchOnCommitted(events::HistogramValue histogram_value,
const std::string& event_name,

Powered by Google App Engine
This is Rietveld 408576698