summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
commit43211582b1fa8c69136385250e7b0446cf364b5c (patch)
tree655ab01543012b6fd5699dee8fab92876959b7d9 /chrome/browser/ui/views/frame
parentd43970a7ceee5fc5433787b0f28b64234a4039f2 (diff)
downloadchromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.zip
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.gz
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.bz2
Moving notification types which are chrome specific to a new header file chrome_notification_types.h.
This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/frame')
-rw-r--r--chrome/browser/ui/views/frame/browser_root_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc11
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h2
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc9
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.h2
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc9
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.h2
7 files changed, 21 insertions, 18 deletions
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 51c606a..49d2fbe 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -19,8 +19,8 @@
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/l10n/l10n_util.h"
#if defined(TOUCH_UI)
+#include "content/common/content_notification_types.h"
#include "content/common/notification_service.h"
-#include "content/common/notification_type.h"
#include "views/ime/input_method.h"
#endif
@@ -48,7 +48,7 @@ ui::TouchStatus BrowserRootView::OnTouchEvent(const views::TouchEvent& event) {
ui::TextInputType text_input_type = input_method->GetTextInputType();
if (text_input_type != ui::TEXT_INPUT_TYPE_NONE) {
NotificationService::current()->Notify(
- NotificationType::EDITABLE_ELEMENT_TOUCHED,
+ chrome::EDITABLE_ELEMENT_TOUCHED,
Source<View>(this),
Details<ui::TextInputType>(&text_input_type));
}
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 556af60..7cb5cfb 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -69,6 +69,7 @@
#include "chrome/browser/ui/webui/bug_report_ui.h"
#include "chrome/browser/ui/webui/task_manager_dialog.h"
#include "chrome/browser/ui/window_sizer.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/native_window_notification_source.h"
@@ -337,7 +338,7 @@ BrowserView::BrowserView(Browser* browser)
browser_->tabstrip_model()->AddObserver(this);
registrar_.Add(this,
- NotificationType::SIDEBAR_CHANGED,
+ chrome::NOTIFICATION_SIDEBAR_CHANGED,
Source<SidebarManager>(SidebarManager::GetInstance()));
}
@@ -1394,11 +1395,11 @@ ToolbarView* BrowserView::GetToolbarView() const {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, NotificationObserver implementation:
-void BrowserView::Observe(NotificationType type,
+void BrowserView::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::SIDEBAR_CHANGED:
+ switch (type) {
+ case chrome::NOTIFICATION_SIDEBAR_CHANGED:
if (Details<SidebarContainer>(details)->tab_contents() ==
browser_->GetSelectedTabContents()) {
UpdateSidebar();
@@ -1729,7 +1730,7 @@ bool BrowserView::CanClose() {
// Empty TabStripModel, it's now safe to allow the Window to be closed.
NotificationService::current()->Notify(
- NotificationType::WINDOW_CLOSED,
+ chrome::NOTIFICATION_WINDOW_CLOSED,
Source<gfx::NativeWindow>(frame_->GetNativeWindow()),
NotificationService::NoDetails());
return true;
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index 361a79f..9da0d76 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -349,7 +349,7 @@ class BrowserView : public BrowserBubbleHost,
virtual ToolbarView* GetToolbarView() const OVERRIDE;
// Overridden from NotificationObserver:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index adbc5b8..b43bebb 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/views/tabs/side_tab_strip.h"
#include "chrome/browser/ui/views/tabs/tab.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "content/common/notification_service.h"
@@ -90,7 +91,7 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame,
AddChildView(avatar_button_.get());
UpdateAvatarInfo();
if (!browser_view_->IsOffTheRecord()) {
- registrar_.Add(this, NotificationType::PROFILE_CACHED_INFO_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
NotificationService::AllSources());
}
}
@@ -513,11 +514,11 @@ void GlassBrowserFrameView::DisplayNextThrobberFrame() {
reinterpret_cast<LPARAM>(throbber_icons_[throbber_frame_]));
}
-void GlassBrowserFrameView::Observe(NotificationType type,
+void GlassBrowserFrameView::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::PROFILE_CACHED_INFO_CHANGED:
+ switch (type) {
+ case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
UpdateAvatarInfo();
LayoutAvatar();
break;
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.h b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
index 79a083e..ea6aba4 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.h
@@ -82,7 +82,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
void DisplayNextThrobberFrame();
// NotificationObserver implementation:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 37f84c4..1920b04 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/browser/ui/views/toolbar_view.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/tab_contents.h"
@@ -206,7 +207,7 @@ OpaqueBrowserFrameView::OpaqueBrowserFrameView(BrowserFrame* frame,
AddChildView(avatar_button_.get());
UpdateAvatarInfo();
if (!browser_view_->IsOffTheRecord()) {
- registrar_.Add(this, NotificationType::PROFILE_CACHED_INFO_CHANGED,
+ registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
NotificationService::AllSources());
}
}
@@ -507,11 +508,11 @@ SkBitmap OpaqueBrowserFrameView::GetFaviconForTabIconView() {
///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, protected:
-void OpaqueBrowserFrameView::Observe(NotificationType type,
+void OpaqueBrowserFrameView::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::PROFILE_CACHED_INFO_CHANGED:
+ switch (type) {
+ case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED:
UpdateAvatarInfo();
LayoutAvatar();
break;
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
index c73573d..bcf4e79 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
@@ -101,7 +101,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
protected:
// NotificationObserver implementation:
- virtual void Observe(NotificationType type,
+ virtual void Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) OVERRIDE;