| 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;
|
|
|