| 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 "chrome/browser/ui/tabs/tab_strip_model_observer.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" |
| 9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
| 10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 public views::StyledLabelListener, | 36 public views::StyledLabelListener, |
| 37 public content::WebContentsObserver, | 37 public content::WebContentsObserver, |
| 38 public content::NotificationObserver, | 38 public content::NotificationObserver, |
| 39 public TabStripModelObserver { | 39 public TabStripModelObserver { |
| 40 public: | 40 public: |
| 41 static void Show(Browser* browser); | 41 static void Show(Browser* browser); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 SessionCrashedBubbleView(views::View* anchor_view, | 44 SessionCrashedBubbleView(views::View* anchor_view, |
| 45 Browser* browser, | 45 Browser* browser, |
| 46 content::WebContents* web_contents); | 46 content::WebContents* web_contents, |
| 47 bool offer_uma_optin); |
| 47 virtual ~SessionCrashedBubbleView(); | 48 virtual ~SessionCrashedBubbleView(); |
| 48 | 49 |
| 50 // Creates and shows the session crashed bubble, with |offer_uma_optin| |
| 51 // indicating whether the UMA opt-in checkbox should be shown. Called |
| 52 // by Show() after checking whether the UMA option should be presented. |
| 53 static void ShowForReal(Browser* browser, bool offer_uma_optin); |
| 54 |
| 49 // WidgetDelegateView methods. | 55 // WidgetDelegateView methods. |
| 50 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 56 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
| 51 | 57 |
| 52 // views::BubbleDelegateView methods. | 58 // views::BubbleDelegateView methods. |
| 53 virtual void Init() OVERRIDE; | 59 virtual void Init() OVERRIDE; |
| 54 | 60 |
| 55 // views::ButtonListener methods. | 61 // views::ButtonListener methods. |
| 56 virtual void ButtonPressed(views::Button* sender, | 62 virtual void ButtonPressed(views::Button* sender, |
| 57 const ui::Event& event) OVERRIDE; | 63 const ui::Event& event) OVERRIDE; |
| 58 | 64 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 111 |
| 106 // Button for the user to confirm a session restore. | 112 // Button for the user to confirm a session restore. |
| 107 views::LabelButton* restore_button_; | 113 views::LabelButton* restore_button_; |
| 108 | 114 |
| 109 // Button for the user to close this bubble. | 115 // Button for the user to close this bubble. |
| 110 views::LabelButton* close_; | 116 views::LabelButton* close_; |
| 111 | 117 |
| 112 // Checkbox for the user to opt-in to UMA reporting. | 118 // Checkbox for the user to opt-in to UMA reporting. |
| 113 views::Checkbox* uma_option_; | 119 views::Checkbox* uma_option_; |
| 114 | 120 |
| 121 // Whether or not the UMA opt-in option should be shown. |
| 122 bool offer_uma_optin_; |
| 123 |
| 115 // Whether or not a navigation has started on current tab. | 124 // Whether or not a navigation has started on current tab. |
| 116 bool started_navigation_; | 125 bool started_navigation_; |
| 117 | 126 |
| 118 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); | 127 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); |
| 119 }; | 128 }; |
| 120 | 129 |
| 121 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ | 130 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ |
| OLD | NEW |