Chromium Code Reviews| Index: chrome/browser/ui/browser_commands_chromeos.cc |
| diff --git a/chrome/browser/ui/browser_commands_chromeos.cc b/chrome/browser/ui/browser_commands_chromeos.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef51084140014a69b8907fe4c1af4192fdef9d62 |
| --- /dev/null |
| +++ b/chrome/browser/ui/browser_commands_chromeos.cc |
| @@ -0,0 +1,28 @@ |
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
|
sky
2015/02/04 17:06:01
no copyright.
caelyn
2015/02/04 20:30:12
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/ui/browser_commands_chromeos.h" |
| + |
| +#include "ash/accelerators/accelerator_controller.h" |
| +#include "ash/metrics/user_metrics_recorder.h" |
| +#include "ash/screenshot_delegate.h" |
| +#include "ash/shell.h" |
| +#include "base/metrics/user_metrics_action.h" |
| +#include "content/public/browser/user_metrics.h" |
| + |
| +using base::UserMetricsAction; |
| + |
| +namespace chrome { |
| + |
| +void TakeScreenshot() { |
| + content::RecordAction(UserMetricsAction("Menu_Take_Screenshot")); |
| + ash::ScreenshotDelegate* screenshot_delegate = ash::Shell::GetInstance()-> |
| + accelerator_controller()->screenshot_delegate(); |
| + if (screenshot_delegate && |
| + screenshot_delegate->CanTakeScreenshot()) { |
| + screenshot_delegate->HandleTakeScreenshotForAllRootWindows(); |
| + } |
| +} |
| + |
| +} // namespace chrome |