| 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..8793943271188c31e1fbe85d978cec66b1388830
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/browser_commands_chromeos.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
| +// 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/screenshot_delegate.h"
|
| +#include "ash/shell.h"
|
| +#include "content/public/browser/user_metrics.h"
|
| +#include "content/public/common/user_metrics_action.h"
|
| +
|
| +using content::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
|
|
|