| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 kArrowOffsetTopBottom, | 77 kArrowOffsetTopBottom, |
| 78 kArrowOffsetLeftRight); | 78 kArrowOffsetLeftRight); |
| 79 // An anchor can have an asymmetrical border for spacing reasons. Adjust the | 79 // An anchor can have an asymmetrical border for spacing reasons. Adjust the |
| 80 // anchor location for this. | 80 // anchor location for this. |
| 81 if (anchor->border()) | 81 if (anchor->border()) |
| 82 insets += anchor->border()->GetInsets(); | 82 insets += anchor->border()->GetInsets(); |
| 83 | 83 |
| 84 set_anchor_view_insets(insets); | 84 set_anchor_view_insets(insets); |
| 85 set_close_on_esc(false); | 85 set_close_on_esc(false); |
| 86 set_close_on_deactivate(false); | 86 set_close_on_deactivate(false); |
| 87 set_use_focusless(true); | 87 set_can_activate(false); |
| 88 set_accept_events(false); | 88 set_accept_events(false); |
| 89 | 89 |
| 90 set_margins(gfx::Insets(kMessageTopBottomMargin, kMessageLeftRightMargin, | 90 set_margins(gfx::Insets(kMessageTopBottomMargin, kMessageLeftRightMargin, |
| 91 kMessageTopBottomMargin, kMessageLeftRightMargin)); | 91 kMessageTopBottomMargin, kMessageLeftRightMargin)); |
| 92 set_shadow(views::BubbleBorder::SMALL_SHADOW); | 92 set_shadow(views::BubbleBorder::SMALL_SHADOW); |
| 93 | 93 |
| 94 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 94 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 95 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, | 95 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, |
| 96 kHorizontalPopupPaddingBetweenItems)); | 96 kHorizontalPopupPaddingBetweenItems)); |
| 97 | 97 |
| (...skipping 119 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 |