| 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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && | 1166 } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && |
| 1167 !base::i18n::IsRTL()) { | 1167 !base::i18n::IsRTL()) { |
| 1168 // Force the tooltip to have RTL directionality. | 1168 // Force the tooltip to have RTL directionality. |
| 1169 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); | 1169 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); |
| 1170 } | 1170 } |
| 1171 } | 1171 } |
| 1172 if (view()) | 1172 if (view()) |
| 1173 view()->SetTooltipText(wrapped_tooltip_text); | 1173 view()->SetTooltipText(wrapped_tooltip_text); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { | 1176 void RenderViewHost::OnMsgSelectionChanged(const std::string& text, |
| 1177 const ui::Range& range) { |
| 1177 if (view()) | 1178 if (view()) |
| 1178 view()->SelectionChanged(text); | 1179 view()->SelectionChanged(text, range); |
| 1179 } | 1180 } |
| 1180 | 1181 |
| 1181 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1182 void RenderViewHost::OnMsgRunJavaScriptMessage( |
| 1182 const std::wstring& message, | 1183 const std::wstring& message, |
| 1183 const std::wstring& default_prompt, | 1184 const std::wstring& default_prompt, |
| 1184 const GURL& frame_url, | 1185 const GURL& frame_url, |
| 1185 const int flags, | 1186 const int flags, |
| 1186 IPC::Message* reply_msg) { | 1187 IPC::Message* reply_msg) { |
| 1187 // While a JS message dialog is showing, tabs in the same process shouldn't | 1188 // While a JS message dialog is showing, tabs in the same process shouldn't |
| 1188 // process input events. | 1189 // process input events. |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1596 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1597 LOG(DFATAL) << "Invalid checked state " << checked_state; |
| 1597 return; | 1598 return; |
| 1598 } | 1599 } |
| 1599 | 1600 |
| 1600 CommandState state; | 1601 CommandState state; |
| 1601 state.is_enabled = is_enabled; | 1602 state.is_enabled = is_enabled; |
| 1602 state.checked_state = | 1603 state.checked_state = |
| 1603 static_cast<RenderViewCommandCheckedState>(checked_state); | 1604 static_cast<RenderViewCommandCheckedState>(checked_state); |
| 1604 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1605 command_states_[static_cast<RenderViewCommand>(command)] = state; |
| 1605 } | 1606 } |
| OLD | NEW |