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

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

Issue 1408193003: Add chrome side webusb permission UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address jyasskin@'s comments Created 5 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
« no previous file with comments | « chrome/browser/ui/website_settings/chooser_bubble_delegate.cc ('k') | chrome/browser/usb/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_OPTIONS_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_OPTIONS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "base/strings/string16.h"
13
14 // Stores all the available chooser options, handle options initialization,
15 // option added/removed.
16 class ChooserOptions {
17 public:
18 ChooserOptions() {}
19 virtual ~ChooserOptions() {}
20
21 class Observer {
22 public:
23 virtual void OnOptionsInitialized() = 0;
Jeffrey Yasskin 2015/12/07 23:57:55 Is there a guarantee that OnOptionsInitialized() i
juncai 2015/12/08 20:16:29 Yes, it is called only once at the ChooserBubbleDe
24 virtual void OnOptionAdded(int index) = 0;
25 virtual void OnOptionRemoved(int index) = 0;
26
27 protected:
28 virtual ~Observer() {}
29 };
30
31 virtual const std::vector<base::string16>& GetOptions() const = 0;
32 virtual void Select(int index) = 0;
Jeffrey Yasskin 2015/12/07 23:57:54 Does a call to Select() indicate that the ChooserO
juncai 2015/12/08 20:16:29 Yes.
33
34 void set_observer(Observer* observer) { observer_ = observer; }
35 Observer* observer() const { return observer_; }
36
37 private:
38 Observer* observer_ = nullptr;
39 DISALLOW_COPY_AND_ASSIGN(ChooserOptions);
40 };
41
42 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_OPTIONS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/chooser_bubble_delegate.cc ('k') | chrome/browser/usb/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698