Home | History | Annotate | Download | only in cloud_print
      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_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_SOURCE_H_
      6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_SOURCE_H_
      7 
      8 #include <string>
      9 
     10 #include "base/message_loop.h"
     11 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
     12 #include "chrome/common/url_constants.h"
     13 
     14 class CloudPrintSetupSource : public ChromeURLDataManager::DataSource {
     15  public:
     16   CloudPrintSetupSource();
     17   virtual void StartDataRequest(const std::string& path,
     18                                 bool is_incognito,
     19                                 int request_id);
     20 
     21   virtual std::string GetMimeType(const std::string& path) const;
     22 
     23   static const char kInvalidPasswordHelpUrl[];
     24   static const char kCanNotAccessAccountUrl[];
     25   static const char kCreateNewAccountUrl[];
     26 
     27  private:
     28   virtual ~CloudPrintSetupSource() {}
     29 
     30   // Takes a string containing an URL and returns an URL containing a CGI
     31   // parameter of the form "&hl=xy" where 'xy' is the language code of the
     32   // current locale.
     33   std::string GetLocalizedUrl(const std::string& url) const;
     34 
     35   DISALLOW_COPY_AND_ASSIGN(CloudPrintSetupSource);
     36 };
     37 
     38 #endif  // CHROME_BROWSER_PRINTING_CLOUD_PRINT_CLOUD_PRINT_SETUP_SOURCE_H_
     39