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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/device_permissions_view_controller.h

Issue 1097603003: Remove knowledge of USB devices from permission prompt implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize delegate_ to nullptr. Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_EXTENSIONS_DEVICE_PERMISSIONS_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_VIEW_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 #include "extensions/browser/api/device_permissions_prompt.h" 11 #include "extensions/browser/api/device_permissions_prompt.h"
12 12
13 class DevicePermissionsDialogController;
14
13 // Displays the device permissions prompt, and notifies the 15 // Displays the device permissions prompt, and notifies the
14 // DevicePermissionsPrompt::Delegate of success or failure. 16 // DevicePermissionsDialogController of selected devices.
15 @interface DevicePermissionsViewController 17 @interface DevicePermissionsViewController
16 : NSViewController<NSTableViewDataSource, NSTableViewDelegate> { 18 : NSViewController<NSTableViewDataSource, NSTableViewDelegate> {
17 IBOutlet NSTextField* titleField_; 19 IBOutlet NSTextField* titleField_;
18 IBOutlet NSTextField* promptField_; 20 IBOutlet NSTextField* promptField_;
19 IBOutlet NSButton* cancelButton_; 21 IBOutlet NSButton* cancelButton_;
20 IBOutlet NSButton* okButton_; 22 IBOutlet NSButton* okButton_;
21 IBOutlet NSTableView* tableView_; 23 IBOutlet NSTableView* tableView_;
22 IBOutlet NSTableColumn* deviceNameColumn_; 24 IBOutlet NSTableColumn* deviceNameColumn_;
23 IBOutlet NSTableColumn* serialNumberColumn_; 25 IBOutlet NSTableColumn* serialNumberColumn_;
24 IBOutlet NSScrollView* scrollView_; 26 IBOutlet NSScrollView* scrollView_;
25 27
26 extensions::DevicePermissionsPrompt::Delegate* delegate_; // weak 28 DevicePermissionsDialogController* controller_; // weak
27 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_; 29 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_;
28 } 30 }
29 31
30 - (id)initWithDelegate:(extensions::DevicePermissionsPrompt::Delegate*)delegate 32 - (id)
33 initWithController:(DevicePermissionsDialogController*)controller
31 prompt: 34 prompt:
32 (scoped_refptr<extensions::DevicePermissionsPrompt::Prompt>) 35 (scoped_refptr<extensions::DevicePermissionsPrompt::Prompt>)
33 prompt; 36 prompt;
34 - (IBAction)cancel:(id)sender; 37 - (IBAction)cancel:(id)sender;
35 - (IBAction)ok:(id)sender; 38 - (IBAction)ok:(id)sender;
36 - (void)devicesChanged; 39 - (void)devicesChanged;
37 40
38 @end 41 @end
39 42
40 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_VIEW_CONTROLLER _H_ 43 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_VIEW_CONTROLLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698