| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" | 63 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 64 #include "chrome/browser/ui/gtk/nine_box.h" | 64 #include "chrome/browser/ui/gtk/nine_box.h" |
| 65 #include "chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h" | 65 #include "chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h" |
| 66 #include "chrome/browser/ui/gtk/password_generation_bubble_gtk.h" | 66 #include "chrome/browser/ui/gtk/password_generation_bubble_gtk.h" |
| 67 #include "chrome/browser/ui/gtk/reload_button_gtk.h" | 67 #include "chrome/browser/ui/gtk/reload_button_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/update_recommended_dialog.h" | 72 #include "chrome/browser/ui/gtk/update_recommended_dialog.h" |
| 73 #include "chrome/browser/ui/gtk/website_settings_popup_gtk.h" |
| 73 #include "chrome/browser/ui/omnibox/location_bar.h" | 74 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 74 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 75 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 75 #include "chrome/browser/ui/page_info_bubble.h" | 76 #include "chrome/browser/ui/page_info_bubble.h" |
| 76 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 77 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 77 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 78 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 78 #include "chrome/browser/web_applications/web_app.h" | 79 #include "chrome/browser/web_applications/web_app.h" |
| 79 #include "chrome/browser/website_settings.h" | |
| 80 #include "chrome/common/chrome_notification_types.h" | 80 #include "chrome/common/chrome_notification_types.h" |
| 81 #include "chrome/common/chrome_switches.h" | 81 #include "chrome/common/chrome_switches.h" |
| 82 #include "chrome/common/pref_names.h" | 82 #include "chrome/common/pref_names.h" |
| 83 #include "content/public/browser/download_manager.h" | 83 #include "content/public/browser/download_manager.h" |
| 84 #include "content/public/browser/native_web_keyboard_event.h" | 84 #include "content/public/browser/native_web_keyboard_event.h" |
| 85 #include "content/public/browser/notification_service.h" | 85 #include "content/public/browser/notification_service.h" |
| 86 #include "content/public/browser/render_view_host.h" | 86 #include "content/public/browser/render_view_host.h" |
| 87 #include "content/public/browser/render_widget_host_view.h" | 87 #include "content/public/browser/render_widget_host_view.h" |
| 88 #include "content/public/browser/web_contents.h" | 88 #include "content/public/browser/web_contents.h" |
| 89 #include "content/public/browser/web_contents_view.h" | 89 #include "content/public/browser/web_contents_view.h" |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 browser::ShowPageInfoBubble(window_, profile, url, ssl, show_history, | 1113 browser::ShowPageInfoBubble(window_, profile, url, ssl, show_history, |
| 1114 browser_.get()); | 1114 browser_.get()); |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 void BrowserWindowGtk::ShowWebsiteSettings( | 1117 void BrowserWindowGtk::ShowWebsiteSettings( |
| 1118 Profile* profile, | 1118 Profile* profile, |
| 1119 TabContentsWrapper* tab_contents_wrapper, | 1119 TabContentsWrapper* tab_contents_wrapper, |
| 1120 const GURL& url, | 1120 const GURL& url, |
| 1121 const content::SSLStatus& ssl, | 1121 const content::SSLStatus& ssl, |
| 1122 bool show_history) { | 1122 bool show_history) { |
| 1123 WebsiteSettings::Show(GetNativeHandle(), | 1123 WebsiteSettingsPopupGtk::Show(GetNativeHandle(), profile, |
| 1124 profile, | 1124 tab_contents_wrapper, url, ssl); |
| 1125 tab_contents_wrapper, | |
| 1126 url, | |
| 1127 ssl); | |
| 1128 } | 1125 } |
| 1129 | 1126 |
| 1130 void BrowserWindowGtk::ShowAppMenu() { | 1127 void BrowserWindowGtk::ShowAppMenu() { |
| 1131 toolbar_->ShowAppMenu(); | 1128 toolbar_->ShowAppMenu(); |
| 1132 } | 1129 } |
| 1133 | 1130 |
| 1134 bool BrowserWindowGtk::PreHandleKeyboardEvent( | 1131 bool BrowserWindowGtk::PreHandleKeyboardEvent( |
| 1135 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { | 1132 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { |
| 1136 GdkEventKey* os_event = &event.os_event->key; | 1133 GdkEventKey* os_event = &event.os_event->key; |
| 1137 | 1134 |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2589 wm_type == ui::WM_OPENBOX || | 2586 wm_type == ui::WM_OPENBOX || |
| 2590 wm_type == ui::WM_XFWM4); | 2587 wm_type == ui::WM_XFWM4); |
| 2591 } | 2588 } |
| 2592 | 2589 |
| 2593 // static | 2590 // static |
| 2594 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2591 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2595 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); | 2592 BrowserWindowGtk* browser_window_gtk = new BrowserWindowGtk(browser); |
| 2596 browser_window_gtk->Init(); | 2593 browser_window_gtk->Init(); |
| 2597 return browser_window_gtk; | 2594 return browser_window_gtk; |
| 2598 } | 2595 } |
| OLD | NEW |