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

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

Issue 2390823005: Update device permissions dialog ui for Chrome apps and extensions (Closed)
Patch Set: address more comments Created 4 years 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
(Empty)
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
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 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h"
12 #include "extensions/browser/api/device_permissions_prompt.h"
13
14 namespace content {
15 class WebContents;
16 }
17
18 @class DevicePermissionsViewController;
19
20 // Displays an device permissions selector prompt as a modal sheet constrained
21 // to the window/tab displaying the given web contents.
22 class DevicePermissionsDialogController
23 : public extensions::DevicePermissionsPrompt::Prompt::Observer,
24 public ConstrainedWindowMacDelegate {
25 public:
26 DevicePermissionsDialogController(
27 content::WebContents* web_contents,
28 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt);
29 ~DevicePermissionsDialogController() override;
30
31 void Dismissed();
32
33 // extensions::DevicePermissionsPrompt::Prompt::Observer implementation.
34 void OnDevicesChanged() override;
35
36 // ConstrainedWindowMacDelegate implementation.
37 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override;
38
39 private:
40 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_;
41 base::scoped_nsobject<DevicePermissionsViewController> view_controller_;
42 std::unique_ptr<ConstrainedWindowMac> constrained_window_;
43 };
44
45 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_CONTROLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698