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

Unified Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

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: 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/testing_automation_provider_chromeos.cc
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc
index f6c888e76bcdcf232711f98f4f70b52bc08ebf7b..a5e272aa4dc52c574077c8e4def7a42dba12c0c0 100644
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc
@@ -22,13 +22,17 @@
#include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/network_state_notifier.h"
+#include "chrome/browser/chromeos/options/take_photo_dialog.h"
#include "chrome/browser/chromeos/proxy_cros_settings_provider.h"
#include "chrome/browser/policy/browser_policy_connector.h"
#include "chrome/browser/policy/cloud_policy_cache_base.h"
#include "chrome/browser/policy/cloud_policy_data_store.h"
#include "chrome/browser/policy/cloud_policy_subsystem.h"
#include "chrome/browser/policy/enterprise_install_attributes.h"
+#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/views/window.h"
#include "policy/policy_constants.h"
+#include "views/widget/widget.h"
using chromeos::CrosLibrary;
using chromeos::NetworkLibrary;
@@ -1001,3 +1005,22 @@ void TestingAutomationProvider::SetMute(DictionaryValue* args,
audio_handler->SetMuted(mute);
reply.SendSuccess(NULL);
}
+
+void TestingAutomationProvider::CaptureProfilePhoto(
+ Browser* browser,
+ DictionaryValue* args,
+ IPC::Message* reply_message) {
+
dennis_jeffrey 2011/07/29 20:10:06 remove this blank line
frankf 2011/07/29 21:50:40 Done.
+ chromeos::TakePhotoDialog* take_photo_dialog =
+ new chromeos::TakePhotoDialog(NULL);
+
+ // Set up an observer (it will delete itself).
+ take_photo_dialog->AddObserver(new PhotoCaptureObserver(
+ this, reply_message));
+
+ views::Widget* window = browser::CreateViewsWindow(
+ browser->window()->GetNativeHandle(),
+ take_photo_dialog);
dennis_jeffrey 2011/07/29 20:10:06 fit this on the previous line
frankf 2011/07/29 21:50:40 Done.
+ window->SetAlwaysOnTop(true);
+ window->Show();
+}

Powered by Google App Engine
This is Rietveld 408576698