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

Side by Side Diff: chrome/browser/ui/cocoa/framed_browser_window.mm

Issue 2040253003: Mac low power video: Support child windows, sheets, and transitions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/framed_browser_window.h" 5 #import "chrome/browser/ui/cocoa/framed_browser_window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/sdk_forward_declarations.h" 10 #include "base/mac/sdk_forward_declarations.h"
(...skipping 26 matching lines...) Expand all
37 37
38 } 38 }
39 39
40 @interface FramedBrowserWindow (Private) 40 @interface FramedBrowserWindow (Private)
41 41
42 - (void)adjustCloseButton:(NSNotification*)notification; 42 - (void)adjustCloseButton:(NSNotification*)notification;
43 - (void)adjustMiniaturizeButton:(NSNotification*)notification; 43 - (void)adjustMiniaturizeButton:(NSNotification*)notification;
44 - (void)adjustZoomButton:(NSNotification*)notification; 44 - (void)adjustZoomButton:(NSNotification*)notification;
45 - (void)adjustButton:(NSButton*)button 45 - (void)adjustButton:(NSButton*)button
46 ofKind:(NSWindowButton)kind; 46 ofKind:(NSWindowButton)kind;
47 - (void)childWindowsDidChange;
47 48
48 @end 49 @end
49 50
50 @implementation FramedBrowserWindow 51 @implementation FramedBrowserWindow
51 52
52 - (void)setStyleMask:(NSUInteger)styleMask { 53 - (void)setStyleMask:(NSUInteger)styleMask {
53 if (styleMaskLock_) 54 if (styleMaskLock_)
54 return; 55 return;
55 [super setStyleMask:styleMask]; 56 [super setStyleMask:styleMask];
56 } 57 }
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 353
353 ThemedWindowStyle windowStyle = [self themedWindowStyle]; 354 ThemedWindowStyle windowStyle = [self themedWindowStyle];
354 BOOL incognito = windowStyle & THEMED_INCOGNITO; 355 BOOL incognito = windowStyle & THEMED_INCOGNITO;
355 356
356 if (incognito) 357 if (incognito)
357 return [NSColor whiteColor]; 358 return [NSColor whiteColor];
358 else 359 else
359 return [NSColor windowFrameTextColor]; 360 return [NSColor windowFrameTextColor];
360 } 361 }
361 362
363 - (void)addChildWindow:(NSWindow*)childWindow
364 ordered:(NSWindowOrderingMode)orderingMode {
365 [super addChildWindow:childWindow ordered:orderingMode];
366 [self childWindowsDidChange];
367 }
368
369 - (void)removeChildWindow:(NSWindow*)childWindow {
370 [super removeChildWindow:childWindow];
371 [self childWindowsDidChange];
372 }
373
374 - (void)childWindowsDidChange {
375 id delegate = [self delegate];
376 if ([delegate respondsToSelector:@selector(childWindowsDidChange)])
377 [delegate childWindowsDidChange];
378 }
379
362 @end 380 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698