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

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: Don't re-declare drawCustomFrameRect 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..03bdf22050de1c0f938f72eed2347afe917d59ff 100644
--- a/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm
@@ -11,6 +11,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/cocoa/browser_window_utils.h"
#import "chrome/browser/ui/cocoa/chrome_event_processing_window.h"
+#import "chrome/browser/ui/cocoa/custom_frame_view.h"
#include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.h"
#include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h"
#import "chrome/browser/ui/cocoa/nsview_additions.h"
@@ -223,9 +224,6 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
@end
@interface ShellCustomFrameNSWindow : ShellNSWindow
-
-- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view;
-
@end
@implementation ShellCustomFrameNSWindow
@@ -248,12 +246,13 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
@end
-@interface ShellFramelessNSWindow : ShellCustomFrameNSWindow
-
+@interface ShellFramelessNSWindow : ShellNSWindow
@end
@implementation ShellFramelessNSWindow
+- (void)drawCustomFrameRect:(NSRect)rect forView:(NSView*)view {}
+
+ (NSRect)frameRectForContentRect:(NSRect)contentRect
styleMask:(NSUInteger)mask {
return contentRect;
@@ -373,14 +372,10 @@ NativeAppWindowCocoa::NativeAppWindowCocoa(
NSUInteger NativeAppWindowCocoa::GetWindowStyleMask() const {
NSUInteger style_mask = NSTitledWindowMask | NSClosableWindowMask |
- NSMiniaturizableWindowMask;
+ NSMiniaturizableWindowMask |
+ NSTexturedBackgroundWindowMask;
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