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

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: More Mac compile errors 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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 if (render_widget_host_) 1262 if (render_widget_host_)
1264 render_widget_host_->Send(new ViewMsg_SetBackground( 1263 render_widget_host_->Send(new ViewMsg_SetBackground(
1265 render_widget_host_->GetRoutingID(), background)); 1264 render_widget_host_->GetRoutingID(), background));
1266 } 1265 }
1267 1266
1268 void RenderWidgetHostViewMac::OnAccessibilityNotifications( 1267 void RenderWidgetHostViewMac::OnAccessibilityNotifications(
1269 const std::vector<AccessibilityHostMsg_NotificationParams>& params) { 1268 const std::vector<AccessibilityHostMsg_NotificationParams>& params) {
1270 if (!GetBrowserAccessibilityManager()) { 1269 if (!GetBrowserAccessibilityManager()) {
1271 SetBrowserAccessibilityManager( 1270 SetBrowserAccessibilityManager(
1272 BrowserAccessibilityManager::CreateEmptyDocument( 1271 BrowserAccessibilityManager::CreateEmptyDocument(
1273 cocoa_view_, static_cast<WebAccessibility::State>(0), NULL)); 1272 cocoa_view_,
1273 static_cast<content::AccessibilityNodeData::State>(0),
1274 NULL));
1274 } 1275 }
1275 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params); 1276 GetBrowserAccessibilityManager()->OnAccessibilityNotifications(params);
1276 } 1277 }
1277 1278
1278 void RenderWidgetHostViewMac::SetTextInputActive(bool active) { 1279 void RenderWidgetHostViewMac::SetTextInputActive(bool active) {
1279 if (active) { 1280 if (active) {
1280 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) 1281 if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD)
1281 EnablePasswordInput(); 1282 EnablePasswordInput();
1282 else 1283 else
1283 DisablePasswordInput(); 1284 DisablePasswordInput();
(...skipping 1707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 if (!string) return NO; 2992 if (!string) return NO;
2992 2993
2993 // If the user is currently using an IME, confirm the IME input, 2994 // If the user is currently using an IME, confirm the IME input,
2994 // and then insert the text from the service, the same as TextEdit and Safari. 2995 // and then insert the text from the service, the same as TextEdit and Safari.
2995 [self confirmComposition]; 2996 [self confirmComposition];
2996 [self insertText:string]; 2997 [self insertText:string];
2997 return YES; 2998 return YES;
2998 } 2999 }
2999 3000
3000 @end 3001 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698