| 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 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 | 1159 |
| 1160 crashed_status_ = status; | 1160 crashed_status_ = status; |
| 1161 crashed_error_code_ = error_code; | 1161 crashed_error_code_ = error_code; |
| 1162 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); | 1162 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { | 1165 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { |
| 1166 return crashed_status_; | 1166 return crashed_status_; |
| 1167 } | 1167 } |
| 1168 | 1168 |
| 1169 int WebContentsImpl::GetCrashedErrorCode() const { |
| 1170 return crashed_error_code_; |
| 1171 } |
| 1172 |
| 1169 bool WebContentsImpl::IsBeingDestroyed() const { | 1173 bool WebContentsImpl::IsBeingDestroyed() const { |
| 1170 return is_being_destroyed_; | 1174 return is_being_destroyed_; |
| 1171 } | 1175 } |
| 1172 | 1176 |
| 1173 void WebContentsImpl::NotifyNavigationStateChanged( | 1177 void WebContentsImpl::NotifyNavigationStateChanged( |
| 1174 InvalidateTypes changed_flags) { | 1178 InvalidateTypes changed_flags) { |
| 1175 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 | 1179 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 |
| 1176 // is fixed. | 1180 // is fixed. |
| 1177 tracked_objects::ScopedTracker tracking_profile( | 1181 tracked_objects::ScopedTracker tracking_profile( |
| 1178 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1182 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| (...skipping 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4348 DidGetUserInteraction(type)); | 4352 DidGetUserInteraction(type)); |
| 4349 } | 4353 } |
| 4350 | 4354 |
| 4351 void WebContentsImpl::OnIgnoredUIEvent() { | 4355 void WebContentsImpl::OnIgnoredUIEvent() { |
| 4352 // Notify observers. | 4356 // Notify observers. |
| 4353 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4357 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
| 4354 } | 4358 } |
| 4355 | 4359 |
| 4356 void WebContentsImpl::RendererUnresponsive( | 4360 void WebContentsImpl::RendererUnresponsive( |
| 4357 RenderWidgetHostImpl* render_widget_host) { | 4361 RenderWidgetHostImpl* render_widget_host) { |
| 4362 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 4363 OnRendererUnresponsive(render_widget_host)); |
| 4364 |
| 4358 // Don't show hung renderer dialog for a swapped out RVH. | 4365 // Don't show hung renderer dialog for a swapped out RVH. |
| 4359 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 4366 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
| 4360 return; | 4367 return; |
| 4361 | 4368 |
| 4362 RenderFrameHostImpl* rfhi = | 4369 RenderFrameHostImpl* rfhi = |
| 4363 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); | 4370 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); |
| 4364 | 4371 |
| 4365 // Ignore renderer unresponsive event if debugger is attached to the tab | 4372 // Ignore renderer unresponsive event if debugger is attached to the tab |
| 4366 // since the event may be a result of the renderer sitting on a breakpoint. | 4373 // since the event may be a result of the renderer sitting on a breakpoint. |
| 4367 // See http://crbug.com/65458 | 4374 // See http://crbug.com/65458 |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4760 const WebContentsObserver::MediaPlayerId& id) { | 4767 const WebContentsObserver::MediaPlayerId& id) { |
| 4761 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4768 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4762 } | 4769 } |
| 4763 | 4770 |
| 4764 void WebContentsImpl::MediaStoppedPlaying( | 4771 void WebContentsImpl::MediaStoppedPlaying( |
| 4765 const WebContentsObserver::MediaPlayerId& id) { | 4772 const WebContentsObserver::MediaPlayerId& id) { |
| 4766 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4773 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4767 } | 4774 } |
| 4768 | 4775 |
| 4769 } // namespace content | 4776 } // namespace content |
| OLD | NEW |