| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
| 6 | 6 |
| 7 #include "app/gfx/text_elider.h" | 7 #include "app/gfx/text_elider.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "base/file_version_info.h" | 10 #include "base/file_version_info.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 capturing_contents_(false), | 252 capturing_contents_(false), |
| 253 is_being_destroyed_(false), | 253 is_being_destroyed_(false), |
| 254 notify_disconnection_(false), | 254 notify_disconnection_(false), |
| 255 history_requests_(), | 255 history_requests_(), |
| 256 #if defined(OS_WIN) | 256 #if defined(OS_WIN) |
| 257 message_box_active_(CreateEvent(NULL, TRUE, FALSE, NULL)), | 257 message_box_active_(CreateEvent(NULL, TRUE, FALSE, NULL)), |
| 258 #endif | 258 #endif |
| 259 last_javascript_message_dismissal_(), | 259 last_javascript_message_dismissal_(), |
| 260 suppress_javascript_messages_(false), | 260 suppress_javascript_messages_(false), |
| 261 is_showing_before_unload_dialog_(false), | 261 is_showing_before_unload_dialog_(false), |
| 262 renderer_preferences_(platform_util::GetInitedRendererPreferences()), | 262 renderer_preferences_( |
| 263 platform_util::GetInitedRendererPreferences(profile)), |
| 263 opener_dom_ui_type_(DOMUIFactory::kNoDOMUI) { | 264 opener_dom_ui_type_(DOMUIFactory::kNoDOMUI) { |
| 264 #if defined(OS_CHROMEOS) | 265 #if defined(OS_CHROMEOS) |
| 265 // Make sure the thumbnailer is started before starting the render manager. | 266 // Make sure the thumbnailer is started before starting the render manager. |
| 266 // The thumbnailer will want to listen for RVH creations, one of which will | 267 // The thumbnailer will want to listen for RVH creations, one of which will |
| 267 // happen in RVHManager::Init. | 268 // happen in RVHManager::Init. |
| 268 ThumbnailGenerator* generator = g_browser_process->GetThumbnailGenerator(); | 269 ThumbnailGenerator* generator = g_browser_process->GetThumbnailGenerator(); |
| 269 if (generator) | 270 if (generator) |
| 270 generator->StartThumbnailing(); | 271 generator->StartThumbnailing(); |
| 271 #endif | 272 #endif |
| 272 | 273 |
| (...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 form_field_history_manager_.reset(new FormFieldHistoryManager(this)); | 1876 form_field_history_manager_.reset(new FormFieldHistoryManager(this)); |
| 1876 return form_field_history_manager_.get(); | 1877 return form_field_history_manager_.get(); |
| 1877 } | 1878 } |
| 1878 | 1879 |
| 1879 RenderViewHostDelegate::AutoFill* TabContents::GetAutoFillDelegate() { | 1880 RenderViewHostDelegate::AutoFill* TabContents::GetAutoFillDelegate() { |
| 1880 if (autofill_manager_.get() == NULL) | 1881 if (autofill_manager_.get() == NULL) |
| 1881 autofill_manager_.reset(new AutoFillManager(this)); | 1882 autofill_manager_.reset(new AutoFillManager(this)); |
| 1882 return autofill_manager_.get(); | 1883 return autofill_manager_.get(); |
| 1883 } | 1884 } |
| 1884 | 1885 |
| 1885 RendererPreferences TabContents::GetRendererPrefs() const { | 1886 RendererPreferences TabContents::GetRendererPrefs(Profile* profile) const { |
| 1886 return renderer_preferences_; | 1887 return renderer_preferences_; |
| 1887 } | 1888 } |
| 1888 | 1889 |
| 1889 TabContents* TabContents::GetAsTabContents() { | 1890 TabContents* TabContents::GetAsTabContents() { |
| 1890 return this; | 1891 return this; |
| 1891 } | 1892 } |
| 1892 | 1893 |
| 1893 void TabContents::AddBlockedNotice(const GURL& url, const string16& reason) { | 1894 void TabContents::AddBlockedNotice(const GURL& url, const string16& reason) { |
| 1894 CreateBlockedPopupContainerIfNecessary(); | 1895 CreateBlockedPopupContainerIfNecessary(); |
| 1895 blocked_popups_->AddBlockedNotice(url, reason); | 1896 blocked_popups_->AddBlockedNotice(url, reason); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2638 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt); | 2639 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt); |
| 2639 } | 2640 } |
| 2640 | 2641 |
| 2641 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) { | 2642 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) { |
| 2642 set_suppress_javascript_messages(suppress_message_boxes); | 2643 set_suppress_javascript_messages(suppress_message_boxes); |
| 2643 } | 2644 } |
| 2644 | 2645 |
| 2645 void TabContents::set_encoding(const std::string& encoding) { | 2646 void TabContents::set_encoding(const std::string& encoding) { |
| 2646 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); | 2647 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); |
| 2647 } | 2648 } |
| OLD | NEW |