OLD | NEW |
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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #import <PreferencePanes/PreferencePanes.h> | 6 #import <PreferencePanes/PreferencePanes.h> |
7 #import <SecurityInterface/SFAuthorizationView.h> | 7 #import <SecurityInterface/SFAuthorizationView.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 class JsonHostConfig; | 14 class JsonHostConfig; |
15 } | 15 } |
16 | 16 |
| 17 @class Me2MePreferencePaneConfirmPin; |
| 18 @class Me2MePreferencePaneDisable; |
| 19 |
17 @interface Me2MePreferencePane : NSPreferencePane { | 20 @interface Me2MePreferencePane : NSPreferencePane { |
| 21 Me2MePreferencePaneConfirmPin* confirm_pin_view_; |
| 22 Me2MePreferencePaneDisable* disable_view_; |
| 23 |
18 IBOutlet NSTextField* status_message_; | 24 IBOutlet NSTextField* status_message_; |
19 IBOutlet NSButton* disable_button_; | 25 IBOutlet NSBox* box_; |
20 IBOutlet NSTextField* pin_instruction_message_; | |
21 IBOutlet NSTextField* email_; | |
22 IBOutlet NSTextField* pin_; | |
23 IBOutlet NSButton* apply_button_; | |
24 IBOutlet SFAuthorizationView* authorization_view_; | 26 IBOutlet SFAuthorizationView* authorization_view_; |
25 | 27 |
26 // Holds the new proposed configuration if a temporary config file is | 28 // Holds the new proposed configuration if a temporary config file is |
27 // present. | 29 // present. |
28 scoped_ptr<remoting::JsonHostConfig> config_; | 30 scoped_ptr<remoting::JsonHostConfig> config_; |
29 | 31 |
30 NSTimer* service_status_timer_; | 32 NSTimer* service_status_timer_; |
31 | 33 |
32 // These flags determine the UI state. These are computed in the | 34 // These flags determine the UI state. These are computed in the |
33 // update...Status methods. | 35 // update...Status methods. |
34 BOOL is_service_running_; | 36 BOOL is_service_running_; |
35 BOOL is_pane_unlocked_; | 37 BOOL is_pane_unlocked_; |
36 | 38 |
37 // True if a new proposed config file has been loaded into memory. | 39 // True if a new proposed config file has been loaded into memory. |
38 BOOL have_new_config_; | 40 BOOL have_new_config_; |
39 } | 41 } |
40 | 42 |
41 - (void)mainViewDidLoad; | 43 - (void)mainViewDidLoad; |
42 - (void)willSelect; | 44 - (void)willSelect; |
43 - (void)willUnselect; | 45 - (void)willUnselect; |
44 - (IBAction)onDisable:(id)sender; | 46 - (void)onDisable:(id)sender; |
45 - (IBAction)onApply:(id)sender; | 47 - (void)applyConfiguration:(id)sender |
| 48 pin:(NSString*)pin; |
46 - (void)onNewConfigFile:(NSNotification*)notification; | 49 - (void)onNewConfigFile:(NSNotification*)notification; |
47 - (void)refreshServiceStatus:(NSTimer*)timer; | 50 - (void)refreshServiceStatus:(NSTimer*)timer; |
48 - (void)authorizationViewDidAuthorize:(SFAuthorizationView*)view; | 51 - (void)authorizationViewDidAuthorize:(SFAuthorizationView*)view; |
49 - (void)authorizationViewDidDeauthorize:(SFAuthorizationView*)view; | 52 - (void)authorizationViewDidDeauthorize:(SFAuthorizationView*)view; |
50 - (void)updateServiceStatus; | 53 - (void)updateServiceStatus; |
51 - (void)updateAuthorizationStatus; | 54 - (void)updateAuthorizationStatus; |
52 | 55 |
53 // Read any new config file if present. If a config file is successfully read, | 56 // Read any new config file if present. If a config file is successfully read, |
54 // this deletes the file and keeps the config data loaded in memory. If this | 57 // this deletes the file and keeps the config data loaded in memory. If this |
55 // method is called a second time (when the file has been deleted), the current | 58 // method is called a second time (when the file has been deleted), the current |
(...skipping 19 matching lines...) Expand all Loading... |
75 | 78 |
76 // Save the new config to the system, and either start the service or inform | 79 // Save the new config to the system, and either start the service or inform |
77 // the currently-running service of the new config. | 80 // the currently-running service of the new config. |
78 - (void)applyNewServiceConfig; | 81 - (void)applyNewServiceConfig; |
79 | 82 |
80 - (BOOL)runHelperAsRootWithCommand:(const char*)command | 83 - (BOOL)runHelperAsRootWithCommand:(const char*)command |
81 inputData:(const std::string&)input_data; | 84 inputData:(const std::string&)input_data; |
82 - (BOOL)sendJobControlMessage:(const char*)launch_key; | 85 - (BOOL)sendJobControlMessage:(const char*)launch_key; |
83 | 86 |
84 @end | 87 @end |
OLD | NEW |