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

Side by Side Diff: chrome/browser/ui/login/login_prompt_gtk.cc

Issue 8588068: GTK: Create the start of a compatibility header wrapping deprecated methods. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT and remove views/ cleanups. Created 9 years, 1 month 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 (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/string16.h" 9 #include "base/string16.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/password_manager/password_manager.h" 11 #include "chrome/browser/password_manager/password_manager.h"
12 #include "chrome/browser/tab_contents/tab_contents_view_gtk.h" 12 #include "chrome/browser/tab_contents/tab_contents_view_gtk.h"
13 #include "chrome/browser/tab_contents/tab_util.h" 13 #include "chrome/browser/tab_contents/tab_util.h"
14 #include "chrome/browser/ui/gtk/constrained_window_gtk.h" 14 #include "chrome/browser/ui/gtk/constrained_window_gtk.h"
15 #include "chrome/browser/ui/gtk/gtk_util.h" 15 #include "chrome/browser/ui/gtk/gtk_util.h"
16 #include "chrome/browser/ui/login/login_model.h" 16 #include "chrome/browser/ui/login/login_model.h"
17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
18 #include "content/browser/renderer_host/resource_dispatcher_host.h" 18 #include "content/browser/renderer_host/resource_dispatcher_host.h"
19 #include "content/browser/tab_contents/navigation_controller.h" 19 #include "content/browser/tab_contents/navigation_controller.h"
20 #include "content/browser/tab_contents/tab_contents.h" 20 #include "content/browser/tab_contents/tab_contents.h"
21 #include "content/browser/tab_contents/tab_contents_delegate.h" 21 #include "content/browser/tab_contents/tab_contents_delegate.h"
22 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
23 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
24 #include "net/url_request/url_request.h" 24 #include "net/url_request/url_request.h"
25 #include "ui/base/gtk/gtk_compat.h"
25 #include "ui/base/gtk/gtk_hig_constants.h" 26 #include "ui/base/gtk/gtk_hig_constants.h"
26 #include "ui/base/gtk/gtk_signal.h" 27 #include "ui/base/gtk/gtk_signal.h"
27 #include "ui/base/l10n/l10n_util.h" 28 #include "ui/base/l10n/l10n_util.h"
28 29
29 using content::BrowserThread; 30 using content::BrowserThread;
30 using webkit_glue::PasswordForm; 31 using webkit_glue::PasswordForm;
31 32
32 // ---------------------------------------------------------------------------- 33 // ----------------------------------------------------------------------------
33 // LoginHandlerGtk 34 // LoginHandlerGtk
34 35
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 171 }
171 172
172 void LoginHandlerGtk::OnCancelClicked(GtkWidget* sender) { 173 void LoginHandlerGtk::OnCancelClicked(GtkWidget* sender) {
173 CancelAuth(); 174 CancelAuth();
174 } 175 }
175 176
176 void LoginHandlerGtk::OnPromptHierarchyChanged(GtkWidget* sender, 177 void LoginHandlerGtk::OnPromptHierarchyChanged(GtkWidget* sender,
177 GtkWidget* previous_toplevel) { 178 GtkWidget* previous_toplevel) {
178 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 179 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
179 180
180 if (!GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel(ok_))) 181 if (!gtk_widget_is_toplevel(gtk_widget_get_toplevel(ok_)))
181 return; 182 return;
182 183
183 // Now that we have attached ourself to the window, we can make our OK 184 // Now that we have attached ourself to the window, we can make our OK
184 // button the default action and mess with the focus. 185 // button the default action and mess with the focus.
185 gtk_widget_set_can_default(ok_, TRUE); 186 gtk_widget_set_can_default(ok_, TRUE);
186 gtk_widget_grab_default(ok_); 187 gtk_widget_grab_default(ok_);
187 } 188 }
188 189
189 // static 190 // static
190 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, 191 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info,
191 net::URLRequest* request) { 192 net::URLRequest* request) {
192 return new LoginHandlerGtk(auth_info, request); 193 return new LoginHandlerGtk(auth_info, request);
193 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | content/browser/renderer_host/gtk_window_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698