| 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 21 matching lines...) Expand all Loading... |
| 32 // crashed. It also presents an option to enable metrics reporting, if it not | 32 // crashed. It also presents an option to enable metrics reporting, if it not |
| 33 // enabled already. | 33 // enabled already. |
| 34 class SessionCrashedBubbleView | 34 class SessionCrashedBubbleView |
| 35 : public views::BubbleDelegateView, | 35 : public views::BubbleDelegateView, |
| 36 public views::ButtonListener, | 36 public views::ButtonListener, |
| 37 public views::StyledLabelListener, | 37 public views::StyledLabelListener, |
| 38 public content::WebContentsObserver, | 38 public content::WebContentsObserver, |
| 39 public content::NotificationObserver, | 39 public content::NotificationObserver, |
| 40 public TabStripModelObserver { | 40 public TabStripModelObserver { |
| 41 public: | 41 public: |
| 42 static void Show(Browser* browser); | 42 static bool Show(Browser* browser); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // A helper class that listens to browser removal event. | 45 // A helper class that listens to browser removal event. |
| 46 class BrowserRemovalObserver; | 46 class BrowserRemovalObserver; |
| 47 | 47 |
| 48 SessionCrashedBubbleView(views::View* anchor_view, | 48 SessionCrashedBubbleView(views::View* anchor_view, |
| 49 Browser* browser, | 49 Browser* browser, |
| 50 content::WebContents* web_contents, | 50 content::WebContents* web_contents, |
| 51 bool offer_uma_optin); | 51 bool offer_uma_optin); |
| 52 ~SessionCrashedBubbleView() override; | 52 ~SessionCrashedBubbleView() override; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool started_navigation_; | 124 bool started_navigation_; |
| 125 | 125 |
| 126 // Whether or not the user chose to restore previous session. It is used to | 126 // Whether or not the user chose to restore previous session. It is used to |
| 127 // collect bubble usage stats. | 127 // collect bubble usage stats. |
| 128 bool restored_; | 128 bool restored_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); | 130 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ | 133 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ |
| OLD | NEW |