| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 if (frame->parent()) | 244 if (frame->parent()) |
| 245 return; | 245 return; |
| 246 | 246 |
| 247 GURL osdd_url = frame->document().openSearchDescriptionURL(); | 247 GURL osdd_url = frame->document().openSearchDescriptionURL(); |
| 248 if (!osdd_url.is_empty()) { | 248 if (!osdd_url.is_empty()) { |
| 249 Send(new ChromeViewHostMsg_PageHasOSDD( | 249 Send(new ChromeViewHostMsg_PageHasOSDD( |
| 250 routing_id(), frame->document().url(), osdd_url)); | 250 routing_id(), frame->document().url(), osdd_url)); |
| 251 } | 251 } |
| 252 } | 252 } |
| 253 | 253 |
| 254 void ChromeRenderFrameObserver::DidStartProvisionalLoad() { | 254 void ChromeRenderFrameObserver::DidStartProvisionalLoad( |
| 255 blink::WebDataSource* data_source) { |
| 255 // Let translate_helper do any preparatory work for loading a URL. | 256 // Let translate_helper do any preparatory work for loading a URL. |
| 256 if (!translate_helper_) | 257 if (!translate_helper_) |
| 257 return; | 258 return; |
| 258 | 259 |
| 259 translate_helper_->PrepareForUrl( | 260 translate_helper_->PrepareForUrl( |
| 260 render_frame()->GetWebFrame()->document().url()); | 261 render_frame()->GetWebFrame()->document().url()); |
| 261 } | 262 } |
| 262 | 263 |
| 263 void ChromeRenderFrameObserver::DidCommitProvisionalLoad( | 264 void ChromeRenderFrameObserver::DidCommitProvisionalLoad( |
| 264 bool is_new_navigation, | 265 bool is_new_navigation, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 CapturePageText(FINAL_CAPTURE); | 340 CapturePageText(FINAL_CAPTURE); |
| 340 break; | 341 break; |
| 341 default: | 342 default: |
| 342 break; | 343 break; |
| 343 } | 344 } |
| 344 } | 345 } |
| 345 | 346 |
| 346 void ChromeRenderFrameObserver::OnDestruct() { | 347 void ChromeRenderFrameObserver::OnDestruct() { |
| 347 delete this; | 348 delete this; |
| 348 } | 349 } |
| OLD | NEW |