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

Unified Diff: webkit/tools/test_shell/webview_host_mac.mm

Issue 15028002: Delete test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add dummy test_shell build target. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: webkit/tools/test_shell/webview_host_mac.mm
diff --git a/webkit/tools/test_shell/webview_host_mac.mm b/webkit/tools/test_shell/webview_host_mac.mm
deleted file mode 100644
index 57bb1ca8ebfdedd6973e49ea468ffb4090487975..0000000000000000000000000000000000000000
--- a/webkit/tools/test_shell/webview_host_mac.mm
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import <Cocoa/Cocoa.h>
-
-#include "webkit/tools/test_shell/webview_host.h"
-#include "webkit/tools/test_shell/mac/test_shell_webview.h"
-
-#include "skia/ext/platform_canvas.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
-#include "ui/gfx/rect.h"
-#include "ui/gfx/size.h"
-#include "webkit/glue/webpreferences.h"
-#include "webkit/tools/test_shell/test_shell.h"
-#include "webkit/tools/test_shell/test_webview_delegate.h"
-
-using WebKit::WebDevToolsAgentClient;
-using WebKit::WebSize;
-using WebKit::WebView;
-
-// static
-WebViewHost* WebViewHost::Create(NSView* parent_view,
- TestWebViewDelegate* delegate,
- WebDevToolsAgentClient* dev_tools_client,
- const WebPreferences& prefs) {
- WebViewHost* host = new WebViewHost();
-
- NSRect content_rect = [parent_view frame];
- // bump down the top of the view so that it doesn't overlap the buttons
- // and URL field. 32 is an ad hoc constant.
- // TODO(awalker): replace explicit view layout with a little nib file
- // and use that for view geometry.
- content_rect.size.height -= 32;
- host->view_ = [[TestShellWebView alloc] initWithFrame:content_rect];
- // make the height and width track the window size.
- [host->view_ setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
- [parent_view addSubview:host->view_];
- [host->view_ release];
-
- host->webwidget_ = WebView::create(delegate);
- host->webview()->setDevToolsAgentClient(dev_tools_client);
- webkit_glue::ApplyWebPreferences(prefs, host->webview());
- host->webview()->settings()->setExperimentalCSSGridLayoutEnabled(true);
- host->webview()->initializeMainFrame(delegate);
- host->webwidget_->resize(WebSize(NSWidth(content_rect),
- NSHeight(content_rect)));
-
- return host;
-}
-
-WebView* WebViewHost::webview() const {
- return static_cast<WebView*>(webwidget_);
-}
-
-void WebViewHost::SetIsActive(bool active) {
- // Ignore calls in layout test mode so that tests don't mess with each other
- // when running in parallel.
- if (!TestShell::layout_test_mode())
- webview()->setIsActive(active);
-}

Powered by Google App Engine
This is Rietveld 408576698