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

Unified Diff: chrome/browser/ui/webui/options/sync_setup_handler.cc

Issue 7057038: dom-ui sync: Eliminate jank when customizing sync settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: comment tweak Created 9 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/options/sync_setup_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/sync_setup_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/sync_setup_handler.cc (revision 86339)
+++ chrome/browser/ui/webui/options/sync_setup_handler.cc (working copy)
@@ -253,18 +253,18 @@
}
void SyncSetupHandler::RegisterMessages() {
- web_ui_->RegisterMessageCallback("didShowPage",
- NewCallback(this, &SyncSetupHandler::OnDidShowPage));
- web_ui_->RegisterMessageCallback("didClosePage",
+ web_ui_->RegisterMessageCallback("SyncSetupDidClosePage",
NewCallback(this, &SyncSetupHandler::OnDidClosePage));
- web_ui_->RegisterMessageCallback("SubmitAuth",
+ web_ui_->RegisterMessageCallback("SyncSetupSubmitAuth",
NewCallback(this, &SyncSetupHandler::HandleSubmitAuth));
- web_ui_->RegisterMessageCallback("Configure",
+ web_ui_->RegisterMessageCallback("SyncSetupConfigure",
NewCallback(this, &SyncSetupHandler::HandleConfigure));
- web_ui_->RegisterMessageCallback("Passphrase",
+ web_ui_->RegisterMessageCallback("SyncSetupPassphrase",
NewCallback(this, &SyncSetupHandler::HandlePassphraseEntry));
- web_ui_->RegisterMessageCallback("PassphraseCancel",
+ web_ui_->RegisterMessageCallback("SyncSetupPassphraseCancel",
NewCallback(this, &SyncSetupHandler::HandlePassphraseCancel));
+ web_ui_->RegisterMessageCallback("SyncSetupAttachHandler",
+ NewCallback(this, &SyncSetupHandler::HandleAttachHandler));
}
void SyncSetupHandler::ShowGaiaLogin(const DictionaryValue& args) {
@@ -309,17 +309,6 @@
flow_ = flow;
}
-void SyncSetupHandler::OnDidShowPage(const ListValue* args) {
- DCHECK(web_ui_);
-
- ProfileSyncService* sync_service =
- web_ui_->GetProfile()->GetProfileSyncService();
- if (!sync_service)
- return;
-
- flow_ = sync_service->get_wizard().AttachSyncSetupHandler(this);
-}
-
void SyncSetupHandler::OnDidClosePage(const ListValue* args) {
if (flow_) {
flow_->OnDialogClosed(std::string());
@@ -397,3 +386,16 @@
DCHECK(flow_);
flow_->OnPassphraseCancel();
}
+
+void SyncSetupHandler::HandleAttachHandler(const ListValue* args) {
+ DCHECK(web_ui_);
+
+ ProfileSyncService* sync_service =
+ web_ui_->GetProfile()->GetProfileSyncService();
+ if (!sync_service)
+ return;
+
+ if (!flow_)
+ flow_ = sync_service->get_wizard().AttachSyncSetupHandler(this);
+}
+
« no previous file with comments | « chrome/browser/ui/webui/options/sync_setup_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698