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

Side by Side Diff: ui/views/cocoa/views_nswindow_delegate.mm

Issue 1690543004: MacViews: Implement Full Keyboard Access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix FocusManagerTest.StoreFocusedView Created 4 years, 10 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 #import "ui/views/cocoa/views_nswindow_delegate.h" 5 #import "ui/views/cocoa/views_nswindow_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "ui/views/cocoa/bridged_content_view.h" 8 #import "ui/views/cocoa/bridged_content_view.h"
9 #import "ui/views/cocoa/bridged_native_widget.h" 9 #import "ui/views/cocoa/bridged_native_widget.h"
10 #include "ui/views/widget/native_widget_mac.h" 10 #include "ui/views/widget/native_widget_mac.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 - (void)onWindowOrderWillChange:(NSWindowOrderingMode)orderingMode { 38 - (void)onWindowOrderWillChange:(NSWindowOrderingMode)orderingMode {
39 parent_->OnVisibilityChangedTo(orderingMode != NSWindowOut); 39 parent_->OnVisibilityChangedTo(orderingMode != NSWindowOut);
40 } 40 }
41 41
42 - (void)onWindowOrderChanged:(NSNotification*)notification { 42 - (void)onWindowOrderChanged:(NSNotification*)notification {
43 parent_->OnVisibilityChanged(); 43 parent_->OnVisibilityChanged();
44 } 44 }
45 45
46 - (void)onFullKeyboardAccessModeChanged:(NSNotification*)notification {
47 parent_->native_widget_mac()
tapted 2016/02/23 03:01:19 I think nicer would be a new method on BridgedCont
karandeepb 2016/03/15 02:19:50 Done.
48 ->GetWidget()
49 ->GetFocusManager()
50 ->SetKeyboardAccessibility([NSApp isFullKeyboardAccessEnabled]);
51 }
52
46 - (void)onWindowWillDisplay { 53 - (void)onWindowWillDisplay {
47 parent_->OnVisibilityChangedTo(true); 54 parent_->OnVisibilityChangedTo(true);
48 } 55 }
49 56
50 - (void)sheetDidEnd:(NSWindow*)sheet 57 - (void)sheetDidEnd:(NSWindow*)sheet
51 returnCode:(NSInteger)returnCode 58 returnCode:(NSInteger)returnCode
52 contextInfo:(void*)contextInfo { 59 contextInfo:(void*)contextInfo {
53 [sheet orderOut:nil]; 60 [sheet orderOut:nil];
54 parent_->OnWindowWillClose(); 61 parent_->OnWindowWillClose();
55 } 62 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 usingRect:(NSRect)defaultSheetLocation { 143 usingRect:(NSRect)defaultSheetLocation {
137 // As per NSWindowDelegate documentation, the origin indicates the top left 144 // As per NSWindowDelegate documentation, the origin indicates the top left
138 // point of the host frame in window coordinates. The width changes the 145 // point of the host frame in window coordinates. The width changes the
139 // animation from vertical to trapezoid if it is smaller than the width of the 146 // animation from vertical to trapezoid if it is smaller than the width of the
140 // dialog. The height is ignored but should be set to zero. 147 // dialog. The height is ignored but should be set to zero.
141 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(), 148 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(),
142 NSWidth(defaultSheetLocation), 0); 149 NSWidth(defaultSheetLocation), 0);
143 } 150 }
144 151
145 @end 152 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698