| 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 "chrome/browser/ui/views/bubble/bubble_border.h" | 9 #include "chrome/browser/ui/views/bubble/bubble_border.h" |
| 10 #include "ui/base/animation/animation_delegate.h" | 10 #include "ui/base/animation/animation_delegate.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // Overridden from ui::AnimationDelegate: | 129 // Overridden from ui::AnimationDelegate: |
| 130 virtual void AnimationEnded(const ui::Animation* animation); | 130 virtual void AnimationEnded(const ui::Animation* animation); |
| 131 virtual void AnimationProgressed(const ui::Animation* animation); | 131 virtual void AnimationProgressed(const ui::Animation* animation); |
| 132 | 132 |
| 133 static const SkColor kBackgroundColor; | 133 static const SkColor kBackgroundColor; |
| 134 | 134 |
| 135 protected: | 135 protected: |
| 136 Bubble(); | 136 Bubble(); |
| 137 #if defined(OS_CHROMEOS) | 137 #if defined(OS_CHROMEOS) |
| 138 Bubble(views::WidgetGtk::Type type, bool show_while_screen_is_locked); | 138 Bubble(views::Widget::CreateParams::Type type, |
| 139 bool show_while_screen_is_locked); |
| 139 #endif | 140 #endif |
| 140 virtual ~Bubble(); | 141 virtual ~Bubble(); |
| 141 | 142 |
| 142 // Creates the Bubble. | 143 // Creates the Bubble. |
| 143 virtual void InitBubble(views::Widget* parent, | 144 virtual void InitBubble(views::Widget* parent, |
| 144 const gfx::Rect& position_relative_to, | 145 const gfx::Rect& position_relative_to, |
| 145 BubbleBorder::ArrowLocation arrow_location, | 146 BubbleBorder::ArrowLocation arrow_location, |
| 146 views::View* contents, | 147 views::View* contents, |
| 147 BubbleDelegate* delegate); | 148 BubbleDelegate* delegate); |
| 148 | 149 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // The animation used to fade the bubble out. | 195 // The animation used to fade the bubble out. |
| 195 scoped_ptr<ui::SlideAnimation> animation_; | 196 scoped_ptr<ui::SlideAnimation> animation_; |
| 196 | 197 |
| 197 // The current visibility status of the bubble. | 198 // The current visibility status of the bubble. |
| 198 ShowStatus show_status_; | 199 ShowStatus show_status_; |
| 199 | 200 |
| 200 // Whether to fade away when the bubble closes. | 201 // Whether to fade away when the bubble closes. |
| 201 bool fade_away_on_close_; | 202 bool fade_away_on_close_; |
| 202 | 203 |
| 203 #if defined(OS_CHROMEOS) | 204 #if defined(OS_CHROMEOS) |
| 205 // Some callers want the bubble to be a child control instead of a window. |
| 206 views::Widget::CreateParams::Type type_; |
| 204 // Should we set a property telling the window manager to show this window | 207 // Should we set a property telling the window manager to show this window |
| 205 // onscreen even when the screen is locked? | 208 // onscreen even when the screen is locked? |
| 206 bool show_while_screen_is_locked_; | 209 bool show_while_screen_is_locked_; |
| 207 #endif | 210 #endif |
| 208 | 211 |
| 209 gfx::Rect position_relative_to_; | 212 gfx::Rect position_relative_to_; |
| 210 BubbleBorder::ArrowLocation arrow_location_; | 213 BubbleBorder::ArrowLocation arrow_location_; |
| 211 | 214 |
| 212 views::View* contents_; | 215 views::View* contents_; |
| 213 | 216 |
| 214 DISALLOW_COPY_AND_ASSIGN(Bubble); | 217 DISALLOW_COPY_AND_ASSIGN(Bubble); |
| 215 }; | 218 }; |
| 216 | 219 |
| 217 #endif // CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ | 220 #endif // CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ |
| OLD | NEW |