Remove code which are used for borderless window.
This commit is contained in:
parent
6c098deb57
commit
7a1365673e
1 changed files with 3 additions and 33 deletions
|
@ -24,9 +24,7 @@
|
|||
#include "content/public/browser/web_contents_view.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
|
||||
@interface NSWindow (NSPrivateApis)
|
||||
- (void)setBottomCornerRounded:(BOOL)rounded;
|
||||
@end
|
||||
static const CGFloat kAtomWindowCornerRadius = 4.0;
|
||||
|
||||
@interface NSView (PrivateMethods)
|
||||
- (CGFloat)roundedCornerRadius;
|
||||
|
@ -78,8 +76,6 @@
|
|||
|
||||
@end
|
||||
|
||||
static CGFloat const AtomWindowCornerRadius = 4.0;
|
||||
|
||||
@interface AtomNSWindow : AtomEventProcessingWindow {
|
||||
@protected
|
||||
atom::NativeWindowMac* shell_;
|
||||
|
@ -116,26 +112,6 @@ static CGFloat const AtomWindowCornerRadius = 4.0;
|
|||
NSRectFill(rect);
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeKeyWindow {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeMainWindow {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)hasShadow {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)keyDown:(NSEvent*)event {
|
||||
[self redispatchKeyEvent:event];
|
||||
}
|
||||
|
||||
- (void)keyUp:(NSEvent *)event {
|
||||
[self redispatchKeyEvent:event];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface ControlRegionView : NSView {
|
||||
|
@ -204,8 +180,7 @@ NativeWindowMac::NativeWindowMac(content::WebContents* web_contents,
|
|||
} else {
|
||||
atomWindow = [[AtomFramelessNSWindow alloc]
|
||||
initWithContentRect:cocoa_bounds
|
||||
styleMask:NSTitledWindowMask | NSClosableWindowMask |
|
||||
NSMiniaturizableWindowMask | NSResizableWindowMask
|
||||
styleMask:style_mask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:YES];
|
||||
[atomWindow setOpaque:NO];
|
||||
|
@ -491,11 +466,9 @@ void NativeWindowMac::InstallView() {
|
|||
[[window() contentView] addSubview:view];
|
||||
} else {
|
||||
NSView* frameView = [[window() contentView] superview];
|
||||
|
||||
[view setFrame:[frameView bounds]];
|
||||
[frameView addSubview:view];
|
||||
|
||||
|
||||
ClipWebView();
|
||||
|
||||
[[window() standardWindowButton:NSWindowZoomButton] setHidden:YES];
|
||||
|
@ -513,12 +486,9 @@ void NativeWindowMac::UninstallView() {
|
|||
void NativeWindowMac::ClipWebView() {
|
||||
NSView* view = GetWebContents()->GetView()->GetNativeView();
|
||||
|
||||
// if ([view respondsToSelector:@selector(roundedCornerRadius)])
|
||||
// cornerRadius = [view roundedCornerRadius];
|
||||
|
||||
view.wantsLayer = YES;
|
||||
view.layer.masksToBounds = YES;
|
||||
view.layer.cornerRadius = AtomWindowCornerRadius;
|
||||
view.layer.cornerRadius = kAtomWindowCornerRadius;
|
||||
}
|
||||
|
||||
void NativeWindowMac::InstallDraggableRegionViews() {
|
||||
|
|
Loading…
Reference in a new issue