Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1584473004: Migrate ProcessesEventRouter to the new task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nope, browser process is not expected in onCreate(). Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 1145
1146 crashed_status_ = status; 1146 crashed_status_ = status;
1147 crashed_error_code_ = error_code; 1147 crashed_error_code_ = error_code;
1148 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); 1148 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB);
1149 } 1149 }
1150 1150
1151 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const { 1151 base::TerminationStatus WebContentsImpl::GetCrashedStatus() const {
1152 return crashed_status_; 1152 return crashed_status_;
1153 } 1153 }
1154 1154
1155 int WebContentsImpl::GetCrashedErrorCode() const {
1156 return crashed_error_code_;
1157 }
1158
1155 bool WebContentsImpl::IsBeingDestroyed() const { 1159 bool WebContentsImpl::IsBeingDestroyed() const {
1156 return is_being_destroyed_; 1160 return is_being_destroyed_;
1157 } 1161 }
1158 1162
1159 void WebContentsImpl::NotifyNavigationStateChanged( 1163 void WebContentsImpl::NotifyNavigationStateChanged(
1160 InvalidateTypes changed_flags) { 1164 InvalidateTypes changed_flags) {
1161 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 1165 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285
1162 // is fixed. 1166 // is fixed.
1163 tracked_objects::ScopedTracker tracking_profile( 1167 tracked_objects::ScopedTracker tracking_profile(
1164 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1168 FROM_HERE_WITH_EXPLICIT_FUNCTION(
(...skipping 3170 matching lines...) Expand 10 before | Expand all | Expand 10 after
4335 DidGetUserInteraction(type)); 4339 DidGetUserInteraction(type));
4336 } 4340 }
4337 4341
4338 void WebContentsImpl::OnIgnoredUIEvent() { 4342 void WebContentsImpl::OnIgnoredUIEvent() {
4339 // Notify observers. 4343 // Notify observers.
4340 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent()); 4344 FOR_EACH_OBSERVER(WebContentsObserver, observers_, DidGetIgnoredUIEvent());
4341 } 4345 }
4342 4346
4343 void WebContentsImpl::RendererUnresponsive( 4347 void WebContentsImpl::RendererUnresponsive(
4344 RenderWidgetHostImpl* render_widget_host) { 4348 RenderWidgetHostImpl* render_widget_host) {
4349 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
4350 OnRendererUnresponsive(render_widget_host));
4351
4345 // Don't show hung renderer dialog for a swapped out RVH. 4352 // Don't show hung renderer dialog for a swapped out RVH.
4346 if (render_widget_host != GetRenderViewHost()->GetWidget()) 4353 if (render_widget_host != GetRenderViewHost()->GetWidget())
4347 return; 4354 return;
4348 4355
4349 RenderFrameHostImpl* rfhi = 4356 RenderFrameHostImpl* rfhi =
4350 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame()); 4357 static_cast<RenderFrameHostImpl*>(GetRenderViewHost()->GetMainFrame());
4351 4358
4352 // Ignore renderer unresponsive event if debugger is attached to the tab 4359 // Ignore renderer unresponsive event if debugger is attached to the tab
4353 // since the event may be a result of the renderer sitting on a breakpoint. 4360 // since the event may be a result of the renderer sitting on a breakpoint.
4354 // See http://crbug.com/65458 4361 // See http://crbug.com/65458
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
4761 const WebContentsObserver::MediaPlayerId& id) { 4768 const WebContentsObserver::MediaPlayerId& id) {
4762 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); 4769 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id));
4763 } 4770 }
4764 4771
4765 void WebContentsImpl::MediaStoppedPlaying( 4772 void WebContentsImpl::MediaStoppedPlaying(
4766 const WebContentsObserver::MediaPlayerId& id) { 4773 const WebContentsObserver::MediaPlayerId& id) {
4767 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); 4774 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id));
4768 } 4775 }
4769 4776
4770 } // namespace content 4777 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698