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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 7461104: Fix a few lingering bugs in BrowserAccessibilityManager and BrowserAccessibilityCocoa. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix corner case with removal of renderer to child id mappings. Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <QuartzCore/QuartzCore.h> 5 #include <QuartzCore/QuartzCore.h>
6 6
7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h"
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 if (render_widget_host_) 1056 if (render_widget_host_)
1057 render_widget_host_->Send(new ViewMsg_SetBackground( 1057 render_widget_host_->Send(new ViewMsg_SetBackground(
1058 render_widget_host_->routing_id(), background)); 1058 render_widget_host_->routing_id(), background));
1059 } 1059 }
1060 1060
1061 void RenderWidgetHostViewMac::OnAccessibilityNotifications( 1061 void RenderWidgetHostViewMac::OnAccessibilityNotifications(
1062 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { 1062 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) {
1063 if (!browser_accessibility_manager_.get()) { 1063 if (!browser_accessibility_manager_.get()) {
1064 // Use empty document to process notifications 1064 // Use empty document to process notifications
1065 webkit_glue::WebAccessibility empty_document; 1065 webkit_glue::WebAccessibility empty_document;
1066 // Renderer id's always start at 1000 as determined by webkit. Boot strap
1067 // our ability to reuse BrowserAccessibility instances.
1068 empty_document.id = 1000;
dmazzoni 2011/08/02 06:19:35 Could you move this to a common place, so it isn't
1066 empty_document.role = WebAccessibility::ROLE_WEB_AREA; 1069 empty_document.role = WebAccessibility::ROLE_WEB_AREA;
1067 empty_document.state = 0; 1070 empty_document.state = 0;
1068 browser_accessibility_manager_.reset( 1071 browser_accessibility_manager_.reset(
1069 BrowserAccessibilityManager::Create(cocoa_view_, empty_document, NULL)); 1072 BrowserAccessibilityManager::Create(cocoa_view_, empty_document, NULL));
1070 } 1073 }
1071 browser_accessibility_manager_->OnAccessibilityNotifications(params); 1074 browser_accessibility_manager_->OnAccessibilityNotifications(params);
1072 } 1075 }
1073 1076
1074 void RenderWidgetHostViewMac::SetTextInputActive(bool active) { 1077 void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
1075 if (active) { 1078 if (active) {
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 if (!string) return NO; 2631 if (!string) return NO;
2629 2632
2630 // If the user is currently using an IME, confirm the IME input, 2633 // If the user is currently using an IME, confirm the IME input,
2631 // and then insert the text from the service, the same as TextEdit and Safari. 2634 // and then insert the text from the service, the same as TextEdit and Safari.
2632 [self confirmComposition]; 2635 [self confirmComposition];
2633 [self insertText:string]; 2636 [self insertText:string];
2634 return YES; 2637 return YES;
2635 } 2638 }
2636 2639
2637 @end 2640 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698