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

Side by Side Diff: chrome/browser/ui/website_settings/chooser_choices.h

Issue 1408193003: Add chrome side webusb permission UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call UsbChooserContext::GrantDevicePermission when user grants permission to a device Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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_WEBSITE_SETTINGS_CHOOSER_CHOICES_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_CHOICES_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12
13 // Stores all the available device lists, handle device added/removed, etc.
14 class ChooserChoices {
Reilly Grant (use Gerrit) 2015/11/12 21:44:36 s/Choice/Option/g and I think these class and meth
juncai 2015/11/14 01:54:36 Done.
15 public:
16 ChooserChoices() {}
17 virtual ~ChooserChoices() {}
18
19 class Observer {
20 public:
21 virtual void OnChoicesInitialized() = 0;
22 virtual void OnChoiceAdded(int index) = 0;
23 virtual void OnChoiceRemoved(int index) = 0;
24
25 protected:
26 virtual ~Observer() {}
27 };
28
29 virtual const std::vector<std::string>& GetChoices() const = 0;
30 virtual void Select(int index) = 0;
31
32 void set_observer(Observer* observer) { observer_ = observer; }
33 Observer* observer() const { return observer_; }
34
35 private:
36 Observer* observer_ = nullptr;
37 DISALLOW_COPY_AND_ASSIGN(ChooserChoices);
38 };
39
40 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_CHOICES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698