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

Unified Diff: chrome/browser/ui/views/page_info_bubble_view.cc

Issue 10554010: Remove BrowserList::GetLastActive usage from WebUI pages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: mac build Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/page_info_bubble_view.cc
===================================================================
--- chrome/browser/ui/views/page_info_bubble_view.cc (revision 142088)
+++ chrome/browser/ui/views/page_info_bubble_view.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/certificate_viewer.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/toolbar_view.h"
#include "chrome/common/url_constants.h"
@@ -30,6 +31,7 @@
using content::OpenURLParams;
using content::Referrer;
using content::SSLStatus;
+using content::WebContents;
namespace {
@@ -102,20 +104,21 @@
// PageInfoBubbleView
PageInfoBubbleView::PageInfoBubbleView(views::View* anchor_view,
- Profile* profile,
+ WebContents* web_contents,
const GURL& url,
const SSLStatus& ssl,
bool show_history,
content::PageNavigator* navigator)
: BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT),
- ALLOW_THIS_IN_INITIALIZER_LIST(model_(profile, url, ssl,
- show_history, this)),
+ ALLOW_THIS_IN_INITIALIZER_LIST(model_(
+ TabContents::FromWebContents(web_contents)->profile(), url, ssl,
Ben Goodger (Google) 2012/06/19 14:55:07 Profile::FromBrowserContext(web_contents->GetBrows
jam 2012/06/19 15:13:28 Done.
+ show_history, this)),
cert_id_(ssl.cert_id),
help_center_link_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(resize_animation_(this)),
animation_start_height_(0),
- navigator_(navigator) {
-
+ navigator_(navigator),
+ web_contents_(web_contents) {
if (cert_id_ > 0) {
scoped_refptr<net::X509Certificate> cert;
content::CertStore::GetInstance()->RetrieveCert(cert_id_, &cert);
@@ -135,7 +138,7 @@
void PageInfoBubbleView::ShowCertDialog() {
gfx::NativeWindow parent =
anchor_view() ? anchor_view()->GetWidget()->GetNativeWindow() : NULL;
- ShowCertificateViewerByID(parent, cert_id_);
+ ShowCertificateViewerByID(web_contents_, parent, cert_id_);
}
gfx::Size PageInfoBubbleView::GetSeparatorSize() {
@@ -453,14 +456,14 @@
namespace browser {
void ShowPageInfoBubble(views::View* anchor_view,
- Profile* profile,
+ WebContents* web_contents,
const GURL& url,
const SSLStatus& ssl,
bool show_history,
content::PageNavigator* navigator) {
PageInfoBubbleView* page_info_bubble =
new PageInfoBubbleView(anchor_view,
- profile,
+ web_contents,
url,
ssl,
show_history,

Powered by Google App Engine
This is Rietveld 408576698