Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 12221133: Prevent translated key events (WM_CHAR) associated with key events that focus the WebContents fro... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 1743
1744 host_->GotFocus(); 1744 host_->GotFocus();
1745 host_->SetActive(true); 1745 host_->SetActive(true);
1746 1746
1747 ui::InputMethod* input_method = GetInputMethod(); 1747 ui::InputMethod* input_method = GetInputMethod();
1748 if (input_method) { 1748 if (input_method) {
1749 // Ask the system-wide IME to send all TextInputClient messages to |this| 1749 // Ask the system-wide IME to send all TextInputClient messages to |this|
1750 // object. 1750 // object.
1751 input_method->SetFocusedTextInputClient(this); 1751 input_method->SetFocusedTextInputClient(this);
1752 host_->SetInputMethodActive(input_method->IsActive()); 1752 host_->SetInputMethodActive(input_method->IsActive());
1753
1754 // Often the application can set focus to the view in response to a key
1755 // down. However the following char event shouldn't be sent to the web
1756 // page.
1757 host_->SuppressNextCharEvents();
1753 } else { 1758 } else {
1754 host_->SetInputMethodActive(false); 1759 host_->SetInputMethodActive(false);
1755 } 1760 }
1756 } else if (window_ == lost_focus) { 1761 } else if (window_ == lost_focus) {
1757 host_->SetActive(false); 1762 host_->SetActive(false);
1758 host_->Blur(); 1763 host_->Blur();
1759 1764
1760 DetachFromInputMethod(); 1765 DetachFromInputMethod();
1761 host_->SetInputMethodActive(false); 1766 host_->SetInputMethodActive(false);
1762 1767
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 RenderWidgetHost* widget) { 2046 RenderWidgetHost* widget) {
2042 return new RenderWidgetHostViewAura(widget); 2047 return new RenderWidgetHostViewAura(widget);
2043 } 2048 }
2044 2049
2045 // static 2050 // static
2046 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2051 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2047 GetScreenInfoForWindow(results, NULL); 2052 GetScreenInfoForWindow(results, NULL);
2048 } 2053 }
2049 2054
2050 } // namespace content 2055 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698