OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |