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

Side by Side Diff: ui/snapshot/screenshot_grabber.cc

Issue 2326933002: MacViews: Fix gn check fail for mac_views_browser on Aura dependencies. (Closed)
Patch Set: Typo. Created 4 years, 3 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
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/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
18 #include "base/single_thread_task_runner.h" 18 #include "base/single_thread_task_runner.h"
19 #include "base/task_runner.h" 19 #include "base/task_runner.h"
20 #include "base/threading/sequenced_worker_pool.h" 20 #include "base/threading/sequenced_worker_pool.h"
21 #include "base/threading/thread_task_runner_handle.h" 21 #include "base/threading/thread_task_runner_handle.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "ui/gfx/image/image.h" 23 #include "ui/gfx/image/image.h"
24 #include "ui/snapshot/snapshot.h" 24 #include "ui/snapshot/snapshot.h"
25 25
26 #if defined(USE_AURA) 26 #if defined(USE_AURA)
27 #include "ui/aura/client/cursor_client.h" 27 #include "ui/aura/client/cursor_client.h" // nogncheck
28 #include "ui/aura/window.h" 28 #include "ui/aura/window.h" // nogncheck
29 #endif 29 #endif
30 30
31 namespace ui { 31 namespace ui {
32 32
33 namespace { 33 namespace {
34 // The minimum interval between two screenshot commands. It has to be 34 // The minimum interval between two screenshot commands. It has to be
35 // more than 1000 to prevent the conflict of filenames. 35 // more than 1000 to prevent the conflict of filenames.
36 const int kScreenshotMinimumIntervalInMS = 1000; 36 const int kScreenshotMinimumIntervalInMS = 1000;
37 37
38 using ShowNotificationCallback = 38 using ShowNotificationCallback =
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 ShowNotificationCallback notification_callback(base::Bind( 229 ShowNotificationCallback notification_callback(base::Bind(
230 &ScreenshotGrabber::NotifyScreenshotCompleted, factory_.GetWeakPtr())); 230 &ScreenshotGrabber::NotifyScreenshotCompleted, factory_.GetWeakPtr()));
231 client_->PrepareFileAndRunOnBlockingPool( 231 client_->PrepareFileAndRunOnBlockingPool(
232 screenshot_path, blocking_task_runner_, 232 screenshot_path, blocking_task_runner_,
233 base::Bind(&SaveScreenshot, base::ThreadTaskRunnerHandle::Get(), 233 base::Bind(&SaveScreenshot, base::ThreadTaskRunnerHandle::Get(),
234 notification_callback, screenshot_path, png_data)); 234 notification_callback, screenshot_path, png_data));
235 } 235 }
236 236
237 } // namespace ui 237 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698