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