Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/browser/ui/browser_commands_chromeos.cc

Issue 132233003: Adding a menu item to take a screenshot under "More Tools" submenu in the Wrench menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nuking some empty lines Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 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.
4
5 #include "chrome/browser/ui/browser_commands_chromeos.h"
6
7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/screenshot_delegate.h"
9 #include "ash/shell.h"
10 #include "content/public/browser/user_metrics.h"
11 #include "content/public/common/user_metrics_action.h"
12
13 using content::UserMetricsAction;
14
15 namespace chrome {
16
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();
24 }
25 }
26
27 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands_chromeos.h ('k') | chrome/browser/ui/toolbar/wrench_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698