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

Side by Side Diff: chrome/browser/ui/views/critical_notification_bubble_view.h

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 years, 1 month 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "ui/views/bubble/bubble_dialog_delegate.h" 10 #include "ui/views/bubble/bubble_dialog_delegate.h"
11 11
12 class CriticalNotificationBubbleView : public views::BubbleDialogDelegateView { 12 class CriticalNotificationBubbleView : public views::BubbleDialogDelegateView {
13 public: 13 public:
14 explicit CriticalNotificationBubbleView(views::View* anchor_view); 14 explicit CriticalNotificationBubbleView(views::View* anchor_view);
15 ~CriticalNotificationBubbleView() override; 15 ~CriticalNotificationBubbleView() override;
16 16
17 // views::BubbleDialogDelegateView overrides: 17 // views::BubbleDialogDelegateView overrides:
18 base::string16 GetWindowTitle() const override; 18 base::string16 GetWindowTitle() const override;
19 gfx::ImageSkia GetWindowIcon() override; 19 gfx::ImageSkia GetWindowIcon() override;
20 bool ShouldShowWindowIcon() const override; 20 bool ShouldShowWindowIcon() const override;
21 void WindowClosing() override; 21 void WindowClosing() override;
22 bool Cancel() override; 22 bool Cancel() override;
23 bool Accept() override; 23 bool Accept() override;
24 void Init() override; 24 void Init() override;
25 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 25 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
26 void GetAccessibleState(ui::AXViewState* state) override; 26 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
27 void ViewHierarchyChanged( 27 void ViewHierarchyChanged(
28 const ViewHierarchyChangedDetails& details) override; 28 const ViewHierarchyChangedDetails& details) override;
29 29
30 private: 30 private:
31 // Helper function to calculate the remaining time (in seconds) until 31 // Helper function to calculate the remaining time (in seconds) until
32 // spontaneous reboot. 32 // spontaneous reboot.
33 int GetRemainingTime() const; 33 int GetRemainingTime() const;
34 34
35 // Called when the timer fires each time the clock ticks. 35 // Called when the timer fires each time the clock ticks.
36 void OnCountdown(); 36 void OnCountdown();
37 37
38 // A timer to refresh the bubble to show new countdown value. 38 // A timer to refresh the bubble to show new countdown value.
39 base::RepeatingTimer refresh_timer_; 39 base::RepeatingTimer refresh_timer_;
40 40
41 // When the bubble was created. 41 // When the bubble was created.
42 base::TimeTicks bubble_created_; 42 base::TimeTicks bubble_created_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(CriticalNotificationBubbleView); 44 DISALLOW_COPY_AND_ASSIGN(CriticalNotificationBubbleView);
45 }; 45 };
46 46
47 #endif // CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_ 47 #endif // CHROME_BROWSER_UI_VIEWS_CRITICAL_NOTIFICATION_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/conflicting_module_view_win.cc ('k') | chrome/browser/ui/views/critical_notification_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698