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