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..7d84c3471a53decb22ee278a4f8da04e9aaba6f7 |
--- /dev/null |
+++ b/chrome/browser/ui/browser_commands_chromeos.cc |
@@ -0,0 +1,31 @@ |
+// 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 |
+ |
sky
2014/01/10 19:12:32
Nuke all these empty lines.
mfomitchev
2014/01/10 19:45:57
Done.
|
+ |
+ |
+ |