| Index: headless/lib/browser/headless_browser_impl_mac.mm
|
| diff --git a/headless/lib/browser/headless_browser_impl_mac.mm b/headless/lib/browser/headless_browser_impl_mac.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e1911162d6e0b7e137cff2676e2aa8f73b329e81
|
| --- /dev/null
|
| +++ b/headless/lib/browser/headless_browser_impl_mac.mm
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2017 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.
|
| +
|
| +#include "headless/lib/browser/headless_browser_impl.h"
|
| +
|
| +#include "content/public/browser/web_contents.h"
|
| +#include "ui/base/cocoa/base_view.h"
|
| +
|
| +namespace headless {
|
| +
|
| +void HeadlessBrowserImpl::PlatformInitialize() {}
|
| +
|
| +void HeadlessBrowserImpl::PlatformCreateWindow() {}
|
| +
|
| +void HeadlessBrowserImpl::PlatformInitializeWebContents(
|
| + const gfx::Size& initial_size,
|
| + content::WebContents* web_contents) {
|
| + NSView* web_view = web_contents->GetNativeView();
|
| + [web_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
|
| +
|
| + NSRect frame = NSMakeRect(0, 0, initial_size.width(), initial_size.height());
|
| + [web_view setFrame:frame];
|
| + return;
|
| +}
|
| +
|
| +} // namespace headless
|
|
|