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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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: chrome/browser/automation/testing_automation_provider.cc
===================================================================
--- chrome/browser/automation/testing_automation_provider.cc (revision 91968)
+++ chrome/browser/automation/testing_automation_provider.cc (working copy)
@@ -87,6 +87,7 @@
#include "chrome/browser/ui/webui/ntp/shown_sections_handler.h"
#include "chrome/common/automation_messages.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
@@ -161,7 +162,7 @@
#endif
redirect_query_(0) {
BrowserList::AddObserver(this);
- registrar_.Add(this, NotificationType::SESSION_END,
+ registrar_.Add(this, chrome::NOTIFICATION_SESSION_END,
NotificationService::AllSources());
}
@@ -190,7 +191,7 @@
// last browser goes away.
if (BrowserList::empty() && !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kKeepAliveForTest)) {
- // If you change this, update Observer for NotificationType::SESSION_END
+ // If you change this, update Observer for chrome::SESSION_END
// below.
MessageLoop::current()->PostTask(FROM_HERE,
NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider));
@@ -231,10 +232,10 @@
import_settings_data_.first_run);
}
-void TestingAutomationProvider::Observe(NotificationType type,
+void TestingAutomationProvider::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::SESSION_END);
+ DCHECK(type == chrome::NOTIFICATION_SESSION_END);
// OnBrowserRemoved does a ReleaseLater. When session end is received we exit
// before the task runs resulting in this object not being deleted. This
// Release balance out the Release scheduled by OnBrowserRemoved.
@@ -3869,7 +3870,7 @@
tab_contents)->translate_tab_helper();
std::string language = helper->language_state().original_language();
if (!language.empty()) {
- observer->Observe(NotificationType::TAB_LANGUAGE_DETERMINED,
+ observer->Observe(chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED,
Source<TabContents>(tab_contents),
Details<std::string>(&language));
}
@@ -4381,7 +4382,7 @@
}
new AutofillDisplayedObserver(
- NotificationType::AUTOFILL_DID_SHOW_SUGGESTIONS,
+ chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS,
tab_contents->render_view_host(), this, reply_message);
SendWebKeyPressEventAsync(ui::VKEY_DOWN, tab_contents);
}
@@ -4414,7 +4415,7 @@
int key_code = (direction == "up") ? ui::VKEY_UP : ui::VKEY_DOWN;
new AutofillDisplayedObserver(
- NotificationType::AUTOFILL_DID_FILL_FORM_DATA,
+ chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
tab_contents->render_view_host(), this, reply_message);
SendWebKeyPressEventAsync(key_code, tab_contents);
}
@@ -4438,7 +4439,7 @@
}
new AutofillDisplayedObserver(
- NotificationType::AUTOFILL_DID_FILL_FORM_DATA,
+ chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA,
tab_contents->render_view_host(), this, reply_message);
SendWebKeyPressEventAsync(ui::VKEY_RETURN, tab_contents);
}
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/browser/background/background_application_list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698