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

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

Issue 226503002: Move modal dialogs from WebViewClient to WebFrameClient, part 1/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean Created 6 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 | Annotate | Revision Log
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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 void RenderViewHostImpl::OnRunJavaScriptMessage( 1382 void RenderViewHostImpl::OnRunJavaScriptMessage(
1383 const base::string16& message, 1383 const base::string16& message,
1384 const base::string16& default_prompt, 1384 const base::string16& default_prompt,
1385 const GURL& frame_url, 1385 const GURL& frame_url,
1386 JavaScriptMessageType type, 1386 JavaScriptMessageType type,
1387 IPC::Message* reply_msg) { 1387 IPC::Message* reply_msg) {
1388 // While a JS message dialog is showing, tabs in the same process shouldn't 1388 // While a JS message dialog is showing, tabs in the same process shouldn't
1389 // process input events. 1389 // process input events.
1390 GetProcess()->SetIgnoreInputEvents(true); 1390 GetProcess()->SetIgnoreInputEvents(true);
1391 StopHangMonitorTimeout(); 1391 StopHangMonitorTimeout();
1392 delegate_->RunJavaScriptMessage(this, message, default_prompt, frame_url, 1392 delegate_->RunJavaScriptMessageOBSOLETE(this, message, default_prompt,
1393 type, reply_msg, 1393 frame_url, type, reply_msg,
1394 &are_javascript_messages_suppressed_); 1394 &are_javascript_messages_suppressed_);
1395 } 1395 }
1396 1396
1397 void RenderViewHostImpl::OnRunBeforeUnloadConfirm(const GURL& frame_url, 1397 void RenderViewHostImpl::OnRunBeforeUnloadConfirm(const GURL& frame_url,
1398 const base::string16& message, 1398 const base::string16& message,
1399 bool is_reload, 1399 bool is_reload,
1400 IPC::Message* reply_msg) { 1400 IPC::Message* reply_msg) {
1401 // While a JS before unload dialog is showing, tabs in the same process 1401 // While a JS before unload dialog is showing, tabs in the same process
1402 // shouldn't process input events. 1402 // shouldn't process input events.
1403 GetProcess()->SetIgnoreInputEvents(true); 1403 GetProcess()->SetIgnoreInputEvents(true);
1404 StopHangMonitorTimeout(); 1404 StopHangMonitorTimeout();
1405 delegate_->RunBeforeUnloadConfirm(this, message, is_reload, reply_msg); 1405 delegate_->RunBeforeUnloadConfirmOBSOLETE(
1406 this, message, is_reload, reply_msg);
1406 } 1407 }
1407 1408
1408 void RenderViewHostImpl::OnStartDragging( 1409 void RenderViewHostImpl::OnStartDragging(
1409 const DropData& drop_data, 1410 const DropData& drop_data,
1410 WebDragOperationsMask drag_operations_mask, 1411 WebDragOperationsMask drag_operations_mask,
1411 const SkBitmap& bitmap, 1412 const SkBitmap& bitmap,
1412 const gfx::Vector2d& bitmap_offset_in_dip, 1413 const gfx::Vector2d& bitmap_offset_in_dip,
1413 const DragEventSourceInfo& event_info) { 1414 const DragEventSourceInfo& event_info) {
1414 RenderViewHostDelegateView* view = delegate_->GetDelegateView(); 1415 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1415 if (!view) 1416 if (!view)
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 return true; 1850 return true;
1850 } 1851 }
1851 1852
1852 void RenderViewHostImpl::AttachToFrameTree() { 1853 void RenderViewHostImpl::AttachToFrameTree() {
1853 FrameTree* frame_tree = delegate_->GetFrameTree(); 1854 FrameTree* frame_tree = delegate_->GetFrameTree();
1854 1855
1855 frame_tree->ResetForMainFrameSwap(); 1856 frame_tree->ResetForMainFrameSwap();
1856 } 1857 }
1857 1858
1858 } // namespace content 1859 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698