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 "ash/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/caps_lock_delegate.h" | 9 #include "ash/caps_lock_delegate.h" |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 } | 327 } |
328 // Return true to prevent propagation of the key event. | 328 // Return true to prevent propagation of the key event. |
329 return true; | 329 return true; |
330 case TAKE_PARTIAL_SCREENSHOT: | 330 case TAKE_PARTIAL_SCREENSHOT: |
331 if (screenshot_delegate_.get()) | 331 if (screenshot_delegate_.get()) |
332 ash::Shell::GetInstance()->delegate()-> | 332 ash::Shell::GetInstance()->delegate()-> |
333 StartPartialScreenshot(screenshot_delegate_.get()); | 333 StartPartialScreenshot(screenshot_delegate_.get()); |
334 // Return true to prevent propagation of the key event because | 334 // Return true to prevent propagation of the key event because |
335 // this key combination is reserved for partial screenshot. | 335 // this key combination is reserved for partial screenshot. |
336 return true; | 336 return true; |
337 case SEARCH_KEY: | 337 case SEARCH_KEY: |
mazda
2012/06/08 03:43:57
How about removing SEARCH_KEY instead of TOGGLE_AP
xiyuan
2012/06/08 16:37:13
Done.
| |
338 ash::Shell::GetInstance()->delegate()->Search(); | |
339 return true; | |
340 case TOGGLE_APP_LIST: | |
341 ash::Shell::GetInstance()->ToggleAppList(); | 338 ash::Shell::GetInstance()->ToggleAppList(); |
342 return true; | 339 return true; |
343 case TOGGLE_CAPS_LOCK: | 340 case TOGGLE_CAPS_LOCK: |
344 if (caps_lock_delegate_.get()) | 341 if (caps_lock_delegate_.get()) |
345 return caps_lock_delegate_->HandleToggleCapsLock(); | 342 return caps_lock_delegate_->HandleToggleCapsLock(); |
346 break; | 343 break; |
347 case BRIGHTNESS_DOWN: | 344 case BRIGHTNESS_DOWN: |
348 if (brightness_control_delegate_.get()) | 345 if (brightness_control_delegate_.get()) |
349 return brightness_control_delegate_->HandleBrightnessDown(accelerator); | 346 return brightness_control_delegate_->HandleBrightnessDown(accelerator); |
350 break; | 347 break; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 // Then set this one as active. | 558 // Then set this one as active. |
562 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); | 559 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); |
563 } | 560 } |
564 } | 561 } |
565 | 562 |
566 bool AcceleratorController::CanHandleAccelerators() const { | 563 bool AcceleratorController::CanHandleAccelerators() const { |
567 return true; | 564 return true; |
568 } | 565 } |
569 | 566 |
570 } // namespace ash | 567 } // namespace ash |
OLD | NEW |