Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8064)

Unified Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 307843002: Always set NSTexturedBackgroundWindowMask on app windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
index ecb10c0b1b6af5a339dfe71b3c331b4a6363862f..3843f47a71797bbe040f71938f239f6ff7e4a501 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -223,9 +223,7 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
@end
@interface ShellCustomFrameNSWindow : ShellNSWindow
-
- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view;
-
@end
@implementation ShellCustomFrameNSWindow
@@ -248,12 +246,14 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
@end
-@interface ShellFramelessNSWindow : ShellCustomFrameNSWindow
-
+@interface ShellFramelessNSWindow : ShellNSWindow
+- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view;
tapted 2014/05/29 03:35:28 I'd move this up into the ShellNSWindow interface
jackhou1 2014/05/29 04:09:40 ShellNSWindow is used to draw native frames, so it
@end
@implementation ShellFramelessNSWindow
+- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view {}
+
+ (NSRect)frameRectForContentRect:(NSRect)contentRect
styleMask:(NSUInteger)mask {
return contentRect;
@@ -373,14 +373,10 @@ NativeAppWindowCocoa::NativeAppWindowCocoa(
NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const {
NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask |
- NSMiniaturizableWindowMask;
+ NSMiniaturizableWindowMask |
+ NSTexturedBackgroundWindowMask;
tapted 2014/05/29 03:35:28 The documentation suggests that adding this has a
jackhou1 2014/05/29 04:09:40 Yeah, and I think this only applies for native fra
if (shows_resize_controls_)
style_mask |= NSResizableWindowMask;
- if (!has_frame_ ||
- !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAppsUseNativeFrame)) {
- style_mask |= NSTexturedBackgroundWindowMask;
- }
return style_mask;
}
« no previous file with comments | « chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698