OLD | NEW |
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/gtk/chrome_browser_main_extra_parts_gtk.h" | 5 #include "chrome/browser/ui/gtk/chrome_browser_main_extra_parts_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/browser/chrome_browser_main.h" | 10 #include "chrome/browser/chrome_browser_main.h" |
11 #include "chrome/browser/toolkit_extra_parts.h" | |
12 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
13 #include "grit/chromium_strings.h" | 12 #include "grit/chromium_strings.h" |
14 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
15 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
16 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/gfx/gtk_util.h" | 16 #include "ui/gfx/gtk_util.h" |
18 | 17 |
19 ChromeBrowserMainExtraPartsGtk::ChromeBrowserMainExtraPartsGtk() { | 18 ChromeBrowserMainExtraPartsGtk::ChromeBrowserMainExtraPartsGtk() { |
20 } | 19 } |
21 | 20 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 static_cast<GtkDialogFlags>(0), | 71 static_cast<GtkDialogFlags>(0), |
73 GTK_MESSAGE_ERROR, | 72 GTK_MESSAGE_ERROR, |
74 GTK_BUTTONS_CLOSE, | 73 GTK_BUTTONS_CLOSE, |
75 "%s", | 74 "%s", |
76 message); | 75 message); |
77 | 76 |
78 gtk_window_set_title(GTK_WINDOW(dialog), message); | 77 gtk_window_set_title(GTK_WINDOW(dialog), message); |
79 gtk_dialog_run(GTK_DIALOG(dialog)); | 78 gtk_dialog_run(GTK_DIALOG(dialog)); |
80 gtk_widget_destroy(dialog); | 79 gtk_widget_destroy(dialog); |
81 } | 80 } |
82 | |
83 namespace chrome { | |
84 | |
85 void AddGtkToolkitExtraParts(ChromeBrowserMainParts* main_parts) { | |
86 main_parts->AddParts(new ChromeBrowserMainExtraPartsGtk()); | |
87 } | |
88 | |
89 } // namespace chrome | |
OLD | NEW |