• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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/ui/gtk/about_chrome_dialog.h"
12 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h"
13 #include "chrome/browser/ui/gtk/edit_search_engine_dialog.h"
14 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h"
15 #include "chrome/browser/ui/gtk/task_manager_gtk.h"
16 #include "chrome/browser/ui/options/options_window.h"
17 #include "chrome/browser/ui/views/browser_dialogs.h"
18 #include "content/browser/tab_contents/tab_contents.h"
19 #include "chrome/browser/ui/webui/collected_cookies_ui_delegate.h"
20 #include "views/widget/widget.h"
21 
22 namespace browser {
23 
ShowTaskManager()24 void ShowTaskManager() {
25   TaskManagerGtk::Show(false);
26 }
27 
ShowBackgroundPages()28 void ShowBackgroundPages() {
29   TaskManagerGtk::Show(true);
30 }
31 
EditSearchEngine(gfx::NativeWindow parent,const TemplateURL * template_url,EditSearchEngineControllerDelegate * delegate,Profile * profile)32 void EditSearchEngine(gfx::NativeWindow parent,
33                       const TemplateURL* template_url,
34                       EditSearchEngineControllerDelegate* delegate,
35                       Profile* profile) {
36   new EditSearchEngineDialog(GTK_WINDOW(parent), template_url, NULL, profile);
37 }
38 
ShowRepostFormWarningDialog(gfx::NativeWindow parent_window,TabContents * tab_contents)39 void ShowRepostFormWarningDialog(gfx::NativeWindow parent_window,
40                                  TabContents* tab_contents) {
41   new RepostFormWarningGtk(GTK_WINDOW(parent_window), tab_contents);
42 }
43 
ShowCollectedCookiesDialog(gfx::NativeWindow parent_window,TabContents * tab_contents)44 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window,
45                                 TabContents* tab_contents) {
46 #if defined(OS_CHROMEOS)
47   CollectedCookiesUIDelegate::Show(tab_contents);
48 #else
49   new CollectedCookiesGtk(GTK_WINDOW(parent_window), tab_contents);
50 #endif
51 }
52 
53 }  // namespace browser
54