Commit be715074 authored by sky@chromium.org's avatar sky@chromium.org

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
parent cd4f1227
......@@ -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
......@@ -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.
{
......
......@@ -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);
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment