OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/web_contents.h" | 5 #include "chrome/browser/tab_contents/web_contents.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "chrome/browser/password_manager/password_manager.h" | 27 #include "chrome/browser/password_manager/password_manager.h" |
28 #include "chrome/browser/plugin_installer.h" | 28 #include "chrome/browser/plugin_installer.h" |
29 #include "chrome/browser/plugin_service.h" | 29 #include "chrome/browser/plugin_service.h" |
30 #include "chrome/browser/printing/print_job.h" | 30 #include "chrome/browser/printing/print_job.h" |
31 #include "chrome/browser/renderer_host/render_view_host.h" | 31 #include "chrome/browser/renderer_host/render_view_host.h" |
32 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 32 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
33 #include "chrome/browser/search_engines/template_url_fetcher.h" | 33 #include "chrome/browser/search_engines/template_url_fetcher.h" |
34 #include "chrome/browser/search_engines/template_url_model.h" | 34 #include "chrome/browser/search_engines/template_url_model.h" |
35 #include "chrome/browser/tab_contents/navigation_entry.h" | 35 #include "chrome/browser/tab_contents/navigation_entry.h" |
36 #include "chrome/browser/tab_contents/web_contents_view.h" | 36 #include "chrome/browser/tab_contents/web_contents_view.h" |
37 #include "chrome/browser/tab_contents/web_contents_view_win.h" | |
38 #include "chrome/browser/views/hung_renderer_view.h" // TODO(brettw) delete me. | 37 #include "chrome/browser/views/hung_renderer_view.h" // TODO(brettw) delete me. |
39 #include "chrome/common/chrome_switches.h" | 38 #include "chrome/common/chrome_switches.h" |
40 #include "chrome/common/l10n_util.h" | 39 #include "chrome/common/l10n_util.h" |
41 #include "chrome/common/pref_names.h" | 40 #include "chrome/common/pref_names.h" |
42 #include "chrome/common/pref_service.h" | 41 #include "chrome/common/pref_service.h" |
43 #include "chrome/common/resource_bundle.h" | 42 #include "chrome/common/resource_bundle.h" |
44 #include "net/base/mime_util.h" | 43 #include "net/base/mime_util.h" |
45 #include "net/base/registry_controlled_domain.h" | 44 #include "net/base/registry_controlled_domain.h" |
46 #include "webkit/glue/webkit_glue.h" | 45 #include "webkit/glue/webkit_glue.h" |
47 | 46 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 private: | 172 private: |
174 WebContents* contents_; | 173 WebContents* contents_; |
175 }; | 174 }; |
176 | 175 |
177 WebContents::WebContents(Profile* profile, | 176 WebContents::WebContents(Profile* profile, |
178 SiteInstance* site_instance, | 177 SiteInstance* site_instance, |
179 RenderViewHostFactory* render_view_factory, | 178 RenderViewHostFactory* render_view_factory, |
180 int routing_id, | 179 int routing_id, |
181 base::WaitableEvent* modal_dialog_event) | 180 base::WaitableEvent* modal_dialog_event) |
182 : TabContents(TAB_CONTENTS_WEB), | 181 : TabContents(TAB_CONTENTS_WEB), |
183 view_(new WebContentsViewWin(this)), | 182 view_(WebContentsView::Create(this)), |
184 ALLOW_THIS_IN_INITIALIZER_LIST( | 183 ALLOW_THIS_IN_INITIALIZER_LIST( |
185 render_manager_(render_view_factory, this, this)), | 184 render_manager_(render_view_factory, this, this)), |
186 render_view_factory_(render_view_factory), | 185 render_view_factory_(render_view_factory), |
187 received_page_title_(false), | 186 received_page_title_(false), |
188 is_starred_(false), | 187 is_starred_(false), |
189 printing_(*this), | 188 printing_(*this), |
190 notify_disconnection_(false), | 189 notify_disconnection_(false), |
191 message_box_active_(CreateEvent(NULL, TRUE, FALSE, NULL)), | 190 message_box_active_(CreateEvent(NULL, TRUE, FALSE, NULL)), |
192 ALLOW_THIS_IN_INITIALIZER_LIST(fav_icon_helper_(this)), | 191 ALLOW_THIS_IN_INITIALIZER_LIST(fav_icon_helper_(this)), |
193 suppress_javascript_messages_(false), | 192 suppress_javascript_messages_(false), |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 // The favicon url isn't valid. This means there really isn't a favicon, | 1771 // The favicon url isn't valid. This means there really isn't a favicon, |
1773 // or the favicon url wasn't obtained before the load started. This assumes | 1772 // or the favicon url wasn't obtained before the load started. This assumes |
1774 // the later. | 1773 // the later. |
1775 // TODO(sky): Need a way to set the favicon that doesn't involve generating | 1774 // TODO(sky): Need a way to set the favicon that doesn't involve generating |
1776 // its url. | 1775 // its url. |
1777 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); | 1776 new_url->SetFavIconURL(TemplateURL::GenerateFaviconURL(params.referrer)); |
1778 } | 1777 } |
1779 new_url->set_safe_for_autoreplace(true); | 1778 new_url->set_safe_for_autoreplace(true); |
1780 url_model->Add(new_url); | 1779 url_model->Add(new_url); |
1781 } | 1780 } |
OLD | NEW |