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 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 | 415 |
416 // Register for notifications about content setting changes. | 416 // Register for notifications about content setting changes. |
417 registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED, | 417 registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED, |
418 NotificationService::AllSources()); | 418 NotificationService::AllSources()); |
419 | 419 |
420 // Listen for extension changes so we can update extension_for_current_page_. | 420 // Listen for extension changes so we can update extension_for_current_page_. |
421 registrar_.Add(this, NotificationType::EXTENSION_LOADED, | 421 registrar_.Add(this, NotificationType::EXTENSION_LOADED, |
422 NotificationService::AllSources()); | 422 NotificationService::AllSources()); |
423 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, | 423 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED, |
424 NotificationService::AllSources()); | 424 NotificationService::AllSources()); |
425 registrar_.Add(this, NotificationType::EXTENSION_UNLOADED_DISABLED, | |
426 NotificationService::AllSources()); | |
427 | 425 |
428 // Listen for Google URL changes | 426 // Listen for Google URL changes |
429 registrar_.Add(this, NotificationType::GOOGLE_URL_UPDATED, | 427 registrar_.Add(this, NotificationType::GOOGLE_URL_UPDATED, |
430 NotificationService::AllSources()); | 428 NotificationService::AllSources()); |
431 | 429 |
432 // Set-up the showing of the omnibox search infobar if applicable. | 430 // Set-up the showing of the omnibox search infobar if applicable. |
433 if (OmniboxSearchHint::IsEnabled(profile)) | 431 if (OmniboxSearchHint::IsEnabled(profile)) |
434 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); | 432 omnibox_search_hint_.reset(new OmniboxSearchHint(this)); |
435 } | 433 } |
436 | 434 |
(...skipping 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3247 profile()->GetHostContentSettingsMap()-> | 3245 profile()->GetHostContentSettingsMap()-> |
3248 GetContentSettings(entry_url)); | 3246 GetContentSettings(entry_url)); |
3249 } | 3247 } |
3250 break; | 3248 break; |
3251 } | 3249 } |
3252 | 3250 |
3253 case NotificationType::EXTENSION_LOADED: | 3251 case NotificationType::EXTENSION_LOADED: |
3254 break; | 3252 break; |
3255 | 3253 |
3256 case NotificationType::EXTENSION_UNLOADED: | 3254 case NotificationType::EXTENSION_UNLOADED: |
3257 case NotificationType::EXTENSION_UNLOADED_DISABLED: | |
3258 break; | 3255 break; |
3259 | 3256 |
3260 case NotificationType::GOOGLE_URL_UPDATED: | 3257 case NotificationType::GOOGLE_URL_UPDATED: |
3261 UpdateAlternateErrorPageURL(); | 3258 UpdateAlternateErrorPageURL(); |
3262 break; | 3259 break; |
3263 | 3260 |
3264 default: | 3261 default: |
3265 NOTREACHED(); | 3262 NOTREACHED(); |
3266 } | 3263 } |
3267 } | 3264 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3342 } | 3339 } |
3343 | 3340 |
3344 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 3341 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
3345 render_manager_.SwapInRenderViewHost(rvh); | 3342 render_manager_.SwapInRenderViewHost(rvh); |
3346 } | 3343 } |
3347 | 3344 |
3348 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 3345 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
3349 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 3346 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
3350 rwh_view->SetSize(view()->GetContainerSize()); | 3347 rwh_view->SetSize(view()->GetContainerSize()); |
3351 } | 3348 } |
OLD | NEW |