• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_
7 #pragma once
8 
9 #include <string>
10 
11 #include "base/string_piece.h"
12 
13 class DictionaryValue;
14 class FilePath;
15 class RefCountedBytes;
16 
17 namespace chromeos {
18 
19 // 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
21 // 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
23 // to, there is a case for refactoring it back into LoginUIHTMLSource.
24 class HTMLOperationsInterface {
25  public:
HTMLOperationsInterface()26   HTMLOperationsInterface() {}
~HTMLOperationsInterface()27   virtual ~HTMLOperationsInterface() {}
28 
29   virtual base::StringPiece GetLoginHTML();
30   virtual std::string GetFullHTML(base::StringPiece login_html,
31                                   DictionaryValue* localized_strings);
32   virtual RefCountedBytes* CreateHTMLBytes(std::string full_html);
33 
34  private:
35   DISALLOW_COPY_AND_ASSIGN(HTMLOperationsInterface);
36 };
37 
38 }  // namespace chromeos
39 
40 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_LOGIN_UI_HELPERS_H_
41