| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_NEW_PROFILE_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_NEW_PROFILE_HANDLER_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "content/browser/webui/web_ui.h" | |
| 10 | |
| 11 class RefCountedMemory; | |
| 12 | |
| 13 namespace base { | |
| 14 class ListValue; | |
| 15 } | |
| 16 | |
| 17 // The handler for Javascript messages related to the "new profile" page. | |
| 18 class NewProfileHandler : public WebUIMessageHandler { | |
| 19 public: | |
| 20 NewProfileHandler(); | |
| 21 | |
| 22 // WebUIMessageHandler implementation. | |
| 23 virtual void RegisterMessages() OVERRIDE; | |
| 24 | |
| 25 // Callback for the "create" message - finishes creating a profile. | |
| 26 void HandleCreate(const base::ListValue* args); | |
| 27 | |
| 28 // Callback for the "cancel" message - cancels creating a profile. | |
| 29 void HandleCancel(const base::ListValue* args); | |
| 30 | |
| 31 // Callback for the "requestProfileInfo" message - sends profile info. | |
| 32 void HandleRequestProfileInfo(const base::ListValue* args); | |
| 33 | |
| 34 private: | |
| 35 // Send the default avatar images to the page. | |
| 36 void SendDefaultAvatarImages(); | |
| 37 | |
| 38 // Send information about the profile to the page. | |
| 39 void SendProfileInfo(); | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(NewProfileHandler); | |
| 42 }; | |
| 43 | |
| 44 #endif // CHROME_BROWSER_UI_WEBUI_NEW_PROFILE_HANDLER_H_ | |
| OLD | NEW |