OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENSHOT
_JOB_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENSHOT
_JOB_H_ |
6 #define CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENSHOT
_JOB_H_ | 6 #define CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENSHOT
_JOB_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // have been certain types of user input that may result in leaking private | 72 // have been certain types of user input that may result in leaking private |
73 // information. | 73 // information. |
74 virtual bool IsScreenshotAllowed() = 0; | 74 virtual bool IsScreenshotAllowed() = 0; |
75 | 75 |
76 // Acquires a snapshot of |source_rect| in |window| and invokes |callback| | 76 // Acquires a snapshot of |source_rect| in |window| and invokes |callback| |
77 // with the PNG data. The passed-in callback will not be invoked after the | 77 // with the PNG data. The passed-in callback will not be invoked after the |
78 // delegate has been destroyed. See e.g. ScreenshotDelegate. | 78 // delegate has been destroyed. See e.g. ScreenshotDelegate. |
79 virtual void TakeSnapshot( | 79 virtual void TakeSnapshot( |
80 gfx::NativeWindow window, | 80 gfx::NativeWindow window, |
81 const gfx::Rect& source_rect, | 81 const gfx::Rect& source_rect, |
82 const ui::GrabWindowSnapshotAsyncPNGCallback& callback) = 0; | 82 const ui::GrabWindowSnapshotAsyncEncodedCallback& callback) = 0; |
83 | 83 |
84 // Creates a new fully configured instance of an UploadJob. This method | 84 // Creates a new fully configured instance of an UploadJob. This method |
85 // may be called any number of times. | 85 // may be called any number of times. |
86 virtual std::unique_ptr<UploadJob> CreateUploadJob( | 86 virtual std::unique_ptr<UploadJob> CreateUploadJob( |
87 const GURL&, | 87 const GURL&, |
88 UploadJob::Delegate*) = 0; | 88 UploadJob::Delegate*) = 0; |
89 }; | 89 }; |
90 | 90 |
91 explicit DeviceCommandScreenshotJob( | 91 explicit DeviceCommandScreenshotJob( |
92 std::unique_ptr<Delegate> screenshot_delegate); | 92 std::unique_ptr<Delegate> screenshot_delegate); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 std::unique_ptr<UploadJob> upload_job_; | 137 std::unique_ptr<UploadJob> upload_job_; |
138 | 138 |
139 base::WeakPtrFactory<DeviceCommandScreenshotJob> weak_ptr_factory_; | 139 base::WeakPtrFactory<DeviceCommandScreenshotJob> weak_ptr_factory_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(DeviceCommandScreenshotJob); | 141 DISALLOW_COPY_AND_ASSIGN(DeviceCommandScreenshotJob); |
142 }; | 142 }; |
143 | 143 |
144 } // namespace policy | 144 } // namespace policy |
145 | 145 |
146 #endif // CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENS
HOT_JOB_H_ | 146 #endif // CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENS
HOT_JOB_H_ |
OLD | NEW |