| 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" |
| 11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
| 12 #include "webkit/api/public/WebFrame.h" |
| 12 #include "webkit/glue/webview.h" | 13 #include "webkit/glue/webview.h" |
| 13 #include "webkit/tools/test_shell/test_shell.h" | 14 #include "webkit/tools/test_shell/test_shell.h" |
| 14 #include "webkit/tools/test_shell/webwidget_host.h" | 15 #include "webkit/tools/test_shell/webwidget_host.h" |
| 15 | 16 |
| 16 @implementation TestShellWebView | 17 @implementation TestShellWebView |
| 17 | 18 |
| 18 @synthesize shell = shell_; | 19 @synthesize shell = shell_; |
| 19 | 20 |
| 20 - (id)initWithFrame:(NSRect)frame { | 21 - (id)initWithFrame:(NSRect)frame { |
| 21 self = [super initWithFrame:frame]; | 22 self = [super initWithFrame:frame]; |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 } | 197 } |
| 197 | 198 |
| 198 - (void)setFrame:(NSRect)frameRect { | 199 - (void)setFrame:(NSRect)frameRect { |
| 199 [super setFrame:frameRect]; | 200 [super setFrame:frameRect]; |
| 200 if (shell_ && shell_->webView()) | 201 if (shell_ && shell_->webView()) |
| 201 shell_->webViewHost()->Resize(gfx::Rect(NSRectToCGRect(frameRect))); | 202 shell_->webViewHost()->Resize(gfx::Rect(NSRectToCGRect(frameRect))); |
| 202 [self setNeedsDisplay:YES]; | 203 [self setNeedsDisplay:YES]; |
| 203 } | 204 } |
| 204 | 205 |
| 205 @end | 206 @end |
| OLD | NEW |