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

Side by Side Diff: chrome/common/platform_util_linux.cc

Issue 479006: re-apply r34183... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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
« no previous file with comments | « chrome/common/platform_util.h ('k') | chrome/common/platform_util_mac.mm » ('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/common/platform_util.h" 5 #include "chrome/common/platform_util.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
11 #include "base/singleton.h"
12 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "chrome/browser/gtk/gtk_theme_provider.h"
13 #include "chrome/common/gtk_util.h" 13 #include "chrome/common/gtk_util.h"
14 #include "chrome/common/process_watcher.h" 14 #include "chrome/common/process_watcher.h"
15 #include "googleurl/src/gurl.h" 15 #include "googleurl/src/gurl.h"
16 16
17 namespace { 17 namespace {
18 18
19 void XDGOpen(const std::string& path) { 19 void XDGOpen(const std::string& path) {
20 std::vector<std::string> argv; 20 std::vector<std::string> argv;
21 argv.push_back("xdg-open"); 21 argv.push_back("xdg-open");
22 argv.push_back(path); 22 argv.push_back(path);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const string16& title, 81 const string16& title,
82 const string16& message) { 82 const string16& message) {
83 GtkWidget* dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, 83 GtkWidget* dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL,
84 GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", UTF16ToUTF8(message).c_str()); 84 GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", UTF16ToUTF8(message).c_str());
85 gtk_util::ApplyMessageDialogQuirks(dialog); 85 gtk_util::ApplyMessageDialogQuirks(dialog);
86 gtk_window_set_title(GTK_WINDOW(dialog), UTF16ToUTF8(title).c_str()); 86 gtk_window_set_title(GTK_WINDOW(dialog), UTF16ToUTF8(title).c_str());
87 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); 87 g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL);
88 gtk_widget_show_all(dialog); 88 gtk_widget_show_all(dialog);
89 } 89 }
90 90
91 RendererPreferences GetInitedRendererPreferences() {
92 RendererPreferences* prefs = Singleton<RendererPreferences>::get();
93 static bool inited = false;
94 if (!inited) {
95 gtk_util::InitRendererPrefsFromGtkSettings(prefs);
96 inited = true;
97 }
98 return *prefs;
99 }
100
101 } // namespace platform_util 91 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/common/platform_util.h ('k') | chrome/common/platform_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698