| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_UI_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // screenshot" and "description" are disabled. Save the state of this value | 62 // screenshot" and "description" are disabled. Save the state of this value |
| 63 // to restore if the user switches back to a regular bug report before | 63 // to restore if the user switches back to a regular bug report before |
| 64 // sending. | 64 // sending. |
| 65 BOOL saveSendScreenshot_; | 65 BOOL saveSendScreenshot_; |
| 66 scoped_nsobject<NSString> saveBugDescription_; // Strong | 66 scoped_nsobject<NSString> saveBugDescription_; // Strong |
| 67 | 67 |
| 68 // Maps bug type menu item title strings to BugReportUtil::BugType ints. | 68 // Maps bug type menu item title strings to BugReportUtil::BugType ints. |
| 69 NSDictionary* bugTypeDictionary_; // Strong | 69 NSDictionary* bugTypeDictionary_; // Strong |
| 70 } | 70 } |
| 71 | 71 |
| 72 // Properties for bindings. |
| 73 @property(nonatomic, copy) NSString* bugDescription; |
| 74 @property(nonatomic) NSUInteger bugTypeIndex; |
| 75 @property(nonatomic, copy) NSString* pageTitle; |
| 76 @property(nonatomic, copy) NSString* pageURL; |
| 77 @property(nonatomic) BOOL sendScreenshot; |
| 78 @property(nonatomic) BOOL disableScreenshotCheckbox; |
| 79 @property(nonatomic, readonly) NSArray* bugTypeList; |
| 80 |
| 72 // Initialize with the contents of the tab to be reported as buggy / wrong. | 81 // Initialize with the contents of the tab to be reported as buggy / wrong. |
| 73 // If dialog is called without an open window, currentTab may be null; in | 82 // If dialog is called without an open window, currentTab may be null; in |
| 74 // that case, a dialog is opened with options for reporting a bugs not | 83 // that case, a dialog is opened with options for reporting a bugs not |
| 75 // related to a specific page. Profile is passed to BugReportUtil, who | 84 // related to a specific page. Profile is passed to BugReportUtil, who |
| 76 // will not send a report if the value is null. | 85 // will not send a report if the value is null. |
| 77 - (id)initWithTabContents:(TabContents*)currentTab profile:(Profile*)profile; | 86 - (id)initWithTabContents:(TabContents*)currentTab profile:(Profile*)profile; |
| 78 | 87 |
| 79 // Run the dialog with an application-modal event loop. If the user accepts, | 88 // Run the dialog with an application-modal event loop. If the user accepts, |
| 80 // send the report of the bug or broken web site. | 89 // send the report of the bug or broken web site. |
| 81 - (void)runModalDialog; | 90 - (void)runModalDialog; |
| 82 | 91 |
| 83 // IBActions for the dialog buttons. | 92 // IBActions for the dialog buttons. |
| 84 - (IBAction)sendReport:(id)sender; | 93 - (IBAction)sendReport:(id)sender; |
| 85 - (IBAction)cancel:(id)sender; | 94 - (IBAction)cancel:(id)sender; |
| 86 | 95 |
| 87 // YES if the user has selected the phishing report option. | 96 // YES if the user has selected the phishing report option. |
| 88 - (BOOL)isPhishingReport; | 97 - (BOOL)isPhishingReport; |
| 89 | 98 |
| 90 // Converts the bug type from the menu into the correct value for the bug type | 99 // Converts the bug type from the menu into the correct value for the bug type |
| 91 // from BugReportUtil::BugType. | 100 // from BugReportUtil::BugType. |
| 92 - (int)bugTypeFromIndex; | 101 - (int)bugTypeFromIndex; |
| 93 | 102 |
| 94 // Force the description text field to allow "return" to go to the next line | 103 // Force the description text field to allow "return" to go to the next line |
| 95 // within the description field. Without this delegate method, "return" falls | 104 // within the description field. Without this delegate method, "return" falls |
| 96 // back to the "Send Report" action, because this button has been bound to | 105 // back to the "Send Report" action, because this button has been bound to |
| 97 // the return key in IB. | 106 // the return key in IB. |
| 98 - (BOOL)control:(NSControl*)control textView:(NSTextView*)textView | 107 - (BOOL)control:(NSControl*)control textView:(NSTextView*)textView |
| 99 doCommandBySelector:(SEL)commandSelector; | 108 doCommandBySelector:(SEL)commandSelector; |
| 100 | 109 |
| 101 // Properties for bindings. | |
| 102 @property (nonatomic, copy) NSString* bugDescription; | |
| 103 @property (nonatomic) NSUInteger bugTypeIndex; | |
| 104 @property (nonatomic, copy) NSString* pageTitle; | |
| 105 @property (nonatomic, copy) NSString* pageURL; | |
| 106 @property (nonatomic) BOOL sendScreenshot; | |
| 107 @property (nonatomic) BOOL disableScreenshotCheckbox; | |
| 108 @property (nonatomic, readonly) NSArray* bugTypeList; | |
| 109 | |
| 110 @end | 110 @end |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_UI_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ | 112 #endif // CHROME_BROWSER_UI_COCOA_BUG_REPORT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |