| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 "test_shell_webview.h" | 5 #import "test_shell_webview.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/gfx/rect.h" | 9 #include "base/gfx/rect.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 - (BOOL)resignFirstResponder { | 190 - (BOOL)resignFirstResponder { |
| 191 if (shell_ && shell_->webView()) { | 191 if (shell_ && shell_->webView()) { |
| 192 shell_->webViewHost()->SetFocus(NO); | 192 shell_->webViewHost()->SetFocus(NO); |
| 193 return YES; | 193 return YES; |
| 194 } | 194 } |
| 195 | 195 |
| 196 return NO; | 196 return NO; |
| 197 } | 197 } |
| 198 | 198 |
| 199 - (void)setIsActive:(BOOL)active { |
| 200 if (shell_ && shell_->webView()) |
| 201 shell_->webViewHost()->SetIsActive(active ? true : false); |
| 202 } |
| 203 |
| 199 - (void)setFrame:(NSRect)frameRect { | 204 - (void)setFrame:(NSRect)frameRect { |
| 200 [super setFrame:frameRect]; | 205 [super setFrame:frameRect]; |
| 201 if (shell_ && shell_->webView()) | 206 if (shell_ && shell_->webView()) |
| 202 shell_->webViewHost()->Resize(gfx::Rect(NSRectToCGRect(frameRect))); | 207 shell_->webViewHost()->Resize(gfx::Rect(NSRectToCGRect(frameRect))); |
| 203 [self setNeedsDisplay:YES]; | 208 [self setNeedsDisplay:YES]; |
| 204 } | 209 } |
| 205 | 210 |
| 206 @end | 211 @end |
| OLD | NEW |