OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/startup/session_crashed_prompt.h" | 5 #include "chrome/browser/ui/startup/session_crashed_prompt.h" |
6 | 6 |
| 7 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
7 #include "chrome/browser/infobars/infobar_tab_helper.h" | 8 #include "chrome/browser/infobars/infobar_tab_helper.h" |
8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/sessions/session_restore.h" | 10 #include "chrome/browser/sessions/session_restore.h" |
10 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/browser/ui/browser_finder.h" | 12 #include "chrome/browser/ui/browser_finder.h" |
13 #include "chrome/browser/ui/browser_tabstrip.h" | 13 #include "chrome/browser/ui/browser_tabstrip.h" |
14 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
15 #include "chrome/common/chrome_notification_types.h" | 15 #include "chrome/common/chrome_notification_types.h" |
16 #include "chrome/common/url_constants.h" | 16 #include "chrome/common/url_constants.h" |
17 #include "content/public/browser/dom_storage_context.h" | 17 #include "content/public/browser/dom_storage_context.h" |
18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 | 144 |
145 // Don't show the info-bar if there are already info-bars showing. | 145 // Don't show the info-bar if there are already info-bars showing. |
146 if (tab->infobar_tab_helper()->infobar_count() > 0) | 146 if (tab->infobar_tab_helper()->infobar_count() > 0) |
147 return; | 147 return; |
148 | 148 |
149 tab->infobar_tab_helper()->AddInfoBar( | 149 tab->infobar_tab_helper()->AddInfoBar( |
150 new SessionCrashedInfoBarDelegate(tab->infobar_tab_helper())); | 150 new SessionCrashedInfoBarDelegate(tab->infobar_tab_helper())); |
151 } | 151 } |
152 | 152 |
153 } // namespace chrome | 153 } // namespace chrome |
OLD | NEW |