| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/chrome_render_frame_observer.h" | 5 #include "chrome/renderer/chrome_render_frame_observer.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 return; | 378 return; |
| 379 | 379 |
| 380 page_info_.CapturePageInfoLater( | 380 page_info_.CapturePageInfoLater( |
| 381 FINAL_CAPTURE, render_frame(), | 381 FINAL_CAPTURE, render_frame(), |
| 382 base::TimeDelta::FromMilliseconds( | 382 base::TimeDelta::FromMilliseconds( |
| 383 render_frame()->GetRenderView()->GetContentStateImmediately() | 383 render_frame()->GetRenderView()->GetContentStateImmediately() |
| 384 ? 0 | 384 ? 0 |
| 385 : kDelayForCaptureMs)); | 385 : kDelayForCaptureMs)); |
| 386 } | 386 } |
| 387 | 387 |
| 388 void ChromeRenderFrameObserver::DidStartProvisionalLoad() { | 388 void ChromeRenderFrameObserver::DidStartProvisionalLoad( |
| 389 blink::WebDataSource* datasource) { |
| 389 // Let translate_helper do any preparatory work for loading a URL. | 390 // Let translate_helper do any preparatory work for loading a URL. |
| 390 if (!translate_helper_) | 391 if (!translate_helper_) |
| 391 return; | 392 return; |
| 392 | 393 |
| 393 translate_helper_->PrepareForUrl( | 394 translate_helper_->PrepareForUrl( |
| 394 render_frame()->GetWebFrame()->document().url()); | 395 render_frame()->GetWebFrame()->document().url()); |
| 395 } | 396 } |
| 396 | 397 |
| 397 void ChromeRenderFrameObserver::DidCommitProvisionalLoad( | 398 void ChromeRenderFrameObserver::DidCommitProvisionalLoad( |
| 398 bool is_new_navigation, | 399 bool is_new_navigation, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 424 | 425 |
| 425 TRACE_EVENT0("renderer", "ChromeRenderViewObserver::CapturePageInfo"); | 426 TRACE_EVENT0("renderer", "ChromeRenderViewObserver::CapturePageInfo"); |
| 426 | 427 |
| 427 #if defined(FULL_SAFE_BROWSING) | 428 #if defined(FULL_SAFE_BROWSING) |
| 428 // Will swap out the string. | 429 // Will swap out the string. |
| 429 if (phishing_classifier_) | 430 if (phishing_classifier_) |
| 430 phishing_classifier_->PageCaptured(content, | 431 phishing_classifier_->PageCaptured(content, |
| 431 capture_type == PRELIMINARY_CAPTURE); | 432 capture_type == PRELIMINARY_CAPTURE); |
| 432 #endif | 433 #endif |
| 433 } | 434 } |
| OLD | NEW |