| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/views/repost_form_warning_view.h" | 5 #include "chrome/browser/views/repost_form_warning_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" |
| 7 #include "chrome/browser/browser_list.h" | 8 #include "chrome/browser/browser_list.h" |
| 8 #include "chrome/browser/tab_contents/navigation_controller.h" | 9 #include "chrome/browser/tab_contents/navigation_controller.h" |
| 9 #include "chrome/common/l10n_util.h" | |
| 10 #include "chrome/common/message_box_flags.h" | 10 #include "chrome/common/message_box_flags.h" |
| 11 #include "chrome/common/notification_service.h" | 11 #include "chrome/common/notification_service.h" |
| 12 #include "chrome/views/controls/message_box_view.h" | 12 #include "chrome/views/controls/message_box_view.h" |
| 13 #include "chrome/views/window/window.h" | 13 #include "chrome/views/window/window.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 15 | 15 |
| 16 // Implementation of function declared in | 16 // Implementation of function declared in |
| 17 // browser/tab_contents/repost_form_warning.h | 17 // browser/tab_contents/repost_form_warning.h |
| 18 void RunRepostFormWarningDialog(NavigationController* navigation_controller) { | 18 void RunRepostFormWarningDialog(NavigationController* navigation_controller) { |
| 19 RepostFormWarningView* dialog = | 19 RepostFormWarningView* dialog = |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // the same page anymore) or if the tab is closed, because then we won't have | 96 // the same page anymore) or if the tab is closed, because then we won't have |
| 97 // a navigation controller anymore. | 97 // a navigation controller anymore. |
| 98 if (window() && navigation_controller_ && | 98 if (window() && navigation_controller_ && |
| 99 (type == NotificationType::LOAD_START || | 99 (type == NotificationType::LOAD_START || |
| 100 type == NotificationType::TAB_CLOSING) && | 100 type == NotificationType::TAB_CLOSING) && |
| 101 Source<NavigationController>(source).ptr() == navigation_controller_) { | 101 Source<NavigationController>(source).ptr() == navigation_controller_) { |
| 102 navigation_controller_ = NULL; | 102 navigation_controller_ = NULL; |
| 103 window()->Close(); | 103 window()->Close(); |
| 104 } | 104 } |
| 105 } | 105 } |
| OLD | NEW |