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 class DevicePermissionsDialogView : public views::DialogDelegateView { |
| 18 public: |
| 19 DevicePermissionsDialogView( |
| 20 extensions::DevicePermissionsPrompt::Delegate* delegate, |
| 21 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt); |
| 22 virtual ~DevicePermissionsDialogView(); |
| 23 |
| 24 // Overriding views::DialogDelegate. |
| 25 virtual bool Cancel() override; |
| 26 virtual bool Accept() override; |
| 27 |
| 28 // Overriding views::DialogModel. |
| 29 virtual base::string16 GetDialogButtonLabel( |
| 30 ui::DialogButton button) const override; |
| 31 |
| 32 // Overriding views::WidgetDelegate. |
| 33 virtual ui::ModalType GetModalType() const override; |
| 34 virtual base::string16 GetWindowTitle() const override; |
| 35 |
| 36 // Overriding views::View |
| 37 virtual gfx::Size GetPreferredSize() const override; |
| 38 |
| 39 private: |
| 40 extensions::DevicePermissionsPrompt::Delegate* delegate_; |
| 41 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_; |
| 42 |
| 43 // Displays the list of devices. |
| 44 views::TableView* table_view_; |
| 45 scoped_ptr<DevicePermissionsTableModel> table_model_; |
| 46 }; |
| 47 |
| 48 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_VIEW_H_ |
OLD | NEW |