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

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

Issue 214243005: Fire accessibility focus/blur events on root web document. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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
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/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 input_method->SetFocusedTextInputClient(this); 3109 input_method->SetFocusedTextInputClient(this);
3110 host_->SetInputMethodActive(input_method->IsActive()); 3110 host_->SetInputMethodActive(input_method->IsActive());
3111 3111
3112 // Often the application can set focus to the view in response to a key 3112 // Often the application can set focus to the view in response to a key
3113 // down. However the following char event shouldn't be sent to the web 3113 // down. However the following char event shouldn't be sent to the web
3114 // page. 3114 // page.
3115 host_->SuppressNextCharEvents(); 3115 host_->SuppressNextCharEvents();
3116 } else { 3116 } else {
3117 host_->SetInputMethodActive(false); 3117 host_->SetInputMethodActive(false);
3118 } 3118 }
3119
3120 BrowserAccessibilityManager* manager = GetBrowserAccessibilityManager();
3121 if (manager)
3122 manager->OnWindowFocused();
3119 } else if (window_ == lost_focus) { 3123 } else if (window_ == lost_focus) {
3120 host_->SetActive(false); 3124 host_->SetActive(false);
3121 host_->Blur(); 3125 host_->Blur();
3122 3126
3123 DetachFromInputMethod(); 3127 DetachFromInputMethod();
3124 host_->SetInputMethodActive(false); 3128 host_->SetInputMethodActive(false);
3125 3129
3126 if (touch_editing_client_) 3130 if (touch_editing_client_)
3127 touch_editing_client_->EndTouchEditing(false); 3131 touch_editing_client_->EndTouchEditing(false);
3128 3132
(...skipping 13 matching lines...) Expand all
3142 POINT point = {0}; 3146 POINT point = {0};
3143 ::GetCursorPos(&point); 3147 ::GetCursorPos(&point);
3144 if (screen->GetDisplayNearestWindow(window_).id() != 3148 if (screen->GetDisplayNearestWindow(window_).id() !=
3145 screen->GetDisplayNearestPoint(gfx::Point(point)).id()) 3149 screen->GetDisplayNearestPoint(gfx::Point(point)).id())
3146 return; 3150 return;
3147 } 3151 }
3148 #endif 3152 #endif
3149 in_shutdown_ = true; 3153 in_shutdown_ = true;
3150 host_->Shutdown(); 3154 host_->Shutdown();
3151 } 3155 }
3156
3157 BrowserAccessibilityManager* manager = GetBrowserAccessibilityManager();
3158 if (manager)
3159 manager->OnWindowBlurred();
3152 } 3160 }
3153 } 3161 }
3154 3162
3155 //////////////////////////////////////////////////////////////////////////////// 3163 ////////////////////////////////////////////////////////////////////////////////
3156 // RenderWidgetHostViewAura, aura::WindowTreeHostObserver implementation: 3164 // RenderWidgetHostViewAura, aura::WindowTreeHostObserver implementation:
3157 3165
3158 void RenderWidgetHostViewAura::OnHostMoved(const aura::WindowTreeHost* host, 3166 void RenderWidgetHostViewAura::OnHostMoved(const aura::WindowTreeHost* host,
3159 const gfx::Point& new_origin) { 3167 const gfx::Point& new_origin) {
3160 TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnHostMoved", 3168 TRACE_EVENT1("ui", "RenderWidgetHostViewAura::OnHostMoved",
3161 "new_origin", new_origin.ToString()); 3169 "new_origin", new_origin.ToString());
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
3683 RenderWidgetHost* widget) { 3691 RenderWidgetHost* widget) {
3684 return new RenderWidgetHostViewAura(widget); 3692 return new RenderWidgetHostViewAura(widget);
3685 } 3693 }
3686 3694
3687 // static 3695 // static
3688 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 3696 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
3689 GetScreenInfoForWindow(results, NULL); 3697 GetScreenInfoForWindow(results, NULL);
3690 } 3698 }
3691 3699
3692 } // namespace content 3700 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698