OLD | NEW |
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 "base/string16.h" | 7 #include "base/string16.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/password_manager/password_manager.h" | 9 #include "chrome/browser/password_manager/password_manager.h" |
10 #include "chrome/browser/tab_contents/tab_util.h" | 10 #include "chrome/browser/tab_contents/tab_util.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Scary thread safety note: This can potentially be called *after* SetAuth | 130 // Scary thread safety note: This can potentially be called *after* SetAuth |
131 // or CancelAuth (say, if the request was cancelled before the UI thread got | 131 // or CancelAuth (say, if the request was cancelled before the UI thread got |
132 // control). However, that's OK since any UI interaction in those functions | 132 // control). However, that's OK since any UI interaction in those functions |
133 // will occur via an InvokeLater on the UI thread, which is guaranteed | 133 // will occur via an InvokeLater on the UI thread, which is guaranteed |
134 // to happen after this is called (since this was InvokeLater'd first). | 134 // to happen after this is called (since this was InvokeLater'd first). |
135 WebContents* requesting_contents = GetWebContentsForLogin(); | 135 WebContents* requesting_contents = GetWebContentsForLogin(); |
136 SetDialog(new ConstrainedWindowViews( | 136 SetDialog(new ConstrainedWindowViews( |
137 requesting_contents, | 137 requesting_contents, |
138 this, | 138 this, |
139 enable_chrome_style_, | 139 enable_chrome_style_, |
140 ConstrainedWindowViews::DEFAULT_INSETS)); | 140 ConstrainedWindowViews::FRAME_LAYOUT_FULL)); |
141 NotifyAuthNeeded(); | 141 NotifyAuthNeeded(); |
142 } | 142 } |
143 | 143 |
144 private: | 144 private: |
145 friend class base::RefCountedThreadSafe<LoginHandlerViews>; | 145 friend class base::RefCountedThreadSafe<LoginHandlerViews>; |
146 friend class LoginPrompt; | 146 friend class LoginPrompt; |
147 | 147 |
148 ~LoginHandlerViews() {} | 148 ~LoginHandlerViews() {} |
149 | 149 |
150 bool enable_chrome_style_; | 150 bool enable_chrome_style_; |
151 | 151 |
152 // The LoginView that contains the user's login information | 152 // The LoginView that contains the user's login information |
153 LoginView* login_view_; | 153 LoginView* login_view_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(LoginHandlerViews); | 155 DISALLOW_COPY_AND_ASSIGN(LoginHandlerViews); |
156 }; | 156 }; |
157 | 157 |
158 // static | 158 // static |
159 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, | 159 LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info, |
160 net::URLRequest* request) { | 160 net::URLRequest* request) { |
161 return new LoginHandlerViews(auth_info, request); | 161 return new LoginHandlerViews(auth_info, request); |
162 } | 162 } |
OLD | NEW |