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

Unified Diff: chrome/browser/chooser_controller/chooser_controller.h

Issue 2163683005: Change ChooserController::Observer to ChooserController::View (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed ChooserController::Observer to ChooserController::View 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chooser_controller/chooser_controller.h
diff --git a/chrome/browser/chooser_controller/chooser_controller.h b/chrome/browser/chooser_controller/chooser_controller.h
index 8ac0b007fea71c265980a419386fcb5d02ff0d78..805b9e50a8208b4c13d0ef9db28dbb6fadace3fe 100644
--- a/chrome/browser/chooser_controller/chooser_controller.h
+++ b/chrome/browser/chooser_controller/chooser_controller.h
@@ -27,8 +27,8 @@ class ChooserController {
virtual ~ChooserController();
// Since the set of options can change while the UI is visible an
- // implementation should register an observer.
- class Observer {
+ // implementation should register a view.
msw 2016/07/20 20:37:07 nit: "a view to observe changes"
juncai 2016/07/20 22:37:45 Done.
+ class View {
public:
// Called after the options list is initialized for the first time.
// OnOptionsInitialized should only be called once.
@@ -53,7 +53,7 @@ class ChooserController {
virtual void OnRefreshStateChanged(bool refreshing) = 0;
protected:
- virtual ~Observer() {}
+ virtual ~View() {}
};
// Returns the text to be displayed in the chooser title.
@@ -94,15 +94,15 @@ class ChooserController {
// Open help center URL.
virtual void OpenHelpCenterUrl() const = 0;
- // Only one observer may be registered at a time.
- void set_observer(Observer* observer) { observer_ = observer; }
- Observer* observer() const { return observer_; }
+ // Only one view may be registered at a time.
+ void set_view(View* view) { view_ = view; }
+ View* view() const { return view_; }
private:
content::RenderFrameHost* const owning_frame_;
const int title_string_id_origin_;
const int title_string_id_extension_;
- Observer* observer_ = nullptr;
+ View* view_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(ChooserController);
};

Powered by Google App Engine
This is Rietveld 408576698