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

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

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return tab_util::GetWebContentsByID(render_process_host_id_, 125 return tab_util::GetWebContentsByID(render_process_host_id_,
126 tab_contents_id_); 126 tab_contents_id_);
127 } 127 }
128 128
129 RenderViewHostDelegate* LoginHandler::GetRenderViewHostDelegate() const { 129 RenderViewHostDelegate* LoginHandler::GetRenderViewHostDelegate() const {
130 RenderViewHost* rvh = RenderViewHost::FromID(render_process_host_id_, 130 RenderViewHost* rvh = RenderViewHost::FromID(render_process_host_id_,
131 tab_contents_id_); 131 tab_contents_id_);
132 if (!rvh) 132 if (!rvh)
133 return NULL; 133 return NULL;
134 134
135 return rvh->delegate(); 135 return rvh->GetDelegate();
136 } 136 }
137 137
138 void LoginHandler::SetAuth(const string16& username, 138 void LoginHandler::SetAuth(const string16& username,
139 const string16& password) { 139 const string16& password) {
140 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 140 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
141 141
142 if (TestAndSetAuthHandled()) 142 if (TestAndSetAuthHandled())
143 return; 143 return;
144 144
145 // Tell the password manager the credentials were submitted / accepted. 145 // Tell the password manager the credentials were submitted / accepted.
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 479
480 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, 480 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info,
481 net::URLRequest* request) { 481 net::URLRequest* request) {
482 LoginHandler* handler = LoginHandler::Create(auth_info, request); 482 LoginHandler* handler = LoginHandler::Create(auth_info, request);
483 BrowserThread::PostTask( 483 BrowserThread::PostTask(
484 BrowserThread::UI, FROM_HERE, 484 BrowserThread::UI, FROM_HERE,
485 base::Bind(&LoginDialogCallback, request->url(), 485 base::Bind(&LoginDialogCallback, request->url(),
486 make_scoped_refptr(auth_info), make_scoped_refptr(handler))); 486 make_scoped_refptr(auth_info), make_scoped_refptr(handler)));
487 return handler; 487 return handler;
488 } 488 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc ('k') | chrome/browser/ui/login/login_prompt_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698