OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 3833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3844 window()->ShowCollectedCookiesDialog(wrapper); | 3844 window()->ShowCollectedCookiesDialog(wrapper); |
3845 } | 3845 } |
3846 | 3846 |
3847 bool Browser::ShouldAddNavigationToHistory( | 3847 bool Browser::ShouldAddNavigationToHistory( |
3848 const history::HistoryAddPageArgs& add_page_args, | 3848 const history::HistoryAddPageArgs& add_page_args, |
3849 content::NavigationType navigation_type) { | 3849 content::NavigationType navigation_type) { |
3850 // Don't update history if running as app. | 3850 // Don't update history if running as app. |
3851 return !IsApplication(); | 3851 return !IsApplication(); |
3852 } | 3852 } |
3853 | 3853 |
| 3854 void Browser::TabContentsCreated(TabContents* new_contents) { |
| 3855 // Create a TabContentsWrapper now, so all observers are in place, as the |
| 3856 // network requests for its initial navigation will start immediately. The |
| 3857 // TabContents will later be inserted into this browser using |
| 3858 // Browser::Navigate via AddNewContents. The latter will retrieve the newly |
| 3859 // created TabContentsWrapper from TabContents object. |
| 3860 new TabContentsWrapper(new_contents); |
| 3861 } |
| 3862 |
3854 void Browser::ContentRestrictionsChanged(TabContents* source) { | 3863 void Browser::ContentRestrictionsChanged(TabContents* source) { |
3855 UpdateCommandsForContentRestrictionState(); | 3864 UpdateCommandsForContentRestrictionState(); |
3856 } | 3865 } |
3857 | 3866 |
3858 void Browser::RendererUnresponsive(TabContents* source) { | 3867 void Browser::RendererUnresponsive(TabContents* source) { |
3859 browser::ShowHungRendererDialog(source); | 3868 browser::ShowHungRendererDialog(source); |
3860 } | 3869 } |
3861 | 3870 |
3862 void Browser::RendererResponsive(TabContents* source) { | 3871 void Browser::RendererResponsive(TabContents* source) { |
3863 browser::HideHungRendererDialog(source); | 3872 browser::HideHungRendererDialog(source); |
(...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5500 } | 5509 } |
5501 | 5510 |
5502 void Browser::UpdateFullscreenExitBubbleContent() { | 5511 void Browser::UpdateFullscreenExitBubbleContent() { |
5503 GURL url; | 5512 GURL url; |
5504 if (fullscreened_tab_) | 5513 if (fullscreened_tab_) |
5505 url = fullscreened_tab_->tab_contents()->GetURL(); | 5514 url = fullscreened_tab_->tab_contents()->GetURL(); |
5506 | 5515 |
5507 window_->UpdateFullscreenExitBubbleContent( | 5516 window_->UpdateFullscreenExitBubbleContent( |
5508 url, GetFullscreenExitBubbleType()); | 5517 url, GetFullscreenExitBubbleType()); |
5509 } | 5518 } |
OLD | NEW |