summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_browser_application_mac.h
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-24 03:47:59 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-24 03:47:59 +0000
commit1dd17d77d24a3232976e03b3ec5c7c61a14f1015 (patch)
tree1908be9b6513b74a7b90b1d45b98a2827efa5d12 /chrome/browser/chrome_browser_application_mac.h
parent051b520a6c03a0bbb1e6385cff114411296b52d1 (diff)
downloadchromium_src-1dd17d77d24a3232976e03b3ec5c7c61a14f1015.zip
chromium_src-1dd17d77d24a3232976e03b3ec5c7c61a14f1015.tar.gz
chromium_src-1dd17d77d24a3232976e03b3ec5c7c61a14f1015.tar.bz2
Fix install-from-dmg.
When installing from a disk image, the browser relaunched from the newly-installed location should follow the proper first-run experience if appropriate. When installing from a disk image, existing dock tiles should be reused, and dock tiles pointing at the application on the disk image should be replaced with ones pointing at the newly-installed location. When installing from a disk image and requesting administrator access (because the user does not have permission to install to /Applications), Keystone should be promoted to a system-level install, and Chrome's Keystone ticket should be promoted to a system Keystone ticket. The custom panel key window tracking stuff doesn't need to maintain strong references to key windows, but does need to be beefed up for thread safety. Chrome doesn't need to wait until it's mostly started up to run the install-from-dmg flow. It should do it early, avoiding delays and reducing the possibility that harmful services will start running. BUG=119325 TEST=obvious from the above and the bug Review URL: http://codereview.chromium.org/9814029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128677 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_application_mac.h')
-rw-r--r--chrome/browser/chrome_browser_application_mac.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/chrome_browser_application_mac.h b/chrome/browser/chrome_browser_application_mac.h
index 52c6be3..0801fbb 100644
--- a/chrome/browser/chrome_browser_application_mac.h
+++ b/chrome/browser/chrome_browser_application_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,9 +10,12 @@
#import <AppKit/AppKit.h>
+#include <vector>
+
#import "base/mac/scoped_sending_event.h"
#import "base/memory/scoped_nsobject.h"
#import "base/message_pump_mac.h"
+#include "base/synchronization/lock.h"
// Event hooks must implement this protocol.
@protocol CrApplicationEventHookProtocol
@@ -29,8 +32,12 @@
scoped_nsobject<NSMutableArray> eventHooks_;
// App's previous key windows. Most recent key window is last.
- // Does not include current key window.
- scoped_nsobject<NSMutableArray> previousKeyWindows_;
+ // Does not include current key window. Elements of this vector are weak
+ // references.
+ std::vector<NSWindow*> previousKeyWindows_;
+
+ // Guards previousKeyWindows_.
+ base::Lock previousKeyWindowsLock_;
}
// Our implementation of |-terminate:| only attempts to terminate the
@@ -52,7 +59,7 @@
// Keep track of the previous key windows and whether windows are being
// cycled for use in determining whether a Panel window can become the
// key window.
-- (id)previousKeyWindow;
+- (NSWindow*)previousKeyWindow;
- (BOOL)isCyclingWindows;
@end