summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs
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/browser/views/tabs
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/browser/views/tabs')
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.cc17
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.h2
2 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.cc b/chrome/browser/views/tabs/dragged_tab_controller.cc
index 4d35ad8..7464b92 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/views/tabs/dragged_tab_controller.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/views/tabs/tab_strip.h"
#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/animation.h"
+#include "chrome/common/notification_service.h"
#include "chrome/views/event.h"
#include "chrome/views/root_view.h"
#include "skia/include/SkBitmap.h"
@@ -488,7 +489,7 @@ void DraggedTabController::UpdateTargetURL(TabContents* source,
void DraggedTabController::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NOTIFY_TAB_CONTENTS_DESTROYED);
+ DCHECK(type == NotificationType::TAB_CONTENTS_DESTROYED);
DCHECK(Source<TabContents>(source).ptr() == dragged_contents_);
EndDragImpl(TAB_DESTROYED);
}
@@ -561,18 +562,20 @@ void DraggedTabController::UpdateDockInfo(const gfx::Point& screen_point) {
void DraggedTabController::ChangeDraggedContents(TabContents* new_contents) {
if (dragged_contents_) {
- NotificationService::current()->RemoveObserver(this,
- NOTIFY_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(dragged_contents_));
+ NotificationService::current()->RemoveObserver(
+ this,
+ NotificationType::TAB_CONTENTS_DESTROYED,
+ Source<TabContents>(dragged_contents_));
if (original_delegate_)
dragged_contents_->set_delegate(original_delegate_);
}
original_delegate_ = NULL;
dragged_contents_ = new_contents;
if (dragged_contents_) {
- NotificationService::current()->AddObserver(this,
- NOTIFY_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(dragged_contents_));
+ NotificationService::current()->AddObserver(
+ this,
+ NotificationType::TAB_CONTENTS_DESTROYED,
+ Source<TabContents>(dragged_contents_));
// We need to be the delegate so we receive messages about stuff,
// otherwise our dragged_contents() may be replaced and subsequently
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.h b/chrome/browser/views/tabs/dragged_tab_controller.h
index 5c9730a..b03b0cb 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.h
+++ b/chrome/browser/views/tabs/dragged_tab_controller.h
@@ -12,7 +12,7 @@
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/views/tabs/tab_renderer.h"
-#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_observer.h"
namespace views {
class MouseEvent;