| 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_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1738 return; | 1738 return; |
| 1739 | 1739 |
| 1740 host_->GotFocus(); | 1740 host_->GotFocus(); |
| 1741 host_->SetActive(true); | 1741 host_->SetActive(true); |
| 1742 | 1742 |
| 1743 ui::InputMethod* input_method = GetInputMethod(); | 1743 ui::InputMethod* input_method = GetInputMethod(); |
| 1744 if (input_method) { | 1744 if (input_method) { |
| 1745 // Ask the system-wide IME to send all TextInputClient messages to |this| | 1745 // Ask the system-wide IME to send all TextInputClient messages to |this| |
| 1746 // object. | 1746 // object. |
| 1747 input_method->SetFocusedTextInputClient(this); | 1747 input_method->SetFocusedTextInputClient(this); |
| 1748 | |
| 1749 // Often the application can set focus to the view in response to a key | |
| 1750 // down. However, the following events shouldn't be sent to the web page. | |
| 1751 host_->SuppressEventsUntilKeyDown(); | |
| 1752 } | 1748 } |
| 1753 | 1749 |
| 1754 BrowserAccessibilityManager* manager = | 1750 BrowserAccessibilityManager* manager = |
| 1755 host_->GetRootBrowserAccessibilityManager(); | 1751 host_->GetRootBrowserAccessibilityManager(); |
| 1756 if (manager) | 1752 if (manager) |
| 1757 manager->OnWindowFocused(); | 1753 manager->OnWindowFocused(); |
| 1758 } else if (window_ == lost_focus) { | 1754 } else if (window_ == lost_focus) { |
| 1759 host_->SetActive(false); | 1755 host_->SetActive(false); |
| 1760 host_->Blur(); | 1756 host_->Blur(); |
| 1761 | 1757 |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2369 | 2365 |
| 2370 void RenderWidgetHostViewAura::SetPopupChild( | 2366 void RenderWidgetHostViewAura::SetPopupChild( |
| 2371 RenderWidgetHostViewAura* popup_child_host_view) { | 2367 RenderWidgetHostViewAura* popup_child_host_view) { |
| 2372 popup_child_host_view_ = popup_child_host_view; | 2368 popup_child_host_view_ = popup_child_host_view; |
| 2373 event_handler_->SetPopupChild( | 2369 event_handler_->SetPopupChild( |
| 2374 popup_child_host_view, | 2370 popup_child_host_view, |
| 2375 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); | 2371 popup_child_host_view ? popup_child_host_view->event_handler() : nullptr); |
| 2376 } | 2372 } |
| 2377 | 2373 |
| 2378 } // namespace content | 2374 } // namespace content |
| OLD | NEW |