| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
| 8 // For GdkScreen | 8 // For GdkScreen |
| 9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
| 10 #endif // defined(OS_CHROMEOS) | 10 #endif // defined(OS_CHROMEOS) |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 load_state_(net::LOAD_STATE_IDLE), | 263 load_state_(net::LOAD_STATE_IDLE), |
| 264 load_state_host_(), | 264 load_state_host_(), |
| 265 upload_size_(0), | 265 upload_size_(0), |
| 266 upload_position_(0), | 266 upload_position_(0), |
| 267 received_page_title_(false), | 267 received_page_title_(false), |
| 268 is_starred_(false), | 268 is_starred_(false), |
| 269 contents_mime_type_(), | 269 contents_mime_type_(), |
| 270 encoding_(), | 270 encoding_(), |
| 271 blocked_popups_(NULL), | 271 blocked_popups_(NULL), |
| 272 dont_notify_render_view_(false), | 272 dont_notify_render_view_(false), |
| 273 displayed_insecure_content_(false), |
| 273 infobar_delegates_(), | 274 infobar_delegates_(), |
| 274 find_ui_active_(false), | 275 find_ui_active_(false), |
| 275 find_op_aborted_(false), | 276 find_op_aborted_(false), |
| 276 current_find_request_id_(find_request_id_counter_++), | 277 current_find_request_id_(find_request_id_counter_++), |
| 277 last_search_case_sensitive_(false), | 278 last_search_case_sensitive_(false), |
| 278 last_search_result_(), | 279 last_search_result_(), |
| 279 extension_app_(NULL), | 280 extension_app_(NULL), |
| 280 extension_app_for_current_page_(NULL), | 281 extension_app_for_current_page_(NULL), |
| 281 capturing_contents_(false), | 282 capturing_contents_(false), |
| 282 is_being_destroyed_(false), | 283 is_being_destroyed_(false), |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 AutoReset auto_reset(&dont_notify_render_view_, true); | 1576 AutoReset auto_reset(&dont_notify_render_view_, true); |
| 1576 blocked_popups_->Destroy(); | 1577 blocked_popups_->Destroy(); |
| 1577 blocked_popups_ = NULL; | 1578 blocked_popups_ = NULL; |
| 1578 } | 1579 } |
| 1579 | 1580 |
| 1580 // Clear "blocked" flags. | 1581 // Clear "blocked" flags. |
| 1581 ClearBlockedContentSettings(); | 1582 ClearBlockedContentSettings(); |
| 1582 geolocation_settings_state_.DidNavigate(details); | 1583 geolocation_settings_state_.DidNavigate(details); |
| 1583 if (delegate_) | 1584 if (delegate_) |
| 1584 delegate_->OnContentSettingsChange(this); | 1585 delegate_->OnContentSettingsChange(this); |
| 1586 |
| 1587 // Once the main frame is navigated, we're no longer considered to have |
| 1588 // displayed insecure content. |
| 1589 displayed_insecure_content_ = false; |
| 1585 } | 1590 } |
| 1586 | 1591 |
| 1587 // Close constrained windows if necessary. | 1592 // Close constrained windows if necessary. |
| 1588 if (!net::RegistryControlledDomainService::SameDomainOrHost( | 1593 if (!net::RegistryControlledDomainService::SameDomainOrHost( |
| 1589 details.previous_url, details.entry->url())) | 1594 details.previous_url, details.entry->url())) |
| 1590 CloseConstrainedWindows(); | 1595 CloseConstrainedWindows(); |
| 1591 | 1596 |
| 1592 // Update the starred state. | 1597 // Update the starred state. |
| 1593 UpdateStarredStateForCurrentURL(); | 1598 UpdateStarredStateForCurrentURL(); |
| 1594 | 1599 |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2044 GetRenderProcessHost()->id(), cert_id, | 2049 GetRenderProcessHost()->id(), cert_id, |
| 2045 cert_status); | 2050 cert_status); |
| 2046 | 2051 |
| 2047 NotificationService::current()->Notify( | 2052 NotificationService::current()->Notify( |
| 2048 NotificationType::LOAD_FROM_MEMORY_CACHE, | 2053 NotificationType::LOAD_FROM_MEMORY_CACHE, |
| 2049 Source<NavigationController>(&controller_), | 2054 Source<NavigationController>(&controller_), |
| 2050 Details<LoadFromMemoryCacheDetails>(&details)); | 2055 Details<LoadFromMemoryCacheDetails>(&details)); |
| 2051 } | 2056 } |
| 2052 | 2057 |
| 2053 void TabContents::DidDisplayInsecureContent() { | 2058 void TabContents::DidDisplayInsecureContent() { |
| 2054 controller_.ssl_manager()->DidDisplayInsecureContent(); | 2059 displayed_insecure_content_ = true; |
| 2060 SSLManager::NotifySSLInternalStateChanged(); |
| 2055 } | 2061 } |
| 2056 | 2062 |
| 2057 void TabContents::DidRunInsecureContent(const std::string& security_origin) { | 2063 void TabContents::DidRunInsecureContent(const std::string& security_origin) { |
| 2058 controller_.ssl_manager()->DidRunInsecureContent(security_origin); | 2064 controller_.ssl_manager()->DidRunInsecureContent(security_origin); |
| 2059 } | 2065 } |
| 2060 | 2066 |
| 2061 void TabContents::DidFailProvisionalLoadWithError( | 2067 void TabContents::DidFailProvisionalLoadWithError( |
| 2062 RenderViewHost* render_view_host, | 2068 RenderViewHost* render_view_host, |
| 2063 bool is_main_frame, | 2069 bool is_main_frame, |
| 2064 int error_code, | 2070 int error_code, |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3162 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3168 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
| 3163 } | 3169 } |
| 3164 | 3170 |
| 3165 Profile* TabContents::GetProfileForPasswordManager() { | 3171 Profile* TabContents::GetProfileForPasswordManager() { |
| 3166 return profile(); | 3172 return profile(); |
| 3167 } | 3173 } |
| 3168 | 3174 |
| 3169 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3175 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
| 3170 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3176 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
| 3171 } | 3177 } |
| OLD | NEW |