| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/login_prompt.h" | 5 #include "chrome/browser/ui/login/login_prompt.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/password_manager/password_manager.h" | 10 #include "chrome/browser/password_manager/password_manager.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 void LoginHandlerGtk::OnPromptHierarchyChanged(GtkWidget* sender, | 170 void LoginHandlerGtk::OnPromptHierarchyChanged(GtkWidget* sender, |
| 171 GtkWidget* previous_toplevel) { | 171 GtkWidget* previous_toplevel) { |
| 172 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 172 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 173 | 173 |
| 174 if (!GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(ok_))) | 174 if (!GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(ok_))) |
| 175 return; | 175 return; |
| 176 | 176 |
| 177 // Now that we have attached ourself to the window, we can make our OK | 177 // Now that we have attached ourself to the window, we can make our OK |
| 178 // button the default action and mess with the focus. | 178 // button the default action and mess with the focus. |
| 179 gtk_widget_set_can_default(ok_, TRUE); | 179 GTK_WIDGET_SET_FLAGS(ok_, GTK_CAN_DEFAULT); |
| 180 gtk_widget_grab_default(ok_); | 180 gtk_widget_grab_default(ok_); |
| 181 } | 181 } |
| 182 | 182 |
| 183 // static | 183 // static |
| 184 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 184 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
| 185 net::URLRequest* request) { | 185 net::URLRequest* request) { |
| 186 return new LoginHandlerGtk(auth_info, request); | 186 return new LoginHandlerGtk(auth_info, request); |
| 187 } | 187 } |
| OLD | NEW |