| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/browser_window_gtk.h" | 5 #include "chrome/browser/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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 } | 912 } |
| 913 | 913 |
| 914 void BrowserWindowGtk::ShowPageInfo(Profile* profile, | 914 void BrowserWindowGtk::ShowPageInfo(Profile* profile, |
| 915 const GURL& url, | 915 const GURL& url, |
| 916 const NavigationEntry::SSLStatus& ssl, | 916 const NavigationEntry::SSLStatus& ssl, |
| 917 bool show_history) { | 917 bool show_history) { |
| 918 browser::ShowPageInfo(window_, profile, url, ssl, show_history); | 918 browser::ShowPageInfo(window_, profile, url, ssl, show_history); |
| 919 } | 919 } |
| 920 | 920 |
| 921 void BrowserWindowGtk::ShowPageMenu() { | 921 void BrowserWindowGtk::ShowPageMenu() { |
| 922 // On Windows, this is used to show the page menu for a keyboard accelerator | 922 toolbar_->ShowPageMenu(); |
| 923 // (Alt+e). We connect the accelerator directly to the widget in | |
| 924 // BrowserToolbarGtk. | |
| 925 } | 923 } |
| 926 | 924 |
| 927 void BrowserWindowGtk::ShowAppMenu() { | 925 void BrowserWindowGtk::ShowAppMenu() { |
| 928 // On Windows, this is used to show the page menu for a keyboard accelerator | 926 toolbar_->ShowAppMenu(); |
| 929 // (Alt+f). We connect the accelerator directly to the widget in | |
| 930 // BrowserToolbarGtk. | |
| 931 } | 927 } |
| 932 | 928 |
| 933 bool BrowserWindowGtk::PreHandleKeyboardEvent( | 929 bool BrowserWindowGtk::PreHandleKeyboardEvent( |
| 934 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { | 930 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { |
| 935 GdkEventKey* os_event = event.os_event; | 931 GdkEventKey* os_event = event.os_event; |
| 936 | 932 |
| 937 if (!os_event || event.type != WebKit::WebInputEvent::RawKeyDown) | 933 if (!os_event || event.type != WebKit::WebInputEvent::RawKeyDown) |
| 938 return false; | 934 return false; |
| 939 | 935 |
| 940 // We first find out the browser command associated to the |event|. | 936 // We first find out the browser command associated to the |event|. |
| (...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2037 // are taken from the WMs' source code. | 2033 // are taken from the WMs' source code. |
| 2038 return (wm_name == "Blackbox" || | 2034 return (wm_name == "Blackbox" || |
| 2039 wm_name == "compiz" || | 2035 wm_name == "compiz" || |
| 2040 wm_name == "e16" || // Enlightenment DR16 | 2036 wm_name == "e16" || // Enlightenment DR16 |
| 2041 wm_name == "KWin" || | 2037 wm_name == "KWin" || |
| 2042 wm_name == "Metacity" || | 2038 wm_name == "Metacity" || |
| 2043 wm_name == "Mutter" || | 2039 wm_name == "Mutter" || |
| 2044 wm_name == "Openbox" || | 2040 wm_name == "Openbox" || |
| 2045 wm_name == "Xfwm4"); | 2041 wm_name == "Xfwm4"); |
| 2046 } | 2042 } |
| OLD | NEW |