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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && | 1073 } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && |
1074 !base::i18n::IsRTL()) { | 1074 !base::i18n::IsRTL()) { |
1075 // Force the tooltip to have RTL directionality. | 1075 // Force the tooltip to have RTL directionality. |
1076 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); | 1076 base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); |
1077 } | 1077 } |
1078 } | 1078 } |
1079 if (view()) | 1079 if (view()) |
1080 view()->SetTooltipText(UTF16ToWide(wrapped_tooltip_text)); | 1080 view()->SetTooltipText(UTF16ToWide(wrapped_tooltip_text)); |
1081 } | 1081 } |
1082 | 1082 |
1083 void RenderViewHost::OnMsgSelectionChanged(const std::string& text) { | 1083 void RenderViewHost::OnMsgSelectionChanged(const std::string& text, |
| 1084 const ui::Range& range) { |
1084 if (view()) | 1085 if (view()) |
1085 view()->SelectionChanged(text); | 1086 view()->SelectionChanged(text, range); |
1086 } | 1087 } |
1087 | 1088 |
1088 void RenderViewHost::OnMsgRunJavaScriptMessage( | 1089 void RenderViewHost::OnMsgRunJavaScriptMessage( |
1089 const std::wstring& message, | 1090 const std::wstring& message, |
1090 const std::wstring& default_prompt, | 1091 const std::wstring& default_prompt, |
1091 const GURL& frame_url, | 1092 const GURL& frame_url, |
1092 const int flags, | 1093 const int flags, |
1093 IPC::Message* reply_msg) { | 1094 IPC::Message* reply_msg) { |
1094 // While a JS message dialog is showing, tabs in the same process shouldn't | 1095 // While a JS message dialog is showing, tabs in the same process shouldn't |
1095 // process input events. | 1096 // process input events. |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1455 LOG(DFATAL) << "Invalid checked state " << checked_state; |
1455 return; | 1456 return; |
1456 } | 1457 } |
1457 | 1458 |
1458 CommandState state; | 1459 CommandState state; |
1459 state.is_enabled = is_enabled; | 1460 state.is_enabled = is_enabled; |
1460 state.checked_state = | 1461 state.checked_state = |
1461 static_cast<RenderViewCommandCheckedState>(checked_state); | 1462 static_cast<RenderViewCommandCheckedState>(checked_state); |
1462 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1463 command_states_[static_cast<RenderViewCommand>(command)] = state; |
1463 } | 1464 } |
OLD | NEW |