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 // This file contains stub implementations of the functions declared in | 5 // This file contains stub implementations of the functions declared in |
6 // browser_dialogs.h that are currently unimplemented in GTK-views. | 6 // browser_dialogs.h that are currently unimplemented in GTK-views. |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "chrome/browser/fonts_languages_window.h" | 11 #include "chrome/browser/fonts_languages_window.h" |
12 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" | 12 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" |
13 #include "chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h" | 13 #include "chrome/browser/ui/gtk/clear_browsing_data_dialog_gtk.h" |
14 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" | 14 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" |
15 #include "chrome/browser/ui/gtk/edit_search_engine_dialog.h" | 15 #include "chrome/browser/ui/gtk/edit_search_engine_dialog.h" |
16 #include "chrome/browser/ui/gtk/keyword_editor_view.h" | 16 #include "chrome/browser/ui/gtk/keyword_editor_view.h" |
17 #include "chrome/browser/ui/gtk/options/content_settings_window_gtk.h" | |
18 #include "chrome/browser/ui/gtk/options/passwords_exceptions_window_gtk.h" | |
19 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" | 17 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" |
20 #include "chrome/browser/ui/gtk/task_manager_gtk.h" | 18 #include "chrome/browser/ui/gtk/task_manager_gtk.h" |
21 #include "chrome/browser/ui/options/options_window.h" | 19 #include "chrome/browser/ui/options/options_window.h" |
22 #include "chrome/browser/ui/views/browser_dialogs.h" | 20 #include "chrome/browser/ui/views/browser_dialogs.h" |
23 #include "content/browser/tab_contents/tab_contents.h" | 21 #include "content/browser/tab_contents/tab_contents.h" |
24 #include "views/widget/widget.h" | 22 #include "views/widget/widget.h" |
25 | 23 |
26 namespace browser { | 24 namespace browser { |
27 | 25 |
28 void ShowClearBrowsingDataView(views::Widget* parent, | 26 void ShowClearBrowsingDataView(views::Widget* parent, |
29 Profile* profile) { | 27 Profile* profile) { |
30 ClearBrowsingDataDialogGtk::Show(GTK_WINDOW(parent->GetNativeView()), | 28 ClearBrowsingDataDialogGtk::Show(GTK_WINDOW(parent->GetNativeView()), |
31 profile); | 29 profile); |
32 } | 30 } |
33 | 31 |
34 void ShowPasswordsExceptionsWindowView(Profile* profile) { | |
35 ShowPasswordsExceptionsWindow(profile); | |
36 } | |
37 | |
38 void ShowKeywordEditorView(Profile* profile) { | 32 void ShowKeywordEditorView(Profile* profile) { |
39 KeywordEditorView::Show(profile); | 33 KeywordEditorView::Show(profile); |
40 } | 34 } |
41 | 35 |
42 void ShowTaskManager() { | 36 void ShowTaskManager() { |
43 TaskManagerGtk::Show(false); | 37 TaskManagerGtk::Show(false); |
44 } | 38 } |
45 | 39 |
46 void ShowBackgroundPages() { | 40 void ShowBackgroundPages() { |
47 TaskManagerGtk::Show(true); | 41 TaskManagerGtk::Show(true); |
48 } | 42 } |
49 | 43 |
50 void EditSearchEngine(gfx::NativeWindow parent, | 44 void EditSearchEngine(gfx::NativeWindow parent, |
51 const TemplateURL* template_url, | 45 const TemplateURL* template_url, |
52 EditSearchEngineControllerDelegate* delegate, | 46 EditSearchEngineControllerDelegate* delegate, |
53 Profile* profile) { | 47 Profile* profile) { |
54 new EditSearchEngineDialog(GTK_WINDOW(parent), template_url, NULL, profile); | 48 new EditSearchEngineDialog(GTK_WINDOW(parent), template_url, NULL, profile); |
55 } | 49 } |
56 | 50 |
57 void ShowRepostFormWarningDialog(gfx::NativeWindow parent_window, | 51 void ShowRepostFormWarningDialog(gfx::NativeWindow parent_window, |
58 TabContents* tab_contents) { | 52 TabContents* tab_contents) { |
59 new RepostFormWarningGtk(GTK_WINDOW(parent_window), tab_contents); | 53 new RepostFormWarningGtk(GTK_WINDOW(parent_window), tab_contents); |
60 } | 54 } |
61 | 55 |
62 void ShowContentSettingsWindow(gfx::NativeWindow parent_window, | |
63 ContentSettingsType content_type, | |
64 Profile* profile) { | |
65 ContentSettingsWindowGtk::Show(parent_window, content_type, profile); | |
66 } | |
67 | |
68 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, | 56 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, |
69 TabContents* tab_contents) { | 57 TabContents* tab_contents) { |
70 new CollectedCookiesGtk(GTK_WINDOW(parent_window), tab_contents); | 58 new CollectedCookiesGtk(GTK_WINDOW(parent_window), tab_contents); |
71 } | 59 } |
72 | 60 |
73 } // namespace browser | 61 } // namespace browser |
OLD | NEW |