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

Side by Side Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 319733003: [Mac] Don't show a title on app windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h"
6 6
7 #include "apps/app_shim/extension_app_shim_handler_mac.h" 7 #include "apps/app_shim/extension_app_shim_handler_mac.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 28 matching lines...) Expand all
39 // 39 //
40 // Attempting maximize and restore functionality with non resizable windows 40 // Attempting maximize and restore functionality with non resizable windows
41 // using the native zoom method did not work, even with 41 // using the native zoom method did not work, even with
42 // windowWillUseStandardFrame, as the window would not restore back to the 42 // windowWillUseStandardFrame, as the window would not restore back to the
43 // desired size. 43 // desired size.
44 44
45 using apps::AppWindow; 45 using apps::AppWindow;
46 46
47 @interface NSWindow (NSPrivateApis) 47 @interface NSWindow (NSPrivateApis)
48 - (void)setBottomCornerRounded:(BOOL)rounded; 48 - (void)setBottomCornerRounded:(BOOL)rounded;
49 - (BOOL)_isTitleHidden;
49 @end 50 @end
50 51
51 // Replicate specific 10.7 SDK declarations for building with prior SDKs. 52 // Replicate specific 10.7 SDK declarations for building with prior SDKs.
52 #if !defined(MAC_OS_X_VERSION_10_7) || \ 53 #if !defined(MAC_OS_X_VERSION_10_7) || \
53 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 54 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
54 55
55 @interface NSWindow (LionSDKDeclarations) 56 @interface NSWindow (LionSDKDeclarations)
56 - (void)toggleFullScreen:(id)sender; 57 - (void)toggleFullScreen:(id)sender;
57 @end 58 @end
58 59
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // view passed into -[NSWindow drawCustomFrameRect:forView:]. 217 // view passed into -[NSWindow drawCustomFrameRect:forView:].
217 @interface NSView (PrivateMethods) 218 @interface NSView (PrivateMethods)
218 - (CGFloat)roundedCornerRadius; 219 - (CGFloat)roundedCornerRadius;
219 @end 220 @end
220 221
221 // TODO(jamescook): Should these be AppNSWindow to match apps::AppWindow? 222 // TODO(jamescook): Should these be AppNSWindow to match apps::AppWindow?
222 // http://crbug.com/344082 223 // http://crbug.com/344082
223 @interface ShellNSWindow : ChromeEventProcessingWindow 224 @interface ShellNSWindow : ChromeEventProcessingWindow
224 @end 225 @end
225 @implementation ShellNSWindow 226 @implementation ShellNSWindow
227
228 - (BOOL)_isTitleHidden {
tapted 2014/06/06 06:57:51 nit: perhaps a comment, like ~Similar to ChromeBro
jackhou1 2014/06/06 07:08:34 Done.
229 return YES;
230 }
231
226 @end 232 @end
227 233
228 @interface ShellCustomFrameNSWindow : ShellNSWindow { 234 @interface ShellCustomFrameNSWindow : ShellNSWindow {
229 @private 235 @private
230 base::scoped_nsobject<NSColor> color_; 236 base::scoped_nsobject<NSColor> color_;
231 base::scoped_nsobject<NSColor> inactiveColor_; 237 base::scoped_nsobject<NSColor> inactiveColor_;
232 } 238 }
233 239
234 - (void)setColor:(NSColor*)color 240 - (void)setColor:(NSColor*)color
235 inactiveColor:(NSColor*)inactiveColor; 241 inactiveColor:(NSColor*)inactiveColor;
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 } 975 }
970 976
971 void NativeAppWindowCocoa::UpdateRestoredBounds() { 977 void NativeAppWindowCocoa::UpdateRestoredBounds() {
972 if (IsRestored(*this)) 978 if (IsRestored(*this))
973 restored_bounds_ = [window() frame]; 979 restored_bounds_ = [window() frame];
974 } 980 }
975 981
976 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { 982 void NativeAppWindowCocoa::HideWithoutMarkingHidden() {
977 [window() orderOut:window_controller_]; 983 [window() orderOut:window_controller_];
978 } 984 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698