Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: chrome/browser/chromeos/input_method/mode_indicator_delegate_view.h

Issue 98703003: Mode Indicator using BubbleDelegateView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698