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

Unified Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.h

Issue 23449023: Add kiosk browser tests for network configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix flakiness Created 7 years, 3 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/ui/webui/chromeos/login/oobe_ui.h
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
index 6c92fdab253fcddfa898d9b945039aa45754d0c1..764b8871311bddb582fba2c904cde6e990f0c570 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/observer_list.h"
#include "chrome/browser/chromeos/login/oobe_display.h"
#include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h"
#include "content/public/browser/web_ui_controller.h"
@@ -41,6 +42,13 @@ class OobeUI : public OobeDisplay,
public content::WebUIController,
public CoreOobeHandler::Delegate {
public:
+ class Observer {
+ public:
+ virtual ~Observer() {}
+ virtual void OnCurrentScreenChanged(
+ Screen current_screen, Screen new_screen) = 0;
+ };
+
// JS oobe/login screens names.
static const char kScreenOobeNetwork[];
static const char kScreenOobeEula[];
@@ -108,6 +116,10 @@ class OobeUI : public OobeDisplay,
// Resets the delegate set in ShowSigninScreen.
void ResetSigninScreenHandlerDelegate();
+ // Add and remove observers for screen change events.
+ void AddObserver(Observer* observer);
+ void RemoveObserver(Observer* observer);
+
Screen current_screen() const { return current_screen_; }
const std::string& GetScreenName(Screen screen) const;
@@ -179,6 +191,9 @@ class OobeUI : public OobeDisplay,
// Callbacks to notify when JS part is fully loaded and ready to accept calls.
std::vector<base::Closure> ready_callbacks_;
+ // List of registered observers.
+ ObserverList<Observer> observer_list_;
+
DISALLOW_COPY_AND_ASSIGN(OobeUI);
};
« no previous file with comments | « chrome/browser/chromeos/login/mock_user_manager.cc ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698