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

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: Updated based on the review 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 views {
14 class Label;
15 } // namespace views
16
17 namespace chromeos {
18 namespace input_method {
19
20 class ModeIndicatorDelegateView : public views::BubbleDelegateView {
21 public:
22 ModeIndicatorDelegateView(const gfx::Rect& cursor_bounds,
23 const string16& label);
24 virtual ~ModeIndicatorDelegateView();
25
26 // Show the mode indicator then hide with fading animation.
27 void ShowAndFadeOut();
28
29 // views::BubbleDelegateView override:
30 virtual gfx::Size GetPreferredSize() OVERRIDE;
31
32 protected:
33 // views::BubbleDelegateView override:
34 virtual void Init() OVERRIDE;
35
36 private:
37 // Hide the window with fading animation. This is called from
38 // ShowAndFadeOut.
39 void FadeOut();
40
41 gfx::Rect cursor_bounds_;
42 views::Label* label_view_;
43 base::OneShotTimer<ModeIndicatorDelegateView> timer_;
44 };
45
46 } // namespace input_method
47 } // namespace chromeos
48
49 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_MODE_INDICATOR_DELEGATE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698