Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / power / idle_action_warning_dialog_view.h
blob793a05780f6ca5d83267ca01f7f9dbf32f8a9bd4
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_POWER_IDLE_ACTION_WARNING_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_POWER_IDLE_ACTION_WARNING_DIALOG_VIEW_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/time/time.h"
11 #include "base/timer/timer.h"
12 #include "ui/views/window/dialog_delegate.h"
14 namespace views {
15 class Label;
18 namespace chromeos {
20 // Shows a modal warning dialog that the idle action is imminent. Since the
21 // warning is only really necessary when the idle action is to log out the user,
22 // the warning is hard-coded to warn about logout.
23 class IdleActionWarningDialogView : public views::DialogDelegateView {
24 public:
25 explicit IdleActionWarningDialogView(base::TimeTicks idle_action_time);
26 void CloseDialog();
28 void Update(base::TimeTicks idle_action_time);
30 // views::DialogDelegateView:
31 ui::ModalType GetModalType() const override;
32 base::string16 GetWindowTitle() const override;
33 int GetDialogButtons() const override;
34 bool Cancel() override;
36 private:
37 ~IdleActionWarningDialogView() override;
39 void UpdateLabel();
41 base::TimeTicks idle_action_time_;
43 views::Label* label_;
45 base::RepeatingTimer<IdleActionWarningDialogView> update_timer_;
47 DISALLOW_COPY_AND_ASSIGN(IdleActionWarningDialogView);
50 } // namespace chromeos
52 #endif // CHROME_BROWSER_CHROMEOS_POWER_IDLE_ACTION_WARNING_DIALOG_VIEW_H_