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

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

Issue 10703162: chromeos: Remove CryptohomeLibrary::TpmGetPassword and TpmIsReady (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add cryptohome_web_ui_handler.cc/h Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_CHROMEOS_CRYPTOHOME_WEB_UI_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_CRYPTOHOME_WEB_UI_HANDLER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chromeos/dbus/cryptohome_client.h"
13 #include "content/public/browser/web_ui_message_handler.h"
14
15 namespace chromeos {
16
17 // Class to handle messages from chrome://cryptohome.
18 class CryptohomeWebUIHandler : public content::WebUIMessageHandler {
19 public:
20 CryptohomeWebUIHandler();
21
22 virtual ~CryptohomeWebUIHandler();
23
24 // WebUIMessageHandler override.
25 virtual void RegisterMessages() OVERRIDE;
26
27 private:
28 // This method is called from JavaScript.
29 void OnRequestCryptohomeProperty(const base::ListValue* args);
30
31 // Returns a callback to handle Cryptohome property values.
32 CryptohomeClient::BoolMethodCallback GetCryptohomeBoolCallback(
33 const std::string& destination_id);
34
35 // This method is called when Cryptohome D-Bus method call completes.
36 void OnCryptohomeBoolProperty(const std::string& destination_id,
37 DBusMethodCallStatus call_status,
38 bool value);
39
40 // Sets textcontent of the element whose id is |destination_id| to true/false.
41 void SetCryptohomeBoolProperty(const std::string& destination_id,
42 bool value);
43
44 // Sets textcontent of the element whose id is |destination_id| to |value|.
45 void SetCryptohomeStringProperty(const std::string& destination_id,
46 const std::string& value);
47
48 base::WeakPtrFactory<CryptohomeWebUIHandler> weak_ptr_factory_;
49 DISALLOW_COPY_AND_ASSIGN(CryptohomeWebUIHandler);
50 };
51
52 } // namespace chromeos
53
54 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_CRYPTOHOME_WEB_UI_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698