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

Unified Diff: chrome/browser/omnibox_search_hint.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/omnibox_search_hint.h ('k') | chrome/browser/password_manager/password_store_default.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/omnibox_search_hint.cc
===================================================================
--- chrome/browser/omnibox_search_hint.cc (revision 91968)
+++ chrome/browser/omnibox_search_hint.cc (working copy)
@@ -23,12 +23,13 @@
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/browser/ui/omnibox/omnibox_view.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/browser/tab_contents/navigation_details.h"
+#include "content/common/content_notification_types.h"
#include "content/common/notification_details.h"
#include "content/common/notification_source.h"
-#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
@@ -149,7 +150,7 @@
OmniboxSearchHint::OmniboxSearchHint(TabContentsWrapper* tab) : tab_(tab) {
NavigationController* controller = &(tab->controller());
notification_registrar_.Add(this,
- NotificationType::NAV_ENTRY_COMMITTED,
+ content::NOTIFICATION_NAV_ENTRY_COMMITTED,
Source<NavigationController>(controller));
// Fill the search_engine_urls_ map, used for faster look-up (overkill?).
for (size_t i = 0;
@@ -159,17 +160,17 @@
// Listen for omnibox to figure-out when the user searches from the omnibox.
notification_registrar_.Add(this,
- NotificationType::OMNIBOX_OPENED_URL,
+ chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
Source<Profile>(tab->profile()));
}
OmniboxSearchHint::~OmniboxSearchHint() {
}
-void OmniboxSearchHint::Observe(NotificationType type,
+void OmniboxSearchHint::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- if (type == NotificationType::NAV_ENTRY_COMMITTED) {
+ if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationEntry* entry = tab_->controller().GetActiveEntry();
if (search_engine_urls_.find(entry->url().spec()) ==
search_engine_urls_.end()) {
@@ -185,7 +186,7 @@
const TemplateURLRef* const search_url = default_provider->url();
if (search_url->GetHost() == entry->url().host())
ShowInfoBar();
- } else if (type == NotificationType::OMNIBOX_OPENED_URL) {
+ } else if (type == chrome::NOTIFICATION_OMNIBOX_OPENED_URL) {
AutocompleteLog* log = Details<AutocompleteLog>(details).ptr();
AutocompleteMatch::Type type =
log->result.match_at(log->selected_index).type;
« no previous file with comments | « chrome/browser/omnibox_search_hint.h ('k') | chrome/browser/password_manager/password_store_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698