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

Unified Diff: ios/web/public/web_state/web_state_observer.h

Issue 986743003: Upstream (most of) ios/web/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix namespace comment Created 5 years, 9 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: ios/web/public/web_state/web_state_observer.h
diff --git a/ios/web/public/web_state/web_state_observer.h b/ios/web/public/web_state/web_state_observer.h
index ac6f9d274771608fdc1258bb445ca7b0435ded83..443dcf1a93eb03b6d88e2fbd979bc8df8de9310f 100644
--- a/ios/web/public/web_state/web_state_observer.h
+++ b/ios/web/public/web_state/web_state_observer.h
@@ -5,6 +5,8 @@
#ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_
#define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_
+#include <string>
+
#include "base/macros.h"
namespace web {
@@ -19,6 +21,10 @@ enum class PageLoadCompletionStatus : bool { SUCCESS = 0, FAILURE = 1 };
// load events from WebState.
class WebStateObserver {
public:
+ // Key code associated to form events for which the key code is missing or
+ // irrelevant.
+ static int kInvalidFormKeyCode;
+
// Returns the web state associated with this observer.
WebState* web_state() const { return web_state_; }
@@ -32,12 +38,30 @@ class WebStateObserver {
// Called when the current page is loaded.
virtual void PageLoaded(PageLoadCompletionStatus load_completion_status) {}
+ // Called when the interstitial is dismissed by the user.
+ virtual void InsterstitialDismissed() {}
+
// Called on URL hash change events.
virtual void URLHashChanged() {}
// Called on history state change events.
virtual void HistoryStateChanged() {}
+ // Called on form submission. |user_interaction| is true if the user
+ // interacted with the page.
+ virtual void DocumentSubmitted(const std::string& form_name,
+ bool user_interaction) {}
+
+ // Called when the user is typing on a form field, with |error| indicating if
+ // there is any error when parsing the form field information.
+ // |key_code| may be kInvalidFormKeyCode if there is no key code.
+ virtual void FormActivityRegistered(const std::string& form_name,
+ const std::string& field_name,
+ const std::string& type,
+ const std::string& value,
+ int key_code,
+ bool error) {}
+
// Invoked when the WebState is being destroyed. Gives subclasses a chance
// to cleanup.
virtual void WebStateDestroyed() {}
« no previous file with comments | « ios/web/public/web_state/url_verification_constants.h ('k') | ios/web/public/web_state/web_state_observer_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698