OLD | NEW |
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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 9 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // indicating whether the user has already opted-in to UMA. It will be called | 55 // indicating whether the user has already opted-in to UMA. It will be called |
56 // by Show. It takes ownership of |browser_observer|. | 56 // by Show. It takes ownership of |browser_observer|. |
57 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer, | 57 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer, |
58 bool uma_opted_in_already); | 58 bool uma_opted_in_already); |
59 | 59 |
60 // WidgetDelegateView methods. | 60 // WidgetDelegateView methods. |
61 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 61 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
62 virtual base::string16 GetWindowTitle() const OVERRIDE; | 62 virtual base::string16 GetWindowTitle() const OVERRIDE; |
63 virtual bool ShouldShowWindowTitle() const OVERRIDE; | 63 virtual bool ShouldShowWindowTitle() const OVERRIDE; |
64 virtual bool ShouldShowCloseButton() const OVERRIDE; | 64 virtual bool ShouldShowCloseButton() const OVERRIDE; |
| 65 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
65 | 66 |
66 // views::BubbleDelegateView methods. | 67 // views::BubbleDelegateView methods. |
67 virtual void Init() OVERRIDE; | 68 virtual void Init() OVERRIDE; |
68 | 69 |
69 // views::ButtonListener methods. | 70 // views::ButtonListener methods. |
70 virtual void ButtonPressed(views::Button* sender, | 71 virtual void ButtonPressed(views::Button* sender, |
71 const ui::Event& event) OVERRIDE; | 72 const ui::Event& event) OVERRIDE; |
72 | 73 |
73 // views::StyledLabelListener methods. | 74 // views::StyledLabelListener methods. |
74 virtual void StyledLabelLinkClicked(const gfx::Range& range, | 75 virtual void StyledLabelLinkClicked(const gfx::Range& range, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 123 |
123 // Checkbox for the user to opt-in to UMA reporting. | 124 // Checkbox for the user to opt-in to UMA reporting. |
124 views::Checkbox* uma_option_; | 125 views::Checkbox* uma_option_; |
125 | 126 |
126 // Whether or not the UMA opt-in option should be shown. | 127 // Whether or not the UMA opt-in option should be shown. |
127 bool offer_uma_optin_; | 128 bool offer_uma_optin_; |
128 | 129 |
129 // Whether or not a navigation has started on current tab. | 130 // Whether or not a navigation has started on current tab. |
130 bool started_navigation_; | 131 bool started_navigation_; |
131 | 132 |
| 133 // Whether or not the user chose to restore previous session. It is used to |
| 134 // collect bubble usage stats. |
| 135 bool restored_; |
| 136 |
132 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); | 137 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); |
133 }; | 138 }; |
134 | 139 |
135 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ | 140 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ |
OLD | NEW |