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

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

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/startup/obsolete_os_prompt.h"
6
7 #include <gtk/gtk.h>
8
9 #include "chrome/browser/api/infobars/infobar_service.h"
10 #include "chrome/browser/ui/browser_tabstrip.h"
11 #include "chrome/browser/ui/startup/obsolete_os_info_bar.h"
12 #include "grit/chromium_strings.h"
13 #include "ui/base/l10n/l10n_util.h"
14
15 namespace chrome {
16
17 void ShowObsoleteOSPrompt(Browser* browser) {
18 // We've deprecated support for Ubuntu Hardy. Rather than attempting to
19 // determine whether you're using that, we instead key off the GTK version;
20 // this will also deprecate other distributions (including variants of Ubuntu)
21 // that are of a similar age.
22 // Version key:
23 // Ubuntu Hardy: GTK 2.12
24 // RHEL 6: GTK 2.18
25 // Ubuntu Lucid: GTK 2.20
26 if (gtk_check_version(2, 18, 0)) {
27 string16 message = l10n_util::GetStringUTF16(IDS_SYSTEM_OBSOLETE_MESSAGE);
28 // Link to an article in the help center on minimum system requirements.
29 const char* kLearnMoreURL =
30 "http://www.google.com/support/chrome/bin/answer.py?answer=95411";
31 content::WebContents* web_contents = chrome::GetActiveWebContents(browser);
32 if (!web_contents)
33 return;
34 InfoBarService* infobar_service =
35 InfoBarService::FromWebContents(web_contents);
36 infobar_service->AddInfoBar(new ObsoleteOSInfoBar(infobar_service, message,
37 GURL(kLearnMoreURL)));
38 }
39 }
40
41 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/obsolete_os_prompt.cc ('k') | chrome/browser/ui/startup/session_crashed_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698