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 26 matching lines...) Expand all Loading... | |
37 public TabStripModelObserver { | 37 public TabStripModelObserver { |
38 public: | 38 public: |
39 static void Show(Browser* browser); | 39 static void Show(Browser* browser); |
40 | 40 |
41 private: | 41 private: |
42 SessionCrashedBubbleView(views::View* anchor_view, | 42 SessionCrashedBubbleView(views::View* anchor_view, |
43 Browser* browser, | 43 Browser* browser, |
44 content::WebContents* web_contents); | 44 content::WebContents* web_contents); |
45 virtual ~SessionCrashedBubbleView(); | 45 virtual ~SessionCrashedBubbleView(); |
46 | 46 |
47 // Create and show the session crashed bubble. | |
48 static void ShowForReal(Browser* browser, bool buffer); | |
Alexei Svitkine (slow)
2014/05/14 14:09:57
Rename |buffer| to a more meaningful name and make
yao
2014/05/14 14:53:28
Done.
| |
49 | |
47 // WidgetDelegateView methods. | 50 // WidgetDelegateView methods. |
48 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 51 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
49 | 52 |
50 // views::BubbleDelegateView methods. | 53 // views::BubbleDelegateView methods. |
51 virtual void Init() OVERRIDE; | 54 virtual void Init() OVERRIDE; |
52 | 55 |
53 // views::ButtonListener methods. | 56 // views::ButtonListener methods. |
54 virtual void ButtonPressed(views::Button* sender, | 57 virtual void ButtonPressed(views::Button* sender, |
55 const ui::Event& event) OVERRIDE; | 58 const ui::Event& event) OVERRIDE; |
56 | 59 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 | 102 |
100 // Button for the user to confirm a session restore. | 103 // Button for the user to confirm a session restore. |
101 views::LabelButton* restore_button_; | 104 views::LabelButton* restore_button_; |
102 | 105 |
103 // Button for the user to close this bubble. | 106 // Button for the user to close this bubble. |
104 views::LabelButton* close_; | 107 views::LabelButton* close_; |
105 | 108 |
106 // Checkbox for the user to opt-in to UMA reporting. | 109 // Checkbox for the user to opt-in to UMA reporting. |
107 views::Checkbox* uma_option_; | 110 views::Checkbox* uma_option_; |
108 | 111 |
112 // Whether or not should offer UMA opt-in option. | |
113 bool offer_uma_optin_; | |
114 | |
109 // Whether or not a navigation has started on current tab. | 115 // Whether or not a navigation has started on current tab. |
110 bool started_navigation_; | 116 bool started_navigation_; |
111 | 117 |
112 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); | 118 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); |
113 }; | 119 }; |
114 | 120 |
115 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ | 121 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ |
OLD | NEW |