Chromium Code Reviews| Index: chrome/renderer/chrome_render_frame_observer.cc |
| diff --git a/chrome/renderer/chrome_render_frame_observer.cc b/chrome/renderer/chrome_render_frame_observer.cc |
| index b49f1beea218117dbbd65ff3815aed22b42ed47e..65edde330b6458f30f8016a3f335ffaf0d8a88f6 100644 |
| --- a/chrome/renderer/chrome_render_frame_observer.cc |
| +++ b/chrome/renderer/chrome_render_frame_observer.cc |
| @@ -64,6 +64,10 @@ static const size_t kMaxIndexChars = 65535; |
| // Constants for UMA statistic collection. |
| static const char kTranslateCaptureText[] = "Translate.CaptureText"; |
| +// For a page that auto-refreshes, we still show the bubble, if |
| +// the refresh delay is less than this value (in seconds). |
| +static const double kLocationChangeInterval = 10; |
|
jochen (gone - plz use gerrit)
2016/03/08 05:11:01
Please add InSeconds
|
| + |
| namespace { |
| // If the source image is null or occupies less area than |
| @@ -338,7 +342,7 @@ void ChromeRenderFrameObserver::CapturePageText(TextCaptureType capture_type) { |
| return; |
| // Don't capture pages that have pending redirect or location change. |
| - if (frame->isNavigationScheduled()) |
| + if (frame->isNavigationScheduledWithin(kLocationChangeInterval)) |
| return; |
| // Don't index/capture pages that are in view source mode. |