Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / browser_commands_chromeos.cc
blobd6e6dbb83e03e1fea06dbc33cf471529b86e4c04
1 // Copyright 2015 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/metrics/user_metrics_recorder.h"
9 #include "ash/screenshot_delegate.h"
10 #include "ash/shell.h"
11 #include "base/metrics/user_metrics_action.h"
12 #include "content/public/browser/user_metrics.h"
14 using base::UserMetricsAction;
16 void TakeScreenshot() {
17 content::RecordAction(UserMetricsAction("Menu_Take_Screenshot"));
18 ash::ScreenshotDelegate* screenshot_delegate = ash::Shell::GetInstance()->
19 accelerator_controller()->screenshot_delegate();
20 if (screenshot_delegate &&
21 screenshot_delegate->CanTakeScreenshot()) {
22 screenshot_delegate->HandleTakeScreenshotForAllRootWindows();