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/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/views/bubble/bubble_border.h" | 13 #include "ui/views/bubble/bubble_border.h" |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class Widget; | 16 class Widget; |
17 } | 17 } |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
20 | 20 |
21 // PopupMessage shows a message to the user. Since the user is not able to | 21 // PopupMessage shows a message to the user. Since the user is not able to |
22 // dismiss it, the calling code needs to explictly close and destroy it. | 22 // dismiss it, the calling code needs to explictly close and destroy it. |
23 class ASH_EXPORT PopupMessage { | 23 class ASH_EXPORT PopupMessage { |
24 public: | 24 public: |
25 enum IconType { | 25 enum IconType { ICON_WARNING, ICON_NONE }; |
26 ICON_WARNING, | |
27 ICON_NONE | |
28 }; | |
29 | 26 |
30 // Creates a message pointing towards |anchor| with the requested | 27 // Creates a message pointing towards |anchor| with the requested |
31 // |arrow_orientation|. The message contains an optional |caption| which is | 28 // |arrow_orientation|. The message contains an optional |caption| which is |
32 // drawn in bold and an optional |message| together with an optional icon of | 29 // drawn in bold and an optional |message| together with an optional icon of |
33 // shape |message_type|. If a component in |size_override| is not 0 the value | 30 // shape |message_type|. If a component in |size_override| is not 0 the value |
34 // is the used as output size. If |arrow_offset| is not 0, the number is the | 31 // is the used as output size. If |arrow_offset| is not 0, the number is the |
35 // arrow offset in pixels from the border. | 32 // arrow offset in pixels from the border. |
36 // | 33 // |
37 // Here is the layout (arrow given as TOP_LEFT): | 34 // Here is the layout (arrow given as TOP_LEFT): |
38 // |--------| | 35 // |--------| |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 73 |
77 base::string16 caption_; | 74 base::string16 caption_; |
78 base::string16 message_; | 75 base::string16 message_; |
79 | 76 |
80 DISALLOW_COPY_AND_ASSIGN(PopupMessage); | 77 DISALLOW_COPY_AND_ASSIGN(PopupMessage); |
81 }; | 78 }; |
82 | 79 |
83 } // namespace ash | 80 } // namespace ash |
84 | 81 |
85 #endif // ASH_POPUP_MESSAGE_H_ | 82 #endif // ASH_POPUP_MESSAGE_H_ |
OLD | NEW |