| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "chrome/browser/ui/gtk/find_bar_gtk.h" | 55 #include "chrome/browser/ui/gtk/find_bar_gtk.h" |
| 56 #include "chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h" | 56 #include "chrome/browser/ui/gtk/fullscreen_exit_bubble_gtk.h" |
| 57 #include "chrome/browser/ui/gtk/global_menu_bar.h" | 57 #include "chrome/browser/ui/gtk/global_menu_bar.h" |
| 58 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 58 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
| 59 #include "chrome/browser/ui/gtk/gtk_util.h" | 59 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 60 #include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h" | 60 #include "chrome/browser/ui/gtk/infobars/infobar_container_gtk.h" |
| 61 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 61 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
| 62 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" | 62 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 63 #include "chrome/browser/ui/gtk/nine_box.h" | 63 #include "chrome/browser/ui/gtk/nine_box.h" |
| 64 #include "chrome/browser/ui/gtk/reload_button_gtk.h" | 64 #include "chrome/browser/ui/gtk/reload_button_gtk.h" |
| 65 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" | |
| 66 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" | 65 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
| 67 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | 66 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 68 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 67 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
| 69 #include "chrome/browser/ui/gtk/task_manager_gtk.h" | 68 #include "chrome/browser/ui/gtk/task_manager_gtk.h" |
| 70 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" | 69 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" |
| 71 #include "chrome/browser/ui/omnibox/location_bar.h" | 70 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 72 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 71 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 73 #include "chrome/browser/ui/page_info_bubble.h" | 72 #include "chrome/browser/ui/page_info_bubble.h" |
| 74 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 73 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 75 #include "chrome/browser/ui/webui/chrome_web_ui.h" | 74 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 return download_shelf_.get() && download_shelf_->IsShowing(); | 1037 return download_shelf_.get() && download_shelf_->IsShowing(); |
| 1039 } | 1038 } |
| 1040 | 1039 |
| 1041 DownloadShelf* BrowserWindowGtk::GetDownloadShelf() { | 1040 DownloadShelf* BrowserWindowGtk::GetDownloadShelf() { |
| 1042 if (!download_shelf_.get()) | 1041 if (!download_shelf_.get()) |
| 1043 download_shelf_.reset(new DownloadShelfGtk(browser_.get(), | 1042 download_shelf_.reset(new DownloadShelfGtk(browser_.get(), |
| 1044 render_area_vbox_)); | 1043 render_area_vbox_)); |
| 1045 return download_shelf_.get(); | 1044 return download_shelf_.get(); |
| 1046 } | 1045 } |
| 1047 | 1046 |
| 1048 void BrowserWindowGtk::ShowRepostFormWarningDialog(TabContents* tab_contents) { | |
| 1049 new RepostFormWarningGtk(GetNativeHandle(), tab_contents); | |
| 1050 } | |
| 1051 | |
| 1052 void BrowserWindowGtk::ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) { | 1047 void BrowserWindowGtk::ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) { |
| 1053 // Deletes itself on close. | 1048 // Deletes itself on close. |
| 1054 new CollectedCookiesGtk(GetNativeHandle(), wrapper); | 1049 new CollectedCookiesGtk(GetNativeHandle(), wrapper); |
| 1055 } | 1050 } |
| 1056 | 1051 |
| 1057 void BrowserWindowGtk::UserChangedTheme() { | 1052 void BrowserWindowGtk::UserChangedTheme() { |
| 1058 SetBackgroundColor(); | 1053 SetBackgroundColor(); |
| 1059 InvalidateWindow(); | 1054 InvalidateWindow(); |
| 1060 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1055 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1061 } | 1056 } |
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2455 wm_type == ui::WM_OPENBOX || | 2450 wm_type == ui::WM_OPENBOX || |
| 2456 wm_type == ui::WM_XFWM4); | 2451 wm_type == ui::WM_XFWM4); |
| 2457 } | 2452 } |
| 2458 | 2453 |
| 2459 // static | 2454 // static |
| 2460 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2455 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2461 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2456 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2462 browser_window_gtk->Init(); | 2457 browser_window_gtk->Init(); |
| 2463 return browser_window_gtk; | 2458 return browser_window_gtk; |
| 2464 } | 2459 } |
| OLD | NEW |