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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <climits> | 9 #include <climits> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
15 #include "base/location.h" | 15 #include "base/location.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/memory/ptr_util.h" |
17 #include "base/message_loop/message_loop.h" | 18 #include "base/message_loop/message_loop.h" |
18 #include "base/single_thread_task_runner.h" | 19 #include "base/single_thread_task_runner.h" |
19 #include "base/task_runner.h" | 20 #include "base/task_runner.h" |
20 #include "base/threading/sequenced_worker_pool.h" | 21 #include "base/threading/sequenced_worker_pool.h" |
21 #include "base/threading/thread_task_runner_handle.h" | 22 #include "base/threading/thread_task_runner_handle.h" |
22 #include "base/time/time.h" | 23 #include "base/time/time.h" |
23 #include "ui/gfx/image/image.h" | 24 #include "ui/gfx/image/image.h" |
24 #include "ui/snapshot/snapshot.h" | 25 #include "ui/snapshot/snapshot.h" |
25 | 26 |
26 #if defined(USE_AURA) | 27 #if defined(USE_AURA) |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 229 |
229 ShowNotificationCallback notification_callback(base::Bind( | 230 ShowNotificationCallback notification_callback(base::Bind( |
230 &ScreenshotGrabber::NotifyScreenshotCompleted, factory_.GetWeakPtr())); | 231 &ScreenshotGrabber::NotifyScreenshotCompleted, factory_.GetWeakPtr())); |
231 client_->PrepareFileAndRunOnBlockingPool( | 232 client_->PrepareFileAndRunOnBlockingPool( |
232 screenshot_path, blocking_task_runner_, | 233 screenshot_path, blocking_task_runner_, |
233 base::Bind(&SaveScreenshot, base::ThreadTaskRunnerHandle::Get(), | 234 base::Bind(&SaveScreenshot, base::ThreadTaskRunnerHandle::Get(), |
234 notification_callback, screenshot_path, png_data)); | 235 notification_callback, screenshot_path, png_data)); |
235 } | 236 } |
236 | 237 |
237 } // namespace ui | 238 } // namespace ui |
OLD | NEW |