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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.mm

Issue 82193002: [rAC, OSX] Autofill text field hot keys. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 7 years 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_input_field.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_window_controller.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 - (void)mouseDown:(NSEvent*)event { 49 - (void)mouseDown:(NSEvent*)event {
50 // Delegate _must_ be notified before mouseDown is complete, since it needs 50 // Delegate _must_ be notified before mouseDown is complete, since it needs
51 // to distinguish between mouseDown for already focused fields, and fields 51 // to distinguish between mouseDown for already focused fields, and fields
52 // that will receive focus as part of the mouseDown. 52 // that will receive focus as part of the mouseDown.
53 AutofillTextField* textfield = 53 AutofillTextField* textfield =
54 base::mac::ObjCCastStrict<AutofillTextField>([self delegate]); 54 base::mac::ObjCCastStrict<AutofillTextField>([self delegate]);
55 [textfield onEditorMouseDown:self]; 55 [textfield onEditorMouseDown:self];
56 [super mouseDown:event]; 56 [super mouseDown:event];
57 } 57 }
58 58
59 // Intercept key down messages and forward them to the text fields delegate.
60 // This needs to happen in the field editor, since it handles all keyDown
61 // messages for NSTextField.
62 - (void)keyDown:(NSEvent*)event {
63 AutofillTextField* textfield =
64 base::mac::ObjCCastStrict<AutofillTextField>([self delegate]);
65 if ([[textfield inputDelegate] keyEvent:event
66 forInput:textfield] != kKeyEventHandled) {
67 [super keyDown:event];
68 }
69 }
70
59 @end 71 @end
60 72
61 73
62 #pragma mark Window Controller 74 #pragma mark Window Controller
63 75
64 @interface AutofillDialogWindowController () 76 @interface AutofillDialogWindowController ()
65 77
66 // Compute maximum allowed height for the dialog. 78 // Compute maximum allowed height for the dialog.
67 - (CGFloat)maxHeight; 79 - (CGFloat)maxHeight;
68 80
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 435
424 - (content::WebContents*)getSignInWebContents { 436 - (content::WebContents*)getSignInWebContents {
425 return [signInContainer_ webContents]; 437 return [signInContainer_ webContents];
426 } 438 }
427 439
428 - (BOOL)isShowingOverlay { 440 - (BOOL)isShowingOverlay {
429 return ![[overlayController_ view] isHidden]; 441 return ![[overlayController_ view] isHidden];
430 } 442 }
431 443
432 @end 444 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_input_field.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698