OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/options/content_page_gtk.h" | 5 #include "chrome/browser/ui/gtk/options/content_page_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/defaults.h" | 11 #include "chrome/browser/defaults.h" |
12 #include "chrome/browser/importer/importer_data_types.h" | 12 #include "chrome/browser/importer/importer_data_types.h" |
13 #include "chrome/browser/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/sync/sync_ui_util.h" | 15 #include "chrome/browser/sync/sync_ui_util.h" |
16 #include "chrome/browser/ui/browser_list.h" | 16 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/browser/ui/browser_window.h" | 17 #include "chrome/browser/ui/browser_window.h" |
18 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 18 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
19 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" | 19 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
20 #include "chrome/browser/ui/gtk/gtk_util.h" | 20 #include "chrome/browser/ui/gtk/gtk_util.h" |
21 #include "chrome/browser/ui/gtk/import_dialog_gtk.h" | 21 #include "chrome/browser/ui/gtk/import_dialog_gtk.h" |
22 #include "chrome/browser/ui/gtk/options/options_layout_gtk.h" | 22 #include "chrome/browser/ui/gtk/options/options_layout_gtk.h" |
23 #include "chrome/browser/ui/gtk/options/passwords_exceptions_window_gtk.h" | 23 #include "chrome/browser/ui/gtk/options/passwords_exceptions_window_gtk.h" |
24 #include "chrome/common/notification_service.h" | 24 #include "chrome/common/notification_service.h" |
25 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
26 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
27 #include "gfx/gtk_util.h" | |
28 #include "grit/app_resources.h" | 27 #include "grit/app_resources.h" |
29 #include "grit/chromium_strings.h" | 28 #include "grit/chromium_strings.h" |
30 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
31 #include "grit/locale_settings.h" | 30 #include "grit/locale_settings.h" |
32 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
| 32 #include "ui/gfx/gtk_util.h" |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 // Background color for the status label when it's showing an error. | 36 // Background color for the status label when it's showing an error. |
37 static const GdkColor kSyncLabelErrorBgColor = GDK_COLOR_RGB(0xff, 0x9a, 0x9a); | 37 static const GdkColor kSyncLabelErrorBgColor = GDK_COLOR_RGB(0xff, 0x9a, 0x9a); |
38 | 38 |
39 // Helper for WrapLabelAtAllocationHack. | 39 // Helper for WrapLabelAtAllocationHack. |
40 void OnLabelAllocate(GtkWidget* label, GtkAllocation* allocation) { | 40 void OnLabelAllocate(GtkWidget* label, GtkAllocation* allocation) { |
41 gtk_util::SetLabelWidth(label, allocation->width); | 41 gtk_util::SetLabelWidth(label, allocation->width); |
42 | 42 |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 if (response == GTK_RESPONSE_ACCEPT) { | 577 if (response == GTK_RESPONSE_ACCEPT) { |
578 sync_service_->DisableForUser(); | 578 sync_service_->DisableForUser(); |
579 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 579 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); |
580 } | 580 } |
581 gtk_widget_destroy(widget); | 581 gtk_widget_destroy(widget); |
582 } | 582 } |
583 | 583 |
584 void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) { | 584 void ContentPageGtk::OnPrivacyDashboardLinkClicked(GtkWidget* widget) { |
585 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); | 585 BrowserList::GetLastActive()->OpenPrivacyDashboardTabAndActivate(); |
586 } | 586 } |
OLD | NEW |