summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/dialog_stubs_gtk.cc
blob: 53bfc580ba7dd79073b165f07643523438d35000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file contains stub implementations of the functions declared in
// browser_dialogs.h that are currently unimplemented in GTK-views.

#include <gtk/gtk.h>

#include "base/logging.h"
#include "chrome/browser/gtk/about_chrome_dialog.h"
#include "chrome/browser/fonts_languages_window.h"
#include "chrome/browser/gtk/bookmark_manager_gtk.h"
#include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
#include "chrome/browser/gtk/edit_search_engine_dialog.h"
#include "chrome/browser/gtk/keyword_editor_view.h"
#include "chrome/browser/gtk/options/passwords_exceptions_window_gtk.h"
#include "chrome/browser/gtk/repost_form_warning_gtk.h"
#include "chrome/browser/gtk/task_manager_gtk.h"
#include "chrome/browser/options_window.h"
#include "chrome/browser/views/browser_dialogs.h"
#include "views/widget/widget.h"

namespace browser {

void ShowBugReportView(views::Widget* parent,
                       Profile* profile,
                       TabContents* tab) {
  // Bug report view hasn't been implemented on gtk yet.
  NOTIMPLEMENTED();
}

void ShowClearBrowsingDataView(views::Widget* parent,
                               Profile* profile) {
  ClearBrowsingDataDialogGtk::Show(GTK_WINDOW(parent->GetNativeView()),
                                   profile);
}

void ShowSelectProfileDialog() {
  // Only matters if we're going to support profile switching
  // (switches::kEnableUserDataDirProfiles).
  NOTIMPLEMENTED();
}

void ShowImporterView(views::Widget* parent, Profile* profile) {
  // Import currently doesn't matter.
  NOTIMPLEMENTED();
}

void ShowBookmarkManagerView(Profile* profile) {
  BookmarkManagerGtk::Show(profile);
}

#if not defined(OS_CHROMEOS)
void ShowAboutChromeView(gfx::NativeWindow parent, Profile* profile) {
  ShowAboutDialogForProfile(parent, profile);
}
#endif

void ShowHtmlDialogView(gfx::NativeWindow parent, Browser* browser,
                        HtmlDialogUIDelegate* delegate) {
  // Hasn't been implemented yet on linux.
  NOTIMPLEMENTED();
}

void ShowPasswordsExceptionsWindowView(Profile* profile) {
  ShowPasswordsExceptionsWindow(profile);
}

void ShowKeywordEditorView(Profile* profile) {
  KeywordEditorView::Show(profile);
}

void ShowNewProfileDialog() {
  // Hasn't been implemented yet on linux.
  NOTIMPLEMENTED();
}

void ShowTaskManager() {
  TaskManagerGtk::Show();
}

void EditSearchEngine(gfx::NativeWindow parent,
                      const TemplateURL* template_url,
                      EditSearchEngineControllerDelegate* delegate,
                      Profile* profile) {
  new EditSearchEngineDialog(GTK_WINDOW(parent), template_url, NULL, profile);
}

void ShowRepostFormWarningDialog(gfx::NativeWindow parent_window,
                                 TabContents* tab_contents) {
  new RepostFormWarningGtk(GTK_WINDOW(parent_window),
                           &tab_contents->controller());
}

}  // namespace browser