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

Side by Side Diff: chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h

Issue 1135413002: Disable screenshot uploading if there has been user input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review Created 5 years, 7 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 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Failed due to a client-side error. 55 // Failed due to a client-side error.
56 FAILURE_CLIENT = 5 56 FAILURE_CLIENT = 5
57 }; 57 };
58 58
59 // A delegate interface used by DeviceCommandScreenshotJob to retrieve its 59 // A delegate interface used by DeviceCommandScreenshotJob to retrieve its
60 // dependencies. 60 // dependencies.
61 class Delegate { 61 class Delegate {
62 public: 62 public:
63 virtual ~Delegate() {} 63 virtual ~Delegate() {}
64 64
65 // Returns true if screenshots are allowed in this session. Returns false
66 // if the current session is not an auto-launched kiosk session, or there
67 // have been certain types of user input that may result in leaking private
68 // information.
69 virtual bool IsScreenshotAllowed() = 0;
70
65 // Acquires a snapshot of |source_rect| in |window| and invokes |callback| 71 // Acquires a snapshot of |source_rect| in |window| and invokes |callback|
66 // with the PNG data. The passed-in callback will not be invoked after the 72 // with the PNG data. The passed-in callback will not be invoked after the
67 // delegate has been destroyed. See e.g. ScreenshotDelegate. 73 // delegate has been destroyed. See e.g. ScreenshotDelegate.
68 virtual void TakeSnapshot( 74 virtual void TakeSnapshot(
69 gfx::NativeWindow window, 75 gfx::NativeWindow window,
70 const gfx::Rect& source_rect, 76 const gfx::Rect& source_rect,
71 const ui::GrabWindowSnapshotAsyncPNGCallback& callback) = 0; 77 const ui::GrabWindowSnapshotAsyncPNGCallback& callback) = 0;
72 78
73 // Creates a new fully configured instance of an UploadJob. This method 79 // Creates a new fully configured instance of an UploadJob. This method
74 // may be called any number of times. 80 // may be called any number of times.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 scoped_ptr<UploadJob> upload_job_; 130 scoped_ptr<UploadJob> upload_job_;
125 131
126 base::WeakPtrFactory<DeviceCommandScreenshotJob> weak_ptr_factory_; 132 base::WeakPtrFactory<DeviceCommandScreenshotJob> weak_ptr_factory_;
127 133
128 DISALLOW_COPY_AND_ASSIGN(DeviceCommandScreenshotJob); 134 DISALLOW_COPY_AND_ASSIGN(DeviceCommandScreenshotJob);
129 }; 135 };
130 136
131 } // namespace policy 137 } // namespace policy
132 138
133 #endif // CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENS HOT_JOB_H_ 139 #endif // CHROME_BROWSER_CHROMEOS_POLICY_REMOTE_COMMANDS_DEVICE_COMMAND_SCREENS HOT_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698