Index: ash/system/logout_button/logout_confirmation_dialog_view.h |
diff --git a/ash/system/logout_button/logout_confirmation_dialog_view.h b/ash/system/logout_button/logout_confirmation_dialog_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0a7b2b58f2063a027626d6d4f2f87eb14a466d3f |
--- /dev/null |
+++ b/ash/system/logout_button/logout_confirmation_dialog_view.h |
@@ -0,0 +1,60 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_CONFIRMATION_DIALOG_VIEW_H_ |
+#define ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_CONFIRMATION_DIALOG_VIEW_H_ |
+ |
+#include "base/timer/timer.h" |
+#include "ui/views/window/dialog_delegate.h" |
+ |
+namespace views { |
+ class Label; |
bartfab (slow)
2013/10/24 13:11:02
Do not indent class declarations.
binjin
2013/10/25 13:03:10
Done.
|
+} |
+ |
+namespace ash { |
+ |
+namespace internal { |
+ |
+class LogoutButtonTray; |
+ |
+// dialog view class for logout confirmation |
bartfab (slow)
2013/10/24 13:11:02
This should be a complete sentence, starting with
binjin
2013/10/25 13:03:10
Done.
|
+class LogoutConfirmationDialogView : public views::DialogDelegateView { |
+ public: |
+ |
bartfab (slow)
2013/10/24 13:11:02
Remove blank line.
binjin
2013/10/25 13:03:10
Done.
|
+ // views::DialogDelegateView: |
+ virtual bool Accept(); |
bartfab (slow)
2013/10/24 13:11:02
Add OVERRIDE.
binjin
2013/10/25 13:03:10
Done.
|
+ virtual int GetDialogButtons() const OVERRIDE; |
bartfab (slow)
2013/10/24 13:11:02
#include "base/compiler_specific.h"
binjin
2013/10/25 13:03:10
Done.
|
+ virtual ui::ModalType GetModalType() const OVERRIDE; |
+ virtual string16 GetWindowTitle() const OVERRIDE; |
+ virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
+ |
+ private: |
+ |
bartfab (slow)
2013/10/24 13:11:02
Remove blank line.
binjin
2013/10/25 13:03:10
Done.
|
+ friend class LogoutButtonTray; |
bartfab (slow)
2013/10/24 13:11:02
Make the methods public and remove the friend decl
binjin
2013/10/25 13:03:10
Done.
|
+ |
+ LogoutConfirmationDialogView(LogoutButtonTray *owner); |
bartfab (slow)
2013/10/24 13:11:02
- Put the * on the data type, not the argument nam
binjin
2013/10/25 13:03:10
Done.
|
+ virtual ~LogoutConfirmationDialogView(); |
+ |
+ void InitAndShow(); |
+ |
+ void Show(); |
+ |
+ void UpdateCountdown(); |
+ |
+ views::Label *display_label_; |
bartfab (slow)
2013/10/24 13:11:02
Put the * on the data type, not the member name.
binjin
2013/10/25 13:03:10
Done.
|
+ |
+ base::Time countdown_end_time_; |
bartfab (slow)
2013/10/24 13:11:02
- Use base::TimeTicks instead: base::Time changes
binjin
2013/10/25 13:03:10
Done.
|
+ |
+ base::RepeatingTimer<LogoutConfirmationDialogView> timer_; |
+ |
+ LogoutButtonTray *owner_; |
bartfab (slow)
2013/10/24 13:11:02
Put the * on the data type, not the member name.
binjin
2013/10/25 13:03:10
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(LogoutConfirmationDialogView); |
bartfab (slow)
2013/10/24 13:11:02
#include "base/basictypes.h"
binjin
2013/10/25 13:03:10
Done.
|
+}; |
+ |
+} // namespace internal |
+ |
+} // namespace ash |
+ |
+#endif // ASH_SYSTEM_LOGOUT_BUTTON_LOGOUT_CONFIRMATION_DIALOG_VIEW_H_ |
bartfab (slow)
2013/10/24 13:11:02
Add blank line at end of file.
binjin
2013/10/25 13:03:10
Done.
|