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

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

Issue 2236403004: Handling new frames and frame navigations with find-in-page during a find session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and updated comment. 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 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1967 } 1967 }
1968 1968
1969 void WebLocalFrameImpl::didCallIsSearchProviderInstalled() 1969 void WebLocalFrameImpl::didCallIsSearchProviderInstalled()
1970 { 1970 {
1971 UseCounter::count(frame(), UseCounter::ExternalIsSearchProviderInstalled); 1971 UseCounter::count(frame(), UseCounter::ExternalIsSearchProviderInstalled);
1972 } 1972 }
1973 1973
1974 void WebLocalFrameImpl::requestFind(int identifier, const WebString& searchText, const WebFindOptions& options) 1974 void WebLocalFrameImpl::requestFind(int identifier, const WebString& searchText, const WebFindOptions& options)
1975 { 1975 {
1976 // Send "no results" if this frame has no visible content. 1976 // Send "no results" if this frame has no visible content.
1977 if (!hasVisibleContent()) { 1977 if (!hasVisibleContent() && !options.force) {
1978 client()->reportFindInPageMatchCount(identifier, 0 /* count */, true /* finalUpdate */); 1978 client()->reportFindInPageMatchCount(identifier, 0 /* count */, true /* finalUpdate */);
1979 return; 1979 return;
1980 } 1980 }
1981 1981
1982 WebRange currentSelection = selectionRange(); 1982 WebRange currentSelection = selectionRange();
1983 bool result = false; 1983 bool result = false;
1984 bool activeNow = false; 1984 bool activeNow = false;
1985 1985
1986 // Search for an active match only if this frame is focused or if this is a 1986 // Search for an active match only if this frame is focused or if this is a
1987 // find next request. 1987 // find next request.
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2240 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2241 } else if (metric == "wasAlternateProtocolAvailable") { 2241 } else if (metric == "wasAlternateProtocolAvailable") {
2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2242 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2243 } else if (metric == "connectionInfo") { 2243 } else if (metric == "connectionInfo") {
2244 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2244 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2245 } 2245 }
2246 UseCounter::count(frame(), feature); 2246 UseCounter::count(frame(), feature);
2247 } 2247 }
2248 2248
2249 } // namespace blink 2249 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698