| Index: ash/accelerators/accelerator_controller.cc
|
| diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
|
| index b3309d24f12a9c6a67844a71793dd659f9cbd2aa..f00c079b45365384054a291654b2fc01d31cc705 100644
|
| --- a/ash/accelerators/accelerator_controller.cc
|
| +++ b/ash/accelerators/accelerator_controller.cc
|
| @@ -547,6 +547,15 @@ void HandlePositionCenter() {
|
| wm::CenterWindow(wm::GetActiveWindow());
|
| }
|
|
|
| +bool CanHandleUnpin() {
|
| + wm::WindowState* window_state = wm::GetActiveWindowState();
|
| + return window_state && window_state->IsPinned();
|
| +}
|
| +
|
| +void HandleUnpin() {
|
| + accelerators::Unpin();
|
| +}
|
| +
|
| #if defined(OS_CHROMEOS)
|
| void HandleBrightnessDown(BrightnessControlDelegate* delegate,
|
| const ui::Accelerator& accelerator) {
|
| @@ -1028,6 +1037,8 @@ bool AcceleratorController::CanPerformAction(
|
| return CanHandleWindowSnapOrDock();
|
| case WINDOW_POSITION_CENTER:
|
| return CanHandlePositionCenter();
|
| + case UNPIN:
|
| + return CanHandleUnpin();
|
| #if defined(OS_CHROMEOS)
|
| case DEBUG_ADD_REMOVE_DISPLAY:
|
| case DEBUG_TOGGLE_TOUCH_PAD:
|
| @@ -1283,6 +1294,9 @@ void AcceleratorController::PerformAction(AcceleratorAction action,
|
| case WINDOW_POSITION_CENTER:
|
| HandlePositionCenter();
|
| break;
|
| + case UNPIN:
|
| + HandleUnpin();
|
| + break;
|
| #if defined(OS_CHROMEOS)
|
| case BRIGHTNESS_DOWN:
|
| HandleBrightnessDown(brightness_control_delegate_.get(), accelerator);
|
|
|