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/views/extensions/device_permissions_dialog_view.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_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/controls/table/table_view_observer.h"
10 #include "ui/views/window/dialog_delegate.h"
11
12 namespace views {
13 class TableView;
14 }
15
16 class DevicePermissionsTableModel;
17
18 // Displays a device permissions selector prompt as a modal dialog constrained
19 // to the window/tab displaying the given web contents.
20 class DevicePermissionsDialogView : public views::DialogDelegateView,
21 public views::TableViewObserver {
22 public:
23 DevicePermissionsDialogView(
24 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt);
25 ~DevicePermissionsDialogView() override;
26
27 // views::DialogDelegateView:
28 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
29 bool IsDialogButtonEnabled(ui::DialogButton button) const override;
30 ui::ModalType GetModalType() const override;
31 base::string16 GetWindowTitle() const override;
32 void DeleteDelegate() override;
33 bool Accept() override;
34 gfx::Size GetPreferredSize() const override;
35
36 // views::TableViewObserver:
37 void OnSelectionChanged() override;
38
39 private:
40 scoped_refptr<extensions::DevicePermissionsPrompt::Prompt> prompt_;
41
42 // Displays the list of devices.
43 views::TableView* table_view_;
44 std::unique_ptr<DevicePermissionsTableModel> table_model_;
45 };
46
47 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_DEVICE_PERMISSIONS_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698