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

Unified Diff: chrome/browser/extensions/extension_webnavigation_api.h

Issue 3436002: Add the onBeforeNavigate and onErrorOccured events to the webNavigation API. (Closed)
Patch Set: updates Created 10 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_webnavigation_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_webnavigation_api.h
diff --git a/chrome/browser/extensions/extension_webnavigation_api.h b/chrome/browser/extensions/extension_webnavigation_api.h
index 77182e1590e6c72ca0f9dfd0e02059ef53f6f56e..95ba03220dd3c0f39f50b426574a10d887d32b2c 100644
--- a/chrome/browser/extensions/extension_webnavigation_api.h
+++ b/chrome/browser/extensions/extension_webnavigation_api.h
@@ -12,10 +12,13 @@
#include "base/singleton.h"
#include "chrome/browser/extensions/extension_function.h"
-#include "chrome/browser/tab_contents/navigation_controller.h"
+#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
+class NavigationController;
+class ProvisionalLoadDetails;
+
// Observes navigation notifications and routes them as events to the extension
// system.
class ExtensionWebNavigationEventRouter : public NotificationObserver {
@@ -36,11 +39,23 @@ class ExtensionWebNavigationEventRouter : public NotificationObserver {
const NotificationSource& source,
const NotificationDetails& details);
- // Handler for the NAV_ENTRY_COMMITTED event. The method takes the details of
- // such an event and constructs a suitable JSON formatted extension event
- // from it.
- void NavEntryCommitted(NavigationController* controller,
- NavigationController::LoadCommittedDetails* details);
+ // Handler for the FRAME_PROVISIONAL_LOAD_START event. The method takes the
+ // details of such an event and constructs a suitable JSON formatted extension
+ // event from it.
+ void FrameProvisionalLoadStart(NavigationController* controller,
+ ProvisionalLoadDetails* details);
+
+ // Handler for the FRAME_PROVISIONAL_LOAD_COMMITTED event. The method takes
+ // the details of such an event and constructs a suitable JSON formatted
+ // extension event from it.
+ void FrameProvisionalLoadCommitted(NavigationController* controller,
+ ProvisionalLoadDetails* details);
+
+ // Handler for the FAIL_PROVISIONAL_LOAD_WITH_ERROR event. The method takes
+ // the details of such an event and constructs a suitable JSON formatted
+ // extension event from it.
+ void FailProvisionalLoadWithError(NavigationController* controller,
+ ProvisionalLoadDetails* details);
// This method dispatches events to the extension message service.
void DispatchEvent(Profile* context,
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_webnavigation_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698