OLD | NEW |
---|---|
(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_VIEWS_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_VIEW_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_VIEW_H_ | |
7 | |
8 #include "extensions/browser/api/device_permissions_prompt.h" | |
9 #include "ui/views/window/dialog_delegate.h" | |
10 | |
11 namespace views { | |
12 class TableView; | |
13 } | |
14 | |
15 class DevicePermissionsTableModel; | |
16 | |
17 // Displays an device permissions selector prompt as a modal dialog constrained | |
Finnur
2014/10/16 09:20:21
nit: s/an/a/
| |
18 // to the window/tab displaying the given web contents. | |
19 class DevicePermissionsDialogView : public views::DialogDelegateView { | |
20 public: | |
21 DevicePermissionsDialogView( | |
22 extensions::DevicePermissionsPrompt::Delegate* delegate, | |
23 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt); | |
24 virtual ~DevicePermissionsDialogView(); | |
25 | |
26 // Overriding views::DialogDelegate. | |
27 virtual bool Cancel() override; | |
28 virtual bool Accept() override; | |
29 | |
30 // Overriding views::DialogModel. | |
31 virtual base::string16 GetDialogButtonLabel( | |
32 ui::DialogButton button) const override; | |
33 | |
34 // Overriding views::WidgetDelegate. | |
35 virtual ui::ModalType GetModalType() const override; | |
36 virtual base::string16 GetWindowTitle() const override; | |
37 | |
38 // Overriding views::View | |
39 virtual gfx::Size GetPreferredSize() const override; | |
40 | |
41 private: | |
42 extensions::DevicePermissionsPrompt::Delegate* delegate_; | |
43 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_; | |
44 | |
45 // Displays the list of devices. | |
46 views::TableView* table_view_; | |
47 scoped_ptr<DevicePermissionsTableModel> table_model_; | |
48 }; | |
49 | |
50 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_VIEW_H_ | |
OLD | NEW |