| 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 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/ui/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 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" | 67 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" |
| 68 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" | 68 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
| 69 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | 69 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 70 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 70 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
| 71 #include "chrome/browser/ui/gtk/task_manager_gtk.h" | 71 #include "chrome/browser/ui/gtk/task_manager_gtk.h" |
| 72 #include "chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h" | 72 #include "chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h" |
| 73 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" | 73 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" |
| 74 #include "chrome/browser/ui/omnibox/location_bar.h" | 74 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 75 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 75 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 76 #include "chrome/browser/ui/window_sizer.h" | 76 #include "chrome/browser/ui/window_sizer.h" |
| 77 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" |
| 77 #include "chrome/common/chrome_switches.h" | 78 #include "chrome/common/chrome_switches.h" |
| 78 #include "chrome/common/native_web_keyboard_event.h" | 79 #include "chrome/common/native_web_keyboard_event.h" |
| 79 #include "chrome/common/notification_service.h" | 80 #include "chrome/common/notification_service.h" |
| 80 #include "chrome/common/pref_names.h" | 81 #include "chrome/common/pref_names.h" |
| 81 #include "gfx/gtk_util.h" | 82 #include "gfx/gtk_util.h" |
| 82 #include "gfx/rect.h" | 83 #include "gfx/rect.h" |
| 83 #include "gfx/skia_utils_gtk.h" | 84 #include "gfx/skia_utils_gtk.h" |
| 84 #include "grit/app_resources.h" | 85 #include "grit/app_resources.h" |
| 85 #include "grit/chromium_strings.h" | 86 #include "grit/chromium_strings.h" |
| 86 #include "grit/generated_resources.h" | 87 #include "grit/generated_resources.h" |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 contents->CancelInstantFade(); | 1115 contents->CancelInstantFade(); |
| 1115 } | 1116 } |
| 1116 } | 1117 } |
| 1117 | 1118 |
| 1118 gfx::Rect BrowserWindowGtk::GetInstantBounds() { | 1119 gfx::Rect BrowserWindowGtk::GetInstantBounds() { |
| 1119 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); | 1120 return gtk_util::GetWidgetScreenBounds(contents_container_->widget()); |
| 1120 } | 1121 } |
| 1121 | 1122 |
| 1122 gfx::Rect BrowserWindowGtk::GrabWindowSnapshot(std::vector<unsigned char>* | 1123 gfx::Rect BrowserWindowGtk::GrabWindowSnapshot(std::vector<unsigned char>* |
| 1123 png_representation) { | 1124 png_representation) { |
| 1124 ui::GrabWindowSnapshot(window_, png_representation); | 1125 browser::GrabWindowSnapshot(window_, png_representation); |
| 1125 return bounds_; | 1126 return bounds_; |
| 1126 } | 1127 } |
| 1127 | 1128 |
| 1128 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { | 1129 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { |
| 1129 new DownloadInProgressDialogGtk(browser()); | 1130 new DownloadInProgressDialogGtk(browser()); |
| 1130 } | 1131 } |
| 1131 | 1132 |
| 1132 void BrowserWindowGtk::Observe(NotificationType type, | 1133 void BrowserWindowGtk::Observe(NotificationType type, |
| 1133 const NotificationSource& source, | 1134 const NotificationSource& source, |
| 1134 const NotificationDetails& details) { | 1135 const NotificationDetails& details) { |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2244 // special-case the ones where the custom frame should be used. These names | 2245 // special-case the ones where the custom frame should be used. These names |
| 2245 // are taken from the WMs' source code. | 2246 // are taken from the WMs' source code. |
| 2246 return (wm_name == "Blackbox" || | 2247 return (wm_name == "Blackbox" || |
| 2247 wm_name == "compiz" || | 2248 wm_name == "compiz" || |
| 2248 wm_name == "e16" || // Enlightenment DR16 | 2249 wm_name == "e16" || // Enlightenment DR16 |
| 2249 wm_name == "Metacity" || | 2250 wm_name == "Metacity" || |
| 2250 wm_name == "Mutter" || | 2251 wm_name == "Mutter" || |
| 2251 wm_name == "Openbox" || | 2252 wm_name == "Openbox" || |
| 2252 wm_name == "Xfwm4"); | 2253 wm_name == "Xfwm4"); |
| 2253 } | 2254 } |
| OLD | NEW |