OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/launcher/launcher_tooltip_manager.h" | 5 #include "ash/launcher/launcher_tooltip_manager.h" |
6 | 6 |
7 #include "ash/launcher/launcher_view.h" | 7 #include "ash/launcher/launcher_view.h" |
8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 host_(host) { | 77 host_(host) { |
78 gfx::Insets insets = gfx::Insets(kArrowOffsetTopBottom, | 78 gfx::Insets insets = gfx::Insets(kArrowOffsetTopBottom, |
79 kArrowOffsetLeftRight, | 79 kArrowOffsetLeftRight, |
80 kArrowOffsetTopBottom, | 80 kArrowOffsetTopBottom, |
81 kArrowOffsetLeftRight); | 81 kArrowOffsetLeftRight); |
82 // Launcher items can have an asymmetrical border for spacing reasons. | 82 // Launcher items can have an asymmetrical border for spacing reasons. |
83 // Adjust anchor location for this. | 83 // Adjust anchor location for this. |
84 if (anchor->border()) | 84 if (anchor->border()) |
85 insets += anchor->border()->GetInsets(); | 85 insets += anchor->border()->GetInsets(); |
86 | 86 |
87 set_anchor_insets(insets); | 87 set_anchor_view_insets(insets); |
88 set_close_on_esc(false); | 88 set_close_on_esc(false); |
89 set_close_on_deactivate(false); | 89 set_close_on_deactivate(false); |
90 set_use_focusless(true); | 90 set_use_focusless(true); |
91 set_accept_events(false); | 91 set_accept_events(false); |
92 set_margins(gfx::Insets(kTooltipTopBottomMargin, kTooltipLeftRightMargin, | 92 set_margins(gfx::Insets(kTooltipTopBottomMargin, kTooltipLeftRightMargin, |
93 kTooltipTopBottomMargin, kTooltipLeftRightMargin)); | 93 kTooltipTopBottomMargin, kTooltipLeftRightMargin)); |
94 set_shadow(views::BubbleBorder::SMALL_SHADOW); | 94 set_shadow(views::BubbleBorder::SMALL_SHADOW); |
95 SetLayoutManager(new views::FillLayout()); | 95 SetLayoutManager(new views::FillLayout()); |
96 // The anchor may not have the widget in tests. | 96 // The anchor may not have the widget in tests. |
97 if (anchor->GetWidget() && anchor->GetWidget()->GetNativeView()) { | 97 if (anchor->GetWidget() && anchor->GetWidget()->GetNativeView()) { |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 | 363 |
364 gfx::NativeView native_view = widget_->GetNativeView(); | 364 gfx::NativeView native_view = widget_->GetNativeView(); |
365 views::corewm::SetWindowVisibilityAnimationType( | 365 views::corewm::SetWindowVisibilityAnimationType( |
366 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); | 366 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); |
367 views::corewm::SetWindowVisibilityAnimationTransition( | 367 views::corewm::SetWindowVisibilityAnimationTransition( |
368 native_view, views::corewm::ANIMATE_HIDE); | 368 native_view, views::corewm::ANIMATE_HIDE); |
369 } | 369 } |
370 | 370 |
371 } // namespace internal | 371 } // namespace internal |
372 } // namespace ash | 372 } // namespace ash |
OLD | NEW |