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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 render_view_host_delegate_view_(NULL), | 351 render_view_host_delegate_view_(NULL), |
352 created_with_opener_(false), | 352 created_with_opener_(false), |
353 #if defined(OS_WIN) | 353 #if defined(OS_WIN) |
354 accessible_parent_(NULL), | 354 accessible_parent_(NULL), |
355 #endif | 355 #endif |
356 frame_tree_(new NavigatorImpl(&controller_, this), | 356 frame_tree_(new NavigatorImpl(&controller_, this), |
357 this, | 357 this, |
358 this, | 358 this, |
359 this, | 359 this, |
360 this), | 360 this), |
361 is_loading_(false), | |
362 is_load_to_different_document_(false), | 361 is_load_to_different_document_(false), |
363 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), | 362 crashed_status_(base::TERMINATION_STATUS_STILL_RUNNING), |
364 crashed_error_code_(0), | 363 crashed_error_code_(0), |
365 waiting_for_response_(false), | 364 waiting_for_response_(false), |
366 load_state_(net::LOAD_STATE_IDLE, base::string16()), | 365 load_state_(net::LOAD_STATE_IDLE, base::string16()), |
367 upload_size_(0), | 366 upload_size_(0), |
368 upload_position_(0), | 367 upload_position_(0), |
369 is_resume_pending_(false), | 368 is_resume_pending_(false), |
| 369 paused_throbber_for_interstitial_(false), |
370 displayed_insecure_content_(false), | 370 displayed_insecure_content_(false), |
371 has_accessed_initial_document_(false), | 371 has_accessed_initial_document_(false), |
372 theme_color_(SK_ColorTRANSPARENT), | 372 theme_color_(SK_ColorTRANSPARENT), |
373 last_sent_theme_color_(SK_ColorTRANSPARENT), | 373 last_sent_theme_color_(SK_ColorTRANSPARENT), |
374 did_first_visually_non_empty_paint_(false), | 374 did_first_visually_non_empty_paint_(false), |
375 capturer_count_(0), | 375 capturer_count_(0), |
376 should_normally_be_visible_(true), | 376 should_normally_be_visible_(true), |
377 is_being_destroyed_(false), | 377 is_being_destroyed_(false), |
378 notify_disconnection_(false), | 378 notify_disconnection_(false), |
379 dialog_manager_(NULL), | 379 dialog_manager_(NULL), |
380 is_showing_before_unload_dialog_(false), | 380 is_showing_before_unload_dialog_(false), |
381 last_active_time_(base::TimeTicks::Now()), | 381 last_active_time_(base::TimeTicks::Now()), |
382 closed_by_user_gesture_(false), | 382 closed_by_user_gesture_(false), |
383 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), | 383 minimum_zoom_percent_(static_cast<int>(kMinimumZoomFactor * 100)), |
384 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), | 384 maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), |
385 zoom_scroll_remainder_(0), | 385 zoom_scroll_remainder_(0), |
386 render_view_message_source_(NULL), | 386 render_view_message_source_(NULL), |
387 render_frame_message_source_(NULL), | 387 render_frame_message_source_(NULL), |
388 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), | 388 fullscreen_widget_routing_id_(MSG_ROUTING_NONE), |
389 fullscreen_widget_had_focus_at_shutdown_(false), | 389 fullscreen_widget_had_focus_at_shutdown_(false), |
390 is_subframe_(false), | 390 is_subframe_(false), |
391 force_disable_overscroll_content_(false), | 391 force_disable_overscroll_content_(false), |
392 last_dialog_suppressed_(false), | 392 last_dialog_suppressed_(false), |
393 geolocation_service_context_(new GeolocationServiceContext()), | 393 geolocation_service_context_(new GeolocationServiceContext()), |
394 accessibility_mode_( | 394 accessibility_mode_(BrowserAccessibilityStateImpl::GetInstance() |
395 BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode()), | 395 ->accessibility_mode()), |
396 audio_stream_monitor_(this), | 396 audio_stream_monitor_(this), |
397 virtual_keyboard_requested_(false), | 397 virtual_keyboard_requested_(false), |
398 page_scale_factor_is_one_(true), | 398 page_scale_factor_is_one_(true), |
399 loading_weak_factory_(this) { | 399 loading_weak_factory_(this) { |
400 frame_tree_.SetFrameRemoveListener( | 400 frame_tree_.SetFrameRemoveListener( |
401 base::Bind(&WebContentsImpl::OnFrameRemoved, | 401 base::Bind(&WebContentsImpl::OnFrameRemoved, |
402 base::Unretained(this))); | 402 base::Unretained(this))); |
403 #if defined(OS_ANDROID) | 403 #if defined(OS_ANDROID) |
404 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); | 404 media_web_contents_observer_.reset(new MediaWebContentsObserverAndroid(this)); |
405 #else | 405 #else |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 renderer_preferences_.user_agent_override = override; | 880 renderer_preferences_.user_agent_override = override; |
881 | 881 |
882 // Send the new override string to the renderer. | 882 // Send the new override string to the renderer. |
883 RenderViewHost* host = GetRenderViewHost(); | 883 RenderViewHost* host = GetRenderViewHost(); |
884 if (host) | 884 if (host) |
885 host->SyncRendererPrefs(); | 885 host->SyncRendererPrefs(); |
886 | 886 |
887 // Reload the page if a load is currently in progress to avoid having | 887 // Reload the page if a load is currently in progress to avoid having |
888 // different parts of the page loaded using different user agents. | 888 // different parts of the page loaded using different user agents. |
889 NavigationEntry* entry = controller_.GetVisibleEntry(); | 889 NavigationEntry* entry = controller_.GetVisibleEntry(); |
890 if (is_loading_ && entry != NULL && entry->GetIsOverridingUserAgent()) | 890 if (IsLoading() && entry != NULL && entry->GetIsOverridingUserAgent()) |
891 controller_.ReloadIgnoringCache(true); | 891 controller_.ReloadIgnoringCache(true); |
892 | 892 |
893 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 893 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
894 UserAgentOverrideSet(override)); | 894 UserAgentOverrideSet(override)); |
895 } | 895 } |
896 | 896 |
897 const std::string& WebContentsImpl::GetUserAgentOverride() const { | 897 const std::string& WebContentsImpl::GetUserAgentOverride() const { |
898 return renderer_preferences_.user_agent_override; | 898 return renderer_preferences_.user_agent_override; |
899 } | 899 } |
900 | 900 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 | 1018 |
1019 SiteInstanceImpl* WebContentsImpl::GetPendingSiteInstance() const { | 1019 SiteInstanceImpl* WebContentsImpl::GetPendingSiteInstance() const { |
1020 RenderViewHostImpl* dest_rvh = | 1020 RenderViewHostImpl* dest_rvh = |
1021 GetRenderManager()->pending_render_view_host() ? | 1021 GetRenderManager()->pending_render_view_host() ? |
1022 GetRenderManager()->pending_render_view_host() : | 1022 GetRenderManager()->pending_render_view_host() : |
1023 GetRenderManager()->current_host(); | 1023 GetRenderManager()->current_host(); |
1024 return dest_rvh->GetSiteInstance(); | 1024 return dest_rvh->GetSiteInstance(); |
1025 } | 1025 } |
1026 | 1026 |
1027 bool WebContentsImpl::IsLoading() const { | 1027 bool WebContentsImpl::IsLoading() const { |
1028 return is_loading_; | 1028 return frame_tree_.IsLoading() && !paused_throbber_for_interstitial_; |
1029 } | 1029 } |
1030 | 1030 |
1031 bool WebContentsImpl::IsLoadingToDifferentDocument() const { | 1031 bool WebContentsImpl::IsLoadingToDifferentDocument() const { |
1032 return is_loading_ && is_load_to_different_document_; | 1032 return IsLoading() && is_load_to_different_document_; |
1033 } | 1033 } |
1034 | 1034 |
1035 bool WebContentsImpl::IsWaitingForResponse() const { | 1035 bool WebContentsImpl::IsWaitingForResponse() const { |
1036 return waiting_for_response_ && is_load_to_different_document_; | 1036 return waiting_for_response_ && is_load_to_different_document_; |
1037 } | 1037 } |
1038 | 1038 |
1039 const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const { | 1039 const net::LoadStateWithParam& WebContentsImpl::GetLoadState() const { |
1040 return load_state_; | 1040 return load_state_; |
1041 } | 1041 } |
1042 | 1042 |
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2276 InterstitialPageImpl* interstitial_page) { | 2276 InterstitialPageImpl* interstitial_page) { |
2277 DCHECK(interstitial_page); | 2277 DCHECK(interstitial_page); |
2278 GetRenderManager()->set_interstitial_page(interstitial_page); | 2278 GetRenderManager()->set_interstitial_page(interstitial_page); |
2279 | 2279 |
2280 // Cancel any visible dialogs so that they don't interfere with the | 2280 // Cancel any visible dialogs so that they don't interfere with the |
2281 // interstitial. | 2281 // interstitial. |
2282 CancelActiveAndPendingDialogs(); | 2282 CancelActiveAndPendingDialogs(); |
2283 | 2283 |
2284 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2284 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2285 DidAttachInterstitialPage()); | 2285 DidAttachInterstitialPage()); |
| 2286 |
| 2287 // Stop the throbber if needed while the interstitial page is shown. |
| 2288 if (IsLoading()) |
| 2289 LoadingStateChanged(false, true, nullptr); |
| 2290 |
| 2291 paused_throbber_for_interstitial_ = true; |
| 2292 } |
| 2293 |
| 2294 void WebContentsImpl::DidProceedOnInterstitial() { |
| 2295 // Restart the throbber now that the interstitial page is going away. |
| 2296 if (paused_throbber_for_interstitial_) { |
| 2297 paused_throbber_for_interstitial_ = false; |
| 2298 if (frame_tree_.IsLoading()) |
| 2299 LoadingStateChanged(true, true, nullptr); |
| 2300 } |
2286 } | 2301 } |
2287 | 2302 |
2288 void WebContentsImpl::DetachInterstitialPage() { | 2303 void WebContentsImpl::DetachInterstitialPage() { |
2289 if (ShowingInterstitialPage()) | 2304 if (ShowingInterstitialPage()) |
2290 GetRenderManager()->remove_interstitial_page(); | 2305 GetRenderManager()->remove_interstitial_page(); |
2291 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2306 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2292 DidDetachInterstitialPage()); | 2307 DidDetachInterstitialPage()); |
| 2308 // Restart the throbber now that the interstitial page is going away. |
| 2309 if (paused_throbber_for_interstitial_) { |
| 2310 paused_throbber_for_interstitial_ = false; |
| 2311 if (frame_tree_.IsLoading()) |
| 2312 LoadingStateChanged(true, true, nullptr); |
| 2313 } |
2293 } | 2314 } |
2294 | 2315 |
2295 void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset, | 2316 void WebContentsImpl::SetHistoryOffsetAndLength(int history_offset, |
2296 int history_length) { | 2317 int history_length) { |
2297 SetHistoryOffsetAndLengthForView( | 2318 SetHistoryOffsetAndLengthForView( |
2298 GetRenderViewHost(), history_offset, history_length); | 2319 GetRenderViewHost(), history_offset, history_length); |
2299 } | 2320 } |
2300 | 2321 |
2301 void WebContentsImpl::SetHistoryOffsetAndLengthForView( | 2322 void WebContentsImpl::SetHistoryOffsetAndLengthForView( |
2302 RenderViewHost* render_view_host, | 2323 RenderViewHost* render_view_host, |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3557 if (delegate_) | 3578 if (delegate_) |
3558 delegate_->ShowRepostFormWarningDialog(this); | 3579 delegate_->ShowRepostFormWarningDialog(this); |
3559 } | 3580 } |
3560 | 3581 |
3561 bool WebContentsImpl::HasAccessedInitialDocument() { | 3582 bool WebContentsImpl::HasAccessedInitialDocument() { |
3562 return has_accessed_initial_document_; | 3583 return has_accessed_initial_document_; |
3563 } | 3584 } |
3564 | 3585 |
3565 // Notifies the RenderWidgetHost instance about the fact that the page is | 3586 // Notifies the RenderWidgetHost instance about the fact that the page is |
3566 // loading, or done loading. | 3587 // loading, or done loading. |
3567 void WebContentsImpl::SetIsLoading(bool is_loading, | 3588 void WebContentsImpl::LoadingStateChanged(bool is_loading, |
3568 bool to_different_document, | 3589 bool to_different_document, |
3569 LoadNotificationDetails* details) { | 3590 LoadNotificationDetails* details) { |
3570 if (is_loading == is_loading_) | 3591 // Do not send notifications about loading while the interstitial is showing. |
| 3592 if (paused_throbber_for_interstitial_) |
3571 return; | 3593 return; |
3572 | 3594 |
3573 if (!is_loading) { | 3595 if (!is_loading) { |
3574 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, | 3596 load_state_ = net::LoadStateWithParam(net::LOAD_STATE_IDLE, |
3575 base::string16()); | 3597 base::string16()); |
3576 load_state_host_.clear(); | 3598 load_state_host_.clear(); |
3577 upload_size_ = 0; | 3599 upload_size_ = 0; |
3578 upload_position_ = 0; | 3600 upload_position_ = 0; |
3579 } | 3601 } |
3580 | 3602 |
3581 GetRenderManager()->SetIsLoading(is_loading); | 3603 GetRenderManager()->SetIsLoading(is_loading); |
3582 | 3604 |
3583 is_loading_ = is_loading; | |
3584 waiting_for_response_ = is_loading; | 3605 waiting_for_response_ = is_loading; |
3585 is_load_to_different_document_ = to_different_document; | 3606 is_load_to_different_document_ = to_different_document; |
3586 | 3607 |
3587 if (delegate_) | 3608 if (delegate_) |
3588 delegate_->LoadingStateChanged(this, to_different_document); | 3609 delegate_->LoadingStateChanged(this, to_different_document); |
3589 NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); | 3610 NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD); |
3590 | 3611 |
3591 std::string url = (details ? details->url.possibly_invalid_spec() : "NULL"); | 3612 std::string url = (details ? details->url.possibly_invalid_spec() : "NULL"); |
3592 if (is_loading) { | 3613 if (is_loading) { |
3593 TRACE_EVENT_ASYNC_BEGIN2("browser,navigation", "WebContentsImpl Loading", | 3614 TRACE_EVENT_ASYNC_BEGIN2("browser,navigation", "WebContentsImpl Loading", |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3926 // renderer may not have made a clean exit. | 3947 // renderer may not have made a clean exit. |
3927 if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())) | 3948 if (IsFullscreenForCurrentTab(GetRenderViewHost()->GetWidget())) |
3928 ExitFullscreenMode(); | 3949 ExitFullscreenMode(); |
3929 | 3950 |
3930 // Cancel any visible dialogs so they are not left dangling over the sad tab. | 3951 // Cancel any visible dialogs so they are not left dangling over the sad tab. |
3931 CancelActiveAndPendingDialogs(); | 3952 CancelActiveAndPendingDialogs(); |
3932 | 3953 |
3933 if (delegate_) | 3954 if (delegate_) |
3934 delegate_->HideValidationMessage(this); | 3955 delegate_->HideValidationMessage(this); |
3935 | 3956 |
3936 SetIsLoading(false, true, nullptr); | |
3937 NotifyDisconnected(); | |
3938 SetIsCrashed(status, error_code); | |
3939 | |
3940 // Reset the loading progress. TODO(avi): What does it mean to have a | 3957 // Reset the loading progress. TODO(avi): What does it mean to have a |
3941 // "renderer crash" when there is more than one renderer process serving a | 3958 // "renderer crash" when there is more than one renderer process serving a |
3942 // webpage? Once this function is called at a more granular frame level, we | 3959 // webpage? Once this function is called at a more granular frame level, we |
3943 // probably will need to more granularly reset the state here. | 3960 // probably will need to more granularly reset the state here. |
3944 ResetLoadProgressState(); | 3961 ResetLoadProgressState(); |
| 3962 NotifyDisconnected(); |
| 3963 SetIsCrashed(status, error_code); |
3945 | 3964 |
3946 FOR_EACH_OBSERVER(WebContentsObserver, | 3965 FOR_EACH_OBSERVER(WebContentsObserver, |
3947 observers_, | 3966 observers_, |
3948 RenderProcessGone(GetCrashedStatus())); | 3967 RenderProcessGone(GetCrashedStatus())); |
3949 } | 3968 } |
3950 | 3969 |
3951 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { | 3970 void WebContentsImpl::RenderViewDeleted(RenderViewHost* rvh) { |
3952 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); | 3971 FOR_EACH_OBSERVER(WebContentsObserver, observers_, RenderViewDeleted(rvh)); |
3953 } | 3972 } |
3954 | 3973 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4028 delegate_->SwappedOut(this); | 4047 delegate_->SwappedOut(this); |
4029 } | 4048 } |
4030 | 4049 |
4031 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { | 4050 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { |
4032 if (delegate_ && delegate_->IsPopupOrPanel(this)) | 4051 if (delegate_ && delegate_->IsPopupOrPanel(this)) |
4033 delegate_->MoveContents(this, new_bounds); | 4052 delegate_->MoveContents(this, new_bounds); |
4034 } | 4053 } |
4035 | 4054 |
4036 void WebContentsImpl::DidStartLoading(FrameTreeNode* frame_tree_node, | 4055 void WebContentsImpl::DidStartLoading(FrameTreeNode* frame_tree_node, |
4037 bool to_different_document) { | 4056 bool to_different_document) { |
4038 SetIsLoading(true, to_different_document, nullptr); | 4057 LoadingStateChanged(true, to_different_document, nullptr); |
4039 | 4058 |
4040 // Notify accessibility that the user is navigating away from the | 4059 // Notify accessibility that the user is navigating away from the |
4041 // current document. | 4060 // current document. |
4042 // | 4061 // |
4043 // TODO(dmazzoni): do this using a WebContentsObserver. | 4062 // TODO(dmazzoni): do this using a WebContentsObserver. |
4044 BrowserAccessibilityManager* manager = | 4063 BrowserAccessibilityManager* manager = |
4045 frame_tree_node->current_frame_host()->browser_accessibility_manager(); | 4064 frame_tree_node->current_frame_host()->browser_accessibility_manager(); |
4046 if (manager) | 4065 if (manager) |
4047 manager->UserIsNavigatingAway(); | 4066 manager->UserIsNavigatingAway(); |
4048 } | 4067 } |
(...skipping 13 matching lines...) Expand all Loading... |
4062 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); | 4081 base::TimeTicks::Now() - navigator->GetCurrentLoadStart(); |
4063 | 4082 |
4064 details.reset(new LoadNotificationDetails( | 4083 details.reset(new LoadNotificationDetails( |
4065 entry->GetVirtualURL(), | 4084 entry->GetVirtualURL(), |
4066 entry->GetTransitionType(), | 4085 entry->GetTransitionType(), |
4067 elapsed, | 4086 elapsed, |
4068 &controller_, | 4087 &controller_, |
4069 controller_.GetCurrentEntryIndex())); | 4088 controller_.GetCurrentEntryIndex())); |
4070 } | 4089 } |
4071 | 4090 |
4072 SetIsLoading(false, true, details.get()); | 4091 LoadingStateChanged(false, true, details.get()); |
4073 } | 4092 } |
4074 | 4093 |
4075 void WebContentsImpl::DidChangeLoadProgress() { | 4094 void WebContentsImpl::DidChangeLoadProgress() { |
4076 double load_progress = frame_tree_.load_progress(); | 4095 double load_progress = frame_tree_.load_progress(); |
4077 | 4096 |
4078 // The delegate is notified immediately for the first and last updates. Also, | 4097 // The delegate is notified immediately for the first and last updates. Also, |
4079 // since the message loop may be pretty busy when a page is loaded, it might | 4098 // since the message loop may be pretty busy when a page is loaded, it might |
4080 // not execute a posted task in a timely manner so the progress report is sent | 4099 // not execute a posted task in a timely manner so the progress report is sent |
4081 // immediately if enough time has passed. | 4100 // immediately if enough time has passed. |
4082 base::TimeDelta min_delay = | 4101 base::TimeDelta min_delay = |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4599 int render_frame_id, | 4618 int render_frame_id, |
4600 IPC::Message* reply_msg, | 4619 IPC::Message* reply_msg, |
4601 bool dialog_was_suppressed, | 4620 bool dialog_was_suppressed, |
4602 bool success, | 4621 bool success, |
4603 const base::string16& user_input) { | 4622 const base::string16& user_input) { |
4604 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, | 4623 RenderFrameHostImpl* rfh = RenderFrameHostImpl::FromID(render_process_id, |
4605 render_frame_id); | 4624 render_frame_id); |
4606 last_dialog_suppressed_ = dialog_was_suppressed; | 4625 last_dialog_suppressed_ = dialog_was_suppressed; |
4607 | 4626 |
4608 if (is_showing_before_unload_dialog_ && !success) { | 4627 if (is_showing_before_unload_dialog_ && !success) { |
4609 // If a beforeunload dialog is canceled, we need to stop the throbber from | |
4610 // spinning, since we forced it to start spinning in Navigate. | |
4611 if (rfh) | 4628 if (rfh) |
4612 DidStopLoading(); | 4629 rfh->frame_tree_node()->BeforeUnloadCanceled(); |
4613 controller_.DiscardNonCommittedEntries(); | 4630 controller_.DiscardNonCommittedEntries(); |
4614 | 4631 |
4615 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 4632 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
4616 BeforeUnloadDialogCancelled()); | 4633 BeforeUnloadDialogCancelled()); |
4617 } | 4634 } |
4618 | 4635 |
4619 is_showing_before_unload_dialog_ = false; | 4636 is_showing_before_unload_dialog_ = false; |
4620 if (rfh) { | 4637 if (rfh) { |
4621 rfh->JavaScriptDialogClosed(reply_msg, success, user_input, | 4638 rfh->JavaScriptDialogClosed(reply_msg, success, user_input, |
4622 dialog_was_suppressed); | 4639 dialog_was_suppressed); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4728 const WebContentsObserver::MediaPlayerId& id) { | 4745 const WebContentsObserver::MediaPlayerId& id) { |
4729 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4746 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
4730 } | 4747 } |
4731 | 4748 |
4732 void WebContentsImpl::MediaStoppedPlaying( | 4749 void WebContentsImpl::MediaStoppedPlaying( |
4733 const WebContentsObserver::MediaPlayerId& id) { | 4750 const WebContentsObserver::MediaPlayerId& id) { |
4734 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4751 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
4735 } | 4752 } |
4736 | 4753 |
4737 } // namespace content | 4754 } // namespace content |
OLD | NEW |