1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ASH_IME_MODE_INDICATOR_VIEW_H_
6 #define ASH_IME_MODE_INDICATOR_VIEW_H_
8 #include "ash/ash_export.h"
9 #include "base/strings/string16.h"
10 #include "base/timer/timer.h"
11 #include "ui/gfx/native_widget_types.h"
12 #include "ui/gfx/rect.h"
13 #include "ui/views/bubble/bubble_delegate.h"
23 class ASH_EXPORT ModeIndicatorView : public views::BubbleDelegateView {
25 ModeIndicatorView(gfx::NativeView parent,
26 const gfx::Rect& cursor_bounds,
27 const base::string16& label);
28 ~ModeIndicatorView() override;
30 // Show the mode indicator then hide with fading animation.
31 void ShowAndFadeOut();
33 // views::BubbleDelegateView override:
34 gfx::Size GetPreferredSize() const override;
37 // views::BubbleDelegateView override:
40 // views::WidgetDelegateView overrides:
41 views::NonClientFrameView* CreateNonClientFrameView(
42 views::Widget* widget) override;
45 gfx::Rect cursor_bounds_;
46 views::Label* label_view_;
47 base::OneShotTimer<views::Widget> timer_;
49 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorView);
55 #endif // ASH_IME_MODE_INDICATOR_VIEW_H_