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

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

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