Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3625)

Unified Diff: chrome/browser/ui/views/ash/chrome_shell_delegate.cc

Issue 10534053: ash/chromeos: "Search" key to toggle app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for nit in #2 Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/views/ash/chrome_shell_delegate.cc b/chrome/browser/ui/views/ash/chrome_shell_delegate.cc
index cf681708e147b1861a35be25964d62fc321c2ad9..33d092d5f5b399ee9f4d9b39a86fbb17b963e15f 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();
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/webui/chromeos/keyboard_overlay_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698