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/managed_mode/managed_mode_interstitial.h" | 5 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" | 8 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" |
9 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/tab_contents/tab_util.h" | 11 #include "chrome/browser/tab_contents/tab_util.h" |
12 #include "chrome/browser/ui/webui/web_ui_util.h" | 12 #include "chrome/browser/ui/webui/web_ui_util.h" |
13 #include "chrome/common/jstemplate_builder.h" | |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
15 #include "chrome/common/url_constants.h" | 14 #include "chrome/common/url_constants.h" |
16 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/interstitial_page.h" | 16 #include "content/public/browser/interstitial_page.h" |
18 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
19 #include "content/public/browser/web_contents_delegate.h" | 18 #include "content/public/browser/web_contents_delegate.h" |
20 #include "grit/browser_resources.h" | 19 #include "grit/browser_resources.h" |
21 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
22 #include "net/base/net_util.h" | 21 #include "net/base/net_util.h" |
23 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 24 #include "ui/webui/jstemplate_builder.h" |
25 | 25 |
26 using content::BrowserThread; | 26 using content::BrowserThread; |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 void ShowInterstitialOnUIThread(int render_process_host_id, | 30 void ShowInterstitialOnUIThread(int render_process_host_id, |
31 int render_view_id, | 31 int render_view_id, |
32 const GURL& url, | 32 const GURL& url, |
33 const base::Callback<void(bool)>& callback) { | 33 const base::Callback<void(bool)>& callback) { |
34 // The tab might have been closed. | 34 // The tab might have been closed. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 void ManagedModeInterstitial::OnDontProceed() { | 141 void ManagedModeInterstitial::OnDontProceed() { |
142 DispatchContinueRequest(false); | 142 DispatchContinueRequest(false); |
143 } | 143 } |
144 | 144 |
145 void ManagedModeInterstitial::DispatchContinueRequest(bool continue_request) { | 145 void ManagedModeInterstitial::DispatchContinueRequest(bool continue_request) { |
146 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 146 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
147 base::Bind(callback_, continue_request)); | 147 base::Bind(callback_, continue_request)); |
148 } | 148 } |
149 | 149 |
OLD | NEW |