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_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_LOAD_PAGE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_LOAD_PAGE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_LOAD_PAGE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_LOAD_PAGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // Create a merge session load delay page for the |web_contents|. | 40 // Create a merge session load delay page for the |web_contents|. |
41 // The |callback| will be run on the IO thread. | 41 // The |callback| will be run on the IO thread. |
42 MergeSessionLoadPage( | 42 MergeSessionLoadPage( |
43 content::WebContents* web_contents, | 43 content::WebContents* web_contents, |
44 const GURL& url, | 44 const GURL& url, |
45 const MergeSessionThrottle::CompletionCallback& callback); | 45 const MergeSessionThrottle::CompletionCallback& callback); |
46 | 46 |
47 void Show(); | 47 void Show(); |
48 | 48 |
49 protected: | 49 protected: |
50 virtual ~MergeSessionLoadPage(); | 50 ~MergeSessionLoadPage() override; |
51 | 51 |
52 private: | 52 private: |
53 friend class TestMergeSessionLoadPage; | 53 friend class TestMergeSessionLoadPage; |
54 | 54 |
55 // InterstitialPageDelegate implementation. | 55 // InterstitialPageDelegate implementation. |
56 virtual std::string GetHTMLContents() override; | 56 std::string GetHTMLContents() override; |
57 virtual void CommandReceived(const std::string& command) override; | 57 void CommandReceived(const std::string& command) override; |
58 virtual void OverrideRendererPrefs( | 58 void OverrideRendererPrefs(content::RendererPreferences* prefs) override; |
59 content::RendererPreferences* prefs) override; | 59 void OnProceed() override; |
60 virtual void OnProceed() override; | 60 void OnDontProceed() override; |
61 virtual void OnDontProceed() override; | |
62 | 61 |
63 // OAuth2LoginManager::Observer overrides. | 62 // OAuth2LoginManager::Observer overrides. |
64 virtual void OnSessionRestoreStateChanged( | 63 void OnSessionRestoreStateChanged( |
65 Profile* user_profile, | 64 Profile* user_profile, |
66 OAuth2LoginManager::SessionRestoreState state) override; | 65 OAuth2LoginManager::SessionRestoreState state) override; |
67 | 66 |
68 void NotifyBlockingPageComplete(); | 67 void NotifyBlockingPageComplete(); |
69 | 68 |
70 // Helper function to get OAuth2LoginManager out of |web_contents_|. | 69 // Helper function to get OAuth2LoginManager out of |web_contents_|. |
71 OAuth2LoginManager* GetOAuth2LoginManager(); | 70 OAuth2LoginManager* GetOAuth2LoginManager(); |
72 | 71 |
73 MergeSessionThrottle::CompletionCallback callback_; | 72 MergeSessionThrottle::CompletionCallback callback_; |
74 | 73 |
75 // True if the proceed is chosen. | 74 // True if the proceed is chosen. |
76 bool proceeded_; | 75 bool proceeded_; |
77 | 76 |
78 content::WebContents* web_contents_; | 77 content::WebContents* web_contents_; |
79 GURL url_; | 78 GURL url_; |
80 content::InterstitialPage* interstitial_page_; // Owns us. | 79 content::InterstitialPage* interstitial_page_; // Owns us. |
81 | 80 |
82 DISALLOW_COPY_AND_ASSIGN(MergeSessionLoadPage); | 81 DISALLOW_COPY_AND_ASSIGN(MergeSessionLoadPage); |
83 }; | 82 }; |
84 | 83 |
85 } // namespace chromeos | 84 } // namespace chromeos |
86 | 85 |
87 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_LOAD_PAGE_H_ | 86 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_MERGE_SESSION_LOAD_PAGE_H_ |
OLD | NEW |