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 #ifndef UI_SNAPSHOT_SCREENSHOT_GRABBER_H_ | 5 #ifndef UI_SNAPSHOT_SCREENSHOT_GRABBER_H_ |
6 #define UI_SNAPSHOT_SCREENSHOT_GRABBER_H_ | 6 #define UI_SNAPSHOT_SCREENSHOT_GRABBER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 private: | 78 private: |
79 #if defined(USE_AURA) | 79 #if defined(USE_AURA) |
80 class ScopedCursorHider; | 80 class ScopedCursorHider; |
81 #endif | 81 #endif |
82 | 82 |
83 void GrabWindowSnapshotAsyncCallback( | 83 void GrabWindowSnapshotAsyncCallback( |
84 const std::string& window_identifier, | 84 const std::string& window_identifier, |
85 base::FilePath screenshot_path, | 85 base::FilePath screenshot_path, |
86 bool is_partial, | 86 bool is_partial, |
87 scoped_refptr<base::RefCountedMemory> png_data); | 87 scoped_refptr<base::RefCountedBytes> png_data); |
88 | 88 |
89 // A weak pointer to the screenshot taker client. | 89 // A weak pointer to the screenshot taker client. |
90 ScreenshotGrabberDelegate* client_; | 90 ScreenshotGrabberDelegate* client_; |
91 | 91 |
92 // The timestamp when the screenshot task was issued last time. | 92 // The timestamp when the screenshot task was issued last time. |
93 base::TimeTicks last_screenshot_timestamp_; | 93 base::TimeTicks last_screenshot_timestamp_; |
94 | 94 |
95 // Task runner for blocking tasks. | 95 // Task runner for blocking tasks. |
96 scoped_refptr<base::TaskRunner> blocking_task_runner_; | 96 scoped_refptr<base::TaskRunner> blocking_task_runner_; |
97 | 97 |
98 #if defined(USE_AURA) | 98 #if defined(USE_AURA) |
99 // The object to hide cursor when taking screenshot. | 99 // The object to hide cursor when taking screenshot. |
100 std::unique_ptr<ScopedCursorHider> cursor_hider_; | 100 std::unique_ptr<ScopedCursorHider> cursor_hider_; |
101 #endif | 101 #endif |
102 | 102 |
103 base::ObserverList<ScreenshotGrabberObserver> observers_; | 103 base::ObserverList<ScreenshotGrabberObserver> observers_; |
104 base::WeakPtrFactory<ScreenshotGrabber> factory_; | 104 base::WeakPtrFactory<ScreenshotGrabber> factory_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(ScreenshotGrabber); | 106 DISALLOW_COPY_AND_ASSIGN(ScreenshotGrabber); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace ui | 109 } // namespace ui |
110 | 110 |
111 #endif // UI_SNAPSHOT_SCREENSHOT_GRABBER_H_ | 111 #endif // UI_SNAPSHOT_SCREENSHOT_GRABBER_H_ |
OLD | NEW |