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

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

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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 <gtk/gtk.h> 5 #include <gtk/gtk.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/certificate_viewer.h" 11 #include "chrome/browser/certificate_viewer.h"
12 #include "chrome/browser/page_info_model.h" 12 #include "chrome/browser/page_info_model.h"
13 #include "chrome/browser/page_info_model_observer.h" 13 #include "chrome/browser/page_info_model_observer.h"
14 #include "chrome/browser/ui/browser_list.h" 14 #include "chrome/browser/ui/browser_finder.h"
15 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" 15 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h"
16 #include "chrome/browser/ui/gtk/browser_window_gtk.h" 16 #include "chrome/browser/ui/gtk/browser_window_gtk.h"
17 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 17 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
18 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" 18 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h"
19 #include "chrome/browser/ui/gtk/gtk_theme_service.h" 19 #include "chrome/browser/ui/gtk/gtk_theme_service.h"
20 #include "chrome/browser/ui/gtk/gtk_util.h" 20 #include "chrome/browser/ui/gtk/gtk_util.h"
21 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" 21 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h"
22 #include "chrome/common/url_constants.h" 22 #include "chrome/common/url_constants.h"
23 #include "content/public/common/ssl_status.h" 23 #include "content/public/common/ssl_status.h"
24 #include "googleurl/src/gurl.h" 24 #include "googleurl/src/gurl.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 return section_box; 221 return section_box;
222 } 222 }
223 223
224 void PageInfoBubbleGtk::OnViewCertLinkClicked(GtkWidget* widget) { 224 void PageInfoBubbleGtk::OnViewCertLinkClicked(GtkWidget* widget) {
225 ShowCertificateViewerByID(GTK_WINDOW(parent_), cert_id_); 225 ShowCertificateViewerByID(GTK_WINDOW(parent_), cert_id_);
226 bubble_->Close(); 226 bubble_->Close();
227 } 227 }
228 228
229 void PageInfoBubbleGtk::OnHelpLinkClicked(GtkWidget* widget) { 229 void PageInfoBubbleGtk::OnHelpLinkClicked(GtkWidget* widget) {
230 Browser* browser = BrowserList::GetLastActiveWithProfile(profile_); 230 Browser* browser = browser::FindLastActiveWithProfile(profile_);
231 browser->OpenURL(OpenURLParams( 231 browser->OpenURL(OpenURLParams(
232 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), 232 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
233 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); 233 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false));
234 bubble_->Close(); 234 bubble_->Close();
235 } 235 }
236 236
237 } // namespace 237 } // namespace
238 238
239 namespace browser { 239 namespace browser {
240 240
241 void ShowPageInfoBubble(gfx::NativeWindow parent, 241 void ShowPageInfoBubble(gfx::NativeWindow parent,
242 Profile* profile, 242 Profile* profile,
243 const GURL& url, 243 const GURL& url,
244 const SSLStatus& ssl, 244 const SSLStatus& ssl,
245 bool show_history) { 245 bool show_history) {
246 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history); 246 new PageInfoBubbleGtk(parent, profile, url, ssl, show_history);
247 } 247 }
248 248
249 } // namespace browser 249 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698