| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Whether the Bubble should fade in when opening. When trying to determine | 62 // Whether the Bubble should fade in when opening. When trying to determine |
| 63 // whether to use FadeIn, consider whether the bubble is shown as a direct | 63 // whether to use FadeIn, consider whether the bubble is shown as a direct |
| 64 // result of a user action or not. For example, if the bubble is being shown | 64 // result of a user action or not. For example, if the bubble is being shown |
| 65 // as a direct result of a mouse-click, we should not use FadeIn. However, if | 65 // as a direct result of a mouse-click, we should not use FadeIn. However, if |
| 66 // the bubble appears as a notification that something happened in the | 66 // the bubble appears as a notification that something happened in the |
| 67 // background, we use FadeIn. | 67 // background, we use FadeIn. |
| 68 virtual bool FadeInOnShow() = 0; | 68 virtual bool FadeInOnShow() = 0; |
| 69 | 69 |
| 70 // The name of the window to which this delegate belongs. | 70 // The name of the window to which this delegate belongs. |
| 71 virtual std::wstring accessible_name(); | 71 virtual string16 GetAccessibleName(); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the | 74 // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the |
| 75 // WidgetFoo subclass into a separate class that calls into Bubble. | 75 // WidgetFoo subclass into a separate class that calls into Bubble. |
| 76 // That way Bubble has no (or very few) ifdefs. | 76 // That way Bubble has no (or very few) ifdefs. |
| 77 class Bubble | 77 class Bubble |
| 78 #if defined(USE_AURA) | 78 #if defined(USE_AURA) |
| 79 : public views::NativeWidgetAura, | 79 : public views::NativeWidgetAura, |
| 80 #elif defined(OS_WIN) | 80 #elif defined(OS_WIN) |
| 81 : public views::NativeWidgetWin, | 81 : public views::NativeWidgetWin, |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 views::View* contents_; | 257 views::View* contents_; |
| 258 | 258 |
| 259 bool accelerator_registered_; | 259 bool accelerator_registered_; |
| 260 | 260 |
| 261 ObserverList<Observer> observer_list_; | 261 ObserverList<Observer> observer_list_; |
| 262 | 262 |
| 263 DISALLOW_COPY_AND_ASSIGN(Bubble); | 263 DISALLOW_COPY_AND_ASSIGN(Bubble); |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 #endif // CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ | 266 #endif // CHROME_BROWSER_UI_VIEWS_BUBBLE_BUBBLE_H_ |
| OLD | NEW |