Use a new option to opt into the standard window.

This commit is contained in:
joshaber 2015-05-08 16:28:24 -04:00
parent 5f357d39b2
commit 85119db81a
3 changed files with 7 additions and 3 deletions

View file

@ -310,12 +310,12 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents,
width, width,
height); height);
bool useFrame = true; bool useStandardWindow = false;
options.Get(switches::kFrame, &useFrame); options.Get(switches::kStandardWindow, &useStandardWindow);
NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask | NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSResizableWindowMask; NSMiniaturizableWindowMask | NSResizableWindowMask;
if (!useFrame) { if (!useStandardWindow) {
styleMask |= NSTexturedBackgroundWindowMask; styleMask |= NSTexturedBackgroundWindowMask;
} }

View file

@ -78,6 +78,9 @@ const char kType[] = "type";
// Disable auto-hiding cursor. // Disable auto-hiding cursor.
const char kDisableAutoHideCursor[] = "disable-auto-hide-cursor"; const char kDisableAutoHideCursor[] = "disable-auto-hide-cursor";
// Use the OS X's standard window instead of the textured window.
const char kStandardWindow[] = "standard-window";
// Web runtime features. // Web runtime features.
const char kExperimentalFeatures[] = "experimental-features"; const char kExperimentalFeatures[] = "experimental-features";
const char kExperimentalCanvasFeatures[] = "experimental-canvas-features"; const char kExperimentalCanvasFeatures[] = "experimental-canvas-features";

View file

@ -42,6 +42,7 @@ extern const char kPreloadScript[];
extern const char kTransparent[]; extern const char kTransparent[];
extern const char kType[]; extern const char kType[];
extern const char kDisableAutoHideCursor[]; extern const char kDisableAutoHideCursor[];
extern const char kStandardWindow[];
extern const char kExperimentalFeatures[]; extern const char kExperimentalFeatures[];
extern const char kExperimentalCanvasFeatures[]; extern const char kExperimentalCanvasFeatures[];