| 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_BUBBLE_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "views/bubble/bubble_border.h" | 10 #include "views/bubble/bubble_border.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 class Bubble | 80 class Bubble |
| 81 #if defined(USE_AURA) | 81 #if defined(USE_AURA) |
| 82 : public views::NativeWidgetAura, | 82 : public views::NativeWidgetAura, |
| 83 #elif defined(OS_WIN) | 83 #elif defined(OS_WIN) |
| 84 : public views::NativeWidgetWin, | 84 : public views::NativeWidgetWin, |
| 85 #elif defined(TOUCH_UI) | 85 #elif defined(TOUCH_UI) |
| 86 : public views::NativeWidgetViews, | 86 : public views::NativeWidgetViews, |
| 87 #elif defined(TOOLKIT_USES_GTK) | 87 #elif defined(TOOLKIT_USES_GTK) |
| 88 : public views::NativeWidgetGtk, | 88 : public views::NativeWidgetGtk, |
| 89 #endif | 89 #endif |
| 90 public views::AcceleratorTarget, | 90 public ui::AcceleratorTarget, |
| 91 public ui::AnimationDelegate { | 91 public ui::AnimationDelegate { |
| 92 public: | 92 public: |
| 93 class Observer { | 93 class Observer { |
| 94 public: | 94 public: |
| 95 // See BubbleDelegate::BubbleClosing for when this is called. | 95 // See BubbleDelegate::BubbleClosing for when this is called. |
| 96 virtual void OnBubbleClosing() = 0; | 96 virtual void OnBubbleClosing() = 0; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 // Shows the Bubble. | 99 // Shows the Bubble. |
| 100 // |parent| is set as the parent window. | 100 // |parent| is set as the parent window. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 // Animates to a hidden state. | 229 // Animates to a hidden state. |
| 230 void FadeOut(); | 230 void FadeOut(); |
| 231 | 231 |
| 232 // Animates to a visible/hidden state (visible if |fade_in| is true). | 232 // Animates to a visible/hidden state (visible if |fade_in| is true). |
| 233 void Fade(bool fade_in); | 233 void Fade(bool fade_in); |
| 234 | 234 |
| 235 void RegisterEscapeAccelerator(); | 235 void RegisterEscapeAccelerator(); |
| 236 void UnregisterEscapeAccelerator(); | 236 void UnregisterEscapeAccelerator(); |
| 237 | 237 |
| 238 // Overridden from AcceleratorTarget: | 238 // Overridden from AcceleratorTarget: |
| 239 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); | 239 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator); |
| 240 | 240 |
| 241 // The delegate, if any. | 241 // The delegate, if any. |
| 242 BubbleDelegate* delegate_; | 242 BubbleDelegate* delegate_; |
| 243 | 243 |
| 244 // The animation used to fade the bubble out. | 244 // The animation used to fade the bubble out. |
| 245 scoped_ptr<ui::SlideAnimation> animation_; | 245 scoped_ptr<ui::SlideAnimation> animation_; |
| 246 | 246 |
| 247 // The current visibility status of the bubble. | 247 // The current visibility status of the bubble. |
| 248 ShowStatus show_status_; | 248 ShowStatus show_status_; |
| 249 | 249 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 270 views::View* contents_; | 270 views::View* contents_; |
| 271 | 271 |
| 272 bool accelerator_registered_; | 272 bool accelerator_registered_; |
| 273 | 273 |
| 274 ObserverList<Observer> observer_list_; | 274 ObserverList<Observer> observer_list_; |
| 275 | 275 |
| 276 DISALLOW_COPY_AND_ASSIGN(Bubble); | 276 DISALLOW_COPY_AND_ASSIGN(Bubble); |
| 277 }; | 277 }; |
| 278 | 278 |
| 279 #endif // CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ | 279 #endif // CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ |
| OLD | NEW |