OLD | NEW |
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_LOGIN_UI_HELPERS_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/string_piece.h" | 11 #include "base/string_piece.h" |
12 | 12 |
13 class DictionaryValue; | |
14 class FilePath; | 13 class FilePath; |
15 class RefCountedBytes; | 14 class RefCountedBytes; |
16 | 15 |
| 16 namespace base { |
| 17 class DictionaryValue; |
| 18 } |
| 19 |
17 namespace chromeos { | 20 namespace chromeos { |
18 | 21 |
19 // This class is used for encapsulating the statics and other other messy | 22 // This class is used for encapsulating the statics and other other messy |
20 // external calls that are required for creating and getting the needed HTML | 23 // external calls that are required for creating and getting the needed HTML |
21 // objects. This allows for easier mocking of this code and allows for | 24 // objects. This allows for easier mocking of this code and allows for |
22 // modularity. Since we don't currently unit the class that this code is related | 25 // modularity. Since we don't currently unit the class that this code is related |
23 // to, there is a case for refactoring it back into LoginUIHTMLSource. | 26 // to, there is a case for refactoring it back into LoginUIHTMLSource. |
24 class HTMLOperationsInterface { | 27 class HTMLOperationsInterface { |
25 public: | 28 public: |
26 HTMLOperationsInterface() {} | 29 HTMLOperationsInterface() {} |
27 virtual ~HTMLOperationsInterface() {} | 30 virtual ~HTMLOperationsInterface() {} |
28 | 31 |
29 virtual base::StringPiece GetLoginHTML(); | 32 virtual base::StringPiece GetLoginHTML(); |
30 virtual std::string GetFullHTML(base::StringPiece login_html, | 33 virtual std::string GetFullHTML(base::StringPiece login_html, |
31 DictionaryValue* localized_strings); | 34 base::DictionaryValue* localized_strings); |
32 virtual RefCountedBytes* CreateHTMLBytes(std::string full_html); | 35 virtual RefCountedBytes* CreateHTMLBytes(std::string full_html); |
33 | 36 |
34 private: | 37 private: |
35 DISALLOW_COPY_AND_ASSIGN(HTMLOperationsInterface); | 38 DISALLOW_COPY_AND_ASSIGN(HTMLOperationsInterface); |
36 }; | 39 }; |
37 | 40 |
38 } // namespace chromeos | 41 } // namespace chromeos |
39 | 42 |
40 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_ | 43 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_ |
OLD | NEW |