Index: chrome/browser/automation/automation_provider_observers.h |
=================================================================== |
--- chrome/browser/automation/automation_provider_observers.h (revision 152427) |
+++ chrome/browser/automation/automation_provider_observers.h (working copy) |
@@ -1487,112 +1487,6 @@ |
DISALLOW_COPY_AND_ASSIGN(AppLaunchObserver); |
}; |
-// Observes when Autofill information is displayed in the renderer. This can |
-// happen in two different ways: (1) a popup containing Autofill suggestions |
-// has been shown in the renderer; (2) a webpage form is filled or previewed |
-// with Autofill suggestions. A constructor argument specifies the appropriate |
-// notification to wait for. |
-class AutofillDisplayedObserver : public content::NotificationObserver { |
- public: |
- AutofillDisplayedObserver(int notification, |
- content::RenderViewHost* render_view_host, |
- AutomationProvider* automation, |
- IPC::Message* reply_message); |
- virtual ~AutofillDisplayedObserver(); |
- |
- // Overridden from content::NotificationObserver: |
- virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) OVERRIDE; |
- |
- private: |
- int notification_; |
- content::RenderViewHost* render_view_host_; |
- base::WeakPtr<AutomationProvider> automation_; |
- scoped_ptr<IPC::Message> reply_message_; |
- content::NotificationRegistrar registrar_; |
- |
- DISALLOW_COPY_AND_ASSIGN(AutofillDisplayedObserver); |
-}; |
- |
-// Observes when a specified number of autofill profiles and credit cards have |
-// been changed in the WebDataService. The notifications are sent on the DB |
-// thread, the thread that interacts with the database. |
-class AutofillChangedObserver |
- : public base::RefCountedThreadSafe< |
- AutofillChangedObserver, |
- content::BrowserThread::DeleteOnUIThread>, |
- public content::NotificationObserver { |
- public: |
- AutofillChangedObserver(AutomationProvider* automation, |
- IPC::Message* reply_message, |
- int num_profiles, |
- int num_credit_cards); |
- |
- // Schedules a task on the DB thread to register the appropriate observers. |
- virtual void Init(); |
- |
- // Overridden from content::NotificationObserver: |
- virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) OVERRIDE; |
- |
- private: |
- friend struct content::BrowserThread::DeleteOnThread< |
- content::BrowserThread::UI>; |
- ~AutofillChangedObserver(); |
- friend class base::DeleteHelper<AutofillChangedObserver>; |
- |
- // Registers the appropriate observers. Called on the DB thread. |
- void RegisterObserversTask(); |
- |
- // Sends the |reply_message_| to |automation_| indicating we're done. Called |
- // on the UI thread. |
- void IndicateDone(); |
- |
- base::WeakPtr<AutomationProvider> automation_; |
- scoped_ptr<IPC::Message> reply_message_; |
- scoped_ptr<content::NotificationRegistrar> registrar_; |
- int num_profiles_; |
- int num_credit_cards_; |
- |
- // Used to ensure that the UI thread waits for the DB thread to finish |
- // registering observers before proceeding. |
- base::WaitableEvent done_event_; |
- |
- DISALLOW_COPY_AND_ASSIGN(AutofillChangedObserver); |
-}; |
- |
-// Observes when an Autofill form submitted via a webpage has been processed. |
-// This observer also takes care of accepting any infobars that appear as a |
-// result of submitting the webpage form (submitting credit card information |
-// causes a confirm infobar to appear). |
-class AutofillFormSubmittedObserver |
- : public PersonalDataManagerObserver, |
- public content::NotificationObserver { |
- public: |
- AutofillFormSubmittedObserver(AutomationProvider* automation, |
- IPC::Message* reply_message, |
- PersonalDataManager* pdm); |
- virtual ~AutofillFormSubmittedObserver(); |
- |
- // PersonalDataManagerObserver interface. |
- virtual void OnPersonalDataChanged() OVERRIDE; |
- virtual void OnInsufficientFormData() OVERRIDE; |
- |
- // Overridden from content::NotificationObserver: |
- virtual void Observe(int type, |
- const content::NotificationSource& source, |
- const content::NotificationDetails& details) OVERRIDE; |
- |
- private: |
- content::NotificationRegistrar registrar_; |
- base::WeakPtr<AutomationProvider> automation_; |
- scoped_ptr<IPC::Message> reply_message_; |
- PersonalDataManager* pdm_; |
- InfoBarTabHelper* infobar_helper_; |
-}; |
- |
// Allows the automation provider to wait until all the notification |
// processes are ready. |
class GetAllNotificationsObserver : public content::NotificationObserver { |