| 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 void RenderWidgetHostImpl::GotFocus() { | 701 void RenderWidgetHostImpl::GotFocus() { |
| 702 Focus(); | 702 Focus(); |
| 703 if (delegate_) | 703 if (delegate_) |
| 704 delegate_->RenderWidgetGotFocus(this); | 704 delegate_->RenderWidgetGotFocus(this); |
| 705 } | 705 } |
| 706 | 706 |
| 707 void RenderWidgetHostImpl::Focus() { | 707 void RenderWidgetHostImpl::Focus() { |
| 708 is_focused_ = true; | 708 is_focused_ = true; |
| 709 | 709 |
| 710 Send(new InputMsg_SetFocus(routing_id_, true)); | 710 Send(new InputMsg_SetFocus(routing_id_, true)); |
| 711 |
| 712 if (delegate_) |
| 713 delegate_->SendFocusToCrossProcessRenderWidgets(true); |
| 711 } | 714 } |
| 712 | 715 |
| 713 void RenderWidgetHostImpl::Blur() { | 716 void RenderWidgetHostImpl::Blur() { |
| 714 is_focused_ = false; | 717 is_focused_ = false; |
| 715 | 718 |
| 716 // If there is a pending mouse lock request, we don't want to reject it at | 719 // If there is a pending mouse lock request, we don't want to reject it at |
| 717 // this point. The user can switch focus back to this view and approve the | 720 // this point. The user can switch focus back to this view and approve the |
| 718 // request later. | 721 // request later. |
| 719 if (IsMouseLocked()) | 722 if (IsMouseLocked()) |
| 720 view_->UnlockMouse(); | 723 view_->UnlockMouse(); |
| 721 | 724 |
| 722 if (touch_emulator_) | 725 if (touch_emulator_) |
| 723 touch_emulator_->CancelTouch(); | 726 touch_emulator_->CancelTouch(); |
| 724 | 727 |
| 725 Send(new InputMsg_SetFocus(routing_id_, false)); | 728 Send(new InputMsg_SetFocus(routing_id_, false)); |
| 729 |
| 730 if (delegate_) |
| 731 delegate_->SendFocusToCrossProcessRenderWidgets(false); |
| 726 } | 732 } |
| 727 | 733 |
| 728 void RenderWidgetHostImpl::LostCapture() { | 734 void RenderWidgetHostImpl::LostCapture() { |
| 729 if (touch_emulator_) | 735 if (touch_emulator_) |
| 730 touch_emulator_->CancelTouch(); | 736 touch_emulator_->CancelTouch(); |
| 731 | 737 |
| 732 Send(new InputMsg_MouseCaptureLost(routing_id_)); | 738 Send(new InputMsg_MouseCaptureLost(routing_id_)); |
| 733 } | 739 } |
| 734 | 740 |
| 735 void RenderWidgetHostImpl::SetActive(bool active) { | 741 void RenderWidgetHostImpl::SetActive(bool active) { |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2193 } | 2199 } |
| 2194 | 2200 |
| 2195 #if defined(OS_WIN) | 2201 #if defined(OS_WIN) |
| 2196 gfx::NativeViewAccessible | 2202 gfx::NativeViewAccessible |
| 2197 RenderWidgetHostImpl::GetParentNativeViewAccessible() { | 2203 RenderWidgetHostImpl::GetParentNativeViewAccessible() { |
| 2198 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; | 2204 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; |
| 2199 } | 2205 } |
| 2200 #endif | 2206 #endif |
| 2201 | 2207 |
| 2202 } // namespace content | 2208 } // namespace content |
| OLD | NEW |