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

Side by Side Diff: chrome/browser/ui/webui/signin/sync_confirmation_handler.cc

Issue 1949613003: Clear initial focus in Sync Confirmation dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h" 5 #include "chrome/browser/ui/webui/signin/sync_confirmation_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 AccountTrackerServiceFactory::GetForProfile(profile)->AddObserver(this); 114 AccountTrackerServiceFactory::GetForProfile(profile)->AddObserver(this);
115 else 115 else
116 SetUserImageURL(primary_account_info.picture_url); 116 SetUserImageURL(primary_account_info.picture_url);
117 117
118 double height; 118 double height;
119 bool success = args->GetDouble(0, &height); 119 bool success = args->GetDouble(0, &height);
120 DCHECK(success); 120 DCHECK(success);
121 121
122 browser->signin_view_controller()->delegate()->ResizeNativeView( 122 browser->signin_view_controller()->delegate()->ResizeNativeView(
123 static_cast<int>(height)); 123 static_cast<int>(height));
124
125 // After the dialog is shown, some platforms might have an element focused.
126 // To be consistent, clear the focused element on all platforms.
127 // TODO(anthonyvd): Figure out why this is needed on Mac and not other
128 // platforms and if there's a way to start unfocused while avoiding this
129 // workaround.
130 web_ui()->CallJavascriptFunction("sync.confirmation.clearFocus");
124 } 131 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698