summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-05 01:51:26 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-05 01:51:26 +0000
commitcbe57cf37c2af0273e57aabbd38dda09b903cbad (patch)
treeae04021b6d26d11cf767016fea670675a8eefefa
parent91b073dd6145b74b191ee8dff524762d51a8c4e1 (diff)
downloadchromium_src-cbe57cf37c2af0273e57aabbd38dda09b903cbad.zip
chromium_src-cbe57cf37c2af0273e57aabbd38dda09b903cbad.tar.gz
chromium_src-cbe57cf37c2af0273e57aabbd38dda09b903cbad.tar.bz2
Switch to direct observation of fullscreen after r174754.
BUG=168084 TEST=none Review URL: https://chromiumcodereview.appspot.com/11791005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175255 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/fullscreen_mac.mm23
1 files changed, 11 insertions, 12 deletions
diff --git a/chrome/browser/fullscreen_mac.mm b/chrome/browser/fullscreen_mac.mm
index f4e73c0..ae50d7c 100644
--- a/chrome/browser/fullscreen_mac.mm
+++ b/chrome/browser/fullscreen_mac.mm
@@ -7,7 +7,6 @@
#import <Cocoa/Cocoa.h>
#import "base/logging.h"
-#import "third_party/GTM/Foundation/GTMNSObject+KeyValueObserving.h"
// Replicate specific 10.7 SDK declarations for building with prior SDKs.
#if !defined(MAC_OS_X_VERSION_10_7) || \
@@ -54,25 +53,25 @@ BOOL AreOptionsFullScreen(NSApplicationPresentationOptions options) {
- (id)init {
if ((self = [super init])) {
- [NSApp gtm_addObserver:self
- forKeyPath:@"currentSystemPresentationOptions"
- selector:@selector(observeNotification:)
- userInfo:nil
- options:NSKeyValueObservingOptionNew |
- NSKeyValueObservingOptionInitial];
+ [NSApp addObserver:self
+ forKeyPath:@"currentSystemPresentationOptions"
+ options:NSKeyValueObservingOptionNew |
+ NSKeyValueObservingOptionInitial
+ context:nil];
}
return self;
}
- (void)dealloc {
- [NSApp gtm_removeObserver:self
- forKeyPath:@"currentSystemPresentationOptions"
- selector:@selector(observeNotification:)];
+ [NSApp removeObserver:self
+ forKeyPath:@"currentSystemPresentationOptions"];
[super dealloc];
}
-- (void)observeNotification:(GTMKeyValueChangeNotification*)notification {
- NSDictionary* change = [notification change];
+- (void)observeValueForKeyPath:(NSString*)keyPath
+ ofObject:(id)object
+ change:(NSDictionary*)change
+ context:(void*)context {
NSApplicationPresentationOptions options =
[[change objectForKey:NSKeyValueChangeNewKey] integerValue];
[self setFullScreen:AreOptionsFullScreen(options)];