diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 23:39:15 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 23:39:15 +0000 |
commit | 766a7086b0ac46dd7a7bd676da47813e5a1790bf (patch) | |
tree | eedca5078840d057ba5a0738ca827b7379a22cf1 /chrome/browser/automation | |
parent | 74368115e55ca8ae0b0799fd2bedcd7e8688882d (diff) | |
download | chromium_src-766a7086b0ac46dd7a7bd676da47813e5a1790bf.zip chromium_src-766a7086b0ac46dd7a7bd676da47813e5a1790bf.tar.gz chromium_src-766a7086b0ac46dd7a7bd676da47813e5a1790bf.tar.bz2 |
Move DOMAutomationController code from chrome to content. This is needed by interstitial pages which are in content, and also browser tests in content.
In followup changes, I'll make interstitial pages not have to derive from a concrete class, and instead implement some sort of delegate interface like we did with WebUI.
BUG=98716
Review URL: https://chromiumcodereview.appspot.com/9310094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120441 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
3 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 352fa92..5f2dabd 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -41,7 +41,6 @@ #include "chrome/browser/browsing_data_remover.h" #include "chrome/browser/character_encoding.h" #include "chrome/browser/content_settings/host_content_settings_map.h" -#include "chrome/browser/dom_operation_notification_details.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_browser_event_router.h" #include "chrome/browser/extensions/extension_host.h" diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc index 0201144..ef8664b 100644 --- a/chrome/browser/automation/automation_provider_observers.cc +++ b/chrome/browser/automation/automation_provider_observers.cc @@ -29,7 +29,6 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" -#include "chrome/browser/dom_operation_notification_details.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_host.h" #include "chrome/browser/extensions/extension_process_manager.h" @@ -76,6 +75,7 @@ #include "chrome/common/content_settings_types.h" #include "chrome/common/extensions/extension.h" #include "content/browser/renderer_host/render_view_host.h" +#include "content/public/browser/dom_operation_notification_details.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/render_process_host.h" @@ -87,6 +87,7 @@ #include "ui/gfx/rect.h" using content::BrowserThread; +using content::DomOperationNotificationDetails; using content::DownloadItem; using content::DownloadManager; using content::NavigationController; @@ -1206,7 +1207,7 @@ void FindInPageNotificationObserver::Observe( const int FindInPageNotificationObserver::kFindInPageRequestId = -1; DomOperationObserver::DomOperationObserver() { - registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, + registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE, content::NotificationService::AllSources()); registrar_.Add(this, chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN, content::NotificationService::AllSources()); @@ -1219,9 +1220,9 @@ DomOperationObserver::~DomOperationObserver() {} void DomOperationObserver::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { - if (type == chrome::NOTIFICATION_DOM_OPERATION_RESPONSE) { + if (type == content::NOTIFICATION_DOM_OPERATION_RESPONSE) { content::Details<DomOperationNotificationDetails> dom_op_details(details); - OnDomOperationCompleted(dom_op_details->json()); + OnDomOperationCompleted(dom_op_details->json); } else if (type == chrome::NOTIFICATION_APP_MODAL_DIALOG_SHOWN) { OnModalDialogShown(); } else if (type == chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED) { diff --git a/chrome/browser/automation/automation_tab_helper_browsertest.cc b/chrome/browser/automation/automation_tab_helper_browsertest.cc index 388d4df..e320c12 100644 --- a/chrome/browser/automation/automation_tab_helper_browsertest.cc +++ b/chrome/browser/automation/automation_tab_helper_browsertest.cc @@ -69,14 +69,14 @@ class AutomationTabHelperBrowserTest : public InProcessBrowserTest { MockTabEventObserver* mock_tab_observer, MockNotificationObserver* mock_notification_observer) { mock_notification_observer->Register( - chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, + content::NOTIFICATION_DOM_OPERATION_RESPONSE, content::NotificationService::AllSources()); testing::InSequence expect_in_sequence; EXPECT_CALL(*mock_tab_observer, OnFirstPendingLoad(_)); EXPECT_CALL(*mock_notification_observer, Observe( testing::Eq( - static_cast<int>(chrome::NOTIFICATION_DOM_OPERATION_RESPONSE)), + static_cast<int>(content::NOTIFICATION_DOM_OPERATION_RESPONSE)), _, _)); EXPECT_CALL(*mock_tab_observer, OnNoMorePendingLoads(_)) .WillOnce(testing::InvokeWithoutArgs( @@ -185,7 +185,7 @@ IN_PROC_BROWSER_TEST_F(AutomationTabHelperBrowserTest, LoadStopComesAfterOnLoad) { MockNotificationObserver mock_notification_observer; mock_notification_observer.Register( - chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, + content::NOTIFICATION_DOM_OPERATION_RESPONSE, content::NotificationService::AllSources()); MockTabEventObserver mock_tab_observer(tab_helper()); @@ -194,7 +194,7 @@ IN_PROC_BROWSER_TEST_F(AutomationTabHelperBrowserTest, testing::InSequence expect_in_sequence; EXPECT_CALL(mock_notification_observer, Observe( testing::Eq( - static_cast<int>(chrome::NOTIFICATION_DOM_OPERATION_RESPONSE)), + static_cast<int>(content::NOTIFICATION_DOM_OPERATION_RESPONSE)), _, _)); EXPECT_CALL(mock_tab_observer, OnNoMorePendingLoads(_)); } |