Merge pull request #1585 from joshaber/no-texture
Use the standard window background
This commit is contained in:
commit
9e3f108fad
4 changed files with 16 additions and 3 deletions
|
@ -310,11 +310,18 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents,
|
|||
width,
|
||||
height);
|
||||
|
||||
bool useStandardWindow = false;
|
||||
options.Get(switches::kStandardWindow, &useStandardWindow);
|
||||
|
||||
NSUInteger styleMask = NSTitledWindowMask | NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask | NSResizableWindowMask;
|
||||
if (!useStandardWindow) {
|
||||
styleMask |= NSTexturedBackgroundWindowMask;
|
||||
}
|
||||
|
||||
window_.reset([[AtomNSWindow alloc]
|
||||
initWithContentRect:cocoa_bounds
|
||||
styleMask:NSTitledWindowMask | NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask | NSResizableWindowMask |
|
||||
NSTexturedBackgroundWindowMask
|
||||
styleMask:styleMask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES]);
|
||||
[window_ setShell:this];
|
||||
|
|
|
@ -84,6 +84,9 @@ const char kType[] = "type";
|
|||
// Disable auto-hiding 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.
|
||||
const char kExperimentalFeatures[] = "experimental-features";
|
||||
const char kExperimentalCanvasFeatures[] = "experimental-canvas-features";
|
||||
|
|
|
@ -44,6 +44,7 @@ extern const char kPreloadScript[];
|
|||
extern const char kTransparent[];
|
||||
extern const char kType[];
|
||||
extern const char kDisableAutoHideCursor[];
|
||||
extern const char kStandardWindow[];
|
||||
|
||||
extern const char kExperimentalFeatures[];
|
||||
extern const char kExperimentalCanvasFeatures[];
|
||||
|
|
|
@ -72,6 +72,8 @@ You can also create a window without chrome by using
|
|||
* `type` String - Specifies the type of the window, possible types are
|
||||
`desktop`, `dock`, `toolbar`, `splash`, `notification`. This only works on
|
||||
Linux.
|
||||
* `standard-window` Boolean - Use the OS X's standard window instead of the
|
||||
textured window. Defaults to `false`.
|
||||
* `web-preferences` Object - Settings of web page's features
|
||||
* `javascript` Boolean
|
||||
* `web-security` Boolean
|
||||
|
|
Loading…
Reference in a new issue