Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / chromeos / ime / infolist_window.h
blob1051b96a9e5923b1a77ef9bb847d983dcd36a0d9
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 UI_CHROMEOS_IME_INFOLIST_WINDOW_H_
6 #define UI_CHROMEOS_IME_INFOLIST_WINDOW_H_
8 #include <string>
9 #include <vector>
11 #include "base/memory/scoped_ptr.h"
12 #include "base/strings/string16.h"
13 #include "base/timer/timer.h"
14 #include "ui/base/ime/infolist_entry.h"
15 #include "ui/chromeos/ui_chromeos_export.h"
16 #include "ui/gfx/font_list.h"
17 #include "ui/views/bubble/bubble_delegate.h"
19 namespace ui {
20 namespace ime {
22 class InfolistEntryView;
24 // A widget delegate representing the infolist window UI.
25 class UI_CHROMEOS_EXPORT InfolistWindow : public views::BubbleDelegateView {
26 public:
27 InfolistWindow(views::View* candidate_window,
28 const std::vector<ui::InfolistEntry>& entries);
29 ~InfolistWindow() override;
30 void InitWidget();
32 // Updates infolist contents with |entries|.
33 void Relayout(const std::vector<ui::InfolistEntry>& entries);
35 // Show/hide itself with a delay.
36 void ShowWithDelay();
37 void HideWithDelay();
39 // Show/hide without delays.
40 void ShowImmediately();
41 void HideImmediately();
43 private:
44 // views::BubbleDelegateView:
45 const char* GetClassName() const override;
47 // views::WidgetDelegate implementation.
48 void WindowClosing() override;
50 // The list of visible entries. Owned by views hierarchy.
51 std::vector<InfolistEntryView*> entry_views_;
53 // Information title font.
54 gfx::FontList title_font_list_;
56 // Information description font.
57 gfx::FontList description_font_list_;
59 base::OneShotTimer<views::Widget> show_hide_timer_;
61 DISALLOW_COPY_AND_ASSIGN(InfolistWindow);
64 } // namespace ime
65 } // namespace ui
67 #endif // UI_CHROMEOS_IME_INFOLIST_WINDOW_H_