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

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

Issue 2644663003: Offer to open the startup pages after a crash. (Closed)
Patch Set: Rebase Created 3 years, 10 months 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 2014 The Chromium Authors. All rights reserved. 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 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_SESSION_CRASHED_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool offer_uma_optin); 42 bool offer_uma_optin);
43 ~SessionCrashedBubbleView() override; 43 ~SessionCrashedBubbleView() override;
44 44
45 // WidgetDelegateView methods. 45 // WidgetDelegateView methods.
46 base::string16 GetWindowTitle() const override; 46 base::string16 GetWindowTitle() const override;
47 bool ShouldShowWindowTitle() const override; 47 bool ShouldShowWindowTitle() const override;
48 bool ShouldShowCloseButton() const override; 48 bool ShouldShowCloseButton() const override;
49 void OnWidgetDestroying(views::Widget* widget) override; 49 void OnWidgetDestroying(views::Widget* widget) override;
50 views::View* CreateFootnoteView() override; 50 views::View* CreateFootnoteView() override;
51 bool Accept() override; 51 bool Accept() override;
52 bool Cancel() override;
52 bool Close() override; 53 bool Close() override;
53 int GetDialogButtons() const override; 54 int GetDialogButtons() const override;
54 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 55 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
55 56
56 // views::BubbleDialogDelegateView methods. 57 // views::BubbleDialogDelegateView methods.
57 void Init() override; 58 void Init() override;
58 59
59 // views::StyledLabelListener methods. 60 // views::StyledLabelListener methods.
60 void StyledLabelLinkClicked(views::StyledLabel* label, 61 void StyledLabelLinkClicked(views::StyledLabel* label,
61 const gfx::Range& range, 62 const gfx::Range& range,
62 int event_flags) override; 63 int event_flags) override;
63 64
64 // Restore previous session after user selects so. 65 // Restore previous session after user selects so.
65 void RestorePreviousSession(); 66 void RestorePreviousSession();
66 67
68 // Open startup pages after user selects so.
69 void OpenStartupPages();
70
71 // Enable UMA if the user accepted the offer.
72 void MaybeEnableUMA();
73
74 // Close and destroy the bubble.
75 void CloseBubble();
76
67 // Used for opening the question mark link as well as access the tab strip. 77 // Used for opening the question mark link as well as access the tab strip.
68 Browser* browser_; 78 Browser* browser_;
69 79
70 // Checkbox for the user to opt-in to UMA reporting. 80 // Checkbox for the user to opt-in to UMA reporting.
71 views::Checkbox* uma_option_; 81 views::Checkbox* uma_option_;
72 82
73 // Whether or not the UMA opt-in option should be shown. 83 // Whether or not the UMA opt-in option should be shown.
74 bool offer_uma_optin_; 84 bool offer_uma_optin_;
75 85
76 // Whether or not the user chose to restore previous session. It is used to 86 // Whether or not the user ignored the bubble. It is used to collect bubble
77 // collect bubble usage stats. 87 // usage stats.
78 bool restored_; 88 bool ignored_;
79 89
80 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); 90 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView);
81 }; 91 };
82 92
83 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ 93 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/browser/ui/views/session_crashed_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698