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

Side by Side Diff: webkit/tools/test_shell/webview_host_mac.mm

Issue 10545050: mac: Use NSWidth() and friends in a few more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 8 years, 6 months 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 | « ui/gfx/platform_font_mac.mm ('k') | webkit/tools/test_shell/webwidget_host_mac.mm » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "webkit/tools/test_shell/webview_host.h" 7 #include "webkit/tools/test_shell/webview_host.h"
8 #include "webkit/tools/test_shell/mac/test_shell_webview.h" 8 #include "webkit/tools/test_shell/mac/test_shell_webview.h"
9 9
10 #include "skia/ext/platform_canvas.h" 10 #include "skia/ext/platform_canvas.h"
(...skipping 25 matching lines...) Expand all
36 host->view_ = [[TestShellWebView alloc] initWithFrame:content_rect]; 36 host->view_ = [[TestShellWebView alloc] initWithFrame:content_rect];
37 // make the height and width track the window size. 37 // make the height and width track the window size.
38 [host->view_ setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; 38 [host->view_ setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
39 [parent_view addSubview:host->view_]; 39 [parent_view addSubview:host->view_];
40 [host->view_ release]; 40 [host->view_ release];
41 41
42 host->webwidget_ = WebView::create(delegate); 42 host->webwidget_ = WebView::create(delegate);
43 host->webview()->setDevToolsAgentClient(dev_tools_client); 43 host->webview()->setDevToolsAgentClient(dev_tools_client);
44 prefs.Apply(host->webview()); 44 prefs.Apply(host->webview());
45 host->webview()->initializeMainFrame(delegate); 45 host->webview()->initializeMainFrame(delegate);
46 host->webwidget_->resize(WebSize(content_rect.size.width, 46 host->webwidget_->resize(WebSize(NSWidth(content_rect),
47 content_rect.size.height)); 47 NSHeight(content_rect)));
48 48
49 return host; 49 return host;
50 } 50 }
51 51
52 WebView* WebViewHost::webview() const { 52 WebView* WebViewHost::webview() const {
53 return static_cast<WebView*>(webwidget_); 53 return static_cast<WebView*>(webwidget_);
54 } 54 }
55 55
56 void WebViewHost::SetIsActive(bool active) { 56 void WebViewHost::SetIsActive(bool active) {
57 // Ignore calls in layout test mode so that tests don't mess with each other 57 // Ignore calls in layout test mode so that tests don't mess with each other
58 // when running in parallel. 58 // when running in parallel.
59 if (!TestShell::layout_test_mode()) 59 if (!TestShell::layout_test_mode())
60 webview()->setIsActive(active); 60 webview()->setIsActive(active);
61 } 61 }
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_mac.mm ('k') | webkit/tools/test_shell/webwidget_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698