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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2384483004: Handling new frames and frame navigations with find-in-page during a find session. (Closed)
Patch Set: Fix. Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 } 1972 }
1973 1973
1974 void WebLocalFrameImpl::didCallIsSearchProviderInstalled() 1974 void WebLocalFrameImpl::didCallIsSearchProviderInstalled()
1975 { 1975 {
1976 UseCounter::count(frame(), UseCounter::ExternalIsSearchProviderInstalled); 1976 UseCounter::count(frame(), UseCounter::ExternalIsSearchProviderInstalled);
1977 } 1977 }
1978 1978
1979 void WebLocalFrameImpl::requestFind(int identifier, const WebString& searchText, const WebFindOptions& options) 1979 void WebLocalFrameImpl::requestFind(int identifier, const WebString& searchText, const WebFindOptions& options)
1980 { 1980 {
1981 // Send "no results" if this frame has no visible content. 1981 // Send "no results" if this frame has no visible content.
1982 if (!hasVisibleContent()) { 1982 if (!hasVisibleContent() && !options.force) {
1983 client()->reportFindInPageMatchCount(identifier, 0 /* count */, true /* finalUpdate */); 1983 client()->reportFindInPageMatchCount(identifier, 0 /* count */, true /* finalUpdate */);
1984 return; 1984 return;
1985 } 1985 }
1986 1986
1987 WebRange currentSelection = selectionRange(); 1987 WebRange currentSelection = selectionRange();
1988 bool result = false; 1988 bool result = false;
1989 bool activeNow = false; 1989 bool activeNow = false;
1990 1990
1991 // Search for an active match only if this frame is focused or if this is a 1991 // Search for an active match only if this frame is focused or if this is a
1992 // find next request. 1992 // find next request.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2245 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2246 } else if (metric == "wasAlternateProtocolAvailable") { 2246 } else if (metric == "wasAlternateProtocolAvailable") {
2247 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2247 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2248 } else if (metric == "connectionInfo") { 2248 } else if (metric == "connectionInfo") {
2249 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2249 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2250 } 2250 }
2251 UseCounter::count(frame(), feature); 2251 UseCounter::count(frame(), feature);
2252 } 2252 }
2253 2253
2254 } // namespace blink 2254 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.cpp ('k') | third_party/WebKit/public/web/WebFindOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698