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

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

Issue 10344028: Support cross-process window.close() messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 OnMsgToggleFullscreen) 931 OnMsgToggleFullscreen)
932 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) 932 IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL)
933 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, 933 IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange,
934 OnMsgDidContentsPreferredSizeChange) 934 OnMsgDidContentsPreferredSizeChange)
935 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame, 935 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollbarsForMainFrame,
936 OnMsgDidChangeScrollbarsForMainFrame) 936 OnMsgDidChangeScrollbarsForMainFrame)
937 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame, 937 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeScrollOffsetPinningForMainFrame,
938 OnMsgDidChangeScrollOffsetPinningForMainFrame) 938 OnMsgDidChangeScrollOffsetPinningForMainFrame)
939 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents, 939 IPC_MESSAGE_HANDLER(ViewHostMsg_DidChangeNumWheelEvents,
940 OnMsgDidChangeNumWheelEvents) 940 OnMsgDidChangeNumWheelEvents)
941 IPC_MESSAGE_HANDLER(ViewHostMsg_RouteCloseEvent,
942 OnMsgRouteCloseEvent)
941 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, 943 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage,
942 OnMsgRunJavaScriptMessage) 944 OnMsgRunJavaScriptMessage)
943 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, 945 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm,
944 OnMsgRunBeforeUnloadConfirm) 946 OnMsgRunBeforeUnloadConfirm)
945 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnMsgStartDragging) 947 IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnMsgStartDragging)
946 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor) 948 IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor)
947 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK) 949 IPC_MESSAGE_HANDLER(DragHostMsg_TargetDrop_ACK, OnTargetDropACK)
948 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus) 950 IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
949 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 951 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
950 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) 952 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole)
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 view_->SelectionChanged(text, offset, range); 1294 view_->SelectionChanged(text, offset, range);
1293 } 1295 }
1294 1296
1295 void RenderViewHostImpl::OnMsgSelectionBoundsChanged( 1297 void RenderViewHostImpl::OnMsgSelectionBoundsChanged(
1296 const gfx::Rect& start_rect, 1298 const gfx::Rect& start_rect,
1297 const gfx::Rect& end_rect) { 1299 const gfx::Rect& end_rect) {
1298 if (view_) 1300 if (view_)
1299 view_->SelectionBoundsChanged(start_rect, end_rect); 1301 view_->SelectionBoundsChanged(start_rect, end_rect);
1300 } 1302 }
1301 1303
1304 void RenderViewHostImpl::OnMsgRouteCloseEvent() {
1305 // Have the delegate route this to the active RenderViewHost.
1306 delegate_->RouteCloseEvent(this);
1307 }
1308
1302 void RenderViewHostImpl::OnMsgRunJavaScriptMessage( 1309 void RenderViewHostImpl::OnMsgRunJavaScriptMessage(
1303 const string16& message, 1310 const string16& message,
1304 const string16& default_prompt, 1311 const string16& default_prompt,
1305 const GURL& frame_url, 1312 const GURL& frame_url,
1306 ui::JavascriptMessageType type, 1313 ui::JavascriptMessageType type,
1307 IPC::Message* reply_msg) { 1314 IPC::Message* reply_msg) {
1308 // While a JS message dialog is showing, tabs in the same process shouldn't 1315 // While a JS message dialog is showing, tabs in the same process shouldn't
1309 // process input events. 1316 // process input events.
1310 GetProcess()->SetIgnoreInputEvents(true); 1317 GetProcess()->SetIgnoreInputEvents(true);
1311 StopHangMonitorTimeout(); 1318 StopHangMonitorTimeout();
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 is_waiting_for_beforeunload_ack_ = false; 1831 is_waiting_for_beforeunload_ack_ = false;
1825 is_waiting_for_unload_ack_ = false; 1832 is_waiting_for_unload_ack_ = false;
1826 has_timed_out_on_unload_ = false; 1833 has_timed_out_on_unload_ = false;
1827 } 1834 }
1828 1835
1829 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1836 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1830 STLDeleteValues(&power_save_blockers_); 1837 STLDeleteValues(&power_save_blockers_);
1831 } 1838 }
1832 1839
1833 } // namespace content 1840 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698