summaryrefslogtreecommitdiffstats
path: root/ash/accelerators/accelerator_controller.cc
diff options
context:
space:
mode:
authormukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-07 03:48:41 +0000
committermukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-07 03:48:41 +0000
commit3e1cdd31535460d1ade1c649587978b682e3b850 (patch)
tree7156b3ac37d0b5e77b144c076cd946f575b539fb /ash/accelerators/accelerator_controller.cc
parent1233572cc709dabbd9f39004d0a6f630361f0800 (diff)
downloadchromium_src-3e1cdd31535460d1ade1c649587978b682e3b850.zip
chromium_src-3e1cdd31535460d1ade1c649587978b682e3b850.tar.gz
chromium_src-3e1cdd31535460d1ade1c649587978b682e3b850.tar.bz2
Allow taking screenshots for all of minitors at the same time.
It contains a fix of screenshot filename too. Because multiple screenshot taking happens in a very short time period, the filename could be same for all of the monitors. Thus we need to rename them by specifying some suffix. Here I just added numbers (2), (3), ... BUG=130718 TEST=none Review URL: https://chromiumcodereview.appspot.com/10514002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/accelerator_controller.cc')
-rw-r--r--ash/accelerators/accelerator_controller.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index f1fb427..f5354fa 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -13,6 +13,7 @@
#include "ash/launcher/launcher.h"
#include "ash/launcher/launcher_delegate.h"
#include "ash/launcher/launcher_model.h"
+#include "ash/monitor/monitor_controller.h"
#include "ash/monitor/multi_monitor_manager.h"
#include "ash/screenshot_delegate.h"
#include "ash/shell.h"
@@ -351,10 +352,11 @@ bool AcceleratorController::AcceleratorPressed(
return HandleRestoreTab();
case TAKE_SCREENSHOT:
if (screenshot_delegate_.get()) {
- // TODO(oshima): Use the active window for now. Use the mouse
- // location if there is no active window. crbug.com/130718.
- aura::RootWindow* root_window = Shell::GetActiveRootWindow();
- screenshot_delegate_->HandleTakeScreenshot(root_window);
+ std::vector<aura::RootWindow*> root_windows;
+ ash::Shell::GetInstance()->monitor_controller()->GetAllRootWindows(
+ &root_windows);
+ for (size_t i = 0; i < root_windows.size(); ++i)
+ screenshot_delegate_->HandleTakeScreenshot(root_windows[i]);
}
// Return true to prevent propagation of the key event.
return true;