| 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 UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 5 #ifndef UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
| 6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 6 #define UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
| 10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void Show(); | 80 void Show(); |
| 81 | 81 |
| 82 // Fade the bubble in or out via Widget transparency. | 82 // Fade the bubble in or out via Widget transparency. |
| 83 // Fade in calls Widget::Show; fade out calls Widget::Close upon completion. | 83 // Fade in calls Widget::Show; fade out calls Widget::Close upon completion. |
| 84 void StartFade(bool fade_in); | 84 void StartFade(bool fade_in); |
| 85 | 85 |
| 86 // Reset fade and opacity of bubble. Restore the opacity of the | 86 // Reset fade and opacity of bubble. Restore the opacity of the |
| 87 // bubble to the setting before StartFade() was called. | 87 // bubble to the setting before StartFade() was called. |
| 88 void ResetFade(); | 88 void ResetFade(); |
| 89 | 89 |
| 90 // The default bubble background color. |
| 91 static const SkColor kBackgroundColor; |
| 92 |
| 90 protected: | 93 protected: |
| 91 // View overrides: | 94 // View overrides: |
| 92 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 95 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
| 93 | 96 |
| 94 // ui::AnimationDelegate overrides: | 97 // ui::AnimationDelegate overrides: |
| 95 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 98 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
| 96 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 99 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
| 97 | 100 |
| 98 // Perform view initialization on the contents for bubble sizing. | 101 // Perform view initialization on the contents for bubble sizing. |
| 99 virtual void Init(); | 102 virtual void Init(); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Create a popup window for focusless bubbles on Linux/ChromeOS. | 148 // Create a popup window for focusless bubbles on Linux/ChromeOS. |
| 146 // These bubbles are not interactive and should not gain focus. | 149 // These bubbles are not interactive and should not gain focus. |
| 147 bool use_focusless_; | 150 bool use_focusless_; |
| 148 | 151 |
| 149 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); | 152 DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView); |
| 150 }; | 153 }; |
| 151 | 154 |
| 152 } // namespace views | 155 } // namespace views |
| 153 | 156 |
| 154 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ | 157 #endif // UI_VIEWS_BUBBLE_BUBBLE_DELEGATE_H_ |
| OLD | NEW |