| 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 <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/themes/theme_service.h" | 34 #include "chrome/browser/themes/theme_service.h" |
| 35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" | 35 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" |
| 36 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 36 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 37 #include "chrome/browser/ui/browser.h" | 37 #include "chrome/browser/ui/browser.h" |
| 38 #include "chrome/browser/ui/browser_dialogs.h" | 38 #include "chrome/browser/ui/browser_dialogs.h" |
| 39 #include "chrome/browser/ui/browser_list.h" | 39 #include "chrome/browser/ui/browser_list.h" |
| 40 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 40 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 41 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 41 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 42 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" | 42 #include "chrome/browser/ui/gtk/about_chrome_dialog.h" |
| 43 #include "chrome/browser/ui/gtk/accelerators_gtk.h" | 43 #include "chrome/browser/ui/gtk/accelerators_gtk.h" |
| 44 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h" |
| 44 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h" | 45 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h" |
| 45 #include "chrome/browser/ui/gtk/browser_titlebar.h" | 46 #include "chrome/browser/ui/gtk/browser_titlebar.h" |
| 46 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" | 47 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" |
| 47 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" | 48 #include "chrome/browser/ui/gtk/cairo_cached_surface.h" |
| 48 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" | 49 #include "chrome/browser/ui/gtk/collected_cookies_gtk.h" |
| 49 #include "chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h" | 50 #include "chrome/browser/ui/gtk/create_application_shortcuts_dialog_gtk.h" |
| 50 #include "chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.h" | 51 #include "chrome/browser/ui/gtk/download/download_in_progress_dialog_gtk.h" |
| 51 #include "chrome/browser/ui/gtk/download/download_shelf_gtk.h" | 52 #include "chrome/browser/ui/gtk/download/download_shelf_gtk.h" |
| 52 #include "chrome/browser/ui/gtk/edit_search_engine_dialog.h" | 53 #include "chrome/browser/ui/gtk/edit_search_engine_dialog.h" |
| 53 #include "chrome/browser/ui/gtk/find_bar_gtk.h" | 54 #include "chrome/browser/ui/gtk/find_bar_gtk.h" |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 const gfx::Rect& bounds) { | 1185 const gfx::Rect& bounds) { |
| 1185 return NEW_POPUP; | 1186 return NEW_POPUP; |
| 1186 } | 1187 } |
| 1187 | 1188 |
| 1188 FindBar* BrowserWindowGtk::CreateFindBar() { | 1189 FindBar* BrowserWindowGtk::CreateFindBar() { |
| 1189 return new FindBarGtk(this); | 1190 return new FindBarGtk(this); |
| 1190 } | 1191 } |
| 1191 | 1192 |
| 1192 void BrowserWindowGtk::ShowAvatarBubble(TabContents* tab_contents, | 1193 void BrowserWindowGtk::ShowAvatarBubble(TabContents* tab_contents, |
| 1193 const gfx::Rect& rect) { | 1194 const gfx::Rect& rect) { |
| 1194 // TODO(sail): Implement this once we have a avatar bubble on GTK. | 1195 GtkWidget* widget = tab_contents->GetContentNativeView(); |
| 1196 new AvatarMenuBubbleGtk(browser_.get(), widget, |
| 1197 BubbleGtk::ARROW_LOCATION_TOP_LEFT, &rect); |
| 1195 } | 1198 } |
| 1196 | 1199 |
| 1197 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { | 1200 void BrowserWindowGtk::ConfirmBrowserCloseWithPendingDownloads() { |
| 1198 new DownloadInProgressDialogGtk(browser()); | 1201 new DownloadInProgressDialogGtk(browser()); |
| 1199 } | 1202 } |
| 1200 | 1203 |
| 1201 void BrowserWindowGtk::Observe(int type, | 1204 void BrowserWindowGtk::Observe(int type, |
| 1202 const NotificationSource& source, | 1205 const NotificationSource& source, |
| 1203 const NotificationDetails& details) { | 1206 const NotificationDetails& details) { |
| 1204 switch (type) { | 1207 switch (type) { |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2416 wm_name == "Openbox" || | 2419 wm_name == "Openbox" || |
| 2417 wm_name == "Xfwm4"); | 2420 wm_name == "Xfwm4"); |
| 2418 } | 2421 } |
| 2419 | 2422 |
| 2420 // static | 2423 // static |
| 2421 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2424 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2422 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2425 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2423 browser_window_gtk->Init(); | 2426 browser_window_gtk->Init(); |
| 2424 return browser_window_gtk; | 2427 return browser_window_gtk; |
| 2425 } | 2428 } |
| OLD | NEW |