| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_sign_in_container.h" | 5 #import "chrome/browser/ui/cocoa/autofill/autofill_sign_in_container.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 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 dialog_web_contents, | 33 dialog_web_contents, |
| 34 originating_web_contents, | 34 originating_web_contents, |
| 35 minimum_size, | 35 minimum_size, |
| 36 maximum_size), | 36 maximum_size), |
| 37 view_(view) {} | 37 view_(view) {} |
| 38 | 38 |
| 39 // WebContentsDelegate implementation. Forwards all unhandled keyboard events | 39 // WebContentsDelegate implementation. Forwards all unhandled keyboard events |
| 40 // to the current window. | 40 // to the current window. |
| 41 virtual void HandleKeyboardEvent( | 41 virtual void HandleKeyboardEvent( |
| 42 content::WebContents* source, | 42 content::WebContents* source, |
| 43 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 43 const content::NativeWebKeyboardEvent& event) override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 NSView* view_; // WebContentsView, used to redispatch key events. | 46 NSView* view_; // WebContentsView, used to redispatch key events. |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 void CocoaSignInDelegate::HandleKeyboardEvent( | 49 void CocoaSignInDelegate::HandleKeyboardEvent( |
| 50 content::WebContents* source, | 50 content::WebContents* source, |
| 51 const content::NativeWebKeyboardEvent& event) { | 51 const content::NativeWebKeyboardEvent& event) { |
| 52 if (![BrowserWindowUtils shouldHandleKeyboardEvent:event]) | 52 if (![BrowserWindowUtils shouldHandleKeyboardEvent:event]) |
| 53 return; | 53 return; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 preferredSize_ = size; | 136 preferredSize_ = size; |
| 137 preferredSize_.height += chrome_style::kClientBottomPadding; | 137 preferredSize_.height += chrome_style::kClientBottomPadding; |
| 138 | 138 |
| 139 // Always request re-layout if preferredSize changes. | 139 // Always request re-layout if preferredSize changes. |
| 140 id delegate = [[[self view] window] windowController]; | 140 id delegate = [[[self view] window] windowController]; |
| 141 if ([delegate respondsToSelector:@selector(requestRelayout)]) | 141 if ([delegate respondsToSelector:@selector(requestRelayout)]) |
| 142 [delegate performSelector:@selector(requestRelayout)]; | 142 [delegate performSelector:@selector(requestRelayout)]; |
| 143 } | 143 } |
| 144 | 144 |
| 145 @end | 145 @end |
| OLD | NEW |