OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "ash/popup_message.h" | 5 #include "ash/popup_message.h" |
6 | 6 |
7 #include "ash/wm/window_animations.h" | 7 #include "ash/wm/window_animations.h" |
8 #include "grit/ash_resources.h" | 8 #include "grit/ash_resources.h" |
9 #include "ui/base/resource/resource_bundle.h" | 9 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/gfx/geometry/insets.h" | 10 #include "ui/gfx/geometry/insets.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // | ^ | 101 // | ^ |
102 // +-------------------------------------------------+ | 102 // +-------------------------------------------------+ |
103 // -| |- | 103 // -| |- |
104 // icon | [!] Caption in bold which can be multi line | caption_label | 104 // icon | [!] Caption in bold which can be multi line | caption_label |
105 // -| |- | 105 // -| |- |
106 // | Message text which can be multi line | message_label | 106 // | Message text which can be multi line | message_label |
107 // | as well. | | 107 // | as well. | |
108 // | |- | 108 // | |- |
109 // +-------------------------------------------------+ | 109 // +-------------------------------------------------+ |
110 // |------------details container--------------| | 110 // |------------details container--------------| |
111 // Note that the icon, caption and massage are optional. | 111 // Note that the icon, caption and message are optional. |
112 | 112 |
113 // Add the icon to the first column (if there is one). | 113 // Add the icon to the first column (if there is one). |
114 if (message_type != ICON_NONE) { | 114 if (message_type != ICON_NONE) { |
115 views::ImageView* icon = new views::ImageView(); | 115 views::ImageView* icon = new views::ImageView(); |
116 icon->SetImage( | 116 icon->SetImage( |
117 bundle.GetImageNamed(IDR_AURA_WARNING_ICON).ToImageSkia()); | 117 bundle.GetImageNamed(IDR_AURA_WARNING_ICON).ToImageSkia()); |
118 icon->SetVerticalAlignment(views::ImageView::LEADING); | 118 icon->SetVerticalAlignment(views::ImageView::LEADING); |
119 AddChildView(icon); | 119 AddChildView(icon); |
120 } | 120 } |
121 | 121 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void PopupMessage::CancelHidingAnimation() { | 217 void PopupMessage::CancelHidingAnimation() { |
218 if (!widget_ || !widget_->GetNativeView()) | 218 if (!widget_ || !widget_->GetNativeView()) |
219 return; | 219 return; |
220 | 220 |
221 gfx::NativeView native_view = widget_->GetNativeView(); | 221 gfx::NativeView native_view = widget_->GetNativeView(); |
222 wm::SetWindowVisibilityAnimationTransition( | 222 wm::SetWindowVisibilityAnimationTransition( |
223 native_view, wm::ANIMATE_NONE); | 223 native_view, wm::ANIMATE_NONE); |
224 } | 224 } |
225 | 225 |
226 } // namespace ash | 226 } // namespace ash |
OLD | NEW |