OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 ASH_POPUP_MESSAGE_H_ | 5 #ifndef ASH_POPUP_MESSAGE_H_ |
6 #define ASH_POPUP_MESSAGE_H_ | 6 #define ASH_POPUP_MESSAGE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/gtest_prod_util.h" |
10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
11 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
12 #include "ui/views/bubble/bubble_border.h" | 13 #include "ui/views/bubble/bubble_border.h" |
13 | 14 |
14 namespace views { | 15 namespace views { |
15 class BubbleDelegateView; | 16 class BubbleDelegateView; |
16 class Widget; | 17 class Widget; |
17 } | 18 } |
18 | 19 |
19 namespace ash { | 20 namespace ash { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 const gfx::Size& size_override, | 56 const gfx::Size& size_override, |
56 int arrow_offset); | 57 int arrow_offset); |
57 // If the message was not explicitly closed before, it closes the message | 58 // If the message was not explicitly closed before, it closes the message |
58 // without animation. | 59 // without animation. |
59 virtual ~PopupMessage(); | 60 virtual ~PopupMessage(); |
60 | 61 |
61 // Closes the message with a fade out animation. | 62 // Closes the message with a fade out animation. |
62 void Close(); | 63 void Close(); |
63 | 64 |
64 private: | 65 private: |
| 66 FRIEND_TEST_ALL_PREFIXES(PopupMessageTest, Layout); |
| 67 |
65 class MessageBubble; | 68 class MessageBubble; |
66 | 69 |
| 70 static const int kCaptionLabelID; |
| 71 static const int kMessageLabelID; |
| 72 |
67 void CancelHidingAnimation(); | 73 void CancelHidingAnimation(); |
68 | 74 |
69 MessageBubble* view_; | 75 MessageBubble* view_; |
70 views::Widget* widget_; | 76 views::Widget* widget_; |
71 | 77 |
72 base::string16 caption_; | 78 base::string16 caption_; |
73 base::string16 message_; | 79 base::string16 message_; |
74 | 80 |
75 DISALLOW_COPY_AND_ASSIGN(PopupMessage); | 81 DISALLOW_COPY_AND_ASSIGN(PopupMessage); |
76 }; | 82 }; |
77 | 83 |
78 } // namespace ash | 84 } // namespace ash |
79 | 85 |
80 #endif // ASH_POPUP_MESSAGE_H_ | 86 #endif // ASH_POPUP_MESSAGE_H_ |
OLD | NEW |