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/ui/browser_tab_contents.h" | 5 #include "chrome/browser/ui/browser_tab_contents.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
9 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 9 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
10 #include "chrome/browser/extensions/tab_helper.h" | 10 #include "chrome/browser/extensions/tab_helper.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "chrome/browser/ui/hung_plugin_tab_helper.h" | 35 #include "chrome/browser/ui/hung_plugin_tab_helper.h" |
36 #include "chrome/browser/ui/pdf/pdf_tab_helper.h" | 36 #include "chrome/browser/ui/pdf/pdf_tab_helper.h" |
37 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 37 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
38 #include "chrome/browser/ui/sad_tab_helper.h" | 38 #include "chrome/browser/ui/sad_tab_helper.h" |
39 #include "chrome/browser/ui/search/search_tab_helper.h" | 39 #include "chrome/browser/ui/search/search_tab_helper.h" |
40 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" | 40 #include "chrome/browser/ui/search_engines/search_engine_tab_helper.h" |
41 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 41 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
42 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 42 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
43 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | 43 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
44 #include "chrome/browser/ui/zoom/zoom_controller.h" | 44 #include "chrome/browser/ui/zoom/zoom_controller.h" |
45 #include "chrome/browser/view_type_utils.h" | |
46 #include "chrome/common/chrome_switches.h" | 45 #include "chrome/common/chrome_switches.h" |
47 #include "components/autofill/browser/autofill_external_delegate.h" | 46 #include "components/autofill/browser/autofill_external_delegate.h" |
48 #include "components/autofill/browser/autofill_manager.h" | 47 #include "components/autofill/browser/autofill_manager.h" |
49 #include "content/public/browser/web_contents.h" | 48 #include "content/public/browser/web_contents.h" |
| 49 #include "extensions/browser/view_type_utils.h" |
50 | 50 |
51 #if defined(ENABLE_AUTOMATION) | 51 #if defined(ENABLE_AUTOMATION) |
52 #include "chrome/browser/automation/automation_tab_helper.h" | 52 #include "chrome/browser/automation/automation_tab_helper.h" |
53 #endif | 53 #endif |
54 | 54 |
55 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 55 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
56 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 56 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
57 #endif | 57 #endif |
58 | 58 |
59 #if defined(ENABLE_PRINTING) | 59 #if defined(ENABLE_PRINTING) |
(...skipping 24 matching lines...) Expand all Loading... |
84 base::SupportsUserData::Data* adoption_tag = | 84 base::SupportsUserData::Data* adoption_tag = |
85 web_contents->GetUserData(&kTabContentsAttachedTabHelpersUserDataKey); | 85 web_contents->GetUserData(&kTabContentsAttachedTabHelpersUserDataKey); |
86 if (adoption_tag) | 86 if (adoption_tag) |
87 return; | 87 return; |
88 | 88 |
89 // Mark as adopted. | 89 // Mark as adopted. |
90 web_contents->SetUserData(&kTabContentsAttachedTabHelpersUserDataKey, | 90 web_contents->SetUserData(&kTabContentsAttachedTabHelpersUserDataKey, |
91 new base::SupportsUserData::Data()); | 91 new base::SupportsUserData::Data()); |
92 | 92 |
93 // Set the view type. | 93 // Set the view type. |
94 chrome::SetViewType(web_contents, chrome::VIEW_TYPE_TAB_CONTENTS); | 94 extensions::SetViewType(web_contents, extensions::VIEW_TYPE_TAB_CONTENTS); |
95 | 95 |
96 // Create all the tab helpers. | 96 // Create all the tab helpers. |
97 | 97 |
98 Profile* profile = | 98 Profile* profile = |
99 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 99 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
100 | 100 |
101 // SessionTabHelper comes first because it sets up the tab ID, and other | 101 // SessionTabHelper comes first because it sets up the tab ID, and other |
102 // helpers may rely on that. | 102 // helpers may rely on that. |
103 SessionTabHelper::CreateForWebContents(web_contents); | 103 SessionTabHelper::CreateForWebContents(web_contents); |
104 | 104 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 if (OneClickSigninHelper::CanOffer( | 173 if (OneClickSigninHelper::CanOffer( |
174 web_contents, OneClickSigninHelper::CAN_OFFER_FOR_ALL, "", NULL)) { | 174 web_contents, OneClickSigninHelper::CAN_OFFER_FOR_ALL, "", NULL)) { |
175 OneClickSigninHelper::CreateForWebContents(web_contents); | 175 OneClickSigninHelper::CreateForWebContents(web_contents); |
176 } | 176 } |
177 #endif | 177 #endif |
178 | 178 |
179 #if defined(OS_WIN) | 179 #if defined(OS_WIN) |
180 MetroPinTabHelper::CreateForWebContents(web_contents); | 180 MetroPinTabHelper::CreateForWebContents(web_contents); |
181 #endif | 181 #endif |
182 } | 182 } |
OLD | NEW |