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

Side by Side Diff: chrome/browser/chrome_browser_application_mac.h

Issue 1575743003: Mac: Remove a case where panels may become key when an autofill popup closes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove poopie code from chrome_browser_application_mac.mm Created 4 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_application_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ 6 #define CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
7 7
8 #ifdef __OBJC__ 8 #ifdef __OBJC__
9 9
10 #import <AppKit/AppKit.h> 10 #import <AppKit/AppKit.h>
11 #include <stddef.h> 11 #include <stddef.h>
12 12
13 #include <vector>
14
15 #import "base/mac/scoped_sending_event.h" 13 #import "base/mac/scoped_sending_event.h"
16 #import "base/message_loop/message_pump_mac.h" 14 #import "base/message_loop/message_pump_mac.h"
17 #include "base/synchronization/lock.h"
18 15
19 @interface BrowserCrApplication : NSApplication<CrAppProtocol, 16 @interface BrowserCrApplication : NSApplication<CrAppProtocol,
20 CrAppControlProtocol> { 17 CrAppControlProtocol> {
21 @private 18 @private
22 BOOL handlingSendEvent_; 19 BOOL handlingSendEvent_;
23 BOOL cyclingWindows_; 20 BOOL cyclingWindows_;
24
25 // App's previous key windows. Most recent key window is last.
26 // Does not include current key window. Elements of this vector are weak
27 // references.
28 std::vector<NSWindow*> previousKeyWindows_;
29
30 // Guards previousKeyWindows_.
31 base::Lock previousKeyWindowsLock_;
32 } 21 }
33 22
34 // Our implementation of |-terminate:| only attempts to terminate the 23 // Our implementation of |-terminate:| only attempts to terminate the
35 // application, i.e., begins a process which may lead to termination. This 24 // application, i.e., begins a process which may lead to termination. This
36 // method cancels that process. 25 // method cancels that process.
37 - (void)cancelTerminate:(id)sender; 26 - (void)cancelTerminate:(id)sender;
38 27
39 // Keep track of the previous key windows and whether windows are being 28 // Keep track of whether windows are being cycled for use in determining whether
40 // cycled for use in determining whether a Panel window can become the 29 // a Panel window can become the key window.
41 // key window.
42 - (NSWindow*)previousKeyWindow;
43 - (BOOL)isCyclingWindows; 30 - (BOOL)isCyclingWindows;
44 @end 31 @end
45 32
46 namespace chrome_browser_application_mac { 33 namespace chrome_browser_application_mac {
47 34
48 // Bin for unknown exceptions. Exposed for testing purposes. 35 // Bin for unknown exceptions. Exposed for testing purposes.
49 extern const size_t kUnknownNSException; 36 extern const size_t kUnknownNSException;
50 37
51 // Returns the histogram bin for |exception| if it is one we track 38 // Returns the histogram bin for |exception| if it is one we track
52 // specifically, or |kUnknownNSException| if unknown. Exposed for testing 39 // specifically, or |kUnknownNSException| if unknown. Exposed for testing
(...skipping 14 matching lines...) Expand all
67 54
68 // Calls -[NSApp terminate:]. 55 // Calls -[NSApp terminate:].
69 void Terminate(); 56 void Terminate();
70 57
71 // Cancels a termination started by |Terminate()|. 58 // Cancels a termination started by |Terminate()|.
72 void CancelTerminate(); 59 void CancelTerminate();
73 60
74 } // namespace chrome_browser_application_mac 61 } // namespace chrome_browser_application_mac
75 62
76 #endif // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_ 63 #endif // CHROME_BROWSER_CHROME_BROWSER_APPLICATION_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_application_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698