| 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_INFO_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFO_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_INFO_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_INFO_BUBBLE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/views/bubble_border.h" | 9 #include "chrome/browser/ui/views/bubble_border.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 // Whether the InfoBubble should fade in when opening. When trying to | 165 // Whether the InfoBubble should fade in when opening. When trying to |
| 166 // determine whether to use FadeIn, consider whether the bubble is shown as a | 166 // determine whether to use FadeIn, consider whether the bubble is shown as a |
| 167 // direct result of a user action or not. For example, if the bubble is being | 167 // direct result of a user action or not. For example, if the bubble is being |
| 168 // shown as a direct result of a mouse-click, we should not use FadeIn. | 168 // shown as a direct result of a mouse-click, we should not use FadeIn. |
| 169 // However, if the bubble appears as a notification that something happened | 169 // However, if the bubble appears as a notification that something happened |
| 170 // in the background, we use FadeIn. | 170 // in the background, we use FadeIn. |
| 171 virtual bool FadeInOnShow() = 0; | 171 virtual bool FadeInOnShow() = 0; |
| 172 | 172 |
| 173 // The name of the window to which this delegate belongs. | 173 // The name of the window to which this delegate belongs. |
| 174 virtual std::wstring accessible_name() { return L""; } | 174 virtual std::wstring accessible_name(); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the | 177 // TODO(sky): this code is ifdef-tastic. It might be cleaner to refactor the |
| 178 // WidgetFoo subclass into a separate class that calls into InfoBubble. | 178 // WidgetFoo subclass into a separate class that calls into InfoBubble. |
| 179 // That way InfoBubble has no (or very few) ifdefs. | 179 // That way InfoBubble has no (or very few) ifdefs. |
| 180 class InfoBubble | 180 class InfoBubble |
| 181 #if defined(OS_WIN) | 181 #if defined(OS_WIN) |
| 182 : public views::WidgetWin, | 182 : public views::WidgetWin, |
| 183 #elif defined(OS_LINUX) | 183 #elif defined(OS_LINUX) |
| 184 : public views::WidgetGtk, | 184 : public views::WidgetGtk, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 313 |
| 314 gfx::Rect position_relative_to_; | 314 gfx::Rect position_relative_to_; |
| 315 BubbleBorder::ArrowLocation arrow_location_; | 315 BubbleBorder::ArrowLocation arrow_location_; |
| 316 | 316 |
| 317 views::View* contents_; | 317 views::View* contents_; |
| 318 | 318 |
| 319 DISALLOW_COPY_AND_ASSIGN(InfoBubble); | 319 DISALLOW_COPY_AND_ASSIGN(InfoBubble); |
| 320 }; | 320 }; |
| 321 | 321 |
| 322 #endif // CHROME_BROWSER_UI_VIEWS_INFO_BUBBLE_H_ | 322 #endif // CHROME_BROWSER_UI_VIEWS_INFO_BUBBLE_H_ |
| OLD | NEW |