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

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: add a unittest 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) { 1053 void RenderWidgetHostViewMac::SetBackground(const SkBitmap& background) {
1054 RenderWidgetHostView::SetBackground(background); 1054 RenderWidgetHostView::SetBackground(background);
1055 if (render_widget_host_) 1055 if (render_widget_host_)
1056 render_widget_host_->Send(new ViewMsg_SetBackground( 1056 render_widget_host_->Send(new ViewMsg_SetBackground(
1057 render_widget_host_->routing_id(), background)); 1057 render_widget_host_->routing_id(), background));
1058 } 1058 }
1059 1059
1060 void RenderWidgetHostViewMac::OnAccessibilityNotifications( 1060 void RenderWidgetHostViewMac::OnAccessibilityNotifications(
1061 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { 1061 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) {
1062 if (!browser_accessibility_manager_.get()) { 1062 if (!browser_accessibility_manager_.get()) {
1063 // Use empty document to process notifications 1063 BrowserAccessibilityManager::CreateEmptyDocument(
1064 webkit_glue::WebAccessibility empty_document; 1064 cocoa_view_, static_cast<WebAccessibility::State>(0), NULL);
1065 empty_document.role = WebAccessibility::ROLE_WEB_AREA;
1066 empty_document.state = 0;
1067 browser_accessibility_manager_.reset(
1068 BrowserAccessibilityManager::Create(cocoa_view_, empty_document, NULL));
1069 } 1065 }
1070 browser_accessibility_manager_->OnAccessibilityNotifications(params); 1066 browser_accessibility_manager_->OnAccessibilityNotifications(params);
1071 } 1067 }
1072 1068
1073 void RenderWidgetHostViewMac::SetTextInputActive(bool active) { 1069 void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
1074 if (active) { 1070 if (active) {
1075 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) 1071 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD)
1076 EnablePasswordInput(); 1072 EnablePasswordInput();
1077 else 1073 else
1078 DisablePasswordInput(); 1074 DisablePasswordInput();
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2627 if (!string) return NO; 2623 if (!string) return NO;
2628 2624
2629 // If the user is currently using an IME, confirm the IME input, 2625 // If the user is currently using an IME, confirm the IME input,
2630 // and then insert the text from the service, the same as TextEdit and Safari. 2626 // and then insert the text from the service, the same as TextEdit and Safari.
2631 [self confirmComposition]; 2627 [self confirmComposition];
2632 [self insertText:string]; 2628 [self insertText:string];
2633 return YES; 2629 return YES;
2634 } 2630 }
2635 2631
2636 @end 2632 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698