Merge pull request #4202 from evgenyzinoviev/shadow-pr

Added hasShadow option to BrowserWindow on OS X
This commit is contained in:
Cheng Zhao 2016-01-22 23:56:38 -08:00
commit 31624995bc
9 changed files with 54 additions and 0 deletions

View file

@ -452,6 +452,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];
@ -808,6 +814,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)];
}