| 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 "content/public/browser/interstitial_page.h" | 11 #include "content/public/browser/interstitial_page.h" |
| 12 #include "content/public/browser/interstitial_page_delegate.h" | 12 #include "content/public/browser/interstitial_page_delegate.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 class LoginHandler; | 15 class LoginHandler; |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 struct SSLStatus; |
| 18 class WebContents; | 19 class WebContents; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 class AuthChallengeInfo; | 23 class AuthChallengeInfo; |
| 23 } | 24 } |
| 24 | 25 |
| 25 // Placeholder interstitial for HTTP login prompts. This interstitial makes the | 26 // Placeholder interstitial for HTTP login prompts. This interstitial makes the |
| 26 // omnibox show the correct url when the login prompt is visible. | 27 // omnibox show the correct url when the login prompt is visible. |
| 27 class LoginInterstitialDelegate : public content::InterstitialPageDelegate { | 28 class LoginInterstitialDelegate : public content::InterstitialPageDelegate { |
| 28 public: | 29 public: |
| 29 LoginInterstitialDelegate(content::WebContents* web_contents, | 30 LoginInterstitialDelegate(content::WebContents* web_contents, |
| 30 const GURL& request_url, | 31 const GURL& request_url, |
| 32 const content::SSLStatus& ssl_status, |
| 31 base::Closure& callback); | 33 base::Closure& callback); |
| 32 | 34 |
| 33 virtual ~LoginInterstitialDelegate(); | 35 virtual ~LoginInterstitialDelegate(); |
| 34 | 36 |
| 35 // content::InterstitialPageDelegate: | 37 // content::InterstitialPageDelegate: |
| 36 virtual void CommandReceived(const std::string& command) OVERRIDE; | 38 virtual void CommandReceived(const std::string& command) OVERRIDE; |
| 37 | 39 |
| 38 protected: | 40 protected: |
| 39 virtual std::string GetHTMLContents() OVERRIDE; | 41 virtual std::string GetHTMLContents() OVERRIDE; |
| 42 virtual void OverrideEntry(content::NavigationEntry* entry) OVERRIDE; |
| 40 | 43 |
| 41 private: | 44 private: |
| 45 content::WebContents* web_contents_; |
| 46 const content::SSLStatus& ssl_status_; |
| 42 base::Closure callback_; | 47 base::Closure callback_; |
| 43 | 48 |
| 44 DISALLOW_COPY_AND_ASSIGN(LoginInterstitialDelegate); | 49 DISALLOW_COPY_AND_ASSIGN(LoginInterstitialDelegate); |
| 45 }; | 50 }; |
| 46 | 51 |
| 47 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ | 52 #endif // CHROME_BROWSER_UI_LOGIN_LOGIN_INTERSTITIAL_DELEGATE_H_ |
| OLD | NEW |