Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 8404046: When creating a tab contents for a browser in the RVHDelegateHelper, create a wrapper immediately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3836 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 window()->ShowCollectedCookiesDialog(wrapper); 3847 window()->ShowCollectedCookiesDialog(wrapper);
3848 } 3848 }
3849 3849
3850 bool Browser::ShouldAddNavigationToHistory( 3850 bool Browser::ShouldAddNavigationToHistory(
3851 const history::HistoryAddPageArgs& add_page_args, 3851 const history::HistoryAddPageArgs& add_page_args,
3852 content::NavigationType navigation_type) { 3852 content::NavigationType navigation_type) {
3853 // Don't update history if running as app. 3853 // Don't update history if running as app.
3854 return !IsApplication(); 3854 return !IsApplication();
3855 } 3855 }
3856 3856
3857 void Browser::TabContentsCreated(TabContents* new_contents) {
3858 // Create a TabContentsWrapper now, so all observers are in place, as the
3859 // network requests for its initial navigation will start immediately. The
3860 // TabContents will later be inserted into this browser using
3861 // Browser::Navigate via AddNewContents. The latter will retrieve the newly
3862 // created TabContentsWrapper from TabContents object.
3863 new TabContentsWrapper(new_contents);
3864 }
3865
3857 void Browser::ContentRestrictionsChanged(TabContents* source) { 3866 void Browser::ContentRestrictionsChanged(TabContents* source) {
3858 UpdateCommandsForContentRestrictionState(); 3867 UpdateCommandsForContentRestrictionState();
3859 } 3868 }
3860 3869
3861 void Browser::RendererUnresponsive(TabContents* source) { 3870 void Browser::RendererUnresponsive(TabContents* source) {
3862 browser::ShowHungRendererDialog(source); 3871 browser::ShowHungRendererDialog(source);
3863 } 3872 }
3864 3873
3865 void Browser::RendererResponsive(TabContents* source) { 3874 void Browser::RendererResponsive(TabContents* source) {
3866 browser::HideHungRendererDialog(source); 3875 browser::HideHungRendererDialog(source);
(...skipping 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
5510 } 5519 }
5511 5520
5512 void Browser::UpdateFullscreenExitBubbleContent() { 5521 void Browser::UpdateFullscreenExitBubbleContent() {
5513 GURL url; 5522 GURL url;
5514 if (fullscreened_tab_) 5523 if (fullscreened_tab_)
5515 url = fullscreened_tab_->tab_contents()->GetURL(); 5524 url = fullscreened_tab_->tab_contents()->GetURL();
5516 5525
5517 window_->UpdateFullscreenExitBubbleContent( 5526 window_->UpdateFullscreenExitBubbleContent(
5518 url, GetFullscreenExitBubbleType()); 5527 url, GetFullscreenExitBubbleType());
5519 } 5528 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/test/data/extensions/api_test/webrequest/framework.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698