#include "base/message_loop/message_loop.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
-#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_event_dispatcher.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/insets.h"
#include "ui/views/widget/widget.h"
namespace ash {
-namespace internal {
namespace {
const int kTooltipTopBottomMargin = 3;
const int kTooltipLeftRightMargin = 10;
-const int kTooltipAppearanceDelay = 200; // msec
+const int kTooltipAppearanceDelay = 1000; // msec
const int kTooltipMinHeight = 29 - 2 * kTooltipTopBottomMargin;
const SkColor kTooltipTextColor = SkColorSetRGB(0x22, 0x22, 0x22);
views::BubbleBorder::Arrow arrow,
ShelfTooltipManager* host)
: views::BubbleDelegateView(anchor, arrow), host_(host) {
- // Make sure that the bubble follows the animation of the shelf.
- set_move_with_anchor(true);
gfx::Insets insets = gfx::Insets(kArrowOffsetTopBottom,
kArrowOffsetLeftRight,
kArrowOffsetTopBottom,
kArrowOffsetLeftRight);
- // Launcher items can have an asymmetrical border for spacing reasons.
+ // Shelf items can have an asymmetrical border for spacing reasons.
// Adjust anchor location for this.
if (anchor->border())
insets += anchor->border()->GetInsets();
aura::Window* root_window =
anchor->GetWidget()->GetNativeView()->GetRootWindow();
set_parent_window(ash::Shell::GetInstance()->GetContainer(
- root_window, ash::internal::kShellWindowId_SettingBubbleContainer));
+ root_window, ash::kShellWindowId_SettingBubbleContainer));
}
label_ = new views::Label;
label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
return;
gfx::NativeView native_view = widget_->GetNativeView();
- views::corewm::SetWindowVisibilityAnimationTransition(
- native_view, views::corewm::ANIMATE_NONE);
+ wm::SetWindowVisibilityAnimationTransition(
+ native_view, wm::ANIMATE_NONE);
}
void ShelfTooltipManager::CloseSoon() {
view_->SetText(text_);
gfx::NativeView native_view = widget_->GetNativeView();
- views::corewm::SetWindowVisibilityAnimationType(
- native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
- views::corewm::SetWindowVisibilityAnimationTransition(
- native_view, views::corewm::ANIMATE_HIDE);
+ wm::SetWindowVisibilityAnimationType(
+ native_view, wm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
+ wm::SetWindowVisibilityAnimationTransition(
+ native_view, wm::ANIMATE_HIDE);
}
void ShelfTooltipManager::CreateTimer(int delay_in_ms) {
timer_.reset(new_timer);
}
-} // namespace internal
} // namespace ash