Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / browser_commands_chromeos.cc
blobc955b67ca495d2ec6563b081a0053c6f105de606
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/browser_commands_chromeos.h"
7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/screenshot_delegate.h"
9 #include "ash/shell.h"
10 #include "base/metrics/user_metrics_action.h"
11 #include "content/public/browser/user_metrics.h"
13 using base::UserMetricsAction;
15 namespace chrome {
17 void TakeScreenshot() {
18 content::RecordAction(UserMetricsAction("Menu_Take_Screenshot"));
19 ash::ScreenshotDelegate* screenshot_delegate = ash::Shell::GetInstance()->
20 accelerator_controller()->screenshot_delegate();
21 if (screenshot_delegate &&
22 screenshot_delegate->CanTakeScreenshot()) {
23 screenshot_delegate->HandleTakeScreenshotForAllRootWindows();
27 } // namespace chrome