diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 22:34:18 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-18 22:34:18 +0000 |
commit | da521c53953217de6d2f5963180435e52787badc (patch) | |
tree | 2beb54956c9cc8a66d48c3b2cd06ab61443ba731 /views/bubble | |
parent | 94c6eda7a6b36ae1e4f1050f69c23c960e67d923 (diff) | |
download | chromium_src-da521c53953217de6d2f5963180435e52787badc.zip chromium_src-da521c53953217de6d2f5963180435e52787badc.tar.gz chromium_src-da521c53953217de6d2f5963180435e52787badc.tar.bz2 |
Fix Chrome OS Clang build.
Review URL: http://codereview.chromium.org/8344020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/bubble')
-rw-r--r-- | views/bubble/bubble_delegate.cc | 14 | ||||
-rw-r--r-- | views/bubble/bubble_delegate.h | 10 | ||||
-rw-r--r-- | views/bubble/bubble_view.cc | 8 | ||||
-rw-r--r-- | views/bubble/bubble_view.h | 4 |
4 files changed, 28 insertions, 8 deletions
diff --git a/views/bubble/bubble_delegate.cc b/views/bubble/bubble_delegate.cc index 1ba39f1..e777e58 100644 --- a/views/bubble/bubble_delegate.cc +++ b/views/bubble/bubble_delegate.cc @@ -28,6 +28,10 @@ Widget* BubbleDelegateView::CreateBubble(BubbleDelegateView* bubble_delegate, return bubble_widget; } +View* BubbleDelegateView::GetContentsView() { + return this; +} + ClientView* BubbleDelegateView::CreateClientView(Widget* widget) { return new BubbleView(widget, GetContentsView()); } @@ -42,6 +46,16 @@ gfx::Point BubbleDelegateView::GetAnchorPoint() const { return gfx::Point(); } +BubbleBorder::ArrowLocation BubbleDelegateView::GetArrowLocation() const { + return BubbleBorder::TOP_LEFT; +} + +SkColor BubbleDelegateView::GetColor() const { + return SK_ColorWHITE; +} + +void BubbleDelegateView::Init() {} + const BubbleView* BubbleDelegateView::GetBubbleView() const { return GetWidget()->client_view()->AsBubbleView(); } diff --git a/views/bubble/bubble_delegate.h b/views/bubble/bubble_delegate.h index 3b303f7..5b2c9c3 100644 --- a/views/bubble/bubble_delegate.h +++ b/views/bubble/bubble_delegate.h @@ -27,7 +27,7 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView { Widget* parent_widget); // WidgetDelegate overrides: - virtual View* GetContentsView() OVERRIDE { return this; } + virtual View* GetContentsView() OVERRIDE; virtual ClientView* CreateClientView(Widget* widget) OVERRIDE; virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; @@ -35,16 +35,14 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView { virtual gfx::Point GetAnchorPoint() const; // Get the arrow's location on the bubble. - virtual BubbleBorder::ArrowLocation GetArrowLocation() const { - return BubbleBorder::TOP_LEFT; - } + virtual BubbleBorder::ArrowLocation GetArrowLocation() const; // Get the color used for the background and border. - virtual SkColor GetColor() const { return SK_ColorWHITE; } + virtual SkColor GetColor() const; protected: // Perform view initialization on the contents for bubble sizing. - virtual void Init() {} + virtual void Init(); private: const BubbleView* GetBubbleView() const; diff --git a/views/bubble/bubble_view.cc b/views/bubble/bubble_view.cc index 8ae5efe..85a271f 100644 --- a/views/bubble/bubble_view.cc +++ b/views/bubble/bubble_view.cc @@ -21,6 +21,14 @@ BubbleView::BubbleView(Widget* owner, View* contents_view) BubbleView::~BubbleView() {} +BubbleView* BubbleView::AsBubbleView() { + return this; +} + +const BubbleView* BubbleView::AsBubbleView() const { + return this; +} + void BubbleView::StartFade(bool fade_in) { fade_animation_.reset(new ui::SlideAnimation(this)); fade_animation_->SetSlideDuration(kHideFadeDurationMS); diff --git a/views/bubble/bubble_view.h b/views/bubble/bubble_view.h index 2663199..900eb0f 100644 --- a/views/bubble/bubble_view.h +++ b/views/bubble/bubble_view.h @@ -23,8 +23,8 @@ class VIEWS_EXPORT BubbleView : public ClientView, virtual ~BubbleView(); // ClientView overrides: - virtual BubbleView* AsBubbleView() OVERRIDE { return this; } - virtual const BubbleView* AsBubbleView() const OVERRIDE { return this; } + virtual BubbleView* AsBubbleView() OVERRIDE; + virtual const BubbleView* AsBubbleView() const OVERRIDE; void set_close_on_esc(bool close_on_esc) { close_on_esc_ = close_on_esc; } |