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/insets.h" | 10 #include "ui/gfx/insets.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 IconType message_type, | 47 IconType message_type, |
48 views::View* anchor, | 48 views::View* anchor, |
49 views::BubbleBorder::Arrow arrow_orientation, | 49 views::BubbleBorder::Arrow arrow_orientation, |
50 const gfx::Size& size_override, | 50 const gfx::Size& size_override, |
51 int arrow_offset); | 51 int arrow_offset); |
52 | 52 |
53 void Close(); | 53 void Close(); |
54 | 54 |
55 private: | 55 private: |
56 // views::View overrides: | 56 // views::View overrides: |
57 virtual gfx::Size GetPreferredSize() OVERRIDE; | 57 virtual gfx::Size GetPreferredSize() const OVERRIDE; |
58 | 58 |
59 // Each component (width/height) can force a size override for that component | 59 // Each component (width/height) can force a size override for that component |
60 // if not 0. | 60 // if not 0. |
61 gfx::Size size_override_; | 61 gfx::Size size_override_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(MessageBubble); | 63 DISALLOW_COPY_AND_ASSIGN(MessageBubble); |
64 }; | 64 }; |
65 | 65 |
66 PopupMessage::MessageBubble::MessageBubble(const base::string16& caption, | 66 PopupMessage::MessageBubble::MessageBubble(const base::string16& caption, |
67 const base::string16& message, | 67 const base::string16& message, |
(...skipping 149 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 |