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

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

Issue 10384128: Quote WebPreferences in namespace webkit_glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright 2012 Created 8 years, 7 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
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"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/size.h" 14 #include "ui/gfx/size.h"
15 #include "webkit/glue/webpreferences.h" 15 #include "webkit/glue/webpreferences.h"
16 #include "webkit/tools/test_shell/test_shell.h" 16 #include "webkit/tools/test_shell/test_shell.h"
17 #include "webkit/tools/test_shell/test_webview_delegate.h" 17 #include "webkit/tools/test_shell/test_webview_delegate.h"
18 18
19 using WebKit::WebDevToolsAgentClient; 19 using WebKit::WebDevToolsAgentClient;
20 using WebKit::WebSize; 20 using WebKit::WebSize;
21 using WebKit::WebView; 21 using WebKit::WebView;
22 22
23 // static 23 // static
24 WebViewHost* WebViewHost::Create(NSView* parent_view, 24 WebViewHost* WebViewHost::Create(NSView* parent_view,
25 TestWebViewDelegate* delegate, 25 TestWebViewDelegate* delegate,
26 WebDevToolsAgentClient* dev_tools_client, 26 WebDevToolsAgentClient* dev_tools_client,
27 const WebPreferences& prefs) { 27 const webkit_glue::WebPreferences& prefs) {
28 WebViewHost* host = new WebViewHost(); 28 WebViewHost* host = new WebViewHost();
29 29
30 NSRect content_rect = [parent_view frame]; 30 NSRect content_rect = [parent_view frame];
31 // bump down the top of the view so that it doesn't overlap the buttons 31 // bump down the top of the view so that it doesn't overlap the buttons
32 // and URL field. 32 is an ad hoc constant. 32 // and URL field. 32 is an ad hoc constant.
33 // TODO(awalker): replace explicit view layout with a little nib file 33 // TODO(awalker): replace explicit view layout with a little nib file
34 // and use that for view geometry. 34 // and use that for view geometry.
35 content_rect.size.height -= 32; 35 content_rect.size.height -= 32;
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.
(...skipping 14 matching lines...) Expand all
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 | « webkit/tools/test_shell/webview_host_gtk.cc ('k') | webkit/tools/test_shell/webview_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698