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

Unified Diff: chrome/browser/ui/gtk/page_info_bubble_gtk.cc

Issue 10554010: Remove BrowserList::GetLastActive usage from WebUI pages. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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/gtk/page_info_bubble_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/page_info_bubble_gtk.cc (revision 142088)
+++ chrome/browser/ui/gtk/page_info_bubble_gtk.cc (working copy)
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/common/url_constants.h"
#include "content/public/common/ssl_status.h"
#include "googleurl/src/gurl.h"
@@ -37,7 +38,7 @@
public BubbleDelegateGtk {
public:
PageInfoBubbleGtk(gfx::NativeWindow parent,
- Profile* profile,
+ TabContents* tab_contents,
const GURL& url,
const SSLStatus& ssl,
bool show_history,
@@ -84,7 +85,7 @@
BubbleGtk* bubble_;
- Profile* profile_;
+ TabContents* tab_contents_;
// Used for loading pages.
content::PageNavigator* navigator_;
@@ -93,19 +94,19 @@
};
PageInfoBubbleGtk::PageInfoBubbleGtk(gfx::NativeWindow parent,
- Profile* profile,
+ TabContents* tab_contents,
const GURL& url,
const SSLStatus& ssl,
bool show_history,
content::PageNavigator* navigator)
- : ALLOW_THIS_IN_INITIALIZER_LIST(model_(profile, url, ssl,
+ : ALLOW_THIS_IN_INITIALIZER_LIST(model_(tab_contents->profile(), url, ssl,
show_history, this)),
url_(url),
cert_id_(ssl.cert_id),
parent_(parent),
contents_(NULL),
- theme_service_(GtkThemeService::GetFrom(profile)),
- profile_(profile),
+ theme_service_(GtkThemeService::GetFrom(tab_contents->profile())),
+ tab_contents_(tab_contents),
navigator_(navigator) {
BrowserWindowGtk* browser_window =
BrowserWindowGtk::GetBrowserWindowForNativeWindow(parent);
@@ -229,7 +230,7 @@
}
void PageInfoBubbleGtk::OnViewCertLinkClicked(GtkWidget* widget) {
- ShowCertificateViewerByID(GTK_WINDOW(parent_), cert_id_);
+ ShowCertificateViewerByID(tab_contents_, GTK_WINDOW(parent_), cert_id_);
bubble_->Close();
}
@@ -247,12 +248,13 @@
namespace browser {
void ShowPageInfoBubble(gfx::NativeWindow parent,
- Profile* profile,
+ TabContents* tab_contents,
const GURL& url,
const SSLStatus& ssl,
bool show_history,
content::PageNavigator* navigator) {
- new PageInfoBubbleGtk(parent, profile, url, ssl, show_history, navigator);
+ new PageInfoBubbleGtk(
+ parent, tab_contents, url, ssl, show_history, navigator);
}
} // namespace browser

Powered by Google App Engine
This is Rietveld 408576698