diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-08 21:31:13 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-08 21:31:13 +0000 |
commit | e6be3247dacf7b371555695c318a14f9b884d581 (patch) | |
tree | 30f98e99afd3d953b48b248d416495074b98f55f | |
parent | ee028d3f084d20216efb6c0d7f1089d551eb4421 (diff) | |
download | chromium_src-e6be3247dacf7b371555695c318a14f9b884d581.zip chromium_src-e6be3247dacf7b371555695c318a14f9b884d581.tar.gz chromium_src-e6be3247dacf7b371555695c318a14f9b884d581.tar.bz2 |
ash/chromeos: "Search" key to toggle app list.
- "Search" key to toggle app list;
- Remove old "Ctrl+Search" shortcut for app list;
- Remove ShellDelegate::Search since it no longer in use;
BUG=131703
TEST=Verify "Search" key toggles app list and old "Ctrl+Search" stops working.
Review URL: https://chromiumcodereview.appspot.com/10534053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141290 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ash/accelerators/accelerator_controller.cc | 3 | ||||
-rw-r--r-- | ash/accelerators/accelerator_table.cc | 5 | ||||
-rw-r--r-- | ash/accelerators/accelerator_table.h | 1 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 3 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 1 | ||||
-rw-r--r-- | ash/shell_delegate.h | 3 | ||||
-rw-r--r-- | ash/test/test_shell_delegate.cc | 3 | ||||
-rw-r--r-- | ash/test/test_shell_delegate.h | 1 | ||||
-rw-r--r-- | chrome/app/generated_resources.grd | 3 | ||||
-rw-r--r-- | chrome/browser/resources/chromeos/keyboard_overlay_data.js | 1 | ||||
-rw-r--r-- | chrome/browser/ui/views/ash/chrome_shell_delegate.cc | 32 | ||||
-rw-r--r-- | chrome/browser/ui/views/ash/chrome_shell_delegate.h | 1 | ||||
-rw-r--r-- | chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc | 1 |
13 files changed, 2 insertions, 56 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index d3ea484..4dca2ce 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -334,9 +334,6 @@ bool AcceleratorController::PerformAction(int action, // Return true to prevent propagation of the key event because // this key combination is reserved for partial screenshot. return true; - case SEARCH_KEY: - ash::Shell::GetInstance()->delegate()->Search(); - return true; case TOGGLE_APP_LIST: ash::Shell::GetInstance()->ToggleAppList(); return true; diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc index 3493995..d9a2161 100644 --- a/ash/accelerators/accelerator_table.cc +++ b/ash/accelerators/accelerator_table.cc @@ -54,9 +54,8 @@ const AcceleratorData kAcceleratorData[] = { TAKE_PARTIAL_SCREENSHOT }, { true, ui::VKEY_PRINT, ui::EF_NONE, TAKE_SCREENSHOT }, // On Chrome OS, Search key is mapped to LWIN. - { true, ui::VKEY_LWIN, ui::EF_NONE, SEARCH_KEY }, - { true, ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, SEARCH_KEY }, - { true, ui::VKEY_LWIN, ui::EF_CONTROL_DOWN, TOGGLE_APP_LIST }, + { true, ui::VKEY_LWIN, ui::EF_NONE, TOGGLE_APP_LIST }, + { true, ui::VKEY_BROWSER_SEARCH, ui::EF_NONE, TOGGLE_APP_LIST }, { true, ui::VKEY_LWIN, ui::EF_SHIFT_DOWN, TOGGLE_CAPS_LOCK }, { true, ui::VKEY_F6, ui::EF_NONE, BRIGHTNESS_DOWN }, { true, ui::VKEY_F7, ui::EF_NONE, BRIGHTNESS_UP }, diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h index 53461db..be17ec7 100644 --- a/ash/accelerators/accelerator_table.h +++ b/ash/accelerators/accelerator_table.h @@ -30,7 +30,6 @@ enum AcceleratorAction { PREVIOUS_IME, RESTORE_TAB, ROTATE_WINDOWS, - SEARCH_KEY, SELECT_LAST_WIN, SELECT_WIN_0, SELECT_WIN_1, diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index be403c8..59f68bd 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -66,9 +66,6 @@ void ShellDelegateImpl::NewWindow(bool incognito) { ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); } -void ShellDelegateImpl::Search() { -} - void ShellDelegateImpl::OpenFileManager() { } diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index a97522f..bc1e5be 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -30,7 +30,6 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual void Exit() OVERRIDE; virtual void NewTab() OVERRIDE; virtual void NewWindow(bool incognito) OVERRIDE; - virtual void Search() OVERRIDE; virtual void OpenFileManager() OVERRIDE; virtual void OpenCrosh() OVERRIDE; virtual void OpenMobileSetup(const std::string& service_path) OVERRIDE; diff --git a/ash/shell_delegate.h b/ash/shell_delegate.h index 357b0f0..ea668fa 100644 --- a/ash/shell_delegate.h +++ b/ash/shell_delegate.h @@ -68,9 +68,6 @@ class ASH_EXPORT ShellDelegate { // Invoked when the user uses Ctrl-N or Ctrl-Shift-N to open a new window. virtual void NewWindow(bool incognito) = 0; - // Invoked when the user presses the Search key. - virtual void Search() = 0; - // Invoked when the user uses Ctrl-M to open file manager. virtual void OpenFileManager() = 0; diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc index 5a290a1..3a47f5f 100644 --- a/ash/test/test_shell_delegate.cc +++ b/ash/test/test_shell_delegate.cc @@ -51,9 +51,6 @@ void TestShellDelegate::NewTab() { void TestShellDelegate::NewWindow(bool incognito) { } -void TestShellDelegate::Search() { -} - void TestShellDelegate::OpenFileManager() { } diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h index 4b349b6..9091e4e 100644 --- a/ash/test/test_shell_delegate.h +++ b/ash/test/test_shell_delegate.h @@ -26,7 +26,6 @@ class TestShellDelegate : public ShellDelegate { virtual void Exit() OVERRIDE; virtual void NewTab() OVERRIDE; virtual void NewWindow(bool incognito) OVERRIDE; - virtual void Search() OVERRIDE; virtual void OpenFileManager() OVERRIDE; virtual void OpenCrosh() OVERRIDE; virtual void OpenMobileSetup(const std::string& service_path) OVERRIDE; diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index b4335d6..6ae1974 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -15475,9 +15475,6 @@ Battery full <message name="IDS_KEYBOARD_OVERLAY_TOGGLE_ACCESSIBILITY_FEATURES" desc="The text in the keyboard overlay to explain the shortcut (enable or disable accessibility features)."> Toggle accessibility features </message> - <message name="IDS_KEYBOARD_OVERLAY_TOGGLE_APP_LIST" desc="The text in the keyboard overlay to explain the shortcut (show or hide the app list)."> - Toggle app list - </message> <message name="IDS_KEYBOARD_OVERLAY_TOGGLE_BOOKMARK_BAR" desc="The text in the keyboard overlay to explain the shortcut."> Toggle bookmark bar </message> diff --git a/chrome/browser/resources/chromeos/keyboard_overlay_data.js b/chrome/browser/resources/chromeos/keyboard_overlay_data.js index a277207..c19ded4 100644 --- a/chrome/browser/resources/chromeos/keyboard_overlay_data.js +++ b/chrome/browser/resources/chromeos/keyboard_overlay_data.js @@ -15847,7 +15847,6 @@ var keyboardOverlayData = { 'right<>CTRL<>SHIFT': 'keyboardOverlaySelectWordAtATime', 's<>ALT<>SHIFT': 'keyboardOverlayFocusStatusIcon', 's<>CTRL': 'keyboardOverlaySave', - 'search<>CTRL': 'keyboardOverlayToggleAppList', 'search<>SHIFT': 'keyboardOverlayToggleCapsLock', 'space<>CTRL': 'keyboardOverlaySelectPreviousInputMethod', 'space<>SHIFT': 'keyboardOverlayScrollUpOnePage', diff --git a/chrome/browser/ui/views/ash/chrome_shell_delegate.cc b/chrome/browser/ui/views/ash/chrome_shell_delegate.cc index cf68170..33d092d 100644 --- a/chrome/browser/ui/views/ash/chrome_shell_delegate.cc +++ b/chrome/browser/ui/views/ash/chrome_shell_delegate.cc @@ -17,7 +17,6 @@ #include "chrome/browser/sessions/tab_restore_service_factory.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -#include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h" #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_controller.h" #include "chrome/browser/ui/views/ash/user_action_handler.h" @@ -132,37 +131,6 @@ void ChromeShellDelegate::NewWindow(bool is_incognito) { is_incognito ? profile->GetOffTheRecordProfile() : profile); } -void ChromeShellDelegate::Search() { - // Exit fullscreen to show omnibox. - Browser* last_active = BrowserList::GetLastActive(); - if (last_active) { - if (last_active->window()->IsFullscreen()) { - last_active->ToggleFullscreenMode(); - // ToggleFullscreenMode is asynchronous, so we don't have omnibox - // visible at this point. Wait for next event cycle which toggles - // the visibility of omnibox before creating new tab. - MessageLoop::current()->PostTask( - FROM_HERE, base::Bind(&ChromeShellDelegate::Search, - weak_factory_.GetWeakPtr())); - return; - } - } - - Browser* target_browser = browser::FindOrCreateTabbedBrowser( - last_active ? last_active->profile() : - ProfileManager::GetDefaultProfileOrOffTheRecord()); - const GURL& url = target_browser->GetSelectedWebContents() ? - target_browser->GetSelectedWebContents()->GetURL() : GURL(); - if (url.SchemeIs(chrome::kChromeUIScheme) && - url.host() == chrome::kChromeUINewTabHost) { - // If the NTP is showing, focus the omnibox. - target_browser->window()->SetFocusToLocationBar(true); - } else { - target_browser->NewTab(); - } - target_browser->window()->Show(); -} - void ChromeShellDelegate::OpenFileManager() { #if defined(OS_CHROMEOS) file_manager_util::OpenApplication(); diff --git a/chrome/browser/ui/views/ash/chrome_shell_delegate.h b/chrome/browser/ui/views/ash/chrome_shell_delegate.h index 8d1c9a5..60cd2e1 100644 --- a/chrome/browser/ui/views/ash/chrome_shell_delegate.h +++ b/chrome/browser/ui/views/ash/chrome_shell_delegate.h @@ -39,7 +39,6 @@ class ChromeShellDelegate : public ash::ShellDelegate, virtual void Exit() OVERRIDE; virtual void NewTab() OVERRIDE; virtual void NewWindow(bool is_incognito) OVERRIDE; - virtual void Search() OVERRIDE; virtual void OpenFileManager() OVERRIDE; virtual void OpenCrosh() OVERRIDE; virtual void OpenMobileSetup(const std::string& service_path) OVERRIDE; diff --git a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc index 4a008c2..7075317 100644 --- a/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc +++ b/chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc @@ -178,7 +178,6 @@ struct I18nContentToMessage { { "keyboardOverlayTaskManager", IDS_KEYBOARD_OVERLAY_TASK_MANAGER }, { "keyboardOverlayToggleAccessibilityFeatures", IDS_KEYBOARD_OVERLAY_TOGGLE_ACCESSIBILITY_FEATURES }, - { "keyboardOverlayToggleAppList", IDS_KEYBOARD_OVERLAY_TOGGLE_APP_LIST }, { "keyboardOverlayToggleBookmarkBar", IDS_KEYBOARD_OVERLAY_TOGGLE_BOOKMARK_BAR }, { "keyboardOverlayToggleCapsLock", IDS_KEYBOARD_OVERLAY_TOGGLE_CAPS_LOCK }, |