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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 740813004: Use StopChildProcess instead of base::KillProcess to kill a renderer process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments Created 6 years 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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 const std::string& value) { 742 const std::string& value) {
743 // This is a sanity check before telling the renderer to enable the property. 743 // This is a sanity check before telling the renderer to enable the property.
744 // It could lie and send the corresponding IPC messages anyway, but we will 744 // It could lie and send the corresponding IPC messages anyway, but we will
745 // not act on them if enabled_bindings_ doesn't agree. If we get here without 745 // not act on them if enabled_bindings_ doesn't agree. If we get here without
746 // WebUI bindings, kill the renderer process. 746 // WebUI bindings, kill the renderer process.
747 if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) { 747 if (enabled_bindings_ & BINDINGS_POLICY_WEB_UI) {
748 Send(new ViewMsg_SetWebUIProperty(GetRoutingID(), name, value)); 748 Send(new ViewMsg_SetWebUIProperty(GetRoutingID(), name, value));
749 } else { 749 } else {
750 RecordAction( 750 RecordAction(
751 base::UserMetricsAction("BindingsMismatchTerminate_RVH_WebUI")); 751 base::UserMetricsAction("BindingsMismatchTerminate_RVH_WebUI"));
752 base::KillProcess( 752 GetProcess()->Shutdown(content::RESULT_CODE_KILLED, false);
753 GetProcess()->GetHandle(), content::RESULT_CODE_KILLED, false);
754 } 753 }
755 } 754 }
756 755
757 void RenderViewHostImpl::GotFocus() { 756 void RenderViewHostImpl::GotFocus() {
758 RenderWidgetHostImpl::GotFocus(); // Notifies the renderer it got focus. 757 RenderWidgetHostImpl::GotFocus(); // Notifies the renderer it got focus.
759 758
760 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 759 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
761 if (view) 760 if (view)
762 view->GotFocus(); 761 view->GotFocus();
763 } 762 }
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 FrameTree* frame_tree = delegate_->GetFrameTree(); 1476 FrameTree* frame_tree = delegate_->GetFrameTree();
1478 1477
1479 frame_tree->ResetForMainFrameSwap(); 1478 frame_tree->ResetForMainFrameSwap();
1480 } 1479 }
1481 1480
1482 void RenderViewHostImpl::SelectWordAroundCaret() { 1481 void RenderViewHostImpl::SelectWordAroundCaret() {
1483 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1482 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1484 } 1483 }
1485 1484
1486 } // namespace content 1485 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698