| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cookie_modal_dialog.h" | 5 #include "chrome/browser/cookie_modal_dialog.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/gtk/gtk_chrome_cookie_view.h" | 12 #include "chrome/browser/gtk/gtk_chrome_cookie_view.h" |
| 13 #include "chrome/browser/gtk/gtk_chrome_link_button.h" | 13 #include "chrome/browser/gtk/gtk_chrome_link_button.h" |
| 14 #include "chrome/browser/gtk/gtk_util.h" | 14 #include "chrome/browser/gtk/gtk_util.h" |
| 15 #include "chrome/browser/pref_service.h" | 15 #include "chrome/browser/prefs/pref_service.h" |
| 16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
| 17 #include "chrome/browser/views/cookie_prompt_view.h" | 17 #include "chrome/browser/views/cookie_prompt_view.h" |
| 18 #include "chrome/browser/tab_contents/tab_contents.h" | 18 #include "chrome/browser/tab_contents/tab_contents.h" |
| 19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
| 20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
| 21 #include "grit/locale_settings.h" | 21 #include "grit/locale_settings.h" |
| 22 | 22 |
| 23 void CookiePromptModalDialog::CreateAndShowDialog() { | 23 void CookiePromptModalDialog::CreateAndShowDialog() { |
| 24 dialog_ = CreateNativeDialog(); | 24 dialog_ = CreateNativeDialog(); |
| 25 gtk_util::ShowModalDialogWithMinLocalizedWidth(GTK_WIDGET(dialog_), | 25 gtk_util::ShowModalDialogWithMinLocalizedWidth(GTK_WIDGET(dialog_), |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 gtk_util::AppModalDismissedUngroupWindows(); | 145 gtk_util::AppModalDismissedUngroupWindows(); |
| 146 delete this; | 146 delete this; |
| 147 } | 147 } |
| 148 | 148 |
| 149 void CookiePromptModalDialog::OnExpanderActivate(GtkWidget* expander, | 149 void CookiePromptModalDialog::OnExpanderActivate(GtkWidget* expander, |
| 150 GParamSpec* property) { | 150 GParamSpec* property) { |
| 151 tab_contents_->profile()->GetPrefs()-> | 151 tab_contents_->profile()->GetPrefs()-> |
| 152 SetBoolean(prefs::kCookiePromptExpanded, | 152 SetBoolean(prefs::kCookiePromptExpanded, |
| 153 gtk_expander_get_expanded(GTK_EXPANDER(expander))); | 153 gtk_expander_get_expanded(GTK_EXPANDER(expander))); |
| 154 } | 154 } |
| OLD | NEW |