OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/find_bar_controller.h" | 5 #include "chrome/browser/find_bar_controller.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "chrome/browser/find_bar.h" | 8 #include "chrome/browser/find_bar.h" |
9 #include "chrome/browser/tab_contents/navigation_entry.h" | 9 #include "chrome/browser/tab_contents/navigation_entry.h" |
10 #include "chrome/common/notification_service.h" | 10 #include "chrome/common/notification_service.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 } else if (type == NotificationType::NAV_ENTRY_COMMITTED) { | 118 } else if (type == NotificationType::NAV_ENTRY_COMMITTED) { |
119 NavigationController* source_controller = | 119 NavigationController* source_controller = |
120 Source<NavigationController>(source).ptr(); | 120 Source<NavigationController>(source).ptr(); |
121 if (source_controller == web_contents_->controller()) { | 121 if (source_controller == web_contents_->controller()) { |
122 NavigationController::LoadCommittedDetails* commit_details = | 122 NavigationController::LoadCommittedDetails* commit_details = |
123 Details<NavigationController::LoadCommittedDetails>(details).ptr(); | 123 Details<NavigationController::LoadCommittedDetails>(details).ptr(); |
124 PageTransition::Type transition_type = | 124 PageTransition::Type transition_type = |
125 commit_details->entry->transition_type(); | 125 commit_details->entry->transition_type(); |
126 // We hide the FindInPage window when the user navigates away, except on | 126 // We hide the FindInPage window when the user navigates away, except on |
127 // reload. | 127 // reload. |
128 if (find_bar_->IsFindBarVisible() && | 128 if (find_bar_->IsFindBarVisible()) { |
129 PageTransition::StripQualifier(transition_type) != | 129 if (PageTransition::StripQualifier(transition_type) != |
130 PageTransition::RELOAD) { | 130 PageTransition::RELOAD) { |
131 EndFindSession(); | 131 EndFindSession(); |
| 132 } else { |
| 133 // On Reload we want to make sure FindNext is converted to a full Find |
| 134 // to make sure highlights for inactive matches are repainted. |
| 135 web_contents_->set_find_op_aborted(true); |
| 136 } |
132 } | 137 } |
133 } | 138 } |
134 } | 139 } |
135 } | 140 } |
OLD | NEW |