| 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/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/gtk/browser_window_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "app/keyboard_codes.h" | 11 #include "app/keyboard_codes.h" |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "base/base_paths.h" | 13 #include "base/base_paths.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/message_loop.h" | 16 #include "base/message_loop.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/scoped_ptr.h" | 18 #include "base/scoped_ptr.h" |
| 19 #include "base/singleton.h" | 19 #include "base/singleton.h" |
| 20 #include "base/string_util.h" | 20 #include "base/string_util.h" |
| 21 #include "base/time.h" | 21 #include "base/time.h" |
| 22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
| 23 #include "chrome/app/chrome_command_ids.h" | 23 #include "chrome/app/chrome_command_ids.h" |
| 24 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 24 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
| 25 #include "chrome/browser/bookmarks/bookmark_utils.h" | 25 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 26 #include "chrome/browser/browser_list.h" | 26 #include "chrome/browser/browser_list.h" |
| 27 #include "chrome/browser/browser_process.h" | 27 #include "chrome/browser/browser_process.h" |
| 28 #include "chrome/browser/debugger/devtools_window.h" | 28 #include "chrome/browser/debugger/devtools_window.h" |
| 29 #include "chrome/browser/dom_ui/bug_report_ui.h" |
| 29 #include "chrome/browser/download/download_item_model.h" | 30 #include "chrome/browser/download/download_item_model.h" |
| 30 #include "chrome/browser/download/download_manager.h" | 31 #include "chrome/browser/download/download_manager.h" |
| 31 #include "chrome/browser/find_bar_controller.h" | 32 #include "chrome/browser/find_bar_controller.h" |
| 32 #include "chrome/browser/gtk/about_chrome_dialog.h" | 33 #include "chrome/browser/gtk/about_chrome_dialog.h" |
| 33 #include "chrome/browser/gtk/accelerators_gtk.h" | 34 #include "chrome/browser/gtk/accelerators_gtk.h" |
| 34 #include "chrome/browser/gtk/bookmark_bar_gtk.h" | 35 #include "chrome/browser/gtk/bookmark_bar_gtk.h" |
| 35 #include "chrome/browser/gtk/browser_titlebar.h" | 36 #include "chrome/browser/gtk/browser_titlebar.h" |
| 36 #include "chrome/browser/gtk/browser_toolbar_gtk.h" | 37 #include "chrome/browser/gtk/browser_toolbar_gtk.h" |
| 37 #include "chrome/browser/gtk/cairo_cached_surface.h" | 38 #include "chrome/browser/gtk/cairo_cached_surface.h" |
| 38 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" | 39 #include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h" |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 } | 910 } |
| 910 | 911 |
| 911 DownloadShelf* BrowserWindowGtk::GetDownloadShelf() { | 912 DownloadShelf* BrowserWindowGtk::GetDownloadShelf() { |
| 912 if (!download_shelf_.get()) | 913 if (!download_shelf_.get()) |
| 913 download_shelf_.reset(new DownloadShelfGtk(browser_.get(), | 914 download_shelf_.reset(new DownloadShelfGtk(browser_.get(), |
| 914 render_area_vbox_)); | 915 render_area_vbox_)); |
| 915 return download_shelf_.get(); | 916 return download_shelf_.get(); |
| 916 } | 917 } |
| 917 | 918 |
| 918 void BrowserWindowGtk::ShowReportBugDialog() { | 919 void BrowserWindowGtk::ShowReportBugDialog() { |
| 919 NOTIMPLEMENTED(); | 920 browser::ShowHtmlBugReportView(window_, bounds_, browser_.get()); |
| 920 } | 921 } |
| 921 | 922 |
| 922 void BrowserWindowGtk::ShowClearBrowsingDataDialog() { | 923 void BrowserWindowGtk::ShowClearBrowsingDataDialog() { |
| 923 ClearBrowsingDataDialogGtk::Show(window_, browser_->profile()); | 924 ClearBrowsingDataDialogGtk::Show(window_, browser_->profile()); |
| 924 } | 925 } |
| 925 | 926 |
| 926 void BrowserWindowGtk::ShowImportDialog() { | 927 void BrowserWindowGtk::ShowImportDialog() { |
| 927 ImportDialogGtk::Show(window_, browser_->profile(), ALL); | 928 ImportDialogGtk::Show(window_, browser_->profile(), ALL); |
| 928 } | 929 } |
| 929 | 930 |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2233 // special-case the ones where the custom frame should be used. These names | 2234 // special-case the ones where the custom frame should be used. These names |
| 2234 // are taken from the WMs' source code. | 2235 // are taken from the WMs' source code. |
| 2235 return (wm_name == "Blackbox" || | 2236 return (wm_name == "Blackbox" || |
| 2236 wm_name == "compiz" || | 2237 wm_name == "compiz" || |
| 2237 wm_name == "e16" || // Enlightenment DR16 | 2238 wm_name == "e16" || // Enlightenment DR16 |
| 2238 wm_name == "Metacity" || | 2239 wm_name == "Metacity" || |
| 2239 wm_name == "Mutter" || | 2240 wm_name == "Mutter" || |
| 2240 wm_name == "Openbox" || | 2241 wm_name == "Openbox" || |
| 2241 wm_name == "Xfwm4"); | 2242 wm_name == "Xfwm4"); |
| 2242 } | 2243 } |
| OLD | NEW |