| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/automation/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 } | 1795 } |
| 1796 | 1796 |
| 1797 void PasswordStoreLoginsChangedObserver::IndicateError( | 1797 void PasswordStoreLoginsChangedObserver::IndicateError( |
| 1798 const std::string& error) { | 1798 const std::string& error) { |
| 1799 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1799 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 1800 if (automation_) | 1800 if (automation_) |
| 1801 AutomationJSONReply(automation_, reply_message_.release()).SendError(error); | 1801 AutomationJSONReply(automation_, reply_message_.release()).SendError(error); |
| 1802 Release(); | 1802 Release(); |
| 1803 } | 1803 } |
| 1804 | 1804 |
| 1805 AutomationProviderBrowsingDataObserver::AutomationProviderBrowsingDataObserver( | |
| 1806 AutomationProvider* provider, | |
| 1807 IPC::Message* reply_message) | |
| 1808 : provider_(provider->AsWeakPtr()), | |
| 1809 reply_message_(reply_message) { | |
| 1810 } | |
| 1811 | |
| 1812 AutomationProviderBrowsingDataObserver:: | |
| 1813 ~AutomationProviderBrowsingDataObserver() {} | |
| 1814 | |
| 1815 void AutomationProviderBrowsingDataObserver::OnBrowsingDataRemoverDone() { | |
| 1816 if (provider_) | |
| 1817 AutomationJSONReply(provider_, reply_message_.release()).SendSuccess(NULL); | |
| 1818 delete this; | |
| 1819 } | |
| 1820 | |
| 1821 OmniboxAcceptNotificationObserver::OmniboxAcceptNotificationObserver( | 1805 OmniboxAcceptNotificationObserver::OmniboxAcceptNotificationObserver( |
| 1822 NavigationController* controller, | 1806 NavigationController* controller, |
| 1823 AutomationProvider* automation, | 1807 AutomationProvider* automation, |
| 1824 IPC::Message* reply_message) | 1808 IPC::Message* reply_message) |
| 1825 : automation_(automation->AsWeakPtr()), | 1809 : automation_(automation->AsWeakPtr()), |
| 1826 reply_message_(reply_message), | 1810 reply_message_(reply_message), |
| 1827 controller_(controller) { | 1811 controller_(controller) { |
| 1828 content::Source<NavigationController> source(controller_); | 1812 content::Source<NavigationController> source(controller_); |
| 1829 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, source); | 1813 registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, source); |
| 1830 // Pages requiring auth don't send LOAD_STOP. | 1814 // Pages requiring auth don't send LOAD_STOP. |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2995 if (automation_) { | 2979 if (automation_) { |
| 2996 AutomationJSONReply(automation_, reply_message_.release()) | 2980 AutomationJSONReply(automation_, reply_message_.release()) |
| 2997 .SendSuccess(NULL); | 2981 .SendSuccess(NULL); |
| 2998 } | 2982 } |
| 2999 delete this; | 2983 delete this; |
| 3000 } | 2984 } |
| 3001 } else { | 2985 } else { |
| 3002 NOTREACHED(); | 2986 NOTREACHED(); |
| 3003 } | 2987 } |
| 3004 } | 2988 } |
| OLD | NEW |