OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_INFO_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ |
6 #define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ | 6 #define CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ |
7 | 7 |
8 #include "app/slide_animation.h" | 8 #include "app/slide_animation.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 9 #include "third_party/skia/include/core/SkColor.h" |
10 #include "views/accelerator.h" | 10 #include "views/accelerator.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // Whether the InfoBubble should be closed when the Esc key is pressed. | 156 // Whether the InfoBubble should be closed when the Esc key is pressed. |
157 virtual bool CloseOnEscape() = 0; | 157 virtual bool CloseOnEscape() = 0; |
158 | 158 |
159 // Whether the InfoBubble should fade in when opening. When trying to | 159 // Whether the InfoBubble should fade in when opening. When trying to |
160 // determine whether to use FadeIn, consider whether the bubble is shown as a | 160 // determine whether to use FadeIn, consider whether the bubble is shown as a |
161 // direct result of a user action or not. For example, if the bubble is being | 161 // direct result of a user action or not. For example, if the bubble is being |
162 // shown as a direct result of a mouse-click, we should not use FadeIn. | 162 // shown as a direct result of a mouse-click, we should not use FadeIn. |
163 // However, if the bubble appears as a notification that something happened | 163 // However, if the bubble appears as a notification that something happened |
164 // in the background, we use FadeIn. | 164 // in the background, we use FadeIn. |
165 virtual bool FadeInOnShow() = 0; | 165 virtual bool FadeInOnShow() = 0; |
| 166 |
| 167 // The name of the window to which this delegate belongs. |
| 168 virtual std::wstring accessible_name() { return L""; } |
166 }; | 169 }; |
167 | 170 |
168 // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the | 171 // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the |
169 // WidgetFoo subclass into a separate class that calls into InfoBubble. | 172 // WidgetFoo subclass into a separate class that calls into InfoBubble. |
170 // That way InfoBubble has no (or very few) ifdefs. | 173 // That way InfoBubble has no (or very few) ifdefs. |
171 class InfoBubble | 174 class InfoBubble |
172 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
173 : public views::WidgetWin, | 176 : public views::WidgetWin, |
174 #elif defined(OS_LINUX) | 177 #elif defined(OS_LINUX) |
175 : public views::WidgetGtk, | 178 : public views::WidgetGtk, |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 278 |
276 gfx::Rect position_relative_to_; | 279 gfx::Rect position_relative_to_; |
277 BubbleBorder::ArrowLocation arrow_location_; | 280 BubbleBorder::ArrowLocation arrow_location_; |
278 | 281 |
279 views::View* contents_; | 282 views::View* contents_; |
280 | 283 |
281 DISALLOW_COPY_AND_ASSIGN(InfoBubble); | 284 DISALLOW_COPY_AND_ASSIGN(InfoBubble); |
282 }; | 285 }; |
283 | 286 |
284 #endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ | 287 #endif // CHROME_BROWSER_VIEWS_INFO_BUBBLE_H_ |
OLD | NEW |