OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include "ash/launcher/launcher_types.h" | 7 #include "ash/launcher/launcher_types.h" |
8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 #if defined(OS_CHROMEOS) | 200 #if defined(OS_CHROMEOS) |
201 if (as_dialog) { | 201 if (as_dialog) { |
202 Browser* browser = | 202 Browser* browser = |
203 browser::FindBrowserWithWindow(ash::wm::GetActiveWindow()); | 203 browser::FindBrowserWithWindow(ash::wm::GetActiveWindow()); |
204 // Open the select file dialog only if there is an active browser where the | 204 // Open the select file dialog only if there is an active browser where the |
205 // selected file is displayed. Otherwise open a file manager in a tab. | 205 // selected file is displayed. Otherwise open a file manager in a tab. |
206 if (browser) { | 206 if (browser) { |
207 browser->OpenFile(); | 207 browser->OpenFile(); |
208 return; | 208 return; |
209 } | 209 } |
210 } else { | |
211 file_manager_util::OpenApplication(); | |
Vladislav Kaznacheev
2012/11/06 14:09:17
You are changing the behavior but the comment abov
SeRya
2012/11/06 15:36:17
The comment updated.
| |
210 } | 212 } |
211 file_manager_util::OpenApplication(); | |
212 #endif | 213 #endif |
213 } | 214 } |
214 | 215 |
215 void ChromeShellDelegate::OpenCrosh() { | 216 void ChromeShellDelegate::OpenCrosh() { |
216 #if defined(OS_CHROMEOS) | 217 #if defined(OS_CHROMEOS) |
217 Browser* browser = GetTargetBrowser(); | 218 Browser* browser = GetTargetBrowser(); |
218 GURL crosh_url = TerminalExtensionHelper::GetCroshExtensionURL( | 219 GURL crosh_url = TerminalExtensionHelper::GetCroshExtensionURL( |
219 browser->profile()); | 220 browser->profile()); |
220 if (!crosh_url.is_valid()) | 221 if (!crosh_url.is_valid()) |
221 return; | 222 return; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
481 ash::Shell::GetInstance()->ShowLauncher(); | 482 ash::Shell::GetInstance()->ShowLauncher(); |
482 break; | 483 break; |
483 default: | 484 default: |
484 NOTREACHED() << "Unexpected notification " << type; | 485 NOTREACHED() << "Unexpected notification " << type; |
485 } | 486 } |
486 #else | 487 #else |
487 // MSVC++ warns about switch statements without any cases. | 488 // MSVC++ warns about switch statements without any cases. |
488 NOTREACHED() << "Unexpected notification " << type; | 489 NOTREACHED() << "Unexpected notification " << type; |
489 #endif | 490 #endif |
490 } | 491 } |
OLD | NEW |