OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 // ui::AnimationDelegate: | 38 // ui::AnimationDelegate: |
39 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 39 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
40 | 40 |
41 // Called when the user closes the infobar, notifies the delegate we've been | 41 // Called when the user closes the infobar, notifies the delegate we've been |
42 // dismissed and forwards a removal request to our owner. | 42 // dismissed and forwards a removal request to our owner. |
43 void RemoveInfoBar(); | 43 void RemoveInfoBar(); |
44 | 44 |
45 ui::SlideAnimation* animation() { return animation_.get(); } | 45 ui::SlideAnimation* animation() { return animation_.get(); } |
46 const ui::SlideAnimation* animation() const { return animation_.get(); } | 46 const ui::SlideAnimation* animation() const { return animation_.get(); } |
47 | 47 |
48 // Subclasses may optionally override this. | 48 // Calls PlatformSpecificOnSizeChanged(), then informs our container our size |
49 virtual void PlatformSpecificHide(bool animate); | 49 // has changed. |
50 void OnSizeChanged(); | |
Sheridan Rawlins
2011/04/01 18:41:48
private?
Peter Kasting
2011/04/01 19:07:15
No, because InfoBarView::SetTargetHeight() calls i
| |
51 | |
52 // Platforms may optionally override these if they need to do work during | |
53 // processing of the given calls. | |
54 virtual void PlatformSpecificHide(bool animate) {} | |
55 virtual void PlatformSpecificOnSizeChanged() {} | |
Sheridan Rawlins
2011/04/01 18:41:48
Move implementations to implementation file for th
Peter Kasting
2011/04/01 19:07:15
That's not a style rule I can find. Virtual funct
Sheridan Rawlins
2011/04/01 20:36:56
Thanks, sorry - I had asked a peer who thought all
| |
50 | 56 |
51 private: | 57 private: |
52 // ui::AnimationDelegate: | 58 // ui::AnimationDelegate: |
53 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 59 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
54 | 60 |
55 // Checks whether we're closed. If so, notifies the container that it should | 61 // Checks whether we're closed. If so, notifies the container that it should |
56 // remove us (which will cause the platform-specific code to asynchronously | 62 // remove us (which will cause the platform-specific code to asynchronously |
57 // delete us) and closes the delegate. | 63 // delete us) and closes the delegate. |
58 void MaybeDelete(); | 64 void MaybeDelete(); |
59 | 65 |
60 InfoBarDelegate* delegate_; | 66 InfoBarDelegate* delegate_; |
61 InfoBarContainer* container_; | 67 InfoBarContainer* container_; |
62 scoped_ptr<ui::SlideAnimation> animation_; | 68 scoped_ptr<ui::SlideAnimation> animation_; |
63 | 69 |
64 DISALLOW_COPY_AND_ASSIGN(InfoBar); | 70 DISALLOW_COPY_AND_ASSIGN(InfoBar); |
65 }; | 71 }; |
66 | 72 |
67 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_H_ |
OLD | NEW |