| 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 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4340 DidGetUserInteraction(type)); | 4344 DidGetUserInteraction(type)); |
| 4341 } | 4345 } |
| 4342 | 4346 |
| 4343 void WebContentsImpl::OnIgnoredUIEvent() { | 4347 void WebContentsImpl::OnIgnoredUIEvent() { |
| 4344 // Notify observers. | 4348 // Notify observers. |
| 4345 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); | 4349 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); |
| 4346 } | 4350 } |
| 4347 | 4351 |
| 4348 void WebContentsImpl::RendererUnresponsive( | 4352 void WebContentsImpl::RendererUnresponsive( |
| 4349 RenderWidgetHostImpl* render_widget_host) { | 4353 RenderWidgetHostImpl* render_widget_host) { |
| 4354 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 4355 OnRendererUnresponsive(render_widget_host)); |
| 4356 |
| 4350 // Don't show hung renderer dialog for a swapped out RVH. | 4357 // Don't show hung renderer dialog for a swapped out RVH. |
| 4351 if (render_widget_host != GetRenderViewHost()->GetWidget()) | 4358 if (render_widget_host != GetRenderViewHost()->GetWidget()) |
| 4352 return; | 4359 return; |
| 4353 | 4360 |
| 4354 RenderFrameHostImpl* rfhi = | 4361 RenderFrameHostImpl* rfhi = |
| 4355 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); | 4362 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); |
| 4356 | 4363 |
| 4357 // Ignore renderer unresponsive event if debugger is attached to the tab | 4364 // Ignore renderer unresponsive event if debugger is attached to the tab |
| 4358 // since the event may be a result of the renderer sitting on a breakpoint. | 4365 // since the event may be a result of the renderer sitting on a breakpoint. |
| 4359 // See http://crbug.com/65458 | 4366 // See http://crbug.com/65458 |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4752 const WebContentsObserver::MediaPlayerId& id) { | 4759 const WebContentsObserver::MediaPlayerId& id) { |
| 4753 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4760 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4754 } | 4761 } |
| 4755 | 4762 |
| 4756 void WebContentsImpl::MediaStoppedPlaying( | 4763 void WebContentsImpl::MediaStoppedPlaying( |
| 4757 const WebContentsObserver::MediaPlayerId& id) { | 4764 const WebContentsObserver::MediaPlayerId& id) { |
| 4758 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4765 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4759 } | 4766 } |
| 4760 | 4767 |
| 4761 } // namespace content | 4768 } // namespace content |
| OLD | NEW |