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

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

Issue 10546098: TabContentsWrapper -> TabContents, part 46. (Closed) Base URL: svn://svn.chromium.org/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 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 "chrome/browser/ui/startup/obsolete_os_prompt.h" 5 #include "chrome/browser/ui/startup/obsolete_os_prompt.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/infobars/infobar_tab_helper.h" 8 #include "chrome/browser/infobars/infobar_tab_helper.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
11 #include "chrome/browser/ui/startup/obsolete_os_info_bar.h" 11 #include "chrome/browser/ui/startup/obsolete_os_info_bar.h"
12 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 12 #include "chrome/browser/ui/tab_contents/tab_contents.h"
13 #include "grit/chromium_strings.h" 13 #include "grit/chromium_strings.h"
14 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
15 #include "ui/base/l10n/l10n_util.h" 15 #include "ui/base/l10n/l10n_util.h"
16 16
17 namespace browser { 17 namespace browser {
18 18
19 void ShowObsoleteOSPrompt(Browser* browser) { 19 void ShowObsoleteOSPrompt(Browser* browser) {
20 // We've deprecated support for Ubuntu Hardy. Rather than attempting to 20 // We've deprecated support for Ubuntu Hardy. Rather than attempting to
21 // determine whether you're using that, we instead key off the GTK version; 21 // determine whether you're using that, we instead key off the GTK version;
22 // this will also deprecate other distributions (including variants of Ubuntu) 22 // this will also deprecate other distributions (including variants of Ubuntu)
23 // that are of a similar age. 23 // that are of a similar age.
24 // Version key: 24 // Version key:
25 // Ubuntu Hardy: GTK 2.12 25 // Ubuntu Hardy: GTK 2.12
26 // RHEL 6: GTK 2.18 26 // RHEL 6: GTK 2.18
27 // Ubuntu Lucid: GTK 2.20 27 // Ubuntu Lucid: GTK 2.20
28 if (gtk_check_version(2, 18, 0)) { 28 if (gtk_check_version(2, 18, 0)) {
29 string16 message = l10n_util::GetStringUTF16(IDS_SYSTEM_OBSOLETE_MESSAGE); 29 string16 message = l10n_util::GetStringUTF16(IDS_SYSTEM_OBSOLETE_MESSAGE);
30 // Link to an article in the help center on minimum system requirements. 30 // Link to an article in the help center on minimum system requirements.
31 const char* kLearnMoreURL = 31 const char* kLearnMoreURL =
32 "http://www.google.com/support/chrome/bin/answer.py?answer=95411"; 32 "http://www.google.com/support/chrome/bin/answer.py?answer=95411";
33 TabContentsWrapper* tab = browser->GetSelectedTabContentsWrapper(); 33 TabContents* tab = browser->GetActiveTabContents();
34 if (!tab) 34 if (!tab)
35 return; 35 return;
36 tab->infobar_tab_helper()->AddInfoBar( 36 tab->infobar_tab_helper()->AddInfoBar(
37 new ObsoleteOSInfoBar(tab->infobar_tab_helper(), 37 new ObsoleteOSInfoBar(tab->infobar_tab_helper(),
38 message, 38 message,
39 GURL(kLearnMoreURL))); 39 GURL(kLearnMoreURL)));
40 } 40 }
41 } 41 }
42 42
43 } // namespace browser 43 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/obsolete_os_info_bar.cc ('k') | chrome/browser/ui/startup/obsolete_os_prompt_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698