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

Unified Diff: chrome/browser/automation/automation_provider_observers.h

Issue 7523063: Add a hook for capturing a user profile photo and saving it to file and local state. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed all the comments Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_provider_observers.h
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 34cf0ce38bf33b8308b9c18f8e2d39119d0a1152..ad8228060be59ecfa005de9060dee0c5108d72de 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -27,6 +27,7 @@
#include "chrome/browser/chromeos/login/enterprise_enrollment_view.h"
#include "chrome/browser/chromeos/login/login_status_consumer.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
+#include "chrome/browser/chromeos/options/take_photo_dialog.h"
Nirnimesh 2011/07/30 10:32:31 Including the .h might not be necessary. Just for
frankf 2011/08/01 19:31:09 I don't think you can forward declare a nested cla
#endif // defined(OS_CHROMEOS)
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_manager.h"
@@ -957,6 +958,31 @@ class SSIDConnectObserver : public NetworkConnectObserver {
DISALLOW_COPY_AND_ASSIGN(SSIDConnectObserver);
};
+
+// Waits for a capture success or failure from the camera
+// and returns the status to automation provider.
+class PhotoCaptureObserver : public chromeos::TakePhotoDialog::Observer {
+ public:
+ PhotoCaptureObserver(AutomationProvider* automation,
+ IPC::Message* reply_message);
+ virtual ~PhotoCaptureObserver();
+
+ virtual void OnCaptureSuccess(
+ chromeos::TakePhotoDialog* dialog,
+ chromeos::TakePhotoView* take_photo_view);
+ virtual void OnCaptureFailure(
+ chromeos::TakePhotoDialog* dialog,
+ chromeos::TakePhotoView* take_photo_view);
+ virtual void OnCapturingStopped(
+ chromeos::TakePhotoDialog* dialog,
+ chromeos::TakePhotoView* take_photo_view);
+
+ private:
+ base::WeakPtr<AutomationProvider> automation_;
+ scoped_ptr<IPC::Message> reply_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(PhotoCaptureObserver);
+};
#endif // defined(OS_CHROMEOS)
// Waits for the bookmark model to load.

Powered by Google App Engine
This is Rietveld 408576698