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

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

Issue 2697063004: Fix of "login is not defined" error in OOBE (Closed)
Patch Set: Move CallJSOrDefer to OobeUI Created 3 years, 10 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/base_screen_handler.h
diff --git a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h
index 4c485f58039364806eff24c459b1552bc4f988f3..df5f22ba54e989c2c9124383e78598cd429496da 100644
--- a/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/base_screen_handler.h
@@ -65,23 +65,6 @@ class BaseScreenHandler : public content::WebUIMessageHandler,
return async_assets_load_id_;
}
- protected:
- // All subclasses should implement this method to provide localized values.
- virtual void DeclareLocalizedValues(
- ::login::LocalizedValuesBuilder* builder) = 0;
-
- // All subclasses should implement this method to register callbacks for JS
- // messages.
- //
- // TODO (ygorshenin, crbug.com/433797): make this method purely vrtual when
- // all screens will be switched to use ScreenContext.
- virtual void DeclareJSCallbacks() {}
-
- // Subclasses can override these methods to pass additional parameters
- // to loadTimeData. Generally, it is a bad approach, and it should be replaced
- // with Context at some point.
- virtual void GetAdditionalParameters(base::DictionaryValue* parameters);
-
// Shortcut for calling JS methods on WebUI side.
void CallJS(const std::string& method);
@@ -120,6 +103,23 @@ class BaseScreenHandler : public content::WebUIMessageHandler,
::login::MakeValue(arg4));
}
+ protected:
+ // All subclasses should implement this method to provide localized values.
+ virtual void DeclareLocalizedValues(
+ ::login::LocalizedValuesBuilder* builder) = 0;
+
+ // All subclasses should implement this method to register callbacks for JS
+ // messages.
+ //
+ // TODO (ygorshenin, crbug.com/433797): make this method purely vrtual when
+ // all screens will be switched to use ScreenContext.
+ virtual void DeclareJSCallbacks() {}
+
+ // Subclasses can override these methods to pass additional parameters
+ // to loadTimeData. Generally, it is a bad approach, and it should be replaced
+ // with Context at some point.
+ virtual void GetAdditionalParameters(base::DictionaryValue* parameters);
+
// Shortcut methods for adding WebUI callbacks.
template<typename T>
void AddRawCallback(const std::string& name,

Powered by Google App Engine
This is Rietveld 408576698