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/android/tab_android.h" | 5 #include "chrome/browser/android/tab_android.h" |
6 | 6 |
7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 7 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
8 #include "chrome/browser/extensions/tab_helper.h" | 8 #include "chrome/browser/extensions/tab_helper.h" |
9 #include "chrome/browser/favicon/favicon_tab_helper.h" | 9 #include "chrome/browser/favicon/favicon_tab_helper.h" |
10 #include "chrome/browser/history/history_tab_helper.h" | 10 #include "chrome/browser/history/history_tab_helper.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 base::SupportsUserData::Data* initialization_tag = | 47 base::SupportsUserData::Data* initialization_tag = |
48 contents->GetUserData(&kTabHelpersInitializedUserDataKey); | 48 contents->GetUserData(&kTabHelpersInitializedUserDataKey); |
49 if (initialization_tag) | 49 if (initialization_tag) |
50 return; | 50 return; |
51 | 51 |
52 // Mark as initialized. | 52 // Mark as initialized. |
53 contents->SetUserData(&kTabHelpersInitializedUserDataKey, | 53 contents->SetUserData(&kTabHelpersInitializedUserDataKey, |
54 new base::SupportsUserData::Data()); | 54 new base::SupportsUserData::Data()); |
55 | 55 |
56 // Set the view type. | 56 // Set the view type. |
57 chrome::SetViewType(contents, chrome::VIEW_TYPE_TAB_CONTENTS); | 57 chrome::SetViewType(contents, extensions::VIEW_TYPE_TAB_CONTENTS); |
58 | 58 |
59 // SessionTabHelper comes first because it sets up the tab ID, and other | 59 // SessionTabHelper comes first because it sets up the tab ID, and other |
60 // helpers may rely on that. | 60 // helpers may rely on that. |
61 SessionTabHelper::CreateForWebContents(contents); | 61 SessionTabHelper::CreateForWebContents(contents); |
62 | 62 |
63 AlternateErrorPageTabObserver::CreateForWebContents(contents); | 63 AlternateErrorPageTabObserver::CreateForWebContents(contents); |
64 autofill::TabAutofillManagerDelegate::CreateForWebContents(contents); | 64 autofill::TabAutofillManagerDelegate::CreateForWebContents(contents); |
65 AutofillManager::CreateForWebContentsAndDelegate( | 65 AutofillManager::CreateForWebContentsAndDelegate( |
66 contents, | 66 contents, |
67 autofill::TabAutofillManagerDelegate::FromWebContents(contents)); | 67 autofill::TabAutofillManagerDelegate::FromWebContents(contents)); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 ToolbarModel::SecurityLevel TabAndroid::GetSecurityLevel() { | 126 ToolbarModel::SecurityLevel TabAndroid::GetSecurityLevel() { |
127 return ToolbarModelImpl::GetSecurityLevelForWebContents(GetWebContents()); | 127 return ToolbarModelImpl::GetSecurityLevelForWebContents(GetWebContents()); |
128 } | 128 } |
129 | 129 |
130 void TabAndroid::RunExternalProtocolDialog(const GURL& url) { | 130 void TabAndroid::RunExternalProtocolDialog(const GURL& url) { |
131 } | 131 } |
132 | 132 |
133 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { | 133 bool TabAndroid::RegisterTabAndroid(JNIEnv* env) { |
134 return RegisterNativesImpl(env); | 134 return RegisterNativesImpl(env); |
135 } | 135 } |
OLD | NEW |