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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h

Issue 8360003: [cros] OOBE: add histograms for Profile image fetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 2 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
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_UI_WEBUI_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_HANDLER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/time.h"
9 #include "chrome/browser/chromeos/login/user_image_screen_actor.h" 10 #include "chrome/browser/chromeos/login/user_image_screen_actor.h"
10 #include "chrome/browser/chromeos/options/take_photo_dialog.h" 11 #include "chrome/browser/chromeos/options/take_photo_dialog.h"
11 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 12 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
12 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 13 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/gfx/native_widget_types.h" 15 #include "ui/gfx/native_widget_types.h"
15 16
16 namespace base { 17 namespace base {
17 class ListValue; 18 class ListValue;
18 } // namespace base 19 } // namespace base
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private: 57 private:
57 // Opens the camera capture dialog. 58 // Opens the camera capture dialog.
58 void HandleTakePhoto(const base::ListValue* args); 59 void HandleTakePhoto(const base::ListValue* args);
59 60
60 // Handles clicking on default user image. 61 // Handles clicking on default user image.
61 void HandleSelectImage(const base::ListValue* args); 62 void HandleSelectImage(const base::ListValue* args);
62 63
63 // Called when user accept the image closing the screen. 64 // Called when user accept the image closing the screen.
64 void HandleImageAccepted(const base::ListValue* args); 65 void HandleImageAccepted(const base::ListValue* args);
65 66
67 // Called when the user image screen has been loaded and shown.
68 void HandleScreenShown(const base::ListValue* args);
69
66 // Called when the camera presence check has been completed. 70 // Called when the camera presence check has been completed.
67 void OnCameraPresenceCheckDone(); 71 void OnCameraPresenceCheckDone();
68 72
69 UserImageScreenActor::Delegate* screen_; 73 UserImageScreenActor::Delegate* screen_;
70 74
71 // Keeps whether screen should be shown right after initialization. 75 // Keeps whether screen should be shown right after initialization.
72 bool show_on_init_; 76 bool show_on_init_;
73 77
74 // Index of the selected default user image. -1 if the photo is taken. 78 // Index of the selected default user image. -1 if the photo is taken.
75 int selected_image_; 79 int selected_image_;
76 80
77 // Last user photo, if taken. 81 // Last user photo, if taken.
78 SkBitmap user_photo_; 82 SkBitmap user_photo_;
79 83
80 // Downloaded user profile picture if present. 84 // Downloaded user profile picture if present.
81 SkBitmap profile_picture_; 85 SkBitmap profile_picture_;
82 86
83 // Its data URL. 87 // Its data URL.
84 std::string profile_picture_data_url_; 88 std::string profile_picture_data_url_;
85 89
86 base::WeakPtrFactory<UserImageScreenHandler> weak_factory_; 90 base::WeakPtrFactory<UserImageScreenHandler> weak_factory_;
87 91
92 base::Time screen_show_time_;
93
88 DISALLOW_COPY_AND_ASSIGN(UserImageScreenHandler); 94 DISALLOW_COPY_AND_ASSIGN(UserImageScreenHandler);
89 }; 95 };
90 96
91 } // namespace chromeos 97 } // namespace chromeos
92 98
93 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_HANDLER_H_ 99 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_IMAGE_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698