Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: chrome/browser/find_bar_controller.cc

Issue 56193: Bug 2220: Fix for missing Find highlighting after Refresh (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/tab_contents/web_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/tab_contents/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698