summaryrefslogtreecommitdiffstats
path: root/chrome/views/focus_manager.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-01 18:16:56 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-01 18:16:56 +0000
commitbfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch)
tree70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/views/focus_manager.cc
parenta814d863440f0a154a7299f2d8b440f405c7700e (diff)
downloadchromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip
chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz
chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2
Remove most header file dependencies on the notification type list. It is
really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/focus_manager.cc')
-rw-r--r--chrome/views/focus_manager.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/views/focus_manager.cc b/chrome/views/focus_manager.cc
index 01eab17..6f73045 100644
--- a/chrome/views/focus_manager.cc
+++ b/chrome/views/focus_manager.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/win_util.h"
#include "chrome/browser/renderer_host/render_widget_host_view_win.h"
-#include "chrome/common/notification_types.h"
+#include "chrome/common/notification_service.h"
#include "chrome/views/accelerator.h"
#include "chrome/views/focus_manager.h"
#include "chrome/views/root_view.h"
@@ -212,7 +212,9 @@ FocusManager* FocusManager::CreateFocusManager(HWND window,
// We register for view removed notifications so we can make sure we don't
// keep references to invalidated views.
NotificationService::current()->AddObserver(
- focus_manager, NOTIFY_VIEW_REMOVED, NotificationService::AllSources());
+ focus_manager,
+ NotificationType::VIEW_REMOVED,
+ NotificationService::AllSources());
return focus_manager;
}
@@ -313,7 +315,9 @@ bool FocusManager::OnNCDestroy(HWND window) {
DCHECK(GetProp(window, kFocusManagerKey));
// Unregister notifications.
NotificationService::current()->RemoveObserver(
- this, NOTIFY_VIEW_REMOVED, NotificationService::AllSources());
+ this,
+ NotificationType::VIEW_REMOVED,
+ NotificationService::AllSources());
// Make sure this is called on the window that was set with the
// FocusManager.
@@ -792,7 +796,7 @@ AcceleratorTarget* FocusManager::GetTargetForAccelerator(
void FocusManager::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NOTIFY_VIEW_REMOVED);
+ DCHECK(type == NotificationType::VIEW_REMOVED);
if (focused_view_ && Source<View>(focused_view_) == source)
focused_view_ = NULL;
}