| 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 "chrome/browser/renderer_host/render_view_host.h" | 5 #include "chrome/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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && | 1204 } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && |
| 1205 !base::i18n::IsRTL()) { | 1205 !base::i18n::IsRTL()) { |
| 1206 // Force the tooltip to have RTL directionality. | 1206 // Force the tooltip to have RTL directionality. |
| 1207 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); | 1207 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); |
| 1208 } | 1208 } |
| 1209 } | 1209 } |
| 1210 if (view()) | 1210 if (view()) |
| 1211 view()->SetTooltipText(wrapped_tooltip_text); | 1211 view()->SetTooltipText(wrapped_tooltip_text); |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { | 1214 void RenderViewHost::OnMsgSelectionChanged(const std::string& text, |
| 1215 int start, |
| 1216 int end) { |
| 1215 if (view()) | 1217 if (view()) |
| 1216 view()->SelectionChanged(text); | 1218 view()->SelectionChanged(text, start, end); |
| 1217 } | 1219 } |
| 1218 | 1220 |
| 1219 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1221 void RenderViewHost::OnMsgRunJavaScriptMessage( |
| 1220 const std::wstring& message, | 1222 const std::wstring& message, |
| 1221 const std::wstring& default_prompt, | 1223 const std::wstring& default_prompt, |
| 1222 const GURL& frame_url, | 1224 const GURL& frame_url, |
| 1223 const int flags, | 1225 const int flags, |
| 1224 IPC::Message* reply_msg) { | 1226 IPC::Message* reply_msg) { |
| 1225 // While a JS message dialog is showing, tabs in the same process shouldn't | 1227 // While a JS message dialog is showing, tabs in the same process shouldn't |
| 1226 // process input events. | 1228 // process input events. |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1705 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1707 LOG(DFATAL) << "Invalid checked state " << checked_state; |
| 1706 return; | 1708 return; |
| 1707 } | 1709 } |
| 1708 | 1710 |
| 1709 CommandState state; | 1711 CommandState state; |
| 1710 state.is_enabled = is_enabled; | 1712 state.is_enabled = is_enabled; |
| 1711 state.checked_state = | 1713 state.checked_state = |
| 1712 static_cast<RenderViewCommandCheckedState>(checked_state); | 1714 static_cast<RenderViewCommandCheckedState>(checked_state); |
| 1713 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1715 command_states_[static_cast<RenderViewCommand>(command)] = state; |
| 1714 } | 1716 } |
| OLD | NEW |