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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 const content::NotificationDetails& details) OVERRIDE; | 91 const content::NotificationDetails& details) OVERRIDE; |
92 | 92 |
93 // TabStripModelObserver methods. | 93 // TabStripModelObserver methods. |
94 // When the tab with current bubble is being dragged and dropped to a new | 94 // When the tab with current bubble is being dragged and dropped to a new |
95 // window or to another window, the bubble will be dismissed as if the user | 95 // window or to another window, the bubble will be dismissed as if the user |
96 // chose not to restore the previous session. | 96 // chose not to restore the previous session. |
97 virtual void TabDetachedAt( | 97 virtual void TabDetachedAt( |
98 content::WebContents* contents, | 98 content::WebContents* contents, |
99 int index) OVERRIDE; | 99 int index) OVERRIDE; |
100 | 100 |
101 // Create the view for user to opt in to Uma. | 101 // Create the view for user to opt in to Uma. |
msw
2014/08/26 20:19:37
nit: "for the user", s/Uma/UMA.
yao
2014/08/27 23:07:03
Done.
| |
102 void CreateUmaOptinView(views::GridLayout* layout); | 102 views::View* CreateUmaOptinView(); |
msw
2014/08/26 20:19:37
nit: capitalize UMA in the function name, that see
yao
2014/08/27 23:07:03
Done.
| |
103 | 103 |
104 // Restore previous session after user selects so. | 104 // Restore previous session after user selects so. |
105 void RestorePreviousSession(views::Button* sender); | 105 void RestorePreviousSession(views::Button* sender); |
106 | 106 |
107 // Close and destroy the bubble. | 107 // Close and destroy the bubble. |
108 void CloseBubble(); | 108 void CloseBubble(); |
109 | 109 |
110 content::NotificationRegistrar registrar_; | 110 content::NotificationRegistrar registrar_; |
111 | 111 |
112 // Used for opening the question mark link as well as access the tab strip. | 112 // Used for opening the question mark link as well as access the tab strip. |
(...skipping 15 matching lines...) Expand all Loading... | |
128 bool started_navigation_; | 128 bool started_navigation_; |
129 | 129 |
130 // Whether or not the user chose to restore previous session. It is used to | 130 // Whether or not the user chose to restore previous session. It is used to |
131 // collect bubble usage stats. | 131 // collect bubble usage stats. |
132 bool restored_; | 132 bool restored_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); | 134 DISALLOW_COPY_AND_ASSIGN(SessionCrashedBubbleView); |
135 }; | 135 }; |
136 | 136 |
137 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ | 137 #endif // CHROME_BROWSER_UI_VIEWS_SESSION_CRASHED_BUBBLE_VIEW_H_ |
OLD | NEW |