| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/page_info_window.h" | 64 #include "chrome/browser/ui/gtk/page_info_window.h" |
| 65 #include "chrome/browser/ui/gtk/reload_button_gtk.h" | 65 #include "chrome/browser/ui/gtk/reload_button_gtk.h" |
| 66 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" | 66 #include "chrome/browser/ui/gtk/repost_form_warning_gtk.h" |
| 67 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" | 67 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
| 68 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | 68 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 69 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 69 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
| 70 #include "chrome/browser/ui/gtk/task_manager_gtk.h" | 70 #include "chrome/browser/ui/gtk/task_manager_gtk.h" |
| 71 #include "chrome/browser/ui/gtk/theme_install_bubble_view_gtk.h" | |
| 72 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" | 71 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" |
| 73 #include "chrome/browser/ui/omnibox/location_bar.h" | 72 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 74 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 73 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 75 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 74 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 76 #include "chrome/browser/ui/webui/bug_report_ui.h" | 75 #include "chrome/browser/ui/webui/bug_report_ui.h" |
| 77 #include "chrome/browser/ui/webui/task_manager_dialog.h" | 76 #include "chrome/browser/ui/webui/task_manager_dialog.h" |
| 78 #include "chrome/browser/ui/window_sizer.h" | 77 #include "chrome/browser/ui/window_sizer.h" |
| 79 #include "chrome/browser/web_applications/web_app.h" | 78 #include "chrome/browser/web_applications/web_app.h" |
| 80 #include "chrome/common/chrome_notification_types.h" | 79 #include "chrome/common/chrome_notification_types.h" |
| 81 #include "chrome/common/chrome_switches.h" | 80 #include "chrome/common/chrome_switches.h" |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 | 1022 |
| 1024 void BrowserWindowGtk::ShowRepostFormWarningDialog(TabContents* tab_contents) { | 1023 void BrowserWindowGtk::ShowRepostFormWarningDialog(TabContents* tab_contents) { |
| 1025 new RepostFormWarningGtk(GetNativeHandle(), tab_contents); | 1024 new RepostFormWarningGtk(GetNativeHandle(), tab_contents); |
| 1026 } | 1025 } |
| 1027 | 1026 |
| 1028 void BrowserWindowGtk::ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) { | 1027 void BrowserWindowGtk::ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) { |
| 1029 // Deletes itself on close. | 1028 // Deletes itself on close. |
| 1030 new CollectedCookiesGtk(GetNativeHandle(), wrapper); | 1029 new CollectedCookiesGtk(GetNativeHandle(), wrapper); |
| 1031 } | 1030 } |
| 1032 | 1031 |
| 1033 void BrowserWindowGtk::ShowThemeInstallBubble() { | |
| 1034 ThemeInstallBubbleViewGtk::Show(window_); | |
| 1035 } | |
| 1036 | |
| 1037 void BrowserWindowGtk::UserChangedTheme() { | 1032 void BrowserWindowGtk::UserChangedTheme() { |
| 1038 SetBackgroundColor(); | 1033 SetBackgroundColor(); |
| 1039 InvalidateWindow(); | 1034 InvalidateWindow(); |
| 1040 UpdateWindowShape(bounds_.width(), bounds_.height()); | 1035 UpdateWindowShape(bounds_.width(), bounds_.height()); |
| 1041 } | 1036 } |
| 1042 | 1037 |
| 1043 int BrowserWindowGtk::GetExtraRenderViewHeight() const { | 1038 int BrowserWindowGtk::GetExtraRenderViewHeight() const { |
| 1044 int sum = infobar_container_->TotalHeightOfAnimatingBars(); | 1039 int sum = infobar_container_->TotalHeightOfAnimatingBars(); |
| 1045 if (IsBookmarkBarSupported() && bookmark_bar_->IsAnimating()) | 1040 if (IsBookmarkBarSupported() && bookmark_bar_->IsAnimating()) |
| 1046 sum += bookmark_bar_->GetHeight(); | 1041 sum += bookmark_bar_->GetHeight(); |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 wm_name == "Openbox" || | 2408 wm_name == "Openbox" || |
| 2414 wm_name == "Xfwm4"); | 2409 wm_name == "Xfwm4"); |
| 2415 } | 2410 } |
| 2416 | 2411 |
| 2417 // static | 2412 // static |
| 2418 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2413 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2419 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2414 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2420 browser_window_gtk->Init(); | 2415 browser_window_gtk->Init(); |
| 2421 return browser_window_gtk; | 2416 return browser_window_gtk; |
| 2422 } | 2417 } |
| OLD | NEW |