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