summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 15:43:20 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-07 15:43:20 +0000
commitbe715074bbee02e0f82f8f747daee860c1988c5d (patch)
tree785b318915d6712e60739516849973820d3d3661
parentcd4f1227d897deba8372622343c1bf52a5bd6f0f (diff)
downloadchromium_src-be715074bbee02e0f82f8f747daee860c1988c5d.zip
chromium_src-be715074bbee02e0f82f8f747daee860c1988c5d.tar.gz
chromium_src-be715074bbee02e0f82f8f747daee860c1988c5d.tar.bz2
Adds a couple of keybindings.
BUG=none TEST=none Review URL: http://codereview.chromium.org/155103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20027 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chrome_dll_resource.h1
-rw-r--r--chrome/browser/browser.cc14
-rw-r--r--chrome/browser/browser.h3
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc8
4 files changed, 26 insertions, 0 deletions
diff --git a/chrome/app/chrome_dll_resource.h b/chrome/app/chrome_dll_resource.h
index a1e0956..8dda907 100644
--- a/chrome/app/chrome_dll_resource.h
+++ b/chrome/app/chrome_dll_resource.h
@@ -207,4 +207,5 @@
// Placed in a common file to help insure they never collide.
#define IDC_BOOKMARK_MENU 43000 // OSX only
#define IDC_VIEW_MENU 44000 // OSX only
+#define IDC_CONTROL_PANEL 45000 // Linux2 only
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index b1d5f72..f835795 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1162,6 +1162,14 @@ void Browser::OpenHelpTab() {
false, NULL);
}
+#if defined(LINUX2)
+void Browser::ShowControlPanel() {
+ GURL url("http://localhost:8080");
+ AddTabWithURL(url, GURL(), PageTransition::AUTO_BOOKMARK, true, -1,
+ false, NULL);
+}
+#endif
+
///////////////////////////////////////////////////////////////////////////////
// static
@@ -1362,6 +1370,9 @@ void Browser::ExecuteCommandWithDisposition(
case IDC_IMPORT_SETTINGS: OpenImportSettingsDialog(); break;
case IDC_ABOUT: OpenAboutChromeDialog(); break;
case IDC_HELP_PAGE: OpenHelpTab(); break;
+#if defined(LINUX2)
+ case IDC_CONTROL_PANEL: ShowControlPanel(); break;
+#endif
default:
LOG(WARNING) << "Received Unimplemented Command: " << id;
@@ -2099,6 +2110,9 @@ void Browser::InitCommandState() {
command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true);
command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true);
command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true);
+#if defined(LINUX2)
+ command_updater_.UpdateCommandEnabled(IDC_CONTROL_PANEL, true);
+#endif
// Initialize other commands based on the window type.
{
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index 47ff65a..c3b6538 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -369,6 +369,9 @@ class Browser : public TabStripModelDelegate,
void OpenImportSettingsDialog();
void OpenAboutChromeDialog();
void OpenHelpTab();
+#if defined(LINUX2)
+ void ShowControlPanel();
+#endif
virtual void UpdateDownloadShelfVisibility(bool visible);
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 44274b1..78bc675 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -220,6 +220,14 @@ const struct AcceleratorMapping {
{ GDK_u, IDC_VIEW_SOURCE, GDK_CONTROL_MASK },
{ GDK_p, IDC_PRINT, GDK_CONTROL_MASK },
{ GDK_Escape, IDC_TASK_MANAGER, GDK_SHIFT_MASK },
+
+#if defined(LINUX2)
+ { GDK_f, IDC_FULLSCREEN,
+ GdkModifierType(GDK_CONTROL_MASK | GDK_MOD1_MASK) },
+ { GDK_Delete, IDC_TASK_MANAGER,
+ GdkModifierType(GDK_CONTROL_MASK | GDK_MOD1_MASK) },
+ { GDK_comma, IDC_CONTROL_PANEL, GdkModifierType(GDK_CONTROL_MASK) },
+#endif
};
int GetCommandId(guint accel_key, GdkModifierType modifier) {