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

Unified Diff: extensions/browser/api/hid/hid_apitest.cc

Issue 2390823005: Update device permissions dialog ui for Chrome apps and extensions (Closed)
Patch Set: address more comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/hid/hid_apitest.cc
diff --git a/extensions/browser/api/hid/hid_apitest.cc b/extensions/browser/api/hid/hid_apitest.cc
index f4e6eb4179b78ed2f74b5b3361ac89cab0d40a21..a2a316d5ed45342e07aadb4117907ecede813a59 100644
--- a/extensions/browser/api/hid/hid_apitest.cc
+++ b/extensions/browser/api/hid/hid_apitest.cc
@@ -133,7 +133,17 @@ class TestDevicePermissionsPrompt
void ShowDialog() override { prompt()->SetObserver(this); }
- void OnDevicesChanged() override {
+ void OnDeviceAdded(size_t index, const base::string16& device_name) override {
+ OnDevicesChanged();
+ }
+
+ void OnDeviceRemoved(size_t index,
+ const base::string16& device_name) override {
+ OnDevicesChanged();
+ }
+
+ private:
+ void OnDevicesChanged() {
for (size_t i = 0; i < prompt()->GetDeviceCount(); ++i) {
prompt()->GrantDevicePermission(i);
if (!prompt()->multiple()) {
« no previous file with comments | « extensions/browser/api/device_permissions_prompt_unittest.cc ('k') | extensions/browser/api/usb/usb_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698