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

Side by Side Diff: headless/lib/browser/headless_browser_impl_mac.mm

Issue 2712093002: Enable building headless_shell in MAC. This is an initial implementation with a hidden window, rath… (Closed)
Patch Set: revet chrome/BUILD.gn Created 3 years, 9 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
« no previous file with comments | « headless/BUILD.gn ('k') | headless/lib/browser/headless_content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "headless/lib/browser/headless_browser_impl.h"
6
7 #include "content/public/browser/web_contents.h"
8 #include "ui/base/cocoa/base_view.h"
9
10 namespace headless {
11
12 void HeadlessBrowserImpl::PlatformInitialize() {}
13
14 void HeadlessBrowserImpl::PlatformCreateWindow() {}
15
16 void HeadlessBrowserImpl::PlatformInitializeWebContents(
17 const gfx::Size& initial_size,
18 content::WebContents* web_contents) {
19 NSView* web_view = web_contents->GetNativeView();
20 [web_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
21
22 NSRect frame = NSMakeRect(0, 0, initial_size.width(), initial_size.height());
23 [web_view setFrame:frame];
24 return;
25 }
26
27 } // namespace headless
OLDNEW
« no previous file with comments | « headless/BUILD.gn ('k') | headless/lib/browser/headless_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698