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

Unified Diff: chrome/browser/autocomplete/keyword_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
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.h ('k') | chrome/browser/autocomplete/shortcuts_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider.cc (revision 91968)
+++ chrome/browser/autocomplete/keyword_provider.cc (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
@@ -63,12 +64,13 @@
// Extension suggestions always come from the original profile, since that's
// where extensions run. We use the input ID to distinguish whether the
// suggestions are meant for us.
- registrar_.Add(this, NotificationType::EXTENSION_OMNIBOX_SUGGESTIONS_READY,
- Source<Profile>(profile->GetOriginalProfile()));
registrar_.Add(this,
- NotificationType::EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
+ chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY,
Source<Profile>(profile->GetOriginalProfile()));
- registrar_.Add(this, NotificationType::EXTENSION_OMNIBOX_INPUT_ENTERED,
+ registrar_.Add(
+ this, chrome::NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED,
+ Source<Profile>(profile->GetOriginalProfile()));
+ registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED,
Source<Profile>(profile));
}
@@ -451,15 +453,15 @@
return result;
}
-void KeywordProvider::Observe(NotificationType type,
+void KeywordProvider::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
TemplateURLService* model =
profile_ ? TemplateURLServiceFactory::GetForProfile(profile_) : model_;
const AutocompleteInput& input = extension_suggest_last_input_;
- switch (type.value) {
- case NotificationType::EXTENSION_OMNIBOX_INPUT_ENTERED:
+ switch (type) {
+ case chrome::NOTIFICATION_EXTENSION_OMNIBOX_INPUT_ENTERED:
// Input has been accepted, so we're done with this input session. Ensure
// we don't send the OnInputCancelled event, or handle any more stray
// suggestions_ready events.
@@ -467,7 +469,7 @@
current_input_id_ = 0;
return;
- case NotificationType::EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED: {
+ case chrome::NOTIFICATION_EXTENSION_OMNIBOX_DEFAULT_SUGGESTION_CHANGED: {
// It's possible to change the default suggestion while not in an editing
// session.
string16 keyword, remaining_input;
@@ -484,7 +486,7 @@
return;
}
- case NotificationType::EXTENSION_OMNIBOX_SUGGESTIONS_READY: {
+ case chrome::NOTIFICATION_EXTENSION_OMNIBOX_SUGGESTIONS_READY: {
const ExtensionOmniboxSuggestions& suggestions =
*Details<ExtensionOmniboxSuggestions>(details).ptr();
if (suggestions.request_id != current_input_id_)
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.h ('k') | chrome/browser/autocomplete/shortcuts_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698