OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/snapshot/screenshot_grabber.h" | 5 #include "ui/snapshot/screenshot_grabber.h" |
6 | 6 |
7 #include <climits> | 7 #include <climits> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/message_loop/message_loop.h" |
14 #include "base/task_runner.h" | 15 #include "base/task_runner.h" |
15 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
18 #include "ui/snapshot/snapshot.h" | 19 #include "ui/snapshot/snapshot.h" |
19 | 20 |
20 #if defined(USE_AURA) | 21 #if defined(USE_AURA) |
21 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
22 #endif | 23 #endif |
23 | 24 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 188 |
188 ShowNotificationCallback notification_callback(base::Bind( | 189 ShowNotificationCallback notification_callback(base::Bind( |
189 &ScreenshotGrabber::NotifyScreenshotCompleted, factory_.GetWeakPtr())); | 190 &ScreenshotGrabber::NotifyScreenshotCompleted, factory_.GetWeakPtr())); |
190 client_->PrepareFileAndRunOnBlockingPool( | 191 client_->PrepareFileAndRunOnBlockingPool( |
191 screenshot_path, blocking_task_runner_, | 192 screenshot_path, blocking_task_runner_, |
192 base::Bind(&SaveScreenshot, base::MessageLoop::current()->task_runner(), | 193 base::Bind(&SaveScreenshot, base::MessageLoop::current()->task_runner(), |
193 notification_callback, screenshot_path, png_data)); | 194 notification_callback, screenshot_path, png_data)); |
194 } | 195 } |
195 | 196 |
196 } // namespace ui | 197 } // namespace ui |
OLD | NEW |