OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "content/public/browser/interstitial_page.h" | 13 #include "content/public/browser/interstitial_page.h" |
14 #include "content/public/browser/interstitial_page_delegate.h" | 14 #include "content/public/browser/interstitial_page_delegate.h" |
15 #include "url/gurl.h" | 15 #include "url/gurl.h" |
16 | 16 |
17 class LoginHandler; | |
18 | |
19 namespace content { | 17 namespace content { |
20 class WebContents; | 18 class WebContents; |
21 } | 19 } |
22 | 20 |
23 namespace net { | |
24 class AuthChallengeInfo; | |
25 } | |
26 | |
27 // Placeholder interstitial for HTTP login prompts. This interstitial makes the | 21 // Placeholder interstitial for HTTP login prompts. This interstitial makes the |
28 // omnibox show the correct url when the login prompt is visible. | 22 // omnibox show the correct url when the login prompt is visible. |
29 class LoginInterstitialDelegate : public content::InterstitialPageDelegate { | 23 class LoginInterstitialDelegate : public content::InterstitialPageDelegate { |
30 public: | 24 public: |
31 // Interstitial type, used in tests. | 25 // Interstitial type, used in tests. |
32 static content::InterstitialPageDelegate::TypeID kTypeForTesting; | 26 static content::InterstitialPageDelegate::TypeID kTypeForTesting; |
33 | 27 |
34 LoginInterstitialDelegate(content::WebContents* web_contents, | 28 LoginInterstitialDelegate(content::WebContents* web_contents, |
35 const GURL& request_url, | 29 const GURL& request_url, |
36 base::Closure& callback); | 30 base::Closure& callback); |
(...skipping 13 matching lines...) Expand all Loading... |
50 | 44 |
51 private: | 45 private: |
52 base::Closure callback_; | 46 base::Closure callback_; |
53 content::InterstitialPage* interstitial_page_; | 47 content::InterstitialPage* interstitial_page_; |
54 base::WeakPtrFactory<LoginInterstitialDelegate> weak_ptr_factory_; | 48 base::WeakPtrFactory<LoginInterstitialDelegate> weak_ptr_factory_; |
55 | 49 |
56 DISALLOW_COPY_AND_ASSIGN(LoginInterstitialDelegate); | 50 DISALLOW_COPY_AND_ASSIGN(LoginInterstitialDelegate); |
57 }; | 51 }; |
58 | 52 |
59 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ | 53 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ |
OLD | NEW |