OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "core/dom/Document.h" | 57 #include "core/dom/Document.h" |
58 #include "core/dom/DocumentFullscreen.h" | 58 #include "core/dom/DocumentFullscreen.h" |
59 #include "core/events/MessageEvent.h" | 59 #include "core/events/MessageEvent.h" |
60 #include "core/events/MouseEvent.h" | 60 #include "core/events/MouseEvent.h" |
61 #include "core/dom/WheelController.h" | 61 #include "core/dom/WheelController.h" |
62 #include "core/html/HTMLAppletElement.h" | 62 #include "core/html/HTMLAppletElement.h" |
63 #include "core/loader/DocumentLoader.h" | 63 #include "core/loader/DocumentLoader.h" |
64 #include "core/loader/FrameLoadRequest.h" | 64 #include "core/loader/FrameLoadRequest.h" |
65 #include "core/loader/FrameLoader.h" | 65 #include "core/loader/FrameLoader.h" |
66 #include "core/loader/HistoryItem.h" | 66 #include "core/loader/HistoryItem.h" |
67 #include "core/loader/ProgressTracker.h" | |
68 #include "core/page/Chrome.h" | 67 #include "core/page/Chrome.h" |
69 #include "core/page/EventHandler.h" | 68 #include "core/page/EventHandler.h" |
70 #include "core/frame/FrameView.h" | 69 #include "core/frame/FrameView.h" |
71 #include "core/page/Page.h" | 70 #include "core/page/Page.h" |
72 #include "core/frame/Settings.h" | 71 #include "core/frame/Settings.h" |
73 #include "core/page/WindowFeatures.h" | 72 #include "core/page/WindowFeatures.h" |
74 #include "core/rendering/HitTestResult.h" | 73 #include "core/rendering/HitTestResult.h" |
75 #include "modules/device_orientation/DeviceMotionController.h" | 74 #include "modules/device_orientation/DeviceMotionController.h" |
76 #include "modules/device_orientation/DeviceOrientationController.h" | 75 #include "modules/device_orientation/DeviceOrientationController.h" |
77 #include "modules/gamepad/NavigatorGamepad.h" | 76 #include "modules/gamepad/NavigatorGamepad.h" |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 if (m_webFrame->client()) | 485 if (m_webFrame->client()) |
487 m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(for
m)); | 486 m_webFrame->client()->willSendSubmitEvent(m_webFrame, WebFormElement(for
m)); |
488 } | 487 } |
489 | 488 |
490 void FrameLoaderClientImpl::dispatchWillSubmitForm(HTMLFormElement* form) | 489 void FrameLoaderClientImpl::dispatchWillSubmitForm(HTMLFormElement* form) |
491 { | 490 { |
492 if (m_webFrame->client()) | 491 if (m_webFrame->client()) |
493 m_webFrame->client()->willSubmitForm(m_webFrame, WebFormElement(form)); | 492 m_webFrame->client()->willSubmitForm(m_webFrame, WebFormElement(form)); |
494 } | 493 } |
495 | 494 |
496 void FrameLoaderClientImpl::postProgressStartedNotification(LoadStartType loadSt
artType) | 495 void FrameLoaderClientImpl::didStartLoading(LoadStartType loadStartType) |
497 { | 496 { |
498 WebViewImpl* webview = m_webFrame->viewImpl(); | 497 if (m_webFrame->client()) |
499 if (webview && webview->client()) | 498 m_webFrame->client()->didStartLoading(loadStartType == NavigationToDiffe
rentDocument); |
500 webview->client()->didStartLoading(loadStartType == NavigationToDifferen
tDocument); | |
501 } | 499 } |
502 | 500 |
503 void FrameLoaderClientImpl::postProgressEstimateChangedNotification() | 501 void FrameLoaderClientImpl::progressEstimateChanged(double progressEstimate) |
504 { | 502 { |
505 WebViewImpl* webview = m_webFrame->viewImpl(); | 503 if (m_webFrame->client()) |
506 if (webview && webview->client()) { | 504 m_webFrame->client()->didChangeLoadProgress(progressEstimate); |
507 webview->client()->didChangeLoadProgress( | |
508 m_webFrame, m_webFrame->frame()->page()->progress().estimatedProgres
s()); | |
509 } | |
510 } | 505 } |
511 | 506 |
512 void FrameLoaderClientImpl::postProgressFinishedNotification() | 507 void FrameLoaderClientImpl::didStopLoading() |
513 { | 508 { |
514 // FIXME: why might the webview be null? http://b/1234461 | 509 if (m_webFrame->client()) |
515 WebViewImpl* webview = m_webFrame->viewImpl(); | 510 m_webFrame->client()->didStopLoading(); |
516 if (webview && webview->client()) | |
517 webview->client()->didStopLoading(); | |
518 } | 511 } |
519 | 512 |
520 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
vigationPolicy policy, const String& suggestedName) | 513 void FrameLoaderClientImpl::loadURLExternally(const ResourceRequest& request, Na
vigationPolicy policy, const String& suggestedName) |
521 { | 514 { |
522 if (m_webFrame->client()) { | 515 if (m_webFrame->client()) { |
523 ASSERT(m_webFrame->frame()->document()); | 516 ASSERT(m_webFrame->frame()->document()); |
524 DocumentFullscreen::webkitCancelFullScreen(*m_webFrame->frame()->documen
t()); | 517 DocumentFullscreen::webkitCancelFullScreen(*m_webFrame->frame()->documen
t()); |
525 WrappedResourceRequest webreq(request); | 518 WrappedResourceRequest webreq(request); |
526 m_webFrame->client()->loadURLExternally( | 519 m_webFrame->client()->loadURLExternally( |
527 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges
tedName); | 520 m_webFrame, webreq, static_cast<WebNavigationPolicy>(policy), sugges
tedName); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame,
client)); | 794 return adoptPtr(m_webFrame->client()->createApplicationCacheHost(m_webFrame,
client)); |
802 } | 795 } |
803 | 796 |
804 void FrameLoaderClientImpl::didStopAllLoaders() | 797 void FrameLoaderClientImpl::didStopAllLoaders() |
805 { | 798 { |
806 if (m_webFrame->client()) | 799 if (m_webFrame->client()) |
807 m_webFrame->client()->didAbortLoading(m_webFrame); | 800 m_webFrame->client()->didAbortLoading(m_webFrame); |
808 } | 801 } |
809 | 802 |
810 } // namespace blink | 803 } // namespace blink |
OLD | NEW |