summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 15:18:34 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 15:18:34 +0000
commit24abaefe28cbdf9a6dd21d84f1ad5f92ec11357c (patch)
tree91828998ed627dda2b59097d4c3aa98001faaeef
parente2ffa6665856e442dfd39e5ba249a42022ee73e5 (diff)
downloadchromium_src-24abaefe28cbdf9a6dd21d84f1ad5f92ec11357c.zip
chromium_src-24abaefe28cbdf9a6dd21d84f1ad5f92ec11357c.tar.gz
chromium_src-24abaefe28cbdf9a6dd21d84f1ad5f92ec11357c.tar.bz2
touch: Fix compile.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6933008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84061 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/touch/frame/touch_browser_frame_view.cc2
-rw-r--r--chrome/browser/ui/touch/frame/touch_browser_frame_view.h3
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc21
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.h11
4 files changed, 21 insertions, 16 deletions
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
index c1aa2d9..55140ed 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
@@ -249,6 +249,8 @@ void TouchBrowserFrameView::Observe(NotificationType type,
} else if (type == NotificationType::TAB_CONTENTS_DESTROYED) {
GetFocusedStateAccessor()->DeleteProperty(
Source<TabContents>(source).ptr()->property_bag());
+ } else if (type == NotificationType::PREF_CHANGED) {
+ OpaqueBrowserFrameView::Observe(type, source, details);
}
}
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
index 7fa8813..d6b9f38 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.h
@@ -26,8 +26,7 @@ class SlideAnimation;
class TouchBrowserFrameView : public OpaqueBrowserFrameView,
public views::FocusChangeListener,
public TabStripModelObserver,
- public ui::AnimationDelegate,
- public NotificationObserver {
+ public ui::AnimationDelegate {
public:
enum VirtualKeyboardType {
NONE,
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 56241de..fa2d28c 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -527,6 +527,18 @@ SkBitmap OpaqueBrowserFrameView::GetFaviconForTabIconView() {
}
///////////////////////////////////////////////////////////////////////////////
+// OpaqueBrowserFrameView, protected:
+
+void OpaqueBrowserFrameView::Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ DCHECK_EQ(NotificationType::PREF_CHANGED, type.value);
+ std::string* name = Details<std::string>(details).ptr();
+ if (prefs::kGoogleServicesUsername == *name)
+ LayoutProfileTag();
+}
+
+///////////////////////////////////////////////////////////////////////////////
// OpaqueBrowserFrameView, private:
int OpaqueBrowserFrameView::FrameBorderThickness(bool restored) const {
@@ -1195,15 +1207,6 @@ gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
top_height - border_thickness));
}
-void OpaqueBrowserFrameView::Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- DCHECK_EQ(NotificationType::PREF_CHANGED, type.value);
- std::string* name = Details<std::string>(details).ptr();
- if (prefs::kGoogleServicesUsername == *name)
- LayoutProfileTag();
-}
-
void OpaqueBrowserFrameView::RegisterLoginNotifications() {
PrefService* pref_service = browser_view_->browser()->profile()->GetPrefs();
DCHECK(pref_service);
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 088040e3..9cc00e3 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.h
@@ -107,6 +107,12 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
virtual bool ShouldTabIconViewAnimate() const OVERRIDE;
virtual SkBitmap GetFaviconForTabIconView() OVERRIDE;
+ protected:
+ // NotificationObserver implementation:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
private:
// Returns the thickness of the border that makes up the window frame edges.
// This does not include any client edge. If |restored| is true, acts as if
@@ -157,11 +163,6 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
// Returns the bounds of the client area for the specified view size.
gfx::Rect CalculateClientAreaBounds(int width, int height) const;
- // NotificationObserver implementation:
- virtual void Observe(NotificationType type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
-
// Receive notifications when the user's Google services user name changes.
void RegisterLoginNotifications();