| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Creates and shows the session crashed bubble, with |offer_uma_optin| | 54 // Creates and shows the session crashed bubble, with |offer_uma_optin| |
| 55 // indicating whether the UMA opt-in checkbox should be shown. Called | 55 // indicating whether the UMA opt-in checkbox should be shown. Called |
| 56 // by Show after checking whether the UMA option should be presented and it | 56 // by Show after checking whether the UMA option should be presented and it |
| 57 // takes ownership of |browser_observer|. | 57 // takes ownership of |browser_observer|. |
| 58 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer, | 58 static void ShowForReal(scoped_ptr<BrowserRemovalObserver> browser_observer, |
| 59 bool offer_uma_optin); | 59 bool offer_uma_optin); |
| 60 | 60 |
| 61 // WidgetDelegateView methods. | 61 // WidgetDelegateView methods. |
| 62 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 62 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
| 63 virtual base::string16 GetWindowTitle() const OVERRIDE; |
| 64 virtual bool ShouldShowWindowTitle() const OVERRIDE; |
| 65 virtual bool ShouldShowCloseButton() const OVERRIDE; |
| 63 | 66 |
| 64 // views::BubbleDelegateView methods. | 67 // views::BubbleDelegateView methods. |
| 65 virtual void Init() OVERRIDE; | 68 virtual void Init() OVERRIDE; |
| 66 | 69 |
| 67 // views::ButtonListener methods. | 70 // views::ButtonListener methods. |
| 68 virtual void ButtonPressed(views::Button* sender, | 71 virtual void ButtonPressed(views::Button* sender, |
| 69 const ui::Event& event) OVERRIDE; | 72 const ui::Event& event) OVERRIDE; |
| 70 | 73 |
| 71 // views::StyledLabelListener methods. | 74 // views::StyledLabelListener methods. |
| 72 virtual void StyledLabelLinkClicked(const gfx::Range& range, | 75 virtual void StyledLabelLinkClicked(const gfx::Range& range, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 114 |
| 112 // Used for opening the question mark link as well as access the tab strip. | 115 // Used for opening the question mark link as well as access the tab strip. |
| 113 Browser* browser_; | 116 Browser* browser_; |
| 114 | 117 |
| 115 // The web content associated with current bubble. | 118 // The web content associated with current bubble. |
| 116 content::WebContents* web_contents_; | 119 content::WebContents* web_contents_; |
| 117 | 120 |
| 118 // Button for the user to confirm a session restore. | 121 // Button for the user to confirm a session restore. |
| 119 views::LabelButton* restore_button_; | 122 views::LabelButton* restore_button_; |
| 120 | 123 |
| 121 // Button for the user to close this bubble. | |
| 122 views::LabelButton* close_; | |
| 123 | |
| 124 // Checkbox for the user to opt-in to UMA reporting. | 124 // Checkbox for the user to opt-in to UMA reporting. |
| 125 views::Checkbox* uma_option_; | 125 views::Checkbox* uma_option_; |
| 126 | 126 |
| 127 // Whether or not the UMA opt-in option should be shown. | 127 // Whether or not the UMA opt-in option should be shown. |
| 128 bool offer_uma_optin_; | 128 bool offer_uma_optin_; |
| 129 | 129 |
| 130 // Whether or not a navigation has started on current tab. | 130 // Whether or not a navigation has started on current tab. |
| 131 bool started_navigation_; | 131 bool started_navigation_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); | 133 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ | 136 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ |
| OLD | NEW |