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 "third_party/WebKit/WebKit/chromium/public/WebFrame.h" |
13 #include "webkit/api/public/WebView.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
14 #include "webkit/tools/test_shell/test_shell.h" | 14 #include "webkit/tools/test_shell/test_shell.h" |
15 #include "webkit/tools/test_shell/webwidget_host.h" | 15 #include "webkit/tools/test_shell/webwidget_host.h" |
16 | 16 |
17 @implementation TestShellWebView | 17 @implementation TestShellWebView |
18 | 18 |
19 @synthesize shell = shell_; | 19 @synthesize shell = shell_; |
20 | 20 |
21 - (id)initWithFrame:(NSRect)frame { | 21 - (id)initWithFrame:(NSRect)frame { |
22 self = [super initWithFrame:frame]; | 22 self = [super initWithFrame:frame]; |
23 if (self) { | 23 if (self) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 202 } |
203 | 203 |
204 - (void)setFrame:(NSRect)frameRect { | 204 - (void)setFrame:(NSRect)frameRect { |
205 [super setFrame:frameRect]; | 205 [super setFrame:frameRect]; |
206 if (shell_ && shell_->webView()) | 206 if (shell_ && shell_->webView()) |
207 shell_->webViewHost()->Resize(gfx::Rect(NSRectToCGRect(frameRect))); | 207 shell_->webViewHost()->Resize(gfx::Rect(NSRectToCGRect(frameRect))); |
208 [self setNeedsDisplay:YES]; | 208 [self setNeedsDisplay:YES]; |
209 } | 209 } |
210 | 210 |
211 @end | 211 @end |
OLD | NEW |