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

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

Issue 10544099: Refactor all accessibility code out of webkit/glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build Created 8 years, 6 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) 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_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <QuartzCore/QuartzCore.h> 7 #include <QuartzCore/QuartzCore.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
45 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFact ory.h" 45 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFact ory.h"
46 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFact ory.h" 46 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFact ory.h"
47 #import "third_party/mozilla/ComplexTextInputPanel.h" 47 #import "third_party/mozilla/ComplexTextInputPanel.h"
48 #include "third_party/skia/include/core/SkColor.h" 48 #include "third_party/skia/include/core/SkColor.h"
49 #import "ui/base/cocoa/fullscreen_window_manager.h" 49 #import "ui/base/cocoa/fullscreen_window_manager.h"
50 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" 50 #import "ui/base/cocoa/underlay_opengl_hosting_window.h"
51 #include "ui/gfx/point.h" 51 #include "ui/gfx/point.h"
52 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 52 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
53 #include "ui/surface/io_surface_support_mac.h" 53 #include "ui/surface/io_surface_support_mac.h"
54 #include "webkit/glue/webaccessibility.h"
55 #include "webkit/plugins/npapi/webplugin.h" 54 #include "webkit/plugins/npapi/webplugin.h"
56 55
57 using content::BrowserThread; 56 using content::BrowserThread;
58 using content::NativeWebKeyboardEvent; 57 using content::NativeWebKeyboardEvent;
59 using content::RenderViewHostImpl; 58 using content::RenderViewHostImpl;
60 using content::RenderWidgetHost; 59 using content::RenderWidgetHost;
61 using content::RenderWidgetHostImpl; 60 using content::RenderWidgetHostImpl;
62 using content::RenderWidgetHostView; 61 using content::RenderWidgetHostView;
63 using WebKit::WebInputEvent; 62 using WebKit::WebInputEvent;
64 using WebKit::WebInputEventFactory; 63 using WebKit::WebInputEventFactory;
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 if (render_widget_host_) 1255 if (render_widget_host_)
1257 render_widget_host_->Send(new ViewMsg_SetBackground( 1256 render_widget_host_->Send(new ViewMsg_SetBackground(
1258 render_widget_host_->GetRoutingID(), background)); 1257 render_widget_host_->GetRoutingID(), background));
1259 } 1258 }
1260 1259
1261 void RenderWidgetHostViewMac::OnAccessibilityNotifications( 1260 void RenderWidgetHostViewMac::OnAccessibilityNotifications(
1262 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { 1261 const std::vector<AccessibilityHostMsg_NotificationParams>& params) {
1263 if (!GetBrowserAccessibilityManager()) { 1262 if (!GetBrowserAccessibilityManager()) {
1264 SetBrowserAccessibilityManager( 1263 SetBrowserAccessibilityManager(
1265 BrowserAccessibilityManager::CreateEmptyDocument( 1264 BrowserAccessibilityManager::CreateEmptyDocument(
1266 cocoa_view_, static_cast<WebAccessibility::State>(0), NULL)); 1265 cocoa_view_, static_cast<AccessibilityNodeData::State>(0), NULL));
1267 } 1266 }
1268 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params); 1267 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params);
1269 } 1268 }
1270 1269
1271 void RenderWidgetHostViewMac::SetTextInputActive(bool active) { 1270 void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
1272 if (active) { 1271 if (active) {
1273 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) 1272 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD)
1274 EnablePasswordInput(); 1273 EnablePasswordInput();
1275 else 1274 else
1276 DisablePasswordInput(); 1275 DisablePasswordInput();
(...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 if (!string) return NO; 2976 if (!string) return NO;
2978 2977
2979 // If the user is currently using an IME, confirm the IME input, 2978 // If the user is currently using an IME, confirm the IME input,
2980 // and then insert the text from the service, the same as TextEdit and Safari. 2979 // and then insert the text from the service, the same as TextEdit and Safari.
2981 [self confirmComposition]; 2980 [self confirmComposition];
2982 [self insertText:string]; 2981 [self insertText:string];
2983 return YES; 2982 return YES;
2984 } 2983 }
2985 2984
2986 @end 2985 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698