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

Side by Side Diff: chrome/browser/gtk/about_chrome_dialog.cc

Issue 1560027: Refactor FileVersionInfo into an interface with platform implementations. (Closed)
Patch Set: comments Created 10 years, 8 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
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/memory_details_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/about_chrome_dialog.h" 5 #include "chrome/browser/gtk/about_chrome_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
11 #include "base/file_version_info.h" 11 #include "base/file_version_info.h"
12 #include "chrome/app/chrome_version_info.h"
12 #include "chrome/browser/browser_list.h" 13 #include "chrome/browser/browser_list.h"
13 #include "chrome/browser/gtk/cairo_cached_surface.h" 14 #include "chrome/browser/gtk/cairo_cached_surface.h"
14 #include "chrome/browser/gtk/gtk_chrome_link_button.h" 15 #include "chrome/browser/gtk/gtk_chrome_link_button.h"
15 #include "chrome/browser/gtk/gtk_theme_provider.h" 16 #include "chrome/browser/gtk/gtk_theme_provider.h"
16 #include "chrome/browser/gtk/gtk_util.h" 17 #include "chrome/browser/gtk/gtk_util.h"
17 #include "chrome/browser/profile.h" 18 #include "chrome/browser/profile.h"
18 #include "chrome/common/chrome_constants.h" 19 #include "chrome/common/chrome_constants.h"
19 #include "chrome/common/platform_util.h" 20 #include "chrome/common/platform_util.h"
20 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
21 #include "gfx/gtk_util.h" 22 #include "gfx/gtk_util.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 cairo_destroy(cr); 98 cairo_destroy(cr);
98 return FALSE; 99 return FALSE;
99 } 100 }
100 101
101 } // namespace 102 } // namespace
102 103
103 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { 104 void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) {
104 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 105 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
105 static GdkPixbuf* background = rb.GetPixbufNamed(IDR_ABOUT_BACKGROUND); 106 static GdkPixbuf* background = rb.GetPixbufNamed(IDR_ABOUT_BACKGROUND);
106 scoped_ptr<FileVersionInfo> version_info( 107 scoped_ptr<FileVersionInfo> version_info(
107 FileVersionInfo::CreateFileVersionInfoForCurrentModule()); 108 chrome_app::GetChromeVersionInfo());
108 std::wstring current_version = version_info->file_version(); 109 std::wstring current_version = version_info->file_version();
109 #if !defined(GOOGLE_CHROME_BUILD) 110 #if !defined(GOOGLE_CHROME_BUILD)
110 current_version += L" ("; 111 current_version += L" (";
111 current_version += version_info->last_change(); 112 current_version += version_info->last_change();
112 current_version += L")"; 113 current_version += L")";
113 #endif 114 #endif
114 string16 version_modifier = platform_util::GetVersionStringModifier(); 115 string16 version_modifier = platform_util::GetVersionStringModifier();
115 if (version_modifier.length()) { 116 if (version_modifier.length()) {
116 current_version += L" "; 117 current_version += L" ";
117 current_version += UTF16ToWide(version_modifier); 118 current_version += UTF16ToWide(version_modifier);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 gtk_util::kContentAreaBorder, 0, 283 gtk_util::kContentAreaBorder, 0,
283 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); 284 gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder);
284 gtk_container_add(GTK_CONTAINER(alignment), vbox); 285 gtk_container_add(GTK_CONTAINER(alignment), vbox);
285 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0); 286 gtk_box_pack_start(GTK_BOX(content_area), alignment, FALSE, FALSE, 0);
286 287
287 g_signal_connect(dialog, "response", G_CALLBACK(OnDialogResponse), NULL); 288 g_signal_connect(dialog, "response", G_CALLBACK(OnDialogResponse), NULL);
288 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); 289 gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
289 gtk_widget_show_all(dialog); 290 gtk_widget_show_all(dialog);
290 gtk_widget_grab_focus(close_button); 291 gtk_widget_grab_focus(close_button);
291 } 292 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater.cc ('k') | chrome/browser/memory_details_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698