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

Side by Side Diff: chrome/browser/chooser_controller/chooser_controller.h

Issue 2127203002: Change WebBluetooth chooser OK button's label to be "Pair" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support_chrome_extension_chooser_title
Patch Set: rebase Created 4 years, 5 months 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
6 #define CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // since the options have already been updated. 44 // since the options have already been updated.
45 virtual void OnOptionRemoved(size_t index) = 0; 45 virtual void OnOptionRemoved(size_t index) = 0;
46 46
47 protected: 47 protected:
48 virtual ~Observer() {} 48 virtual ~Observer() {}
49 }; 49 };
50 50
51 // Returns the text to be displayed in the chooser title. 51 // Returns the text to be displayed in the chooser title.
52 base::string16 GetTitle() const; 52 base::string16 GetTitle() const;
53 53
54 // Returns the label for OK button.
55 virtual base::string16 GetOkButtonLabel() const = 0;
56
54 // The number of options users can pick from. For example, it can be 57 // The number of options users can pick from. For example, it can be
55 // the number of USB/Bluetooth device names which are listed in the 58 // the number of USB/Bluetooth device names which are listed in the
56 // chooser so that users can grant permission. 59 // chooser so that users can grant permission.
57 virtual size_t NumOptions() const = 0; 60 virtual size_t NumOptions() const = 0;
58 61
59 // The |index|th option string which is listed in the chooser. 62 // The |index|th option string which is listed in the chooser.
60 virtual base::string16 GetOption(size_t index) const = 0; 63 virtual base::string16 GetOption(size_t index) const = 0;
61 64
62 // These three functions are called just before this object is destroyed: 65 // These three functions are called just before this object is destroyed:
63 66
(...skipping 15 matching lines...) Expand all
79 Observer* observer() const { return observer_; } 82 Observer* observer() const { return observer_; }
80 83
81 private: 84 private:
82 content::RenderFrameHost* owning_frame_; 85 content::RenderFrameHost* owning_frame_;
83 Observer* observer_ = nullptr; 86 Observer* observer_ = nullptr;
84 87
85 DISALLOW_COPY_AND_ASSIGN(ChooserController); 88 DISALLOW_COPY_AND_ASSIGN(ChooserController);
86 }; 89 };
87 90
88 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 91 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chooser_controller/mock_chooser_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698