OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 render_view_host_delegate_view_(NULL), | 349 render_view_host_delegate_view_(NULL), |
350 created_with_opener_(false), | 350 created_with_opener_(false), |
351 #if defined(OS_WIN) | 351 #if defined(OS_WIN) |
352 accessible_parent_(NULL), | 352 accessible_parent_(NULL), |
353 #endif | 353 #endif |
354 frame_tree_(new NavigatorImpl(&controller_, this), | 354 frame_tree_(new NavigatorImpl(&controller_, this), |
355 this, | 355 this, |
356 this, | 356 this, |
357 this, | 357 this, |
358 this), | 358 this), |
359 is_loading_(false), | |
360 is_load_to_different_document_(false), | 359 is_load_to_different_document_(false), |
361 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), | 360 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), |
362 crashed_error_code_(0), | 361 crashed_error_code_(0), |
363 waiting_for_response_(false), | 362 waiting_for_response_(false), |
364 load_state_(net::LOAD_STATE_IDLE, base::string16()), | 363 load_state_(net::LOAD_STATE_IDLE, base::string16()), |
365 upload_size_(0), | 364 upload_size_(0), |
366 upload_position_(0), | 365 upload_position_(0), |
367 is_resume_pending_(false), | 366 is_resume_pending_(false), |
367 paused_throbber_for_interstitial_(false), | |
368 displayed_insecure_content_(false), | 368 displayed_insecure_content_(false), |
369 has_accessed_initial_document_(false), | 369 has_accessed_initial_document_(false), |
370 theme_color_(SK_ColorTRANSPARENT), | 370 theme_color_(SK_ColorTRANSPARENT), |
371 last_sent_theme_color_(SK_ColorTRANSPARENT), | 371 last_sent_theme_color_(SK_ColorTRANSPARENT), |
372 did_first_visually_non_empty_paint_(false), | 372 did_first_visually_non_empty_paint_(false), |
373 capturer_count_(0), | 373 capturer_count_(0), |
374 should_normally_be_visible_(true), | 374 should_normally_be_visible_(true), |
375 is_being_destroyed_(false), | 375 is_being_destroyed_(false), |
376 notify_disconnection_(false), | 376 notify_disconnection_(false), |
377 dialog_manager_(NULL), | 377 dialog_manager_(NULL), |
378 is_showing_before_unload_dialog_(false), | 378 is_showing_before_unload_dialog_(false), |
379 last_active_time_(base::TimeTicks::Now()), | 379 last_active_time_(base::TimeTicks::Now()), |
380 closed_by_user_gesture_(false), | 380 closed_by_user_gesture_(false), |
381 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), | 381 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), |
382 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), | 382 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), |
383 zoom_scroll_remainder_(0), | 383 zoom_scroll_remainder_(0), |
384 render_view_message_source_(NULL), | 384 render_view_message_source_(NULL), |
385 render_frame_message_source_(NULL), | 385 render_frame_message_source_(NULL), |
386 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), | 386 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), |
387 fullscreen_widget_had_focus_at_shutdown_(false), | 387 fullscreen_widget_had_focus_at_shutdown_(false), |
388 is_subframe_(false), | 388 is_subframe_(false), |
389 force_disable_overscroll_content_(false), | 389 force_disable_overscroll_content_(false), |
390 last_dialog_suppressed_(false), | 390 last_dialog_suppressed_(false), |
391 geolocation_service_context_(new GeolocationServiceContext()), | 391 geolocation_service_context_(new GeolocationServiceContext()), |
392 accessibility_mode_( | 392 accessibility_mode_(BrowserAccessibilityStateImpl::GetInstance() |
393 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), | 393 ->accessibility_mode()), |
394 audio_stream_monitor_(this), | 394 audio_stream_monitor_(this), |
395 virtual_keyboard_requested_(false), | 395 virtual_keyboard_requested_(false), |
396 page_scale_factor_is_one_(true), | 396 page_scale_factor_is_one_(true), |
397 loading_weak_factory_(this) { | 397 loading_weak_factory_(this) { |
398 frame_tree_.SetFrameRemoveListener( | 398 frame_tree_.SetFrameRemoveListener( |
399 base::Bind(&WebContentsImpl::OnFrameRemoved, | 399 base::Bind(&WebContentsImpl::OnFrameRemoved, |
400 base::Unretained(this))); | 400 base::Unretained(this))); |
401 #if defined(OS_ANDROID) | 401 #if defined(OS_ANDROID) |
402 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); | 402 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); |
403 #else | 403 #else |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
895 renderer_preferences_.user_agent_override = override; | 895 renderer_preferences_.user_agent_override = override; |
896 | 896 |
897 // Send the new override string to the renderer. | 897 // Send the new override string to the renderer. |
898 RenderViewHost* host = GetRenderViewHost(); | 898 RenderViewHost* host = GetRenderViewHost(); |
899 if (host) | 899 if (host) |
900 host->SyncRendererPrefs(); | 900 host->SyncRendererPrefs(); |
901 | 901 |
902 // Reload the page if a load is currently in progress to avoid having | 902 // Reload the page if a load is currently in progress to avoid having |
903 // different parts of the page loaded using different user agents. | 903 // different parts of the page loaded using different user agents. |
904 NavigationEntry* entry = controller_.GetVisibleEntry(); | 904 NavigationEntry* entry = controller_.GetVisibleEntry(); |
905 if (is_loading_ && entry != NULL && entry->GetIsOverridingUserAgent()) | 905 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) |
906 controller_.ReloadIgnoringCache(true); | 906 controller_.ReloadIgnoringCache(true); |
907 | 907 |
908 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 908 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
909 UserAgentOverrideSet(override)); | 909 UserAgentOverrideSet(override)); |
910 } | 910 } |
911 | 911 |
912 const std::string& WebContentsImpl::GetUserAgentOverride() const { | 912 const std::string& WebContentsImpl::GetUserAgentOverride() const { |
913 return renderer_preferences_.user_agent_override; | 913 return renderer_preferences_.user_agent_override; |
914 } | 914 } |
915 | 915 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1033 | 1033 |
1034 SiteInstanceImpl* WebContentsImpl::GetPendingSiteInstance() const { | 1034 SiteInstanceImpl* WebContentsImpl::GetPendingSiteInstance() const { |
1035 RenderViewHostImpl* dest_rvh = | 1035 RenderViewHostImpl* dest_rvh = |
1036 GetRenderManager()->pending_render_view_host() ? | 1036 GetRenderManager()->pending_render_view_host() ? |
1037 GetRenderManager()->pending_render_view_host() : | 1037 GetRenderManager()->pending_render_view_host() : |
1038 GetRenderManager()->current_host(); | 1038 GetRenderManager()->current_host(); |
1039 return dest_rvh->GetSiteInstance(); | 1039 return dest_rvh->GetSiteInstance(); |
1040 } | 1040 } |
1041 | 1041 |
1042 bool WebContentsImpl::IsLoading() const { | 1042 bool WebContentsImpl::IsLoading() const { |
1043 return is_loading_; | 1043 return frame_tree_.IsLoading() && !paused_throbber_for_interstitial_; |
1044 } | 1044 } |
1045 | 1045 |
1046 bool WebContentsImpl::IsLoadingToDifferentDocument() const { | 1046 bool WebContentsImpl::IsLoadingToDifferentDocument() const { |
1047 return is_loading_ && is_load_to_different_document_; | 1047 return IsLoading() && is_load_to_different_document_; |
1048 } | 1048 } |
1049 | 1049 |
1050 bool WebContentsImpl::IsWaitingForResponse() const { | 1050 bool WebContentsImpl::IsWaitingForResponse() const { |
1051 return waiting_for_response_ && is_load_to_different_document_; | 1051 return waiting_for_response_ && is_load_to_different_document_; |
1052 } | 1052 } |
1053 | 1053 |
1054 const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const { | 1054 const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const { |
1055 return load_state_; | 1055 return load_state_; |
1056 } | 1056 } |
1057 | 1057 |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2298 InterstitialPageImpl* interstitial_page) { | 2298 InterstitialPageImpl* interstitial_page) { |
2299 DCHECK(interstitial_page); | 2299 DCHECK(interstitial_page); |
2300 GetRenderManager()->set_interstitial_page(interstitial_page); | 2300 GetRenderManager()->set_interstitial_page(interstitial_page); |
2301 | 2301 |
2302 // Cancel any visible dialogs so that they don't interfere with the | 2302 // Cancel any visible dialogs so that they don't interfere with the |
2303 // interstitial. | 2303 // interstitial. |
2304 CancelActiveAndPendingDialogs(); | 2304 CancelActiveAndPendingDialogs(); |
2305 | 2305 |
2306 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2306 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2307 DidAttachInterstitialPage()); | 2307 DidAttachInterstitialPage()); |
2308 | |
2309 // Stop the throbber if needed while the interstitial page is shown. | |
2310 if (IsLoading()) | |
2311 LoadingStateChanged(false, true, true, nullptr); | |
2312 } | |
2313 | |
2314 void WebContentsImpl::DidProceedOnInterstitial() { | |
2315 // Restart the throbber now that the interstitial page is going away. | |
2316 if (paused_throbber_for_interstitial_) { | |
2317 if (frame_tree_.IsLoading()) | |
2318 LoadingStateChanged(true, true, false, nullptr); | |
2319 } | |
2308 } | 2320 } |
2309 | 2321 |
2310 void WebContentsImpl::DetachInterstitialPage() { | 2322 void WebContentsImpl::DetachInterstitialPage() { |
2311 if (ShowingInterstitialPage()) | 2323 if (ShowingInterstitialPage()) |
2312 GetRenderManager()->remove_interstitial_page(); | 2324 GetRenderManager()->remove_interstitial_page(); |
2313 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2325 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2314 DidDetachInterstitialPage()); | 2326 DidDetachInterstitialPage()); |
2327 // Restart the throbber now that the interstitial page is going away. | |
2328 if (paused_throbber_for_interstitial_) { | |
2329 if (frame_tree_.IsLoading()) | |
2330 LoadingStateChanged(true, true, false, nullptr); | |
2331 } | |
2315 } | 2332 } |
2316 | 2333 |
2317 void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset, | 2334 void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset, |
2318 int history_length) { | 2335 int history_length) { |
2319 SetHistoryOffsetAndLengthForView( | 2336 SetHistoryOffsetAndLengthForView( |
2320 GetRenderViewHost(), history_offset, history_length); | 2337 GetRenderViewHost(), history_offset, history_length); |
2321 } | 2338 } |
2322 | 2339 |
2323 void WebContentsImpl::SetHistoryOffsetAndLengthForView( | 2340 void WebContentsImpl::SetHistoryOffsetAndLengthForView( |
2324 RenderViewHost* render_view_host, | 2341 RenderViewHost* render_view_host, |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3581 if (delegate_) | 3598 if (delegate_) |
3582 delegate_->ShowRepostFormWarningDialog(this); | 3599 delegate_->ShowRepostFormWarningDialog(this); |
3583 } | 3600 } |
3584 | 3601 |
3585 bool WebContentsImpl::HasAccessedInitialDocument() { | 3602 bool WebContentsImpl::HasAccessedInitialDocument() { |
3586 return has_accessed_initial_document_; | 3603 return has_accessed_initial_document_; |
3587 } | 3604 } |
3588 | 3605 |
3589 // Notifies the RenderWidgetHost instance about the fact that the page is | 3606 // Notifies the RenderWidgetHost instance about the fact that the page is |
3590 // loading, or done loading. | 3607 // loading, or done loading. |
3591 void WebContentsImpl::SetIsLoading(bool is_loading, | 3608 void WebContentsImpl::LoadingStateChanged(bool is_loading, |
3592 bool to_different_document, | 3609 bool to_different_document, |
3593 LoadNotificationDetails* details) { | 3610 bool pause_throbber_for_interstitial, |
3594 if (is_loading == is_loading_) | 3611 LoadNotificationDetails* details) { |
3612 // Do not send notifications about loading while the interstitial is showing. | |
3613 if (paused_throbber_for_interstitial_ && pause_throbber_for_interstitial) | |
nasko
2016/02/03 18:38:09
Why is this change needed? I don't follow based on
clamy
2016/02/08 16:13:49
It's so that the loading state is properly set whe
nasko
2016/02/09 00:12:23
Acknowledged.
| |
3595 return; | 3614 return; |
3596 | 3615 |
3616 // Update whether the interstitial state. | |
3617 paused_throbber_for_interstitial_ = pause_throbber_for_interstitial; | |
3618 | |
3597 if (!is_loading) { | 3619 if (!is_loading) { |
3598 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, | 3620 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, |
3599 base::string16()); | 3621 base::string16()); |
3600 load_state_host_.clear(); | 3622 load_state_host_.clear(); |
3601 upload_size_ = 0; | 3623 upload_size_ = 0; |
3602 upload_position_ = 0; | 3624 upload_position_ = 0; |
3603 } | 3625 } |
3604 | 3626 |
3605 GetRenderManager()->SetIsLoading(is_loading); | 3627 GetRenderManager()->SetIsLoading(is_loading); |
3606 | 3628 |
3607 is_loading_ = is_loading; | |
3608 waiting_for_response_ = is_loading; | 3629 waiting_for_response_ = is_loading; |
3609 is_load_to_different_document_ = to_different_document; | 3630 is_load_to_different_document_ = to_different_document; |
3610 | 3631 |
3611 if (delegate_) | 3632 if (delegate_) |
3612 delegate_->LoadingStateChanged(this, to_different_document); | 3633 delegate_->LoadingStateChanged(this, to_different_document); |
3613 NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); | 3634 NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); |
3614 | 3635 |
3615 std::string url = (details ? details->url.possibly_invalid_spec() : "NULL"); | 3636 std::string url = (details ? details->url.possibly_invalid_spec() : "NULL"); |
3616 if (is_loading) { | 3637 if (is_loading) { |
3617 TRACE_EVENT_ASYNC_BEGIN2("browser,navigation", "WebContentsImpl Loading", | 3638 TRACE_EVENT_ASYNC_BEGIN2("browser,navigation", "WebContentsImpl Loading", |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3950 // renderer may not have made a clean exit. | 3971 // renderer may not have made a clean exit. |
3951 if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())) | 3972 if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())) |
3952 ExitFullscreenMode(false); | 3973 ExitFullscreenMode(false); |
3953 | 3974 |
3954 // Cancel any visible dialogs so they are not left dangling over the sad tab. | 3975 // Cancel any visible dialogs so they are not left dangling over the sad tab. |
3955 CancelActiveAndPendingDialogs(); | 3976 CancelActiveAndPendingDialogs(); |
3956 | 3977 |
3957 if (delegate_) | 3978 if (delegate_) |
3958 delegate_->HideValidationMessage(this); | 3979 delegate_->HideValidationMessage(this); |
3959 | 3980 |
3960 SetIsLoading(false, true, nullptr); | |
3961 NotifyDisconnected(); | |
3962 SetIsCrashed(status, error_code); | |
3963 | |
3964 // Reset the loading progress. TODO(avi): What does it mean to have a | 3981 // Reset the loading progress. TODO(avi): What does it mean to have a |
3965 // "renderer crash" when there is more than one renderer process serving a | 3982 // "renderer crash" when there is more than one renderer process serving a |
3966 // webpage? Once this function is called at a more granular frame level, we | 3983 // webpage? Once this function is called at a more granular frame level, we |
3967 // probably will need to more granularly reset the state here. | 3984 // probably will need to more granularly reset the state here. |
3968 ResetLoadProgressState(); | 3985 ResetLoadProgressState(); |
3986 NotifyDisconnected(); | |
3987 SetIsCrashed(status, error_code); | |
3969 | 3988 |
3970 FOR_EACH_OBSERVER(WebContentsObserver, | 3989 FOR_EACH_OBSERVER(WebContentsObserver, |
3971 observers_, | 3990 observers_, |
3972 RenderProcessGone(GetCrashedStatus())); | 3991 RenderProcessGone(GetCrashedStatus())); |
3973 } | 3992 } |
3974 | 3993 |
3975 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { | 3994 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { |
3976 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); | 3995 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); |
3977 } | 3996 } |
3978 | 3997 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4052 delegate_->SwappedOut(this); | 4071 delegate_->SwappedOut(this); |
4053 } | 4072 } |
4054 | 4073 |
4055 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { | 4074 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { |
4056 if (delegate_ && delegate_->IsPopupOrPanel(this)) | 4075 if (delegate_ && delegate_->IsPopupOrPanel(this)) |
4057 delegate_->MoveContents(this, new_bounds); | 4076 delegate_->MoveContents(this, new_bounds); |
4058 } | 4077 } |
4059 | 4078 |
4060 void WebContentsImpl::DidStartLoading(FrameTreeNode* frame_tree_node, | 4079 void WebContentsImpl::DidStartLoading(FrameTreeNode* frame_tree_node, |
4061 bool to_different_document) { | 4080 bool to_different_document) { |
4062 SetIsLoading(true, to_different_document, nullptr); | 4081 LoadingStateChanged(true, to_different_document, |
4082 paused_throbber_for_interstitial_, nullptr); | |
4063 | 4083 |
4064 // Notify accessibility that the user is navigating away from the | 4084 // Notify accessibility that the user is navigating away from the |
4065 // current document. | 4085 // current document. |
4066 // | 4086 // |
4067 // TODO(dmazzoni): do this using a WebContentsObserver. | 4087 // TODO(dmazzoni): do this using a WebContentsObserver. |
4068 BrowserAccessibilityManager* manager = | 4088 BrowserAccessibilityManager* manager = |
4069 frame_tree_node->current_frame_host()->browser_accessibility_manager(); | 4089 frame_tree_node->current_frame_host()->browser_accessibility_manager(); |
4070 if (manager) | 4090 if (manager) |
4071 manager->UserIsNavigatingAway(); | 4091 manager->UserIsNavigatingAway(); |
4072 } | 4092 } |
(...skipping 13 matching lines...) Expand all Loading... | |
4086 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); | 4106 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); |
4087 | 4107 |
4088 details.reset(new LoadNotificationDetails( | 4108 details.reset(new LoadNotificationDetails( |
4089 entry->GetVirtualURL(), | 4109 entry->GetVirtualURL(), |
4090 entry->GetTransitionType(), | 4110 entry->GetTransitionType(), |
4091 elapsed, | 4111 elapsed, |
4092 &controller_, | 4112 &controller_, |
4093 controller_.GetCurrentEntryIndex())); | 4113 controller_.GetCurrentEntryIndex())); |
4094 } | 4114 } |
4095 | 4115 |
4096 SetIsLoading(false, true, details.get()); | 4116 LoadingStateChanged(false, true, paused_throbber_for_interstitial_, |
4117 details.get()); | |
4097 } | 4118 } |
4098 | 4119 |
4099 void WebContentsImpl::DidChangeLoadProgress() { | 4120 void WebContentsImpl::DidChangeLoadProgress() { |
4100 double load_progress = frame_tree_.load_progress(); | 4121 double load_progress = frame_tree_.load_progress(); |
4101 | 4122 |
4102 // The delegate is notified immediately for the first and last updates. Also, | 4123 // The delegate is notified immediately for the first and last updates. Also, |
4103 // since the message loop may be pretty busy when a page is loaded, it might | 4124 // since the message loop may be pretty busy when a page is loaded, it might |
4104 // not execute a posted task in a timely manner so the progress report is sent | 4125 // not execute a posted task in a timely manner so the progress report is sent |
4105 // immediately if enough time has passed. | 4126 // immediately if enough time has passed. |
4106 base::TimeDelta min_delay = | 4127 base::TimeDelta min_delay = |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4623 int render_frame_id, | 4644 int render_frame_id, |
4624 IPC::Message* reply_msg, | 4645 IPC::Message* reply_msg, |
4625 bool dialog_was_suppressed, | 4646 bool dialog_was_suppressed, |
4626 bool success, | 4647 bool success, |
4627 const base::string16& user_input) { | 4648 const base::string16& user_input) { |
4628 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, | 4649 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, |
4629 render_frame_id); | 4650 render_frame_id); |
4630 last_dialog_suppressed_ = dialog_was_suppressed; | 4651 last_dialog_suppressed_ = dialog_was_suppressed; |
4631 | 4652 |
4632 if (is_showing_before_unload_dialog_ && !success) { | 4653 if (is_showing_before_unload_dialog_ && !success) { |
4633 // If a beforeunload dialog is canceled, we need to stop the throbber from | |
4634 // spinning, since we forced it to start spinning in Navigate. | |
4635 if (rfh) | 4654 if (rfh) |
4636 DidStopLoading(); | 4655 rfh->frame_tree_node()->BeforeUnloadCanceled(); |
4637 controller_.DiscardNonCommittedEntries(); | 4656 controller_.DiscardNonCommittedEntries(); |
4638 | 4657 |
4639 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 4658 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
4640 BeforeUnloadDialogCancelled()); | 4659 BeforeUnloadDialogCancelled()); |
4641 } | 4660 } |
4642 | 4661 |
4643 is_showing_before_unload_dialog_ = false; | 4662 is_showing_before_unload_dialog_ = false; |
4644 if (rfh) { | 4663 if (rfh) { |
4645 rfh->JavaScriptDialogClosed(reply_msg, success, user_input, | 4664 rfh->JavaScriptDialogClosed(reply_msg, success, user_input, |
4646 dialog_was_suppressed); | 4665 dialog_was_suppressed); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4752 const WebContentsObserver::MediaPlayerId& id) { | 4771 const WebContentsObserver::MediaPlayerId& id) { |
4753 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4772 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
4754 } | 4773 } |
4755 | 4774 |
4756 void WebContentsImpl::MediaStoppedPlaying( | 4775 void WebContentsImpl::MediaStoppedPlaying( |
4757 const WebContentsObserver::MediaPlayerId& id) { | 4776 const WebContentsObserver::MediaPlayerId& id) { |
4758 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4777 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4759 } | 4778 } |
4760 | 4779 |
4761 } // namespace content | 4780 } // namespace content |
OLD | NEW |