| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 if (!text_direction_canceled_) | 1395 if (!text_direction_canceled_) |
| 1396 Send(new ViewMsg_SetTextDirection(GetRoutingID(), text_direction_)); | 1396 Send(new ViewMsg_SetTextDirection(GetRoutingID(), text_direction_)); |
| 1397 text_direction_updated_ = false; | 1397 text_direction_updated_ = false; |
| 1398 text_direction_canceled_ = false; | 1398 text_direction_canceled_ = false; |
| 1399 } | 1399 } |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 void RenderWidgetHostImpl::ImeSetComposition( | 1402 void RenderWidgetHostImpl::ImeSetComposition( |
| 1403 const base::string16& text, | 1403 const base::string16& text, |
| 1404 const std::vector<blink::WebCompositionUnderline>& underlines, | 1404 const std::vector<blink::WebCompositionUnderline>& underlines, |
| 1405 const gfx::Range& replacement_range, |
| 1405 int selection_start, | 1406 int selection_start, |
| 1406 int selection_end) { | 1407 int selection_end) { |
| 1407 Send(new InputMsg_ImeSetComposition( | 1408 Send(new InputMsg_ImeSetComposition( |
| 1408 GetRoutingID(), text, underlines, selection_start, selection_end)); | 1409 GetRoutingID(), text, underlines, replacement_range, |
| 1410 selection_start, selection_end)); |
| 1409 } | 1411 } |
| 1410 | 1412 |
| 1411 void RenderWidgetHostImpl::ImeConfirmComposition( | 1413 void RenderWidgetHostImpl::ImeConfirmComposition( |
| 1412 const base::string16& text, | 1414 const base::string16& text, |
| 1413 const gfx::Range& replacement_range, | 1415 const gfx::Range& replacement_range, |
| 1414 bool keep_selection) { | 1416 bool keep_selection) { |
| 1415 Send(new InputMsg_ImeConfirmComposition( | 1417 Send(new InputMsg_ImeConfirmComposition( |
| 1416 GetRoutingID(), text, replacement_range, keep_selection)); | 1418 GetRoutingID(), text, replacement_range, keep_selection)); |
| 1417 } | 1419 } |
| 1418 | 1420 |
| 1419 void RenderWidgetHostImpl::ImeCancelComposition() { | 1421 void RenderWidgetHostImpl::ImeCancelComposition() { |
| 1420 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(), | 1422 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(), |
| 1421 std::vector<blink::WebCompositionUnderline>(), 0, 0)); | 1423 std::vector<blink::WebCompositionUnderline>(), |
| 1424 gfx::Range::InvalidRange(), 0, 0)); |
| 1422 } | 1425 } |
| 1423 | 1426 |
| 1424 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() { | 1427 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() { |
| 1425 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked()); | 1428 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked()); |
| 1426 if (pending_mouse_lock_request_) { | 1429 if (pending_mouse_lock_request_) { |
| 1427 pending_mouse_lock_request_ = false; | 1430 pending_mouse_lock_request_ = false; |
| 1428 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); | 1431 Send(new ViewMsg_LockMouse_ACK(routing_id_, false)); |
| 1429 } else if (IsMouseLocked()) { | 1432 } else if (IsMouseLocked()) { |
| 1430 view_->UnlockMouse(); | 1433 view_->UnlockMouse(); |
| 1431 } | 1434 } |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2245 } | 2248 } |
| 2246 | 2249 |
| 2247 #if defined(OS_WIN) | 2250 #if defined(OS_WIN) |
| 2248 gfx::NativeViewAccessible | 2251 gfx::NativeViewAccessible |
| 2249 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2252 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2250 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2253 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2251 } | 2254 } |
| 2252 #endif | 2255 #endif |
| 2253 | 2256 |
| 2254 } // namespace content | 2257 } // namespace content |
| OLD | NEW |