OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
Avi (use Gerrit)
2014/10/15 01:57:46
No (c) in new files.
Reilly Grant (use Gerrit)
2014/10/15 19:15:32
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_CONTROLER_H _ | |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_CONTROLER_H _ | |
7 | |
8 #import <Cocoa/Cocoa.h> | |
9 | |
10 #include "base/mac/scoped_nsobject.h" | |
11 #include "extensions/browser/api/device_permissions_prompt.h" | |
12 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" | |
Avi (use Gerrit)
2014/10/15 01:57:46
alphabetical order
Reilly Grant (use Gerrit)
2014/10/15 19:15:32
It's amazing how easily I can forget how the alpha
| |
13 | |
14 namespace content { | |
15 class WebContents; | |
16 } | |
17 | |
18 @class DevicePermissionsViewController; | |
19 | |
20 // Displays an device permissions selector prompt as a tab modal dialog. | |
21 class DevicePermissionsDialogController | |
22 : public extensions::DevicePermissionsPrompt::Delegate, | |
23 public extensions::DevicePermissionsPrompt::Prompt::Observer, | |
24 public ConstrainedWindowMacDelegate { | |
25 public: | |
26 DevicePermissionsDialogController( | |
27 content::WebContents* web_contents, | |
28 extensions::DevicePermissionsPrompt::Delegate* delegate, | |
29 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt); | |
30 virtual ~DevicePermissionsDialogController(); | |
31 | |
32 // extensions::DevicePermissionsPrompt::Delegate implementation. | |
33 virtual void UsbDevicesChosen( | |
34 const std::vector<scoped_refptr<device::UsbDevice>>& devices) override; | |
35 | |
36 // extensions::DevicePermissionsPrompt::Prompt::Observer implementation. | |
37 virtual void OnDevicesChanged() override; | |
38 | |
39 // ConstrainedWindowMacDelegate implementation. | |
40 virtual void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; | |
41 | |
42 ConstrainedWindowMac* constrained_window() const { | |
43 return constrained_window_.get(); | |
44 } | |
45 DevicePermissionsViewController* view_controller() const { | |
46 return view_controller_; | |
47 } | |
48 | |
49 private: | |
50 extensions::DevicePermissionsPrompt::Delegate* delegate_; | |
51 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_; | |
52 base::scoped_nsobject<DevicePermissionsViewController> view_controller_; | |
53 scoped_ptr<ConstrainedWindowMac> constrained_window_; | |
54 }; | |
55 | |
56 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_CONTROLE R_H_ | |
OLD | NEW |