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

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 and updated code 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // since the options have already been updated. 48 // since the options have already been updated.
49 virtual void OnOptionRemoved(size_t index) = 0; 49 virtual void OnOptionRemoved(size_t index) = 0;
50 50
51 protected: 51 protected:
52 virtual ~Observer() {} 52 virtual ~Observer() {}
53 }; 53 };
54 54
55 // Returns the text to be displayed in the chooser title. 55 // Returns the text to be displayed in the chooser title.
56 base::string16 GetTitle(); 56 base::string16 GetTitle();
57 57
58 // Returns the label for OK button.
59 virtual base::string16 GetOkButtonLabel() const;
Reilly Grant (use Gerrit) 2016/07/11 23:39:01 This function should be pure virtual.
juncai 2016/07/12 00:10:51 Done.
60
58 // The number of options users can pick from. For example, it can be 61 // The number of options users can pick from. For example, it can be
59 // the number of USB/Bluetooth device names which are listed in the 62 // the number of USB/Bluetooth device names which are listed in the
60 // chooser so that users can grant permission. 63 // chooser so that users can grant permission.
61 virtual size_t NumOptions() const = 0; 64 virtual size_t NumOptions() const = 0;
62 65
63 // The |index|th option string which is listed in the chooser. 66 // The |index|th option string which is listed in the chooser.
64 virtual base::string16 GetOption(size_t index) const = 0; 67 virtual base::string16 GetOption(size_t index) const = 0;
65 68
66 // These three functions are called just before this object is destroyed: 69 // These three functions are called just before this object is destroyed:
67 70
(...skipping 20 matching lines...) Expand all
88 91
89 private: 92 private:
90 content::RenderFrameHost* owning_frame_; 93 content::RenderFrameHost* owning_frame_;
91 bool title_prefix_has_quote_ = true; 94 bool title_prefix_has_quote_ = true;
92 Observer* observer_ = nullptr; 95 Observer* observer_ = nullptr;
93 96
94 DISALLOW_COPY_AND_ASSIGN(ChooserController); 97 DISALLOW_COPY_AND_ASSIGN(ChooserController);
95 }; 98 };
96 99
97 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_ 100 #endif // CHROME_BROWSER_CHOOSER_CONTROLLER_CHOOSER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698