OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_DELEGATE_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_DELEGATE_VIEW_H_ |
| 7 |
| 8 #include "base/strings/string16.h" |
| 9 #include "base/timer/timer.h" |
| 10 #include "ui/gfx/rect.h" |
| 11 #include "ui/views/bubble/bubble_delegate.h" |
| 12 |
| 13 namespace chromeos { |
| 14 namespace input_method { |
| 15 |
| 16 class ModeIndicatorDelegateView : public views::BubbleDelegateView { |
| 17 public: |
| 18 ModeIndicatorDelegateView(const gfx::Rect& cursor_bounds, |
| 19 const string16& label); |
| 20 virtual ~ModeIndicatorDelegateView(); |
| 21 |
| 22 // Show the mode indicator then hide with fading animation. |
| 23 void ShowAndFadeOut(); |
| 24 |
| 25 protected: |
| 26 // views::BubbleDelegateView override: |
| 27 virtual void Init() OVERRIDE; |
| 28 |
| 29 private: |
| 30 // Hide the window with fading animation. This is called from |
| 31 // ShowAndFadeOut. |
| 32 void FadeOut(); |
| 33 |
| 34 gfx::Rect cursor_bounds_; |
| 35 string16 label_; |
| 36 base::OneShotTimer<ModeIndicatorDelegateView> timer_; |
| 37 }; |
| 38 |
| 39 } // namespace input_method |
| 40 } // namespace chromeos |
| 41 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_DELEGATE_VIEW_H_ |
OLD | NEW |