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