OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/login/merge_session_load_page.h" | 5 #include "chrome/browser/chromeos/login/merge_session_load_page.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Delay time for showing interstitial page. | 44 // Delay time for showing interstitial page. |
45 const int kShowDelayTimeMS = 1000; | 45 const int kShowDelayTimeMS = 1000; |
46 | 46 |
47 // Maximum time for showing interstitial page. | 47 // Maximum time for showing interstitial page. |
48 const int kTotalWaitTimeMS = 10000; | 48 const int kTotalWaitTimeMS = 10000; |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 namespace chromeos { | 52 namespace chromeos { |
53 | 53 |
54 MergeSessionLoadPage::MergeSessionLoadPage(WebContents* web_contents, | 54 MergeSessionLoadPage::MergeSessionLoadPage( |
55 const GURL& url, | 55 WebContents* web_contents, |
56 const CompletionCallback& callback) | 56 const GURL& url, |
| 57 const MergeSessionThrottle::CompletionCallback& callback) |
57 : callback_(callback), | 58 : callback_(callback), |
58 proceeded_(false), | 59 proceeded_(false), |
59 web_contents_(web_contents), | 60 web_contents_(web_contents), |
60 url_(url) { | 61 url_(url) { |
61 interstitial_page_ = InterstitialPage::Create(web_contents, true, url, this); | 62 interstitial_page_ = InterstitialPage::Create(web_contents, true, url, this); |
62 } | 63 } |
63 | 64 |
64 MergeSessionLoadPage::~MergeSessionLoadPage() { | 65 MergeSessionLoadPage::~MergeSessionLoadPage() { |
65 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 66 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
66 } | 67 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 " NOT " : "") | 163 " NOT " : "") |
163 << " be blocking now, " | 164 << " be blocking now, " |
164 << state; | 165 << state; |
165 if (!manager->ShouldBlockTabLoading()) { | 166 if (!manager->ShouldBlockTabLoading()) { |
166 manager->RemoveObserver(this); | 167 manager->RemoveObserver(this); |
167 interstitial_page_->Proceed(); | 168 interstitial_page_->Proceed(); |
168 } | 169 } |
169 } | 170 } |
170 | 171 |
171 } // namespace chromeos | 172 } // namespace chromeos |
OLD | NEW |