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

Side by Side Diff: content/renderer/render_widget.cc

Issue 1053833002: Revert of [DevTools] Unpause renderer when paused RenderFrame is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 NO_RESIZE_ACK); 847 NO_RESIZE_ACK);
848 view_screen_rect_ = new_window_rect; 848 view_screen_rect_ = new_window_rect;
849 window_screen_rect_ = new_window_rect; 849 window_screen_rect_ = new_window_rect;
850 if (!did_show_) 850 if (!did_show_)
851 initial_rect_ = new_window_rect; 851 initial_rect_ = new_window_rect;
852 } 852 }
853 853
854 void RenderWidget::OnClose() { 854 void RenderWidget::OnClose() {
855 if (closing_) 855 if (closing_)
856 return; 856 return;
857 NotifyOnClose();
858 closing_ = true; 857 closing_ = true;
859 858
860 // Browser correspondence is no longer needed at this point. 859 // Browser correspondence is no longer needed at this point.
861 if (routing_id_ != MSG_ROUTING_NONE) { 860 if (routing_id_ != MSG_ROUTING_NONE) {
862 if (RenderThreadImpl::current()) 861 if (RenderThreadImpl::current())
863 RenderThreadImpl::current()->WidgetDestroyed(); 862 RenderThreadImpl::current()->WidgetDestroyed();
864 RenderThread::Get()->RemoveRoute(routing_id_); 863 RenderThread::Get()->RemoveRoute(routing_id_);
865 SetHidden(false); 864 SetHidden(false);
866 } 865 }
867 866
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 } 1530 }
1532 1531
1533 void RenderWidget::didBlur() { 1532 void RenderWidget::didBlur() {
1534 } 1533 }
1535 1534
1536 void RenderWidget::DoDeferredClose() { 1535 void RenderWidget::DoDeferredClose() {
1537 WillCloseLayerTreeView(); 1536 WillCloseLayerTreeView();
1538 Send(new ViewHostMsg_Close(routing_id_)); 1537 Send(new ViewHostMsg_Close(routing_id_));
1539 } 1538 }
1540 1539
1541 void RenderWidget::NotifyOnClose() {
1542 FOR_EACH_OBSERVER(RenderFrameImpl, render_frames_, WidgetWillClose());
1543 }
1544
1545 void RenderWidget::closeWidgetSoon() { 1540 void RenderWidget::closeWidgetSoon() {
1546 if (is_swapped_out_) { 1541 if (is_swapped_out_) {
1547 // This widget is currently swapped out, and the active widget is in a 1542 // This widget is currently swapped out, and the active widget is in a
1548 // different process. Have the browser route the close request to the 1543 // different process. Have the browser route the close request to the
1549 // active widget instead, so that the correct unload handlers are run. 1544 // active widget instead, so that the correct unload handlers are run.
1550 Send(new ViewHostMsg_RouteCloseEvent(routing_id_)); 1545 Send(new ViewHostMsg_RouteCloseEvent(routing_id_));
1551 return; 1546 return;
1552 } 1547 }
1553 1548
1554 // If a page calls window.close() twice, we'll end up here twice, but that's 1549 // If a page calls window.close() twice, we'll end up here twice, but that's
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) { 2423 void RenderWidget::RegisterVideoHoleFrame(RenderFrameImpl* frame) {
2429 video_hole_frames_.AddObserver(frame); 2424 video_hole_frames_.AddObserver(frame);
2430 } 2425 }
2431 2426
2432 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) { 2427 void RenderWidget::UnregisterVideoHoleFrame(RenderFrameImpl* frame) {
2433 video_hole_frames_.RemoveObserver(frame); 2428 video_hole_frames_.RemoveObserver(frame);
2434 } 2429 }
2435 #endif // defined(VIDEO_HOLE) 2430 #endif // defined(VIDEO_HOLE)
2436 2431
2437 } // namespace content 2432 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698