OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/tab_contents/chrome_interstitial_page.h" | 5 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" |
6 | 6 |
7 #include "chrome/browser/dom_operation_notification_details.h" | 7 #include "chrome/browser/dom_operation_notification_details.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/renderer_preferences_util.h" | 9 #include "chrome/browser/renderer_preferences_util.h" |
10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
11 #include "content/browser/tab_contents/tab_contents.h" | 11 #include "content/browser/tab_contents/tab_contents.h" |
12 #include "content/common/notification_service.h" | 12 #include "content/public/browser/notification_details.h" |
13 #include "content/public/browser/notification_source.h" | 13 #include "content/public/browser/notification_source.h" |
14 | 14 |
15 ChromeInterstitialPage::ChromeInterstitialPage(TabContents* tab, | 15 ChromeInterstitialPage::ChromeInterstitialPage(TabContents* tab, |
16 bool new_navigation, | 16 bool new_navigation, |
17 const GURL& url) | 17 const GURL& url) |
18 : InterstitialPage(tab, new_navigation, url) { | 18 : InterstitialPage(tab, new_navigation, url) { |
19 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); | 19 Profile* profile = Profile::FromBrowserContext(tab->browser_context()); |
20 RendererPreferences prefs; | 20 RendererPreferences prefs; |
21 renderer_preferences_util::UpdateFromSystemSettings(&prefs, profile); | 21 renderer_preferences_util::UpdateFromSystemSettings(&prefs, profile); |
22 set_renderer_preferences(prefs); | 22 set_renderer_preferences(prefs); |
(...skipping 16 matching lines...) Expand all Loading... |
39 const content::NotificationDetails& details) { | 39 const content::NotificationDetails& details) { |
40 if (chrome::NOTIFICATION_DOM_OPERATION_RESPONSE == type) { | 40 if (chrome::NOTIFICATION_DOM_OPERATION_RESPONSE == type) { |
41 if (enabled()) { | 41 if (enabled()) { |
42 content::Details<DomOperationNotificationDetails> dom_op_details(details); | 42 content::Details<DomOperationNotificationDetails> dom_op_details(details); |
43 CommandReceived(dom_op_details->json()); | 43 CommandReceived(dom_op_details->json()); |
44 } | 44 } |
45 return; | 45 return; |
46 } | 46 } |
47 InterstitialPage::Observe(type, source, details); | 47 InterstitialPage::Observe(type, source, details); |
48 } | 48 } |
OLD | NEW |