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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 void ChromeRenderFrameObserver::DidFinishLoad() { | 320 void ChromeRenderFrameObserver::DidFinishLoad() { |
321 WebLocalFrame* frame = render_frame()->GetWebFrame(); | 321 WebLocalFrame* frame = render_frame()->GetWebFrame(); |
322 // Don't do anything for subframes. | 322 // Don't do anything for subframes. |
323 if (frame->parent()) | 323 if (frame->parent()) |
324 return; | 324 return; |
325 | 325 |
326 GURL osdd_url = frame->document().openSearchDescriptionURL(); | 326 GURL osdd_url = frame->document().openSearchDescriptionURL(); |
327 if (!osdd_url.is_empty()) { | 327 if (!osdd_url.is_empty()) { |
328 Send(new ChromeViewHostMsg_PageHasOSDD( | 328 Send(new ChromeViewHostMsg_PageHasOSDD( |
329 routing_id(), frame->document().url(), osdd_url, | 329 routing_id(), frame->document().url(), osdd_url)); |
330 search_provider::AUTODETECTED_PROVIDER)); | |
331 } | 330 } |
332 } | 331 } |
333 | 332 |
334 void ChromeRenderFrameObserver::DidStartProvisionalLoad() { | 333 void ChromeRenderFrameObserver::DidStartProvisionalLoad() { |
335 // Let translate_helper do any preparatory work for loading a URL. | 334 // Let translate_helper do any preparatory work for loading a URL. |
336 if (!translate_helper_) | 335 if (!translate_helper_) |
337 return; | 336 return; |
338 | 337 |
339 translate_helper_->PrepareForUrl( | 338 translate_helper_->PrepareForUrl( |
340 render_frame()->GetWebFrame()->document().url()); | 339 render_frame()->GetWebFrame()->document().url()); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 case blink::WebMeaningfulLayout::FinishedParsing: | 413 case blink::WebMeaningfulLayout::FinishedParsing: |
415 CapturePageText(PRELIMINARY_CAPTURE); | 414 CapturePageText(PRELIMINARY_CAPTURE); |
416 break; | 415 break; |
417 case blink::WebMeaningfulLayout::FinishedLoading: | 416 case blink::WebMeaningfulLayout::FinishedLoading: |
418 CapturePageText(FINAL_CAPTURE); | 417 CapturePageText(FINAL_CAPTURE); |
419 break; | 418 break; |
420 default: | 419 default: |
421 break; | 420 break; |
422 } | 421 } |
423 } | 422 } |
OLD | NEW |