aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/sender/crash_report_sender.h
diff options
context:
space:
mode:
authornealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-07-21 00:10:57 +0000
committernealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e>2009-07-21 00:10:57 +0000
commit22734848ea2124d2e8c75a472f71ae20a69fb116 (patch)
tree5afa6c3c84b50c60ae8438da402edd940c3bb949 /src/client/mac/sender/crash_report_sender.h
parentFix for http://breakpad.appspot.com/18009 - run dump_syms on both PPC & i386 ... (diff)
downloadbreakpad-22734848ea2124d2e8c75a472f71ae20a69fb116.tar.xz
Port fixes from internal Google Breakpad to SVN.
A=preston, nealsid R=Stuart, Preston git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@360 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/sender/crash_report_sender.h')
-rw-r--r--src/client/mac/sender/crash_report_sender.h49
1 files changed, 39 insertions, 10 deletions
diff --git a/src/client/mac/sender/crash_report_sender.h b/src/client/mac/sender/crash_report_sender.h
index f62e7613..ca5b3079 100644
--- a/src/client/mac/sender/crash_report_sender.h
+++ b/src/client/mac/sender/crash_report_sender.h
@@ -41,6 +41,24 @@
extern NSString *const kGoogleServerType;
extern NSString *const kSocorroServerType;
extern NSString *const kDefaultServerType;
+
+// We're sublcassing NSTextField in order to override a particular
+// method (see the implementation) that lets us reject changes if they
+// are longer than a particular length. Bindings would normally solve
+// this problem, but when we implemented a validation method, and
+// returned NO for strings that were too long, the UI was not updated
+// right away, which was a poor user experience. The UI would be
+// updated as soon as the text field lost first responder status,
+// which isn't soon enough. It is a known bug that the UI KVO didn't
+// work in the middle of a validation.
+@interface LengthLimitingTextField : NSTextField {
+ @private
+ unsigned int maximumLength_;
+}
+
+- (void) setMaximumLength:(unsigned int)maxLength;
+@end
+
@interface Reporter : NSObject {
@public
IBOutlet NSWindow *alertWindow_; // The alert window
@@ -50,26 +68,34 @@ extern NSString *const kDefaultServerType;
IBOutlet NSBox *preEmailBox_;
IBOutlet NSBox *emailSectionBox_;
// Localized elements (or things that need to be moved during localization).
- IBOutlet NSTextField *dialogTitle_;
- IBOutlet NSTextField *commentMessage_;
- IBOutlet NSTextField *emailMessage_;
- IBOutlet NSTextField *emailLabel_;
- IBOutlet NSTextField *privacyLinkLabel_;
- IBOutlet NSButton *sendButton_;
- IBOutlet NSButton *cancelButton_;
- IBOutlet NSView *emailEntryField_;
- IBOutlet NSView *privacyLinkArrow_;
+ IBOutlet NSTextField *dialogTitle_;
+ IBOutlet NSTextField *commentMessage_;
+ IBOutlet NSTextField *emailMessage_;
+ IBOutlet NSTextField *emailLabel_;
+ IBOutlet NSTextField *privacyLinkLabel_;
+ IBOutlet NSButton *sendButton_;
+ IBOutlet NSButton *cancelButton_;
+ IBOutlet LengthLimitingTextField *emailEntryField_;
+ IBOutlet LengthLimitingTextField *commentsEntryField_;
+ IBOutlet NSTextField *countdownLabel_;
+ IBOutlet NSView *privacyLinkArrow_;
// Text field bindings, for user input.
NSString *commentsValue_; // Comments from the user
NSString *emailValue_; // Email from the user
-
+ NSString *countdownMessage_; // Message indicating time
+ // left for input.
@private
int configFile_; // File descriptor for config file
NSMutableDictionary *parameters_; // Key value pairs of data (STRONG)
NSData *minidumpContents_; // The data in the minidump (STRONG)
NSData *logFileData_; // An NSdata for the tar,
// bz2'd log file.
+ NSTimeInterval remainingDialogTime_; // Keeps track of how long
+ // we have until we cancel
+ // the dialog
+ NSTimer *messageTimer_; // Timer we use to update
+ // the dialog
NSMutableDictionary *serverDictionary_; // The dictionary mapping a
// server type name to a
// dictionary of server
@@ -107,4 +133,7 @@ extern NSString *const kDefaultServerType;
- (NSString *)emailValue;
- (void)setEmailValue:(NSString *)value;
+- (NSString *)countdownMessage;
+- (void)setCountdownMessage:(NSString *)value;
+
@end