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

Side by Side 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, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider_observers_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
11 #include <set> 11 #include <set>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/synchronization/waitable_event.h" 18 #include "base/synchronization/waitable_event.h"
19 #include "chrome/browser/automation/automation_provider_json.h" 19 #include "chrome/browser/automation/automation_provider_json.h"
20 #include "chrome/browser/automation/automation_tab_helper.h" 20 #include "chrome/browser/automation/automation_tab_helper.h"
21 #include "chrome/browser/bookmarks/bookmark_model_observer.h" 21 #include "chrome/browser/bookmarks/bookmark_model_observer.h"
22 #include "chrome/browser/browsing_data_remover.h" 22 #include "chrome/browser/browsing_data_remover.h"
23 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
24 #include "chrome/browser/chromeos/cros/network_library.h" 24 #include "chrome/browser/chromeos/cros/network_library.h"
25 #include "chrome/browser/chromeos/login/enterprise_enrollment_screen.h" 25 #include "chrome/browser/chromeos/login/enterprise_enrollment_screen.h"
26 #include "chrome/browser/chromeos/login/enterprise_enrollment_screen_actor.h" 26 #include "chrome/browser/chromeos/login/enterprise_enrollment_screen_actor.h"
27 #include "chrome/browser/chromeos/login/enterprise_enrollment_view.h" 27 #include "chrome/browser/chromeos/login/enterprise_enrollment_view.h"
28 #include "chrome/browser/chromeos/login/login_status_consumer.h" 28 #include "chrome/browser/chromeos/login/login_status_consumer.h"
29 #include "chrome/browser/chromeos/login/user_manager.h"
29 #include "chrome/browser/chromeos/login/wizard_controller.h" 30 #include "chrome/browser/chromeos/login/wizard_controller.h"
31 #include "chrome/browser/chromeos/options/take_photo_dialog.h"
30 #endif // defined(OS_CHROMEOS) 32 #endif // defined(OS_CHROMEOS)
31 #include "chrome/browser/download/download_item.h" 33 #include "chrome/browser/download/download_item.h"
32 #include "chrome/browser/download/download_manager.h" 34 #include "chrome/browser/download/download_manager.h"
33 #include "chrome/browser/history/history.h" 35 #include "chrome/browser/history/history.h"
34 #include "chrome/browser/history/history_types.h" 36 #include "chrome/browser/history/history_types.h"
35 #include "chrome/browser/importer/importer_data_types.h" 37 #include "chrome/browser/importer/importer_data_types.h"
36 #include "chrome/browser/importer/importer_progress_observer.h" 38 #include "chrome/browser/importer/importer_progress_observer.h"
37 #include "chrome/browser/password_manager/password_store_change.h" 39 #include "chrome/browser/password_manager/password_store_change.h"
38 #include "chrome/browser/password_manager/password_store_consumer.h" 40 #include "chrome/browser/password_manager/password_store_consumer.h"
39 #include "chrome/browser/policy/browser_policy_connector.h" 41 #include "chrome/browser/policy/browser_policy_connector.h"
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 const std::string& ssid); 976 const std::string& ssid);
975 977
976 virtual const chromeos::WifiNetwork* GetWifiNetwork( 978 virtual const chromeos::WifiNetwork* GetWifiNetwork(
977 chromeos::NetworkLibrary* network_library); 979 chromeos::NetworkLibrary* network_library);
978 980
979 private: 981 private:
980 std::string ssid_; 982 std::string ssid_;
981 983
982 DISALLOW_COPY_AND_ASSIGN(SSIDConnectObserver); 984 DISALLOW_COPY_AND_ASSIGN(SSIDConnectObserver);
983 }; 985 };
986
987 // Waits for profile photo to be captured by the camera,
988 // saved to file, and the path set in local state preferences
989 class PhotoCaptureObserver : public chromeos::TakePhotoDialog::Observer,
990 public chromeos::UserManager::Observer {
991 public:
992 PhotoCaptureObserver(AutomationProvider* automation,
993 IPC::Message* reply_message);
994 virtual ~PhotoCaptureObserver();
995
996 // TakePhotoDialog::Observer overrides
997 virtual void OnCaptureSuccess(
998 chromeos::TakePhotoDialog* dialog,
999 chromeos::TakePhotoView* take_photo_view) OVERRIDE;
1000 virtual void OnCaptureFailure(
1001 chromeos::TakePhotoDialog* dialog,
1002 chromeos::TakePhotoView* take_photo_view) OVERRIDE;
1003 virtual void OnCapturingStopped(
1004 chromeos::TakePhotoDialog* dialog,
1005 chromeos::TakePhotoView* take_photo_view) OVERRIDE;
1006
1007 // UserManager::Observer overrides
1008 virtual void LocalStateChanged(
1009 chromeos::UserManager* user_manager) OVERRIDE;
1010
1011 private:
1012 base::WeakPtr<AutomationProvider> automation_;
1013 scoped_ptr<IPC::Message> reply_message_;
1014
1015 DISALLOW_COPY_AND_ASSIGN(PhotoCaptureObserver);
1016 };
1017
984 #endif // defined(OS_CHROMEOS) 1018 #endif // defined(OS_CHROMEOS)
985 1019
986 // Waits for the bookmark model to load. 1020 // Waits for the bookmark model to load.
987 class AutomationProviderBookmarkModelObserver : public BookmarkModelObserver { 1021 class AutomationProviderBookmarkModelObserver : public BookmarkModelObserver {
988 public: 1022 public:
989 AutomationProviderBookmarkModelObserver(AutomationProvider* provider, 1023 AutomationProviderBookmarkModelObserver(AutomationProvider* provider,
990 IPC::Message* reply_message, 1024 IPC::Message* reply_message,
991 BookmarkModel* model); 1025 BookmarkModel* model);
992 virtual ~AutomationProviderBookmarkModelObserver(); 1026 virtual ~AutomationProviderBookmarkModelObserver();
993 1027
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 1672
1639 private: 1673 private:
1640 NotificationRegistrar registrar_; 1674 NotificationRegistrar registrar_;
1641 base::WeakPtr<AutomationProvider> automation_; 1675 base::WeakPtr<AutomationProvider> automation_;
1642 scoped_ptr<IPC::Message> reply_message_; 1676 scoped_ptr<IPC::Message> reply_message_;
1643 1677
1644 DISALLOW_COPY_AND_ASSIGN(DragTargetDropAckNotificationObserver); 1678 DISALLOW_COPY_AND_ASSIGN(DragTargetDropAckNotificationObserver);
1645 }; 1679 };
1646 1680
1647 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ 1681 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_
OLDNEW
« 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