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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1714573002: Remove the ability of webpages to specify strings for the onbeforeunload dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 // While a JS message dialog is showing, tabs in the same process shouldn't 1434 // While a JS message dialog is showing, tabs in the same process shouldn't
1435 // process input events. 1435 // process input events.
1436 GetProcess()->SetIgnoreInputEvents(true); 1436 GetProcess()->SetIgnoreInputEvents(true);
1437 render_view_host_->GetWidget()->StopHangMonitorTimeout(); 1437 render_view_host_->GetWidget()->StopHangMonitorTimeout();
1438 delegate_->RunJavaScriptMessage(this, message, default_prompt, 1438 delegate_->RunJavaScriptMessage(this, message, default_prompt,
1439 frame_url, type, reply_msg); 1439 frame_url, type, reply_msg);
1440 } 1440 }
1441 1441
1442 void RenderFrameHostImpl::OnRunBeforeUnloadConfirm( 1442 void RenderFrameHostImpl::OnRunBeforeUnloadConfirm(
1443 const GURL& frame_url, 1443 const GURL& frame_url,
1444 const base::string16& message,
1445 bool is_reload, 1444 bool is_reload,
1446 IPC::Message* reply_msg) { 1445 IPC::Message* reply_msg) {
1447 // While a JS beforeunload dialog is showing, tabs in the same process 1446 // While a JS beforeunload dialog is showing, tabs in the same process
1448 // shouldn't process input events. 1447 // shouldn't process input events.
1449 GetProcess()->SetIgnoreInputEvents(true); 1448 GetProcess()->SetIgnoreInputEvents(true);
1450 render_view_host_->GetWidget()->StopHangMonitorTimeout(); 1449 render_view_host_->GetWidget()->StopHangMonitorTimeout();
1451 delegate_->RunBeforeUnloadConfirm(this, message, is_reload, reply_msg); 1450 delegate_->RunBeforeUnloadConfirm(this, is_reload, reply_msg);
1452 } 1451 }
1453 1452
1454 void RenderFrameHostImpl::OnTextSurroundingSelectionResponse( 1453 void RenderFrameHostImpl::OnTextSurroundingSelectionResponse(
1455 const base::string16& content, 1454 const base::string16& content,
1456 uint32_t start_offset, 1455 uint32_t start_offset,
1457 uint32_t end_offset) { 1456 uint32_t end_offset) {
1458 render_view_host_->OnTextSurroundingSelectionResponse( 1457 render_view_host_->OnTextSurroundingSelectionResponse(
1459 content, start_offset, end_offset); 1458 content, start_offset, end_offset);
1460 } 1459 }
1461 1460
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame(); 2712 FrameTreeNode* focused_frame_tree_node = frame_tree_->GetFocusedFrame();
2714 if (!focused_frame_tree_node) 2713 if (!focused_frame_tree_node)
2715 return; 2714 return;
2716 RenderFrameHostImpl* focused_frame = 2715 RenderFrameHostImpl* focused_frame =
2717 focused_frame_tree_node->current_frame_host(); 2716 focused_frame_tree_node->current_frame_host();
2718 DCHECK(focused_frame); 2717 DCHECK(focused_frame);
2719 dst->focused_tree_id = focused_frame->GetAXTreeID(); 2718 dst->focused_tree_id = focused_frame->GetAXTreeID();
2720 } 2719 }
2721 2720
2722 } // namespace content 2721 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_host_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698