added hasShadow option to BrowserWindow (osx)

This commit is contained in:
evgenyzinoviev 2016-01-23 01:15:49 +01:00
parent 9b28b0e943
commit ff41b4a267
9 changed files with 54 additions and 0 deletions

View file

@ -435,6 +435,12 @@ NativeWindowMac::NativeWindowMac(
if (!has_frame())
[window_ setOpaque:NO];
bool has_shadow = true;
options.Get(options::kHasShadow, &has_shadow);
if (!has_shadow) {
SetHasShadow(false);
}
// We will manage window's lifetime ourselves.
[window_ setReleasedWhenClosed:NO];
@ -714,6 +720,14 @@ void NativeWindowMac::SetBackgroundColor(const std::string& color_name) {
[window_ setBackgroundColor:color];
}
void NativeWindowMac::SetHasShadow(bool has_shadow) {
[window_ setHasShadow:has_shadow];
}
bool NativeWindowMac::HasShadow() {
return [window_ hasShadow];
}
void NativeWindowMac::SetRepresentedFilename(const std::string& filename) {
[window_ setRepresentedFilename:base::SysUTF8ToNSString(filename)];
}