| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { | 1198 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { |
| 1199 if (view()) | 1199 if (view()) |
| 1200 view()->SelectionChanged(text); | 1200 view()->SelectionChanged(text); |
| 1201 } | 1201 } |
| 1202 | 1202 |
| 1203 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1203 void RenderViewHost::OnMsgRunJavaScriptMessage( |
| 1204 const std::wstring& message, | 1204 const std::wstring& message, |
| 1205 const std::wstring& default_prompt, | 1205 const std::wstring& default_prompt, |
| 1206 const GURL& frame_url, | 1206 const GURL& frame_url, |
| 1207 const int flags, | 1207 const int flags, |
| 1208 const bool unload_handler_being_run, |
| 1208 IPC::Message* reply_msg) { | 1209 IPC::Message* reply_msg) { |
| 1209 // While a JS message dialog is showing, tabs in the same process shouldn't | 1210 // While a JS message dialog is showing, tabs in the same process shouldn't |
| 1210 // process input events. | 1211 // process input events. |
| 1211 process()->set_ignore_input_events(true); | 1212 process()->set_ignore_input_events(true); |
| 1212 StopHangMonitorTimeout(); | 1213 StopHangMonitorTimeout(); |
| 1213 delegate_->RunJavaScriptMessage(message, default_prompt, frame_url, flags, | 1214 delegate_->RunJavaScriptMessage(message, default_prompt, frame_url, flags, |
| 1214 reply_msg, | 1215 unload_handler_being_run, reply_msg, |
| 1215 &are_javascript_messages_suppressed_); | 1216 &are_javascript_messages_suppressed_); |
| 1216 } | 1217 } |
| 1217 | 1218 |
| 1218 void RenderViewHost::OnMsgRunBeforeUnloadConfirm(const GURL& frame_url, | 1219 void RenderViewHost::OnMsgRunBeforeUnloadConfirm(const GURL& frame_url, |
| 1219 const std::wstring& message, | 1220 const std::wstring& message, |
| 1220 IPC::Message* reply_msg) { | 1221 IPC::Message* reply_msg) { |
| 1221 // While a JS before unload dialog is showing, tabs in the same process | 1222 // While a JS before unload dialog is showing, tabs in the same process |
| 1222 // shouldn't process input events. | 1223 // shouldn't process input events. |
| 1223 process()->set_ignore_input_events(true); | 1224 process()->set_ignore_input_events(true); |
| 1224 StopHangMonitorTimeout(); | 1225 StopHangMonitorTimeout(); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1689 LOG(DFATAL) << "Invalid checked state " << checked_state; |
| 1689 return; | 1690 return; |
| 1690 } | 1691 } |
| 1691 | 1692 |
| 1692 CommandState state; | 1693 CommandState state; |
| 1693 state.is_enabled = is_enabled; | 1694 state.is_enabled = is_enabled; |
| 1694 state.checked_state = | 1695 state.checked_state = |
| 1695 static_cast<RenderViewCommandCheckedState>(checked_state); | 1696 static_cast<RenderViewCommandCheckedState>(checked_state); |
| 1696 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1697 command_states_[static_cast<RenderViewCommand>(command)] = state; |
| 1697 } | 1698 } |
| OLD | NEW |