| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef ASH_IME_MODE_INDICATOR_VIEW_H_ | 5 #ifndef UI_CHROMEOS_IME_MODE_INDICATOR_VIEW_H_ |
| 6 #define ASH_IME_MODE_INDICATOR_VIEW_H_ | 6 #define UI_CHROMEOS_IME_MODE_INDICATOR_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | |
| 9 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 10 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "ui/chromeos/ui_chromeos_export.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
| 13 #include "ui/views/bubble/bubble_delegate.h" | 13 #include "ui/views/bubble/bubble_delegate.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 class Label; | 16 class Label; |
| 17 class Widget; | 17 class Widget; |
| 18 } // namespace views | 18 } // namespace views |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ui { |
| 21 namespace ime { | 21 namespace ime { |
| 22 | 22 |
| 23 class ASH_EXPORT ModeIndicatorView : public views::BubbleDelegateView { | 23 class UI_CHROMEOS_EXPORT ModeIndicatorView : public views::BubbleDelegateView { |
| 24 public: | 24 public: |
| 25 ModeIndicatorView(gfx::NativeView parent, | 25 ModeIndicatorView(gfx::NativeView parent, |
| 26 const gfx::Rect& cursor_bounds, | 26 const gfx::Rect& cursor_bounds, |
| 27 const base::string16& label); | 27 const base::string16& label); |
| 28 ~ModeIndicatorView() override; | 28 ~ModeIndicatorView() override; |
| 29 | 29 |
| 30 // Show the mode indicator then hide with fading animation. | 30 // Show the mode indicator then hide with fading animation. |
| 31 void ShowAndFadeOut(); | 31 void ShowAndFadeOut(); |
| 32 | 32 |
| 33 // views::BubbleDelegateView override: | 33 // views::BubbleDelegateView override: |
| 34 gfx::Size GetPreferredSize() const override; | 34 gfx::Size GetPreferredSize() const override; |
| 35 | 35 |
| 36 protected: | 36 protected: |
| 37 // views::BubbleDelegateView override: | 37 // views::BubbleDelegateView override: |
| 38 void Init() override; | 38 void Init() override; |
| 39 | 39 |
| 40 // views::WidgetDelegateView overrides: | 40 // views::WidgetDelegateView overrides: |
| 41 views::NonClientFrameView* CreateNonClientFrameView( | 41 views::NonClientFrameView* CreateNonClientFrameView( |
| 42 views::Widget* widget) override; | 42 views::Widget* widget) override; |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 gfx::Rect cursor_bounds_; | 45 gfx::Rect cursor_bounds_; |
| 46 views::Label* label_view_; | 46 views::Label* label_view_; |
| 47 base::OneShotTimer<views::Widget> timer_; | 47 base::OneShotTimer<views::Widget> timer_; |
| 48 | 48 |
| 49 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorView); | 49 DISALLOW_COPY_AND_ASSIGN(ModeIndicatorView); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace ime | 52 } // namespace ime |
| 53 } // namespace ash | 53 } // namespace ui |
| 54 | 54 |
| 55 #endif // ASH_IME_MODE_INDICATOR_VIEW_H_ | 55 #endif // UI_CHROMEOS_IME_MODE_INDICATOR_VIEW_H_ |
| OLD | NEW |