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