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

Side by Side Diff: ui/views/controls/native/native_view_host_mac.mm

Issue 2210763002: MacViews a11y: Sync VoiceOver cursor with keyboard focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Delete view.* changes, other review comments. Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/controls/native/native_view_host_mac.h" 5 #include "ui/views/controls/native/native_view_host_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #import "ui/views/cocoa/bridged_native_widget.h" 10 #import "ui/views/cocoa/bridged_native_widget.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void NativeViewHostMac::HideWidget() { 132 void NativeViewHostMac::HideWidget() {
133 [host_->native_view() setHidden:YES]; 133 [host_->native_view() setHidden:YES];
134 } 134 }
135 135
136 void NativeViewHostMac::SetFocus() { 136 void NativeViewHostMac::SetFocus() {
137 if ([host_->native_view() acceptsFirstResponder]) 137 if ([host_->native_view() acceptsFirstResponder])
138 [[host_->native_view() window] makeFirstResponder:host_->native_view()]; 138 [[host_->native_view() window] makeFirstResponder:host_->native_view()];
139 } 139 }
140 140
141 gfx::NativeViewAccessible NativeViewHostMac::GetNativeViewAccessible() { 141 gfx::NativeViewAccessible NativeViewHostMac::GetNativeViewAccessible() {
142 return NULL; 142 return native_view_;
tapted 2016/10/04 08:17:39 let's leave this off for now - there should be a n
Patti Lor 2016/10/05 05:47:23 Done.
143 } 143 }
144 144
145 gfx::NativeCursor NativeViewHostMac::GetCursor(int x, int y) { 145 gfx::NativeCursor NativeViewHostMac::GetCursor(int x, int y) {
146 // Intentionally not implemented: Not required on non-aura Mac because OSX 146 // Intentionally not implemented: Not required on non-aura Mac because OSX
147 // will query the native view for the cursor directly. For NativeViewHostMac 147 // will query the native view for the cursor directly. For NativeViewHostMac
148 // in practice, OSX will retrieve the cursor that was last set by 148 // in practice, OSX will retrieve the cursor that was last set by
149 // -[RenderWidgetHostViewCocoa updateCursor:] whenever the pointer is over the 149 // -[RenderWidgetHostViewCocoa updateCursor:] whenever the pointer is over the
150 // hosted view. With some plumbing, NativeViewHostMac could return that same 150 // hosted view. With some plumbing, NativeViewHostMac could return that same
151 // cursor here, but it doesn't achieve anything. The implications of returning 151 // cursor here, but it doesn't achieve anything. The implications of returning
152 // null simply mean that the "fallback" cursor on the window itself will be 152 // null simply mean that the "fallback" cursor on the window itself will be
153 // cleared (see -[NativeWidgetMacNSWindow cursorUpdate:]). However, while the 153 // cleared (see -[NativeWidgetMacNSWindow cursorUpdate:]). However, while the
154 // pointer is over a RenderWidgetHostViewCocoa, OSX won't ask for the fallback 154 // pointer is over a RenderWidgetHostViewCocoa, OSX won't ask for the fallback
155 // cursor. 155 // cursor.
156 return gfx::kNullCursor; 156 return gfx::kNullCursor;
157 } 157 }
158 158
159 // static 159 // static
160 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( 160 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper(
161 NativeViewHost* host) { 161 NativeViewHost* host) {
162 return new NativeViewHostMac(host); 162 return new NativeViewHostMac(host);
163 } 163 }
164 164
165 } // namespace views 165 } // namespace views
OLDNEW
« ui/views/cocoa/bridged_content_view.mm ('K') | « ui/views/cocoa/bridged_content_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698