| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 private: | 140 private: |
| 141 friend class LoginPrompt; | 141 friend class LoginPrompt; |
| 142 | 142 |
| 143 CHROMEGTK_CALLBACK_0(LoginHandlerGtk, void, OnOKClicked); | 143 CHROMEGTK_CALLBACK_0(LoginHandlerGtk, void, OnOKClicked); |
| 144 CHROMEGTK_CALLBACK_0(LoginHandlerGtk, void, OnCancelClicked); | 144 CHROMEGTK_CALLBACK_0(LoginHandlerGtk, void, OnCancelClicked); |
| 145 CHROMEGTK_CALLBACK_1(LoginHandlerGtk, void, OnPromptHierarchyChanged, | 145 CHROMEGTK_CALLBACK_1(LoginHandlerGtk, void, OnPromptHierarchyChanged, |
| 146 GtkWidget*); | 146 GtkWidget*); |
| 147 | 147 |
| 148 // The GtkWidgets that form our visual hierarchy: | 148 // The GtkWidgets that form our visual hierarchy: |
| 149 // The root container we pass to our parent. | 149 // The root container we pass to our parent. |
| 150 OwnedWidgetGtk root_; | 150 ui::OwnedWidgetGtk root_; |
| 151 | 151 |
| 152 // GtkEntry widgets that the user types into. | 152 // GtkEntry widgets that the user types into. |
| 153 GtkWidget* username_entry_; | 153 GtkWidget* username_entry_; |
| 154 GtkWidget* password_entry_; | 154 GtkWidget* password_entry_; |
| 155 GtkWidget* ok_; | 155 GtkWidget* ok_; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(LoginHandlerGtk); | 157 DISALLOW_COPY_AND_ASSIGN(LoginHandlerGtk); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 void LoginHandlerGtk::OnOKClicked(GtkWidget* sender) { | 160 void LoginHandlerGtk::OnOKClicked(GtkWidget* sender) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 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_can_default(ok_, TRUE); |
| 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 |