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

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: Rebased 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
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5ff9bb7d79eba22d3aeb2e4eee0ca0dc1ddb614c..256e9f9e4a1339b5fccf782609e7674d81fd7d9d 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -26,7 +26,9 @@
#include "chrome/browser/chromeos/login/enterprise_enrollment_screen_actor.h"
#include "chrome/browser/chromeos/login/enterprise_enrollment_view.h"
#include "chrome/browser/chromeos/login/login_status_consumer.h"
+#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
+#include "chrome/browser/chromeos/options/take_photo_dialog.h"
#endif // defined(OS_CHROMEOS)
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_manager.h"
@@ -981,6 +983,38 @@ class SSIDConnectObserver : public NetworkConnectObserver {
DISALLOW_COPY_AND_ASSIGN(SSIDConnectObserver);
};
+
+// Waits for profile photo to be captured by the camera,
+// saved to file, and the path set in local state preferences
+class PhotoCaptureObserver : public chromeos::TakePhotoDialog::Observer,
+ public chromeos::UserManager::Observer {
+ public:
+ PhotoCaptureObserver(AutomationProvider* automation,
+ IPC::Message* reply_message);
+ virtual ~PhotoCaptureObserver();
+
+ // TakePhotoDialog::Observer overrides
+ virtual void OnCaptureSuccess(
+ chromeos::TakePhotoDialog* dialog,
+ chromeos::TakePhotoView* take_photo_view) OVERRIDE;
+ virtual void OnCaptureFailure(
+ chromeos::TakePhotoDialog* dialog,
+ chromeos::TakePhotoView* take_photo_view) OVERRIDE;
+ virtual void OnCapturingStopped(
+ chromeos::TakePhotoDialog* dialog,
+ chromeos::TakePhotoView* take_photo_view) OVERRIDE;
+
+ // UserManager::Observer overrides
+ virtual void LocalStateChanged(
+ chromeos::UserManager* user_manager) OVERRIDE;
+
+ 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.
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698