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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 9390015: Get rid of ShowPageInfo on WebContents and WebContentsDelegate. Chrome shouldn't have to go throu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix gtk+mac Created 8 years, 10 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 // with the old one. This can be changed in the future if we need it to share 839 // with the old one. This can be changed in the future if we need it to share
840 // processes for some reason. 840 // processes for some reason.
841 TabContents* tc = new TabContents( 841 TabContents* tc = new TabContents(
842 GetBrowserContext(), 842 GetBrowserContext(),
843 SiteInstance::Create(GetBrowserContext()), 843 SiteInstance::Create(GetBrowserContext()),
844 MSG_ROUTING_NONE, this, NULL); 844 MSG_ROUTING_NONE, this, NULL);
845 tc->GetControllerImpl().CopyStateFrom(controller_); 845 tc->GetControllerImpl().CopyStateFrom(controller_);
846 return tc; 846 return tc;
847 } 847 }
848 848
849 void TabContents::ShowPageInfo(const GURL& url,
850 const SSLStatus& ssl,
851 bool show_history) {
852 if (!delegate_)
853 return;
854
855 delegate_->ShowPageInfo(GetBrowserContext(), url, ssl, show_history);
856 }
857
858 void TabContents::AddNewContents(WebContents* new_contents, 849 void TabContents::AddNewContents(WebContents* new_contents,
859 WindowOpenDisposition disposition, 850 WindowOpenDisposition disposition,
860 const gfx::Rect& initial_pos, 851 const gfx::Rect& initial_pos,
861 bool user_gesture) { 852 bool user_gesture) {
862 if (!delegate_) 853 if (!delegate_)
863 return; 854 return;
864 855
865 delegate_->AddNewContents(this, new_contents, disposition, initial_pos, 856 delegate_->AddNewContents(this, new_contents, disposition, initial_pos,
866 user_gesture); 857 user_gesture);
867 } 858 }
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 save_info, 2461 save_info,
2471 this); 2462 this);
2472 } 2463 }
2473 2464
2474 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2465 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2475 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2466 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2476 // Can be NULL during tests. 2467 // Can be NULL during tests.
2477 if (rwh_view) 2468 if (rwh_view)
2478 rwh_view->SetSize(GetView()->GetContainerSize()); 2469 rwh_view->SetSize(GetView()->GetContainerSize());
2479 } 2470 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698